/* ═══════════════════════════════════════════════════════
   PRELOADER
   ═══════════════════════════════════════════════════════ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-content {
    text-align: center;
    color: white;
}

.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.preloader-content h3 {
    font-weight: 300;
    letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    flex-wrap: wrap;
}

.nav-brand h2 {
    color: #2c3e50;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
}

.hamburger-btn {
    display: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.nav-menu a:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════ */
.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid #e1e8ed;
}

.btn-secondary:hover {
    background: white;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════════ */
.search-form {
    margin-bottom: 1.5rem;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.search-bar input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 0.875rem 1.5rem !important;
    white-space: nowrap;
}

.clear-search-btn {
    padding: 0.875rem 1.25rem !important;
    white-space: nowrap;
}

.search-result-info {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #eef2ff, #e8f0fe);
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #4a5568;
}

/* ═══════════════════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════════════════ */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-link a:hover {
    color: #764ba2;
}

/* ═══════════════════════════════════════════════════════
   MESSAGES
   ═══════════════════════════════════════════════════════ */
.error-messages {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    color: #721c24;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

.success-message {
    background: linear-gradient(45deg, #84fab0, #8fd3f4);
    color: #155724;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
    box-shadow: 0 4px 15px rgba(132, 250, 176, 0.3);
}

/* ═══════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════ */
.dashboard {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.dashboard h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    word-break: break-word;
}

.stat-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.recent-transactions {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recent-transactions h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

.data-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
}

.data-table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background-color 0.3s ease;
}

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

.data-table a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.data-table a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.action-cell {
    white-space: nowrap;
    display: flex;
    gap: 4px;
}

.status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
}

.status.paid {
    background: linear-gradient(45deg, #84fab0, #8fd3f4);
    color: #155724;
}

.status.udhar {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    color: #721c24;
}

/* ═══════════════════════════════════════════════════════
   BILL CREATE
   ═══════════════════════════════════════════════════════ */
.bill-create {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.bill-create h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.form-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.item-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    flex-wrap: wrap;
}

.item-row .form-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 120px;
}

.item-row .form-group label {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.item-total {
    background: rgba(102, 126, 234, 0.1) !important;
    font-weight: 600;
    color: #2c3e50;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
}

.remove-item {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.remove-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.bill-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    align-items: center;
}

.summary-row.total {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    font-size: 1.4rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Invoice Actions */
.invoice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   LEDGER
   ═══════════════════════════════════════════════════════ */
.ledger {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.ledger h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
    text-align: center;
    padding: 2rem;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    margin-top: 3rem;
    backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET (max-width: 992px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .nav-menu {
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.8rem;
    }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (max-width: 768px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
        gap: 0;
    }

    .hamburger-btn {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-top: 1rem;
        border-top: 1px solid #eee;
        margin-top: 0.75rem;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    .nav-menu a:hover {
        background: linear-gradient(135deg, #eef2ff, #e8f0fe);
        transform: none;
    }

    .nav-menu a::after {
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .item-row {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .item-row .form-group {
        min-width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem 1rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .dashboard,
    .bill-create,
    .ledger {
        padding: 1rem;
        border-radius: 16px;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .container {
        padding: 10px;
    }

    .summary-row {
        font-size: 0.95rem;
    }

    .summary-row.total {
        font-size: 1.15rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar input {
        width: 100%;
    }

    .invoice-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-actions .btn {
        text-align: center;
    }

    .bill-summary {
        padding: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .nav-brand h2 {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.78rem;
    }

    .btn-sm {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.dashboard,
.bill-create,
.auth-card,
.form-section,
.stat-card,
.ledger {
    animation: fadeIn 0.6s ease-out;
}

.stat-card:hover {
    animation: pulse 0.6s ease-in-out;
}

/* ═══════════════════════════════════════════════════════
   LOCK BANNER (shown to locked users)
   ═══════════════════════════════════════════════════════ */
.lock-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 50%, #c0392b 100%);
    color: white;
    text-align: center;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    animation: lockPulse 3s ease-in-out infinite;
    z-index: 1001;
    position: relative;
}

@keyframes lockPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ═══════════════════════════════════════════════════════
   SUPER ADMIN PANEL
   ═══════════════════════════════════════════════════════ */
.admin-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.admin-panel h1 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
}

.admin-subtitle {
    text-align: center;
    color: #6b7c93;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
}

.admin-stat-card.stat-total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.admin-stat-card.stat-active {
    background: linear-gradient(135deg, #84fab0, #8fd3f4);
    color: #155724;
}

.admin-stat-card.stat-locked {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #721c24;
}

.admin-stat-card h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.admin-stat-card .stat-num {
    font-size: 2.2rem;
    font-weight: 700;
}

.users-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.users-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.user-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #e0e0e0;
}

.user-card.locked-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-color: #ffcccc;
}

.user-card.active-card {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdf4 100%);
    border-color: #d4edda;
}

.user-info {
    flex: 1;
    min-width: 200px;
}

.user-info .user-shop {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 4px;
}

.user-info .user-detail {
    font-size: 0.85rem;
    color: #6b7c93;
    line-height: 1.6;
}

.user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background: linear-gradient(135deg, #84fab0, #8fd3f4);
    color: #155724;
}

.badge-locked {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #721c24;
}

.badge-admin {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-actions .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.btn-lock {
    background: linear-gradient(135deg, #ff9a9e, #ee5a52);
    color: white;
    border: none;
}

.btn-lock:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
}

.btn-unlock {
    background: linear-gradient(135deg, #84fab0, #43e97b);
    color: #155724;
    border: none;
}

.btn-unlock:hover {
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.4);
    transform: translateY(-2px);
}

.btn-edit-pass {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    border: none;
}

.btn-edit-pass:hover {
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
}

.btn-delete-user {
    background: linear-gradient(135deg, #636e72, #2d3436);
    color: white;
    border: none;
}

.btn-delete-user:hover {
    box-shadow: 0 4px 15px rgba(45, 52, 54, 0.4);
    transform: translateY(-2px);
}

/* Admin Modal */
.admin-modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.admin-modal-backdrop.show {
    display: flex;
}

.admin-modal {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
}

.admin-modal h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
}

.admin-modal .form-group {
    margin-bottom: 1.25rem;
}

.admin-modal .modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.admin-modal .modal-actions .btn {
    flex: 1;
}

@media (max-width: 768px) {
    .user-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-actions {
        width: 100%;
    }

    .user-actions .btn {
        flex: 1;
        text-align: center;
    }

    .admin-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-modal {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   CUSTOM SCROLLBAR
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

/* ═══════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════ */
@media print {

    .navbar,
    .footer,
    .hamburger-btn,
    .search-form,
    .search-bar,
    .filter-form,
    .btn,
    .action-cell,
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .dashboard,
    .bill-create,
    .ledger {
        box-shadow: none;
        background: white;
    }

    .data-table th {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .status {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}