@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #235a94;
    --primary-hover: #1d4a7a;
    --primary-light: rgba(35, 90, 148, 0.15);
    --secondary: #1f7fd3;
    --secondary-hover: #1669b0;
    --bg-main: #f8fafc;
    --sidebar-bg: #235a94;
    --sidebar-item-hover: rgba(255, 255, 255, 0.1);
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-family: 'Calibri', 'Segoe UI', sans-serif;
}

/* Override Tailwind slate colors to use black */
.text-slate-900, .text-slate-800, .text-slate-700, .text-slate-600 {
    color: rgb(0, 0, 0) !important;
}
.text-slate-500, .text-slate-400, .text-slate-300, .text-slate-200 {
    color: rgb(124, 118, 118) !important;
}
.text-slate-100 {
    color: rgb(200, 200, 200) !important;
}
.bg-slate-900, .bg-slate-800, .bg-slate-700, .bg-slate-600 {
    background-color: (39, 224, 224) !important;
}
.bg-slate-500, .bg-slate-400, .bg-slate-300, .bg-slate-200, .bg-slate-100, .bg-slate-50 {
    background-color: rgb(230, 230, 230) !important;
}
.border-slate-900, .border-slate-800, .border-slate-700, .border-slate-600, .border-slate-500, .border-slate-400, .border-slate-300, .border-slate-200, .border-slate-100 {
    border-color: rgb(180, 180, 180) !important;
}
.hover\:bg-slate-50:hover {
    background-color: rgb(240, 240, 240) !important;
}
.hover\:bg-slate-100:hover {
    background-color: rgb(220, 220, 220) !important;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Sidebar Styling - Dark Executive */
#revifySidebar {
    background-color: var(--sidebar-bg) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}

#revifySidebar .text-white,
#revifySidebar .text-slate-900 {
    color: #ffffff !important;
}

#revifySidebar .text-slate-400, 
#revifySidebar .text-slate-500,
#revifySidebar .text-muted {
    color: #94a3b8 !important;
}

#revifySidebar a, 
#revifySidebar button[data-revify-collapse] {
    color: #e2e8f0 !important;
    transition: all 0.2s ease;
}

#revifySidebar a:hover, 
#revifySidebar button[data-revify-collapse]:hover {
    background-color: var(--sidebar-item-hover) !important;
    color: #ffffff !important;
}

#revifySidebar .bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

#revifySidebar .border-white\/10,
#revifySidebar .border-slate-100 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Specific Menu Item Active/Hover */
#revifySidebar a.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Logo Container Integration Green */
.logo-container {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Topbar Styling */
header {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color) !important;
}

header .text-white {
    color: var(--text-main) !important;
}

header .text-slate-400 {
    color: var(--text-muted) !important;
}

header .border-white\/10 {
    border-color: var(--border-color) !important;
}

/* Cards Refinement */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-secondary {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover) !important;
    border-color: var(--secondary-hover) !important;
}

/* Metric Cards */
.metric-card {
    border-left: 4px solid var(--primary);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Table Refinement */
.table thead th {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    border-bottom-width: 1px;
    font-family: 'Calibri', 'Segoe UI', sans-serif !important;
}

.table tbody td {
    border-bottom: 1px solid var(--border-color);
    font-family: 'Calibri', 'Segoe UI', sans-serif !important;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table-sm th, .table-sm td {
    padding: 0.5rem 0.75rem;
}

.table-responsive {
    overflow-x: auto;
}

.text-end {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* Form Controls */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 4px 6px -1px rgba(33, 130, 85, 0.2);
}

.btn-secondary {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover) !important;
    border-color: var(--secondary-hover) !important;
}

.btn-outline-primary {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: #e2e8f0;
    color: #64748b;
}

.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-link {
    color: var(--primary);
    background: none;
    border: none;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.w-100 {
    width: 100%;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.py-2\.5 {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.px-10 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

/* Icons */
.fas, .far, .fal, .fab {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Card refinements */
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
}

.card-body {
    padding: 1.5rem;
}

.border-none {
    border: none !important;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.rounded-\[20px\] {
    border-radius: 20px;
}

.rounded-xl {
    border-radius: 12px;
}

.overflow-hidden {
    overflow: hidden;
}

/* Utility classes */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 0.75rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.me-2 {
    margin-right: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.g-2 {
    gap: 0.5rem;
}

.g-3 {
    gap: 0.75rem;
}

.g-4 {
    gap: 1rem;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

.align-items-end {
    align-items: flex-end;
}

.justify-content-between {
    justify-content: space-between;
}

.h-100 {
    height: 100%;
}

.text-muted {
    color: #64748b !important;
}

/* Sortable headers */
.th-sort {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.th-sort:hover {
    color: var(--primary);
}

/* Input Group */
.input-group {
    display: flex;
    position: relative;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.input-group > .form-control {
    position: relative;
    flex: 1;
    min-width: 0;
}

.input-group > .form-control:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.input-group > .form-control:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-right: 1px solid var(--border-color);
}

.rounded-l-xl {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

.rounded-r-xl {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* Grid utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.row > * {
    padding: 0.5rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 48.666667%; max-width: 48.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }

.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-sm-3 { flex: 0 0 25%; max-width: 25%; }

/* Spacing utilities */
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-8 { margin-top: 2rem !important; }
.pt-4 { padding-top: 1rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.pb-4 { padding-bottom: 1rem !important; }

.g-2 { gap: 0.5rem; }
.g-3 { gap: 0.75rem; }
.g-4 { gap: 1rem; }

.me-2 { margin-right: 0.5rem; }
.ms-2 { margin-left: 0.5rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* Flex utilities */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }

/* Border utilities */
.border { border: 1px solid var(--border-color) !important; }
.border-t { border-top: 1px solid var(--border-color) !important; }
.border-b { border-bottom: 1px solid var(--border-color) !important; }
.border-slate-100 { border-color: #f1f5f9 !important; }
.border-slate-200 { border-color: #e2e8f0 !important; }
.border-slate-700 { border-color: #334155 !important; }

/* Text utilities */
.fw-bold { font-weight: 700 !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.ls-1 { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Colors */
.bg-white { background-color: #ffffff !important; }
.bg-slate-50 { background-color: #f8fafc !important; }
.bg-slate-900 { background-color: #0f172a !important; }
.bg-slate-800 { background-color: #1e293b !important; }
.bg-emerald-900 { background-color: #1a3a5c !important; }
.bg-emerald-50 { background-color: #eff6ff !important; }
.bg-emerald-100 { background-color: #dbeafe !important; }
.text-emerald-700 { color: #235a94 !important; }
.text-emerald-600 { color: #1d4a7a !important; }
.text-emerald-500 { color: #235a94 !important; }
.border-emerald-100 { border-color: #bfdbfe !important; }
.border-emerald-200 { border-color: #93c5fd !important; }
.hover\:bg-emerald-100:hover { background-color: #dbeafe !important; }

.text-white { color: #ffffff !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-slate-500 { color: #64748b !important; }
.text-slate-600 { color: #475569 !important; }
.text-slate-800 { color: #1e293b !important; }
.text-emerald-300 { color: #93c5fd !important; }
.text-emerald-400 { color: #60a5fa !important; }

/* Hover states */
.hover\:bg-slate-50:hover { background-color: #f8fafc !important; }
.hover\:border-slate-300:hover { border-color: #cbd5e1 !important; }
.transition-all { transition: all 0.2s ease !important; }
.transition-colors { transition: background-color 0.15s, color 0.15s !important; }

/* Shadows */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important; }
.shadow-\[0_4px_6px_-1px_rgba\(33\2c_130\2c_85\2c_0\.2\)\] { --tw-shadow: 0 4px 6px -1px rgba(35, 90, 148, 0.2); }
.shadow-emerald-500\/30 { --tw-shadow-color: rgba(35, 90, 148, 0.3) !important; }
.shadow-emerald-700\/20 { --tw-shadow-color: rgba(35, 90, 148, 0.2) !important; }
.shadow-emerald-500\/20 { --tw-shadow-color: rgba(35, 90, 148, 0.2) !important; }
.shadow-emerald-600\/20 { --tw-shadow-color: rgba(35, 90, 148, 0.2) !important; }

/* Heights */
.h-10 { height: 2.5rem !important; }
.w-10 { width: 2.5rem !important; }
.h-\[46px\] { height: 46px !important; }
.h-100 { height: 100%; }

/* Widths */
.w-100 { width: 100%; }

/* Gradients - Override with direct background */
.bg-gradient-to-br,
.from-emerald-500,
.to-emerald-600,
div[class*="bg-gradient"] {
    background: linear-gradient(135deg, #235a94, #1d4a7a) !important;
}

/* Border radius */
.rounded-xl { border-radius: 12px; }
.rounded-\[20px\] { border-radius: 20px; }
.rounded-2xl { border-radius: 16px; }
.rounded-3xl { border-radius: 24px; }

/* Icons */
.fa-caret-up::before { content: "\f0d7"; transform: rotate(180deg); display: inline-block; }
.fa-caret-down::before { content: "\f0d7"; }
.fa-sort::before { content: "\f0dc"; }
.fa-sort-asc::before { content: "\f0de"; }
.fa-sort-desc::before { content: "\f0dd"; }

/* Table sort icons */
.fa-caret-up, .fa-caret-down {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

/* Sidebar hide/show */
#mainContent {
    margin-left: 18rem;
}

body.sidebar-closed #mainContent {
    margin-left: 0;
}

/* Desktop: show sidebar by default */
@media (min-width: 1024px) {
    #revifySidebar {
        transform: translateX(0) !important;
    }
    
    body.sidebar-closed #revifySidebar {
        transform: translateX(-100%) !important;
    }
}

@media (max-width: 1023px) {
    #mainContent {
        margin-left: 0;
    }
}
