/* GPS Track Admin - Premium UI Design */
/* FeRgAnI Studio © 2024-2025 */

:root {
    /* Modern color palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --danger: #ef4444;
    --secondary: #64748b;
    --light: #f8fafc;
    --dark: #0f172a;
    --white: #ffffff;
    --border: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Premium effects */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Premium Navbar */
.navbar {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.navbar-brand a {
    color: var(--white);
    font-size: 1.375rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    gap: 0.25rem;
}

.navbar-menu a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar-menu a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-menu a.active {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.navbar-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.025em;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--white);
}

.btn-success:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Premium Cards */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    border: 1px solid var(--border);
}

.detail-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.detail-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

/* Premium Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Кликабельные карточки — ссылки без оформления */
a.stat-card.stat-clickable {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.stat-card.stat-clickable:hover {
    border-color: var(--primary-light);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.18);
}

a.stat-card.stat-clickable:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-online .stat-value {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-warning .stat-value {
    color: var(--warning);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

table th,
table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

table tr {
    transition: all 0.2s ease;
}

table tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

table tr:last-child td {
    border-bottom: none;
}

.table-sm th,
.table-sm td {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Overdue rows */
.overdue-row {
    background: rgba(239, 68, 68, 0.08) !important;
    border-left: 4px solid var(--danger);
}

.overdue-row:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

.overdue-badge {
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Small form controls */
.form-control-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    background: var(--white);
}

.close-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Premium Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%);
    color: #059669;
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #b45309;
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #dc2626;
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-light {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Premium Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.25s ease;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

/* Filters */
.filters {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form select,
.filter-form input {
    padding: 0.625rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--white);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.info-box h4 {
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-box p {
    margin: 0.25rem 0;
    color: var(--gray-600);
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem 1.5rem;
}

.detail-card dt {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.875rem;
}

.detail-card dd {
    font-weight: 600;
    color: var(--gray-800);
}

/* Token Display Box */
.token-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--success);
    margin-bottom: 2rem;
    animation: token-pulse 2s ease-in-out infinite;
}

@keyframes token-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 30px 8px rgba(16, 185, 129, 0.2);
    }
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.token-header h3 {
    margin: 0;
    color: var(--success);
    font-size: 1.1rem;
}

.token-timer {
    background: var(--success);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.token-value {
    background: var(--gray-900);
    color: #4ade80;
    padding: 1.25rem;
    border-radius: var(--radius);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.95rem;
    word-break: break-all;
    margin-bottom: 1rem;
    user-select: all;
}

.token-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.token-actions small {
    color: var(--gray-500);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.pagination a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.flash-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.flash-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Section Headers */
.history-section {
    margin-top: 2.5rem;
}

.history-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

/* Admin Actions */
.admin-actions {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.admin-actions h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Quick Actions */
.quick-actions {
    margin-top: 2.5rem;
}

.quick-actions h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--gray-700);
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 2rem;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray-500);
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-600);
}

/* Disabled State */
tr.disabled {
    opacity: 0.5;
}

/* Premium Footer - FeRgAnI Studio */
.fergani-footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 0.75rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-studio {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 0.25rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Login Page Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-footer-studio {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--gray-500);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-menu a {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 1rem;
    }

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

    .stat-card {
        padding: 1rem;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Print styles */
@media print {

    .navbar,
    .fergani-footer,
    .btn,
    .filters {
        display: none !important;
    }

    body {
        background: white;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   EXTENDED RENTAL CARD STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Two-column layout: Form + Receipt */
.rental-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.rental-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.rental-form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-100);
}

.rental-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rental-form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Receipt Panel (Fixed Sidebar) */
.receipt-panel {
    position: sticky;
    top: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.receipt-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 1rem;
}

.receipt-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.receipt-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

.receipt-items {
    margin: 1rem 0;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-item-label {
    color: var(--gray-600);
    font-weight: 500;
}

.receipt-item-value {
    font-weight: 700;
    color: var(--gray-800);
}

.receipt-total {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    text-align: center;
}

.receipt-total-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.receipt-total-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

/* Payment Section */
.payment-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-200);
}

.payment-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.payment-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.payment-summary-item.highlight {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-history {
    margin-top: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.payment-record {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

/* Multi-select component */
.multi-select-panel {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.multi-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.multi-select-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.multi-select-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.multi-select-item-name {
    font-weight: 600;
    color: var(--gray-800);
}

.multi-select-item-price {
    color: var(--success);
    font-weight: 700;
}

.multi-select-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

.quantity-control button {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.quantity-control button:hover {
    background: var(--primary);
    color: var(--white);
}

.quantity-control input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
}

/* Damage selector */
.damage-selector {
    margin-top: 1rem;
}

.damage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.damage-item-info {
    flex: 1;
}

.damage-item-name {
    font-weight: 600;
    color: var(--danger);
}

.damage-item-cost {
    font-weight: 700;
    color: var(--danger);
}

/* Discount badges */
.discount-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%);
    color: #059669;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Location selector */
.location-selector {
    display: flex;
    gap: 1rem;
}

.location-selector .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Settings checkboxes */
.settings-checkboxes {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .rental-grid {
        grid-template-columns: 1fr;
    }

    .receipt-panel {
        position: relative;
        top: 0;
    }

    .location-selector {
        flex-direction: column;
    }

    /* ═══════════════════════════════════════════════════════════════════════════════
   PHASE 6: ASSIGNMENT DETAIL & MODALS
   ═══════════════════════════════════════════════════════════════════════════════ */

    /* Assignment Detail View */
    .header-actions {
        display: flex;
        gap: 10px;
    }

    .status-badge {
        padding: 12px 20px;
        border-radius: var(--radius);
        font-weight: 600;
        text-align: center;
        margin-bottom: 20px;
        font-size: 16px;
    }

    .status-active {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }

    .status-closed {
        background: linear-gradient(135deg, #64748b 0%, #475569 100%);
        color: white;
    }

    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        margin-top: 15px;
    }

    .damages-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
    }

    .damages-table th,
    .damages-table td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    .damages-table th {
        background: var(--gray-100);
        font-weight: 600;
    }

    .damages-table tfoot {
        background: var(--gray-50);
        font-weight: bold;
    }

    /* Modal Base Styles */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
    }

    .modal-content {
        background: white;
        margin: 5% auto;
        padding: 30px;
        border-radius: var(--radius-lg);
        max-width: 600px;
        box-shadow: var(--shadow-lg);
        animation: modalSlideIn 0.3s ease;
    }

    .modal-large {
        max-width: 800px;
    }

    @keyframes modalSlideIn {
        from {
            transform: translateY(-50px);
            opacity: 0;
        }

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

    .modal h2,
    .modal h3 {
        margin-bottom: 20px;
        color: var(--dark);
    }

    .close {
        color: var(--gray-400);
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.2s;
    }

    .close:hover,
    .close:focus {
        color: var(--dark);
    }

    /* Extension Modal Specific */
    .extension-cost-display {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 20px;
        border-radius: var(--radius);
        text-align: center;
        margin: 20px 0;
    }

    .cost-value {
        font-size: 32px;
        font-weight: bold;
        display: inline-block;
        margin-left: 10px;
    }

    /* Closure Modal Specific */
    .form-section {
        margin-bottom: 30px;
        padding-bottom: 30px;
        border-bottom: 2px solid var(--border);
    }

    .form-section:last-of-type {
        border-bottom: none;
    }

    .damage-row {
        display: grid;
        grid-template-columns: 2fr 1fr 2fr auto;
        gap: 10px;
        margin-bottom: 10px;
        align-items: center;
    }

    .damage-type,
    .damage-cost,
    .damage-note {
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: 14px;
    }

    .btn-icon {
        padding: 8px 12px;
        background: var(--danger);
        color: white;
        border: none;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.2s;
    }

    .btn-icon:hover {
        background: #dc2626;
        transform: scale(1.05);
    }

    .damages-total {
        background: var(--gray-100);
        padding: 15px;
        border-radius: var(--radius);
        margin-top: 15px;
        text-align: right;
        font-size: 18px;
    }

    .damages-total strong {
        color: var(--primary);
    }

    /* Payment Summary */
    .payment-summary {
        background: var(--light);
        padding: 20px;
        border-radius: var(--radius);
        margin: 20px 0;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }

    .summary-row:last-child {
        border-bottom: none;
    }

    .damage-add {
        color: var(--danger);
    }

    .total-row {
        font-size: 20px;
        padding-top: 15px;
        border-top: 2px solid var(--dark);
        margin-top: 10px;
    }

    .modal-actions {
        display: flex;
        gap: 10px;
        margin-top: 30px;
        justify-content: flex-end;
    }

    /* Receipt Panel Extensions */
    .receipt-status {
        text-align: center;
        margin-bottom: 20px;
    }

    .badge {
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
    }

    .badge-primary {
        background: var(--primary);
        color: white;
    }

    .badge-success {
        background: var(--success);
        color: white;
    }

    .payment-info {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 2px solid var(--border);
    }

    .payment-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
    }

    .payment-row.debt {
        color: var(--danger);
        font-weight: bold;
    }

    .payment-row.overpaid {
        color: var(--success);
    }

    .deposit-info {
        background: var(--warning);
        color: white;
        padding: 15px;
        border-radius: var(--radius);
        margin-top: 15px;
        text-align: center;
    }

    .assignment-meta {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        font-size: 12px;
        color: var(--gray-500);
    }

    /* Responsive */
    @media (max-width: 768px) {
        .damage-row {
            grid-template-columns: 1fr;
        }

        .modal-content {
            margin: 10px;
            padding: 20px;
        }

        .btn-icon {
            width: 100%;
            margin-top: 5px;
        }
    }

}
/* Phase 7: Payment Schedule */
.payment-schedule { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-top: 20px; }
.schedule-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.summary-card { background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%); padding: 15px; border-radius: 6px; }
.summary-card.overdue-card { background: linear-gradient(135deg, #fee 0%, #fcc 100%); border: 2px solid #f44336; }
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th { padding: 12px; background: #f5f5f5; text-align: left; }
.schedule-table td { padding: 12px; border-bottom: 1px solid #e0e0e0; }
.schedule-row.row-paid { background: rgba(76, 175, 80, 0.05); }
.schedule-row.row-overdue { background: rgba(244, 67, 54, 0.05); }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-paid { background: #d4edda; color: #155724; }
.status-overdue { background: #f8d7da; color: #721c24; }
.status-partial { background: #fff3cd; color: #856404; }
.status-pending { background: #d1ecf1; color: #0c5460; }
.progress-bar { width: 100%; height: 10px; background: #e0e0e0; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #4caf50 0%, #667eea 100%); transition: width 0.5s ease; }
.payment-info-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px; border-radius: 6px; margin-bottom: 20px; }

/* Phase 8: Payment History */
.payment-history { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-top: 15px; }
.payment-history h3 { margin-bottom: 15px; color: #667eea; }
.payment-history.empty { text-align: center; padding: 30px; }
.payments-summary { display: flex; gap: 20px; margin-bottom: 15px; padding: 15px; background: #f5f9ff; border-radius: 6px; }
.payments-summary .summary-item { flex: 1; }
.payments-summary .label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.payments-summary .amount { color: #4caf50; font-size: 20px; }
.payments-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.payments-table th { padding: 10px; background: #f5f5f5; text-align: left; font-size: 13px; border-bottom: 2px solid #ddd; }
.payments-table td { padding: 10px; border-bottom: 1px solid #eee; }
.payments-table tbody tr:hover { background: #f9f9f9; }
.payments-table .total-row { background: #f5f9ff; font-weight: bold; }
.payment-actions { margin-top: 15px; }
.payment-summary-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px; border-radius: 6px; margin-bottom: 20px; text-align: center; }
.payment-summary-banner .banner-row { display: flex; justify-content: center; align-items: center; gap: 10px; }

/* Phase 9: Client Detail Page */
.client-badges { display: flex; gap: 10px; margin-bottom: 20px; }
.client-detail-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.client-info, .client-history { display: flex; flex-direction: column; gap: 20px; }
.info-card, .history-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.info-card h3, .history-card h3 { margin-bottom: 15px; color: #667eea; }
.info-rows { display: flex; flex-direction: column; gap: 12px; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.info-row .label { color: #666; font-size: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.stat-item { text-align: center; padding: 15px; background: #f5f9ff; border-radius: 6px; }
.stat-item.warning { background: #fff3cd; }
.stat-value { font-size: 24px; font-weight: bold; color: #667eea; margin-bottom: 5px; }
.stat-item.warning .stat-value { color: #ff9800; }
.stat-label { font-size: 13px; color: #666; }
.history-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.history-table th { padding: 10px; background: #f5f5f5; text-align: left; font-size: 13px; border-bottom: 2px solid #ddd; }
.history-table td { padding: 10px; border-bottom: 1px solid #eee; }
.history-table tbody tr:hover { background: #f9f9f9; }
.type-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.type-badge.rental { background: #e3f2fd; color: #1976d2; }
.type-badge.buyout { background: #fff3e0; color: #f57c00; }
.alert-danger { background: #fee; border-left: 4px solid #f44336; }


/* ===== LOGIN PAGE CENTERING (Phase 21: Logo & Layout Fix) ===== */
body.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    background: var(--gradient-dark);
}

.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-box h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.login-box h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.login-box .form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

.login-box .form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.login-box .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.login-box .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.navbar-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    vertical-align: middle;
}

.login-logo {
    margin-bottom: 1rem;
}

.login-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.footer-text {
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 11px !important;
    margin-top: 0.5rem;
}
/* ===== END Phase 21 ===== */


/* ===== KitRent Brand Identity (Phase 22) ===== */
:root {
    --brand-accent: #7B8CDE;          /* Whale blue */
    --brand-kit: #ffffff;             /* "Kit" white */
    --brand-rent: #9D8FE3;            /* "Rent" lavender */
    --kitrent-gradient: linear-gradient(135deg, #667eea 0%, #9D8FE3 50%, #764ba2 100%);
}

/* Brand mark in navbar */
.brand-mark {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

.brand-name {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-kit {
    color: #ffffff;
}

.brand-rent {
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Transparent logo via blend mode */
.navbar-logo {
    height: 32px !important;
    width: auto !important;
    max-width: 36px !important;
    object-fit: contain !important;
    mix-blend-mode: screen;
    filter: brightness(1.1) contrast(1.05);
    border-radius: 6px;
}

/* Login page logo — no blend, transparent PNG */
.login-logo-img {
    height: 90px !important;
    width: auto !important;
    max-width: 300px !important;
    object-fit: contain !important;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

/* Dashboard stat cards — left accent border */
.stat-card {
    border-left: 3px solid var(--brand-accent) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 140, 222, 0.18) !important;
}

/* Table rows — brand-tinted hover */
tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04) !important;
}

/* Flash messages — left accent border */
.flash {
    border-left: 4px solid var(--primary) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

.flash-success {
    border-left-color: var(--success) !important;
}

.flash-error, .flash-danger {
    border-left-color: var(--danger) !important;
}

.flash-warning {
    border-left-color: var(--warning) !important;
}

/* Footer — KitRent style */
.kitrent-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: rgba(255,255,255,0.5);
    padding: 1.25rem 2rem;
    margin-top: 3rem;
    text-align: center;
    font-size: 12px;
}

.kitrent-footer .footer-brand-line {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kitrent-footer .footer-kit { color: #ffffff; }

.kitrent-footer .footer-rent {
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kitrent-footer .footer-copy {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    margin-top: 0.25rem;
}

/* Navbar links — subtle brand hover glow */
.navbar-menu a:hover {
    background: rgba(165, 180, 252, 0.12) !important;
}

.navbar-menu a.active {
    background: var(--primary) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45) !important;
}
/* ===== END Phase 22 ===== */

/* ══════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE IMPROVEMENTS  —  max-width: 768px
   Desktop is NOT affected by any of these rules
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Container padding ── */
    .container { padding: 0.75rem !important; }

    /* ── Page header ── */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .page-header h1 { font-size: 1.4rem; }

    /* ── Buttons: minimum touch target 44px ── */
    .btn, button[type="submit"], button[type="button"] {
        min-height: 44px;
        padding: 0.6rem 1rem;
    }
    .btn-sm { min-height: 36px; }

    /* ── Filters: full width on mobile ── */
    .filter-form { flex-direction: column !important; gap: 0.5rem !important; }
    .filter-form .form-control,
    .filter-form select,
    .filter-form input[type="text"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .filter-card .filter-row { flex-direction: column; gap: 0.75rem; }
    .filter-group { width: 100% !important; }
    .filter-group input,
    .filter-group select { min-width: unset !important; width: 100% !important; box-sizing: border-box; }

    /* ── Tables: horizontal scroll (default fallback) ── */
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

    /* ── Assignment mobile cards ── */
    .assign-mobile-cards { display: block !important; }
    .assign-table-desktop { display: none !important; }

    .assign-card {
        background: white;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        padding: 1rem;
        margin-bottom: 0.75rem;
        box-shadow: 0 2px 6px rgba(0,0,0,.05);
    }
    .assign-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.6rem;
    }
    .assign-card-device {
        font-weight: 800;
        font-size: 1rem;
        color: #0f172a;
    }
    .assign-card-device small {
        display: block;
        font-size: 0.75rem;
        color: #94a3b8;
        font-weight: 500;
        margin-top: 1px;
    }
    .assign-card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem 1rem;
        font-size: 0.8rem;
        color: #374151;
        margin-bottom: 0.75rem;
    }
    .assign-card-body .label { color: #94a3b8; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; display: block; }
    .assign-card-body .val { font-weight: 600; display: block; }
    .assign-card-footer {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 0.5rem;
        border-top: 1px solid #f1f5f9;
        padding-top: 0.6rem;
    }

    /* ── Renters mobile cards ── */
    .renters-table-desktop { display: none !important; }
    .renters-mobile-cards { display: block !important; }

    .renter-card {
        background: white;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        padding: 0.9rem 1rem;
        margin-bottom: 0.6rem;
        box-shadow: 0 1px 4px rgba(0,0,0,.04);
        display: flex;
        align-items: center;
        gap: 0.85rem;
    }
    .renter-card.blacklisted { border-color: #fca5a5; background: #fff1f2; }
    .renter-card-avatar {
        width: 42px; height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg,#6366f1,#8b5cf6);
        display: flex; align-items: center; justify-content: center;
        font-size: 1.1rem; color: white; font-weight: 700;
        flex-shrink: 0;
    }
    .renter-card-info { flex: 1; min-width: 0; }
    .renter-card-name {
        font-weight: 700; font-size: .9rem; color: #0f172a;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .renter-card-sub {
        font-size: .75rem; color: #64748b; margin-top: 2px;
        display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
    }
    .renter-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

    /* ── Stats chips ── */
    .stats-row { display: none; }

    /* ── Header actions stack ── */
    .renters-header { flex-direction: column; align-items: flex-start; }
    .header-actions { flex-wrap: wrap; gap: 0.5rem; }

    /* ── Detail grids ── */
    .rental-grid { grid-template-columns: 1fr !important; }
    .detail-grid { grid-template-columns: 1fr !important; }
    .form-row { grid-template-columns: 1fr !important; }

    /* ── Flash messages ── */
    .flash { padding: 0.75rem 1rem; font-size: 0.875rem; }
}

/* ══════════════════════════════════════════════════
   MOBILE FIXES PHASE 2  —  all remaining pages
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Analytics & reports grid: force 1 column */
    div[style*="grid-template-columns:repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }
    .report-card { margin-bottom: .75rem; }

    /* Scroll shadow hint for tables */
    .table-scroll-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
        box-shadow: inset -8px 0 10px -8px rgba(99,102,241,.15);
    }

    /* Cash mobile cards */
    .cash-table-desktop { display: none !important; }
    .cash-mobile-cards  { display: block !important; }
    .cash-card {
        background: white;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        padding: .85rem 1rem;
        margin-bottom: .6rem;
        box-shadow: 0 1px 4px rgba(0,0,0,.04);
    }
    .cash-card-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: .4rem;
    }
    .cash-card-date { font-size: .78rem; color: #94a3b8; font-weight: 600; }
    .cash-card-amount { font-size: 1.05rem; font-weight: 800; }
    .cash-card-bottom { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .78rem; color: #64748b; }

    /* Debtors mobile cards */
    .debtors-table-desktop { display: none !important; }
    .debtors-mobile-cards  { display: block !important; }
    .debtor-card {
        background: white;
        border-radius: 12px;
        border: 2px solid #fca5a5;
        padding: .9rem 1rem;
        margin-bottom: .65rem;
        box-shadow: 0 2px 8px rgba(239,68,68,.08);
    }
    .debtor-card-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: .5rem;
    }
    .debtor-card-name { font-weight: 700; font-size: .95rem; color: #0f172a; }
    .debtor-card-overdue { background:#fee2e2; color:#991b1b; padding: 3px 10px; border-radius:20px; font-size:.75rem; font-weight:800; animation: pulse 1s infinite; }
    .debtor-card-device { font-size: .8rem; color: #64748b; margin-bottom: .5rem; }
    .debtor-card-actions { display: flex; gap: .5rem; margin-top: .6rem; border-top: 1px solid #fecaca; padding-top: .6rem; }

    /* Devices list: show key cols only via horizontal scroll */
    /* (device list uses card-like grid, generally OK) */

    /* Action buttons in tables - make them visible */
    .actions-cell { flex-wrap: wrap; }

    /* Settings/admin tables - compact */
    .settings-table td, .settings-table th { padding: .5rem .6rem; font-size: .8rem; }
}
