/* ============================================================
   RENTODOC PLATFORM - MASTER THEME
   Version: 1.0.0 | Single CSS File
============================================================ */

/* --- CSS Variables (Easy to Customize) --- */
:root {
    /* Primary Colors */
    --primary-dark: #0f1e3d;      /* Sidebar Background */
    --primary-blue: #1c3a6e;      /* Header Accent */
    --accent-teal: #2b7a78;       /* Primary Button */
    
    /* Success & Warning */
    --success-green: #28a745;     /* Success State */
    --warning-orange: #fd7e14;    /* Warning State */
    --danger-red: #dc3545;        /* Error State */
    
    /* Backgrounds */
    --bg-body: #f6f9fc;           /* Main Background */
    --bg-sidebar: var(--primary-dark);
    --bg-card: #ffffff;           /* Card Background */
    --bg-hover: #f1f5f9;          /* Hover State */
    
    /* Text Colors */
    --text-heading: #1e293b;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* Borders */
    --border-light: #e2e8f0;
    --border-dark: #cbd5e1;
    
    /* Spacing */
    --sidebar-width-expanded: 200px;
    --sidebar-width-collapsed: 70px;
    --header-height: 70px;
    --container-padding: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;

    --success-green: #28a745;
    --success-green-dark: #1e7e34;

    --info-blue: #17a2b8;
    --info-blue-dark: #117a8b;

    --warning-yellow: #ffc107;
    --warning-yellow-dark: #d39e00;

    --danger-red: #dc3545;
    --danger-red-dark: #a71d2a;    
}

/* --- Global Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 12px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- App Wrapper (Sidebar + Content) --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Collapsible Sidebar --- */
.sidebar {
    width: var(--sidebar-width-expanded);
    background: var(--bg-sidebar);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* COLLAPSED STATE */
.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
    box-shadow: var(--shadow-lg);
}

/* Hide text when collapsed */
.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-category span,
.sidebar.collapsed .user-details {
    opacity: 0;
    pointer-events: none;
}

/* Logo adjustment */
.sidebar.collapsed .logo-link {
    justify-content: center;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    transition: all var(--transition-fast);
    border-right: 3px solid transparent;
}

.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 0.75rem 0;
}

.nav-item a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.nav-item a.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-right-color: var(--accent-teal);
    font-weight: 600;
}

.nav-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    padding: 0.75rem 1.5rem 0.25rem;
    font-weight: 600;
}

.sidebar.collapsed .nav-category {
    display: none;
}

/* --- Toggle Button --- */
.sidebar-toggle-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--accent-teal);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.sidebar.collapsed .sidebar-toggle-btn {
    display: flex;
    right: auto;
    left: -12px;
}

.sidebar-toggle-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

/* --- Main Content Area --- */
.main-area {
    flex: 1;
    margin-left: var(--sidebar-width-expanded);
    transition: margin-left var(--transition-normal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-area {
    margin-left: var(--sidebar-width-collapsed);
}

/* --- Top Header Bar --- */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
}

.sidebar.collapsed ~ .main-area .top-header {
    left: var(--sidebar-width-collapsed);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-heading);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- User Dropdown --- */
.user-profile-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.dropdown-toggle:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
}

.role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item.text-danger {
    color: var(--danger-red);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0.5rem 0;
}

/* --- Content Container --- */
.content-container {
    padding: var(--container-padding);
    flex: 1;
}

/* --- Stats Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border-left: 4px solid var(--accent-teal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card.blue { border-left-color: var(--info-blue); }
.stat-card.green { border-left-color: var(--success-green); }
.stat-card.orange { border-left-color: var(--warning-orange); }
.stat-card.purple { border-left-color: var(--primary-blue); }

.stat-icon-lg {
    width: 56px;
    height: 56px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.stat-icon-lg i {
    font-size: 1rem;
    color: var(--primary-blue);
}

.stat-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-action {
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 600;
}

/* --- Quick Actions --- */
.quick-actions-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-teal);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--accent-teal) 0%, var(--primary-blue) 100%);
    border: none;
    color: white;
}

.action-icon-lg {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.action-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.action-text p {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}


.btn-primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background: #18325c;
    border-color: #18325c;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    :root {
        --sidebar-width-expanded: 260px;
        --sidebar-width-collapsed: 260px;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    .main-area {
        margin-left: 0 !important;
    }

    .top-header {
        left: 0 !important;
    }
}

/* --- Print Styles --- */
@media print {
    .sidebar, .top-header, .no-print {
        display: none !important;
    }

    .main-area {
        margin-left: 0;
    }

    body {
        background: white;
    }

    .stat-card, .data-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================================
   RENTODOC PLATFORM - MASTER THEME
============================================================ */

/* --- SIDEBAR TOGGLE BUTTON STYLES (CRITICAL) --- */
.sidebar-toggle-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--accent-teal);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 1001;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Make sure button is ALWAYS visible on desktop */
@media (min-width: 993px) {
    .sidebar-toggle-btn {
        display: flex !important;
    }
}

.sidebar.collapsed .sidebar-toggle-btn {
    right: auto;
    left: -12px;
    box-shadow: -1px 2px 4px rgba(0,0,0,0.3);
}

.sidebar-toggle-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: #3a9a98;
}

.sidebar-toggle-btn i {
    font-size: 0.8rem;
}

/* ============================================================
   RENTODOC PLATFORM - SIDEBAR COLLAPSED STATE (FIXED)
============================================================ */

/* --- SIDEBAR BASE --- */
.sidebar {
    width: var(--sidebar-width-expanded);
    background: var(--bg-sidebar);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* COLLAPSED STATE - ICONS MUST BE VISIBLE */
.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
    box-shadow: var(--shadow-lg);
}

/* Keep icons visible when collapsed! */
.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-category span,
.sidebar.collapsed .user-details {
    opacity: 0;
    pointer-events: none;
    display: none !important; /* Force hide text completely */
}

/* Logo Icon - ALWAYS Visible */
.sidebar.collapsed .logo-link {
    justify-content: center;
    padding: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem !important; /* Increase icon size for collapsed */
}

/* Nav Item Icons - Center & Size Correctly */
.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 0.75rem 0;
    gap: 0; /* Remove gap since only icon */
}

.nav-item a i {
    font-size: 1.1rem;
    width: auto;
    min-width: auto;
}

.sidebar.collapsed .nav-item a i {
    font-size: 1.3rem; /* Larger icons when collapsed */
    margin: 0;
    opacity: 1; /* Always visible */
    color: rgba(255,255,255,0.8);
}

.nav-item a:hover i {
    color: white !important;
    transform: scale(1.1);
}

/* Category Labels - Hidden in Collapsed */
.sidebar.collapsed .nav-category {
    display: none !important;
}

/* Toggle Button - Always Visible */
.sidebar-toggle-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--accent-teal);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 1001;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Move toggle to LEFT when collapsed */
.sidebar.collapsed .sidebar-toggle-btn {
    right: auto;
    left: -12px;
    box-shadow: -1px 2px 4px rgba(0,0,0,0.3);
}

.sidebar-toggle-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: #3a9a98;
}

.sidebar-toggle-btn i {
    font-size: 0.7rem;
}

/* Mobile Responsive Override */
@media (max-width: 992px) {
    .sidebar-toggle-btn {
        display: none !important; /* Hide desktop toggle on mobile */
    }
    
    .mobile-menu-toggle {
        display: inline-flex !important;
    }
}

/* Print Styles */
@media print {
    .sidebar, .top-header, .no-print {
        display: none !important;
    }
}
.sidebar-header{
    font-size: 24px;
    font-weight: bolder;
    color: #fff;
    background: #fff;
}

/* ============================================================
   RENTODOC PLATFORM - MASTER THEME (UPDATED FONT SIZES)
============================================================ */

/* --- CSS Variables (FONT SIZES REDUCED) --- */
:root {
    /* Primary Colors */
    --primary-dark: #0f1e3d;      /* Sidebar Background */
    --primary-blue: #1c3a6e;      /* Header Accent */
    --accent-teal: #2b7a78;       /* Primary Button */
    
    /* Success & Warning */
    --success-green: #28a745;     /* Success State */
    --warning-orange: #fd7e14;    /* Warning State */
    --danger-red: #dc3545;        /* Error State */
    
    /* Backgrounds */
    --bg-body: #f6f9fc;           /* Main Background */
    --bg-sidebar: var(--primary-dark);
    --bg-card: #ffffff;           /* Card Background */
    --bg-hover: #f1f5f9;          /* Hover State */
    
    /* Text Colors */
    --text-heading: #1e293b;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* Borders */
    --border-light: #e2e8f0;
    --border-dark: #cbd5e1;
    
    /* Spacing */
    --sidebar-width-expanded: 200px;
    --sidebar-width-collapsed: 70px;
    --header-height: 65px;
    --container-padding: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
}

/* --- GLOBAL FONT SIZE ADJUSTMENTS --- */
html {
    font-size: 14px !important;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.875rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- SIDEBAR NAVIGATION ITEMS (SMALLER) --- */
.nav-item a {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    gap: 0.75rem;
}

.sidebar-toggle-btn {
    width: 22px;
    height: 22px;
    font-size: 0.7rem !important;
}

.nav-category {
    font-size: 0.65rem;
    padding: 0.6rem 1.5rem 0.25rem;
}

.brand-name {
    font-size: 1.1rem !important;
}

/* --- TOP HEADER (SMALLER) --- */
.top-header {
    height: var(--header-height);
    padding: 0 var(--container-padding);
}

.page-title {
    font-size: 1.3rem !important;
    margin-bottom: 0;
}

.user-details span {
    font-size: 0.8rem !important;
}

.username {
    font-size: 0.85rem !important;
}

.role {
    font-size: 0.7rem !important;
}

.dropdown-item {
    font-size: 0.85rem !important;
}

/* --- BUTTONS (SMALLER) --- */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem !important;
    border-radius: var(--radius-sm);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem !important;
}

/* --- CONTENT CONTAINER --- */
.content-container {
    padding: var(--container-padding);
}

/* --- STATS CARDS (SMALLER) --- */
.stat-card {
    padding: 1.25rem;
}

.stat-icon-lg {
    width: 48px;
    height: 48px;
}

.stat-icon-lg i {
    font-size: 1.25rem !important;
}

.stat-title {
    font-size: 0.8rem !important;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.25rem !important;
}

.stat-action {
    font-size: 0.8rem !important;
}

/* --- QUICK ACTIONS (SMALLER) --- */
.quick-actions-section {
    padding: 1.25rem;
}

.section-title {
    font-size: 1.15rem !important;
    margin-bottom: 1.25rem;
}

.action-btn {
    padding: 1.5rem 1rem;
}

.action-icon-lg {
    font-size: 2rem !important;
}

.action-text h3 {
    font-size: 0.95rem !important;
    margin-bottom: 0.4rem;
}

.action-text p {
    font-size: 0.75rem !important;
}

/* --- DATA TABLES (SMALLER COLUMNS) --- */
.data-table {
        width: 100%;
        border-collapse: collapse;
        background: white;
        box-shadow: var(--shadow-sm);
        border-radius: var(--radius-md);
        overflow: hidden;
        font-size: 0.85rem;
}

.data-table th {
        background: var(--bg-hover);
        color: var(--text-heading);
        font-weight: 600;
        padding: 12px 15px;
        text-align: left;
        font-size: 0.85rem;
}

.data-table td {
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-light);
        color: var(--text-primary);
        vertical-align: middle;
}
    .data-table tbody tr:hover {
        background: var(--bg-hover);
    }


/* --- FORM INPUTS (SMALLER) --- */
.form-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem !important;
    width:100%;
}

form .form-group label {
    font-size: 0.85rem !important;
}

form input,
form select,
form textarea {
    font-size: 0.85rem !important;
    padding: 0.6rem 0.85rem;
}

/* --- MOBILE RESPONSIVE (MINIMALLY CHANGED) --- */
@media (max-width: 992px) {
    .page-title {
        font-size: 1.15rem !important;
    }
    
    .btn {
        font-size: 0.75rem !important;
    }
}

/* --- PRINT STYLES --- */
@media print {
    html {
        font-size: 12px !important;
    }
    
    body {
        font-size: 0.85rem !important;
    }
}

    .export-btn {
        background: linear-gradient(135deg, #2b7a78 0%, #1f5f5d 100%);
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        transition: all 0.2s;
    }
    
    .export-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(43, 122, 120, 0.3);
    }

.btn-success {
    background: var(--success-green);
    color: white;
    border-color: var(--success-green);
}
.btn-success:hover {
    background: var(--success-green-dark);
    border-color: var(--success-green-dark);
}

.btn-info {
    background: var(--info-blue);
    color: white;
    border-color: var(--info-blue);
}
.btn-info:hover {
    background: var(--info-blue-dark);
    border-color: var(--info-blue-dark);
}

.btn-warning {
    background: var(--warning-yellow);
    color: #212529; /* dark text for readability */
    border-color: var(--warning-yellow);
}
.btn-warning:hover {
    background: var(--warning-yellow-dark);
    border-color: var(--warning-yellow-dark);
    color: #212529;
}

.btn-danger {
    background: var(--danger-red);
    color: white;
    border-color: var(--danger-red);
}
.btn-danger:hover {
    background: var(--danger-red-dark);
    border-color: var(--danger-red-dark);
}
.btn-outline-success {
    background: transparent;
    color: var(--success-green);
    border-color: var(--success-green);
}
.btn-outline-success:hover {
    background: var(--success-green);
    color: white;
}

.btn-outline-info {
    background: transparent;
    color: var(--info-blue);
    border-color: var(--info-blue);
}
.btn-outline-info:hover {
    background: var(--info-blue);
    color: white;
}

.btn-outline-warning {
    background: transparent;
    color: var(--warning-yellow-dark);
    border-color: var(--warning-yellow);
}
.btn-outline-warning:hover {
    background: var(--warning-yellow);
    color: #212529;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-red);
    border-color: var(--danger-red);
}
.btn-outline-danger:hover {
    background: var(--danger-red);
    color: white;
}
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-danger {
    transition: all 0.2s ease-in-out;
}   

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.audit-table th {
    background: var(--bg-hover);
    padding: 10px;
    text-align: left;
}

.audit-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
}

.audit-table tr:hover {
    background: var(--bg-hover);
}

/* badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
}

.badge-success { background: #16a34a; }
.badge-warning { background: #f59e0b; }
.badge-danger  { background: #dc2626; }

/* diff styling */
.audit-diff {
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
}

.diff-row {
    margin-bottom: 10px;
    padding: 8px;
    border-left: 3px solid #ccc;
}

.field {
    font-weight: 600;
    margin-bottom: 4px;
}

.old {
    color: #dc2626;
    font-size: 0.8rem;
}

.new {
    color: #16a34a;
    font-size: 0.8rem;
}

.json-box {
    background: #111827;
    color: #e5e7eb;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.75rem;
}

.view-link {
    cursor: pointer;
    color: var(--primary-blue);
}

.no-data {
    color: var(--text-secondary);
}

.leaderboard-table {
    width:100%;
    border-collapse: collapse;
    margin-top:10px;
}

.leaderboard-table th {
    background:#007bff;
    color:white;
    padding:8px;
    font-size:0.85rem;
}

.leaderboard-table td {
    padding:8px;
    border-bottom:1px solid #eee;
    text-align:center;
}

.top1 { background:#fff9c4; font-weight:bold; }
.top2 { background:#e3f2fd; }
.top3 { background:#fce4ec; }
.premium-card {
    padding:20px;
}

.subtle {
    font-size:0.8rem;
    color:#888;
}

/* VS BOX */
.vs-box {
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:linear-gradient(135deg,#007bff,#00c6ff);
    color:white;
    padding:15px;
    border-radius:12px;
    margin-bottom:20px;
}

.vs {
    font-weight:bold;
    font-size:18px;
}

/* LEADERBOARD */
.leaderboard-list {
    display:flex;
    flex-direction:column;
    gap:10px;
}

.leader-row {
    display:grid;
    grid-template-columns:60px 1fr 2fr 100px;
    align-items:center;
    padding:12px;
    border-radius:10px;
    background:#f9f9f9;
    transition:0.2s;
}

.leader-row:hover {
    background:#eef5ff;
    transform:translateX(3px);
}

/* TOP 3 SPECIAL */
.rank-1 {
    background:linear-gradient(135deg,#fff3cd,#ffeeba);
    font-weight:bold;
}

.rank-2 {
    background:#e3f2fd;
}

.rank-3 {
    background:#fce4ec;
}

/* USER */
.user small {
    display:block;
    color:#777;
    font-size:0.75rem;
}

/* BAR */
.bar {
    height:6px;
    background:#ddd;
    border-radius:10px;
    overflow:hidden;
    margin:3px 0;
}

.bar div {
    height:100%;
    background:linear-gradient(90deg,#28a745,#00ff88);
}

/* METRIC */
.metric {
    font-size:0.8rem;
}

.metric label {
    font-size:0.7rem;
    color:#666;
}

/* EARNINGS */
.earnings {
    font-weight:bold;
    color:#28a745;
}

input:read-only,
textarea:read-only,
select:disabled {
    background-color: #eef1f5;
    border: 1px solid #d6d9de;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 1; /* override browser fade */
}
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}
.btn-icon
{
    cursor: pointer;
}

.finance-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    padding: 16px;
    border-radius: 12px;
    color: white;
    box-shadow: var(--shadow-sm);
}

.card .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.card .value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 5px;
}

/* Colors */
.card.total { background: #2563eb; }
.card.received { background: #16a34a; }
.card.pending { background: #dc2626; }
.card.challan { background: #7c3aed; }

.status-strip {
    margin-bottom: 15px;
}

.badge {
    padding: 6px 10px;
    border-radius: 20px;
    margin-right: 8px;
    font-size: 0.75rem;
}

.badge.success { background: #d1fae5; color: #065f46; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.warning { background: #fef3c7; color: #92400e; }


.btn-back {
    display: inline-block;
    padding: 8px 16px;
    background: #eef2ff;
    color: #2563eb;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.btn-back:hover {
    background: #2563eb;
    color: #fff;
}
