/**
 * V-Box Admin Console - Complete Stylesheet
 * Extracted from File A (unchanged)
 */

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

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-superadmin {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge.role-admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.role-finance {
    background: #d1fae5;
    color: #065f46;
}

.role-badge.role-viewer {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.menu-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.menu-toggle:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
    padding: 6px 12px;
    background: var(--gray-50);
    border-radius: 6px;
}

.sync-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: var(--gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Layout */
.main-layout {
    display: flex;
    height: calc(100vh - 64px - 49px);
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 20px 0;
    overflow-y: auto;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
    width: 0;
    padding: 0;
    border: none;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 0 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-item.active {
    color: var(--primary);
    background: #eff6ff;
    border-left-color: var(--primary);
}

.nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.page-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 4px;
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-danger {
    padding: 10px 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: #eff6ff; }
.stat-icon.green { background: #ecfdf5; }
.stat-icon.yellow { background: #fefce8; }
.stat-icon.red { background: #fef2f2; }

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-trend {
    font-size: 13px;
    color: var(--gray-600);
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.card-actions {
    display: flex;
    gap: 8px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
}

.filter-tab {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.2s;
}

.filter-tab:hover {
    background: var(--gray-50);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
}

th {
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge.online { background: #d1fae5; color: #065f46; }
.badge.online .badge-dot { background: #059669; }
.badge.offline { background: var(--gray-200); color: var(--gray-700); }
.badge.offline .badge-dot { background: var(--gray-500); }

.badge.created { background: #dbeafe; color: #1e40af; }
.badge.created .badge-dot { background: #3b82f6; }
.badge.assigned { background: #fef3c7; color: #92400e; }
.badge.assigned .badge-dot { background: #f59e0b; }
.badge.in_progress { background: #e0e7ff; color: #3730a3; }
.badge.in_progress .badge-dot { background: #6366f1; }
.badge.dropped_off { background: #ddd6fe; color: #5b21b6; }
.badge.dropped_off .badge-dot { background: #8b5cf6; }
.badge.picked_up { background: #d1fae5; color: #065f46; }
.badge.picked_up .badge-dot { background: #059669; }
.badge.cancelled { background: #fee2e2; color: #991b1b; }
.badge.cancelled .badge-dot { background: #dc2626; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal.show,
.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

.form-help {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--gray-50);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-content {
    font-size: 14px;
}

.timeline-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 13px;
    color: var(--gray-600);
}

.timeline-details {
    margin-top: 8px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray-700);
}

/* Alert Banner */
.alert-banner {
    padding: 12px 20px;
    background: #fef3c7;
    border-left: 4px solid var(--warning);
    margin-bottom: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-banner.danger {
    background: #fee2e2;
    border-left-color: var(--danger);
}

.alert-banner.info {
    background: #dbeafe;
    border-left-color: var(--primary);
}

.alert-icon {
    font-size: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.alert-message {
    font-size: 14px;
    color: var(--gray-700);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
}

/* Info Box */
.info-box {
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-text {
    font-size: 14px;
    color: var(--gray-700);
}

/* Action Menu */
.action-menu {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.2s;
}

.action-menu:hover:not(:disabled) {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.action-menu:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* OTP Display */
.otp-display {
    background: var(--gray-900);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.otp-code {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 8px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
}

.otp-warning {
    font-size: 13px;
    color: #fbbf24;
    margin-top: 12px;
}

/* Footer */
.footer {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 13px;
    color: var(--gray-600);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-900);
    font-weight: 600;
}

/* Compartment Grid */
.compartment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.compartment-card {
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.compartment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.compartment-card.empty {
    border-color: var(--success);
    background: #f0fdf4;
}

.compartment-card.empty::before {
    background: var(--success);
}

.compartment-card.reserved {
    border-color: var(--warning);
    background: #fefce8;
}

.compartment-card.reserved::before {
    background: var(--warning);
}

.compartment-card.occupied {
    border-color: var(--danger);
    background: #fef2f2;
}

.compartment-card.occupied::before {
    background: var(--danger);
}

.compartment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.compartment-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.door-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.door-status.closed {
    background: #d1fae5;
    color: #065f46;
}

.door-status.open {
    background: #fee2e2;
    color: #991b1b;
}

.door-status.unknown {
    background: var(--gray-200);
    color: var(--gray-700);
}

.door-icon {
    font-size: 14px;
}

.compartment-info {
    margin-top: 12px;
}

.compartment-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

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

.compartment-value {
    color: var(--gray-900);
    font-weight: 600;
}

.compartment-legend {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.legend-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid;
}

.legend-box.empty {
    background: #f0fdf4;
    border-color: var(--success);
}

.legend-box.reserved {
    background: #fefce8;
    border-color: var(--warning);
}

.legend-box.occupied {
    background: #fef2f2;
    border-color: var(--danger);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-sm.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm.btn-secondary {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-sm.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Additional Styles for New Pages */

/* Status badges for different statuses */
.status-badge.status-created {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-assigned {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-in_progress {
    background: #e0e7ff;
    color: #4338ca;
}

.status-badge.status-dropped_off {
    background: #ddd6fe;
    color: #6b21a8;
}

.status-badge.status-picked_up {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-escalated {
    background: #fecaca;
    color: #7f1d1d;
}

.status-badge.status-online {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-offline {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-inactive {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Stats value colors */
.stat-value.stat-success {
    color: var(--success);
}

.stat-value.stat-danger {
    color: var(--danger);
}

.stat-value.stat-warning {
    color: var(--warning);
}

/* Filter buttons */
.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Search box */
.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    min-width: 250px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Table container */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--gray-900);
}

/* Button variants */
.btn-sm.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-sm.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-sm.btn-success:hover {
    background: #047857;
}

.btn-sm.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm.btn-warning:hover {
    background: #b45309;
}

/* Form hints */
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-500);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .search-box input {
        min-width: 150px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* =============================================
   SUPPORT TICKETS PAGE STYLES
   ============================================= */

.ticket-number {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.ticket-number-large {
    font-family: monospace;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.ticket-subject {
    font-weight: 500;
    color: var(--gray-900);
    cursor: pointer;
}

.ticket-subject:hover {
    color: var(--primary);
    text-decoration: underline;
}

.ticket-preview {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.ticket-category {
    font-size: 11px;
    color: var(--gray-500);
}

/* Priority badges */
.badge-priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.badge-priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge-priority-low {
    background: #d1fae5;
    color: #065f46;
}

/* Status badges for tickets */
.badge-status-open {
    background: #fef3c7;
    color: #92400e;
}

.badge-status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.badge-status-waiting-customer {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-status-resolved {
    background: #d1fae5;
    color: #065f46;
}

.badge-status-closed {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Ticket detail modal */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
}

.info-section h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--gray-500);
}

.ticket-subject-detail {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Messages */
.ticket-messages {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    max-height: 350px;
    overflow-y: auto;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    max-width: 85%;
}

.message:last-child {
    margin-bottom: 0;
}

.message-admin {
    background: #dbeafe;
    margin-left: auto;
}

.message-customer {
    background: white;
    border: 1px solid var(--gray-200);
}

.message-internal {
    background: #fef3c7;
    border: 1px dashed #d97706;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.message-sender {
    font-weight: 600;
    color: var(--gray-700);
}

.message-time {
    color: var(--gray-500);
    margin-left: auto;
}

.message-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
}

.badge-internal {
    background: #d97706;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.reply-form {
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
}

.reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

.empty-messages {
    text-align: center;
    color: var(--gray-500);
    padding: 20px;
}

/* Bulk actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: 8px;
    margin-top: 12px;
}

#selectedCount {
    font-weight: 600;
    color: var(--primary);
}

/* =============================================
   PAYMENTS PAGE STYLES
   ============================================= */

.tabs-container {
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--gray-900);
    background: white;
}

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-badge {
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Wallet modal */
.wallet-detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.wallet-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-card {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.summary-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.wallet-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-history h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.transactions-list {
    max-height: 350px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 8px;
}

.tx-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tx-credit .tx-icon {
    background: #d1fae5;
}

.tx-debit .tx-icon {
    background: #fee2e2;
}

.tx-details {
    flex: 1;
}

.tx-description {
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-900);
}

.tx-date {
    font-size: 12px;
    color: var(--gray-500);
}

.tx-amount {
    font-weight: 600;
    font-size: 14px;
}

.payouts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payout-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
}

.payout-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.payout-meta {
    font-size: 12px;
    color: var(--gray-500);
}

/* Payment rules */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.rate-label {
    color: var(--gray-600);
}

.rate-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Info box in modals */
.info-box {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box .info-row {
    margin-bottom: 8px;
}

.info-box .info-row:last-child {
    margin-bottom: 0;
}

/* =============================================
   ANALYTICS PAGE STYLES
   ============================================= */

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

@media (max-width: 1200px) {
    .stats-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card-highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.stat-card-highlight .stat-value,
.stat-card-highlight .stat-label {
    color: white;
}

.stat-card-highlight .stat-icon {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    min-height: 350px;
}

.chart-container {
    height: 300px;
    padding: 16px;
}

/* Analytics grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.metric-label {
    font-size: 14px;
    color: var(--gray-600);
}

.metric-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.analytics-loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* Top performers */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.rank-1 {
    background: #fef3c7;
    color: #d97706;
}

.rank-2 {
    background: #e5e7eb;
    color: #6b7280;
}

.rank-3 {
    background: #fed7aa;
    color: #c2410c;
}

.rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) {
    background: var(--gray-100);
    color: var(--gray-600);
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-value {
    font-size: 12px;
    color: var(--gray-500);
}

/* =============================================
   SETTINGS PAGE STYLES
   ============================================= */

.settings-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    min-height: calc(100vh - 200px);
}

@media (max-width: 900px) {
    .settings-container {
        grid-template-columns: 1fr;
    }
}

.settings-sidebar {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 12px;
    height: fit-content;
    position: sticky;
    top: 88px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.settings-nav-item.active {
    background: var(--primary-light);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
}

.settings-content {
    flex: 1;
}

.settings-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.section-description {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Profile section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.profile-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

/* Security section */
.security-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.security-info code {
    font-family: monospace;
    font-size: 12px;
    background: var(--gray-100);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Notifications section */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-option:hover {
    background: var(--gray-100);
}

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

/* System section */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.system-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.danger-zone {
    border: 1px solid var(--danger);
    border-radius: 8px;
    background: #fee2e2;
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Form rows */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* =============================================
   MODAL STYLES (Extended)
   ============================================= */

.modal-large .modal-content,
.modal-container.modal-wide {
    max-width: 900px;
    width: 95%;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =============================================
   NOTIFICATIONS
   ============================================= */

.notifications-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.notification button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-error {
    border-left: 4px solid var(--danger);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

.notification-info {
    border-left: 4px solid var(--primary);
}

/* =============================================
   RESPONSIVE GRID HELPERS
   ============================================= */

@media (max-width: 1200px) {
    .wallet-detail-grid,
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .settings-sidebar {
        position: static;
    }
    
    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .settings-nav-item {
        white-space: nowrap;
    }
}

/* =============================================
   SUPPORT TICKETS PAGE STYLES
   ============================================= */

.ticket-number {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
}

.ticket-subject {
    font-weight: 500;
    color: var(--gray-900);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-category {
    font-size: 12px;
}

/* Priority badges */
.badge-priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.badge-priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge-priority-low {
    background: #d1fae5;
    color: #065f46;
}

/* Status badges */
.badge-status-open {
    background: #fef3c7;
    color: #92400e;
}

.badge-status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.badge-status-waiting-customer {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-status-resolved {
    background: #d1fae5;
    color: #065f46;
}

.badge-status-closed {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Ticket detail grid */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    min-height: 400px;
}

.ticket-info {
    border-right: 1px solid var(--gray-200);
    padding-right: 24px;
}

.ticket-info .info-section {
    margin-bottom: 24px;
}

.ticket-info .info-section h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.ticket-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.ticket-info .info-label {
    font-size: 13px;
    color: var(--gray-600);
}

.ticket-subject-detail {
    font-size: 14px;
    color: var(--gray-800);
    line-height: 1.6;
}

/* Messages container */
.ticket-messages {
    display: flex;
    flex-direction: column;
}

.ticket-messages h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.messages-container {
    flex: 1;
    max-height: 350px;
    overflow-y: auto;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    max-width: 85%;
}

.message-customer {
    background: white;
    border: 1px solid var(--gray-200);
    margin-right: auto;
}

.message-admin {
    background: var(--primary-light);
    color: white;
    margin-left: auto;
}

.message-internal {
    background: #fef3c7;
    color: #92400e;
    border: 1px dashed #d97706;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.message-sender {
    font-weight: 600;
}

.message-time {
    margin-left: auto;
}

.message-content {
    font-size: 14px;
    line-height: 1.5;
}

.badge-internal {
    background: #f59e0b;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Reply form */
.reply-form {
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
}

.reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

.empty-messages {
    text-align: center;
    color: var(--gray-500);
    padding: 20px;
}

/* =============================================
   PAYMENTS PAGE STYLES
   ============================================= */

.tabs-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--gray-800);
}

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-badge {
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Wallet modal */
.wallet-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.wallet-summary {
    border-right: 1px solid var(--gray-200);
    padding-right: 24px;
}

.summary-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.summary-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.wallet-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-history h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.transactions-list {
    max-height: 300px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
}

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

.tx-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tx-credit .tx-icon {
    background: #d1fae5;
}

.tx-debit .tx-icon {
    background: #fee2e2;
}

.tx-details {
    flex: 1;
}

.tx-description {
    font-size: 13px;
    font-weight: 500;
}

.tx-date {
    font-size: 11px;
    color: var(--gray-500);
}

.tx-amount {
    font-weight: 600;
    font-size: 14px;
}

.payout-item {
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.payout-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payout-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Info box */
.info-box {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

/* Rates grid */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 6px;
}

.rate-label {
    color: var(--gray-600);
}

.rate-value {
    font-weight: 600;
    color: var(--primary);
}

/* =============================================
   ANALYTICS PAGE STYLES
   ============================================= */

.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.stat-card-highlight {
    border-left: 4px solid var(--primary);
}

.stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    min-height: 350px;
}

.chart-container {
    height: 280px;
    padding: 16px;
}

/* Analytics grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.analytics-metrics {
    display: flex;
    flex-direction: column;
}

.analytics-metrics .metric-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.analytics-metrics .metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 13px;
    color: var(--gray-600);
}

.metric-value {
    font-weight: 600;
    color: var(--gray-900);
}

.analytics-loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* Rank badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: var(--gray-200);
    color: var(--gray-700);
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

/* Rating display */
.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-value {
    font-size: 12px;
    color: var(--gray-500);
    margin-left: 4px;
}

/* =============================================
   SETTINGS PAGE STYLES
   ============================================= */

.settings-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    min-height: 600px;
}

.settings-sidebar {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    height: fit-content;
    position: sticky;
    top: 84px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.settings-nav-item.active {
    background: var(--primary-light);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.settings-nav-item .nav-icon {
    font-size: 16px;
}

.settings-content {
    min-height: 400px;
}

.settings-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-description {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}

.profile-info h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Notification options */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Button group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* System info */
.system-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

/* Security info */
.security-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

/* Danger zone */
.danger-zone {
    border: 2px solid var(--danger);
    border-radius: 8px;
    padding: 20px;
    background: #fef2f2;
}

/* =============================================
   ADDITIONAL UTILITY STYLES
   ============================================= */

.text-right {
    text-align: right;
}

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

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

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

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

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

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Modal large */
.modal-large {
    max-width: 900px;
    width: 95%;
}

/* Card body */
.card-body {
    padding: 20px;
}

/* Buttons */
.btn-success {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-success:hover {
    background: #047857;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-warning {
    background: var(--warning);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-warning:hover {
    background: #b45309;
}

/* Empty transactions */
.empty-transactions {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* Loading and error cells */
.loading-cell,
.error-cell,
.empty-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--gray-500);
}

.error-cell {
    color: var(--danger);
}

/* Empty state small */
.empty-state-small {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.empty-state-small div:first-child {
    font-size: 32px;
    margin-bottom: 8px;
}

/* =============================================
   DEVICES PAGE STYLES
   ============================================= */

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
}

.device-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.device-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.device-card.online {
    border-left: 4px solid var(--success);
}

.device-card.offline {
    border-left: 4px solid var(--danger);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.device-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.device-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-online {
    background: #dcfce7;
    color: #16a34a;
}

.status-offline {
    background: #fee2e2;
    color: #dc2626;
}

.device-id {
    font-size: 12px;
    font-family: monospace;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.device-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.device-stat {
    display: flex;
    flex-direction: column;
}

.device-stat .stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.device-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.device-info {
    color: var(--gray-500);
    font-size: 12px;
    margin-bottom: 16px;
}

.device-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Compartments Grid */
.compartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.compartment-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.compartment-card.available {
    border-color: var(--success);
    background: #f0fdf4;
}

.compartment-card.occupied {
    border-color: var(--warning);
    background: #fffbeb;
}

.compartment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.compartment-number {
    font-weight: 700;
    font-size: 16px;
}

.compartment-size {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--gray-200);
    border-radius: 4px;
    text-transform: uppercase;
}

.compartment-status {
    margin-bottom: 8px;
}

.compartment-order {
    font-size: 11px;
    color: var(--gray-500);
    font-family: monospace;
    margin-bottom: 8px;
}

.compartment-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* Responsive for new pages */
@media (max-width: 1200px) {
    .stats-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .wallet-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .settings-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .rates-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   FINANCE MANAGEMENT STYLES
   ============================================= */

.finance-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .finance-overview-grid {
        grid-template-columns: 1fr;
    }
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 24px;
}

.wallet-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .wallet-detail-grid {
        grid-template-columns: 1fr;
    }
}

.wallet-summary-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wallet-balance {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.balance-value {
    font-size: 32px;
    font-weight: 700;
}

.wallet-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wallet-actions button {
    flex: 1;
    min-width: 120px;
}

.wallet-info {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.info-label {
    color: var(--gray-500);
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: var(--gray-900);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

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

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

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

.data-table.compact th,
.data-table.compact td {
    padding: 8px 12px;
    font-size: 13px;
}

.empty-state-small {
    padding: 32px;
    text-align: center;
    color: var(--gray-500);
}

.stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

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

.btn-success {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: #b45309;
    transform: translateY(-1px);
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Finance table improvements */
.finance-table td code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Transaction type badges */
.txn-credit {
    background: #dcfce7;
    color: #166534;
}

.txn-debit {
    background: #fee2e2;
    color: #991b1b;
}

.txn-refund {
    background: #fef3c7;
    color: #92400e;
}

/* Frozen wallet indicator */
.wallet-frozen {
    position: relative;
}

.wallet-frozen::after {
    content: '❄️ FROZEN';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* =============================================
   ENHANCED DEVICE PAGE STYLES
   ============================================= */

/* Device Grid */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Enhanced Device Card */
.device-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.device-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.device-card.online {
    border-left: 4px solid var(--success);
}

.device-card.offline {
    border-left: 4px solid var(--danger);
}

.device-card.maintenance {
    border-left: 4px solid var(--warning);
    background: #fffbeb;
}

.device-card.disabled {
    border-left: 4px solid var(--gray-400);
    background: #f9fafb;
    opacity: 0.8;
}

.device-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.device-info-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
}

.device-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.device-info-item.warning {
    color: var(--warning);
}

.device-info-item .info-icon {
    font-size: 14px;
}

.device-compartment-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
}

.compartment-occupied {
    height: 100%;
    background: var(--warning);
    border-radius: 3px;
}

.device-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

/* Device Detail Modal */
.modal-xl {
    max-width: 1000px;
}

.device-detail-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.device-detail-tabs .tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.device-detail-tabs .tab-btn:hover {
    color: var(--primary);
}

.device-detail-tabs .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.device-tab {
    display: none;
}

.device-tab.active {
    display: block;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.detail-section {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
}

.detail-section h4 {
    margin-bottom: 12px;
    color: var(--gray-700);
    font-size: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-label {
    color: var(--gray-500);
    font-size: 13px;
}

.detail-value {
    font-weight: 500;
    color: var(--gray-900);
    font-size: 13px;
}

/* Compartment Summary */
.compartment-summary {
    display: flex;
    gap: 16px;
}

.summary-item {
    text-align: center;
    flex: 1;
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.summary-item .summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.summary-item .summary-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

.summary-item.success .summary-value {
    color: var(--success);
}

.summary-item.warning .summary-value {
    color: var(--warning);
}

/* Enhanced Compartments Grid */
.compartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.compartment-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.compartment-card.available {
    border-color: var(--success);
    background: #f0fdf4;
}

.compartment-card.occupied {
    border-color: var(--warning);
    background: #fffbeb;
}

.compartment-card.reserved {
    border-color: var(--primary);
    background: #eff6ff;
}

.compartment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.compartment-number {
    font-weight: 700;
    color: var(--gray-900);
}

.compartment-size {
    font-size: 10px;
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--gray-600);
}

.compartment-state {
    font-size: 12px;
    margin-bottom: 8px;
}

.compartment-order {
    font-size: 10px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.compartment-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.action-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
}

.action-card h4 {
    margin-bottom: 8px;
    color: var(--gray-800);
}

.action-card p {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 12px;
}

.action-card.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.action-card.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

/* QR Display */
.qr-display {
    text-align: center;
    padding: 20px;
}

.qr-image-container {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qr-image {
    max-width: 280px;
    height: auto;
}

.qr-device-id {
    font-family: monospace;
    color: var(--gray-500);
    font-size: 12px;
}

.qr-hint {
    color: var(--gray-500);
    font-size: 13px;
    margin: 16px 0;
}

.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* Location Map */
.location-map-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

/* Extra Button Sizes */
.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* =============================================
   DEVICE MANAGEMENT STYLES
   ============================================= */

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.device-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.device-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.device-card.maintenance {
    border-color: var(--warning);
    background: #fffbeb;
}

.device-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.device-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.device-status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.5);
}

.device-status-indicator.offline {
    background: var(--danger);
}

.device-status-indicator.maintenance {
    background: var(--warning);
}

.device-info {
    flex: 1;
    min-width: 0;
}

.device-location {
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-id {
    font-size: 12px;
    color: var(--gray-500);
    font-family: monospace;
}

.device-card-body {
    padding: 16px;
}

.device-address,
.device-landmark {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compartment-stats {
    display: flex;
    justify-content: space-around;
    margin: 16px 0;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
}

.comp-stat {
    text-align: center;
}

.comp-stat .comp-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.comp-stat .comp-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

.comp-stat.success .comp-value {
    color: var(--success);
}

.comp-stat.warning .comp-value {
    color: var(--warning);
}

.utilization-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.utilization-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.utilization-fill.low {
    background: var(--success);
}

.utilization-fill.medium {
    background: var(--warning);
}

.utilization-fill.high {
    background: var(--danger);
}

.utilization-text {
    text-align: center;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 8px;
}

.device-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.device-card-footer .btn-sm {
    flex: 1;
    justify-content: center;
}

.maintenance-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Device Detail Modal */
.device-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .device-detail-layout {
        grid-template-columns: 1fr;
    }
}

.device-detail-main,
.device-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.device-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
}

.device-status-banner.online {
    background: #dcfce7;
    color: #166534;
}

.device-status-banner.offline {
    background: #fee2e2;
    color: #991b1b;
}

.device-status-banner.maintenance {
    background: #fef3c7;
    color: #92400e;
}

.device-status-banner .status-icon {
    font-size: 24px;
}

.device-status-banner .status-text {
    font-weight: 600;
    font-size: 16px;
}

.device-status-banner .status-reason {
    margin-left: auto;
    font-size: 13px;
    opacity: 0.8;
}

.detail-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
}

.detail-section h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--gray-700);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: var(--gray-500);
}

.detail-value {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 500;
}

.action-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.info-row span:first-child {
    color: var(--gray-500);
}

.info-row code {
    background: var(--gray-200);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Compartments Summary */
.compartments-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comp-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid var(--gray-200);
    background: white;
    position: relative;
}

.comp-box.empty {
    border-color: var(--success);
    background: #f0fdf4;
}

.comp-box.occupied {
    border-color: var(--warning);
    background: #fef3c7;
}

.comp-box.reserved {
    border-color: var(--primary);
    background: #dbeafe;
}

.comp-box .comp-num {
    font-weight: 700;
    font-size: 16px;
}

.comp-box .comp-state {
    font-size: 9px;
    text-transform: uppercase;
}

.comp-box .comp-open {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

/* QR Code Container */
.qr-code-container {
    text-align: center;
    padding: 20px;
}

.qr-image {
    max-width: 280px;
    border: 4px solid var(--gray-200);
    border-radius: 12px;
}

.qr-info {
    margin: 16px 0;
}

.qr-device-id {
    font-size: 18px;
    margin-bottom: 4px;
}

.qr-location {
    color: var(--gray-500);
}

.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.qr-instructions {
    text-align: left;
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.qr-instructions ol {
    margin: 8px 0 0 20px;
    padding: 0;
}

.qr-instructions li {
    margin: 4px 0;
    color: var(--gray-600);
}

/* Compartments Grid */
.compartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.compartment-card {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    background: white;
}

.compartment-card.empty {
    border-color: var(--success);
}

.compartment-card.occupied {
    border-color: var(--warning);
}

.compartment-card.reserved {
    border-color: var(--primary);
}

.compartment-card.open {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comp-number {
    font-weight: 600;
}

.comp-lock-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}

.status-open {
    background: #dcfce7;
    color: #166534;
}

.status-locked {
    background: #fee2e2;
    color: #991b1b;
}

.status-unknown {
    background: #f3f4f6;
    color: #6b7280;
}

.compartment-card.open {
    border-left: 4px solid #22c55e;
}

.compartment-card.closed {
    border-left: 4px solid #ef4444;
}

.comp-body {
    margin-bottom: 12px;
}

.comp-state-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.comp-state-badge.empty {
    background: #dcfce7;
    color: #166534;
}

.comp-state-badge.occupied {
    background: #fef3c7;
    color: #92400e;
}

.comp-state-badge.reserved {
    background: #dbeafe;
    color: #1d4ed8;
}

.comp-order {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-500);
}

.comp-actions {
    display: flex;
    gap: 8px;
}

/* History Timeline */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
}

.history-icon {
    font-size: 20px;
}

.history-content {
    flex: 1;
}

.history-action {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.history-details {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.history-meta {
    font-size: 12px;
    color: var(--gray-400);
}

.history-meta span {
    margin-right: 8px;
}

/* Modal XL */
.modal-xl {
    max-width: 1100px;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.activity-action {
    color: var(--gray-700);
}

.activity-time {
    color: var(--gray-400);
}

/* =============================================
   CUSTOMER PAYMENT RULES STYLES
   ============================================= */

.rule-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.rule-type-badge.flat {
    background: #dbeafe;
    color: #1d4ed8;
}

.rule-type-badge.percentage {
    background: #fef3c7;
    color: #d97706;
}

.rule-type-badge.tiered {
    background: #dcfce7;
    color: #16a34a;
}

.rule-type-badge.dynamic {
    background: #f3e8ff;
    color: #9333ea;
}

.rule-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rule-value {
    font-weight: 600;
    color: var(--success);
}

.info-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
}

.info-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.code-block {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-x: auto;
}

.audit-info {
    font-size: 13px;
    color: var(--gray-600);
}

.audit-info div {
    padding: 4px 0;
}

.detail-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-icon.danger {
    color: var(--danger);
}

.btn-icon.danger:hover {
    background: #fee2e2;
}

.modal-sm {
    max-width: 450px;
}

.modal-body {
    padding: 16px 0;
}

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

/* =============================================
   ADMINS & ROLES STYLES
   ============================================= */

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.superadmin {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.role-badge.admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.role-badge.manager {
    background: #dcfce7;
    color: #16a34a;
}

.role-badge.support {
    background: #f3e8ff;
    color: #9333ea;
}

.admin-email-cell {
    display: flex;
    align-items: center;
}

.current-user-row {
    background: #eff6ff;
}

.password-display {
    user-select: all;
}

/* Stats Grid Variants */
.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

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

@media (max-width: 900px) {
    .stats-grid-4,
    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .stats-grid-4,
    .stats-grid-5 {
        grid-template-columns: 1fr;
    }
}

/* Empty state small */
.empty-state-small {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 14px;
}

/* =============================================
   PAYMENT RULES STYLES
   ============================================= */

.rule-name {
    font-weight: 600;
    color: var(--gray-900);
}

.rule-value {
    font-weight: 600;
    font-family: monospace;
}

.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.inactive-row {
    opacity: 0.6;
    background: var(--gray-50);
}

.status-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.status-toggle:hover {
    background: var(--gray-100);
}

.btn-icon-danger:hover {
    background: #fee2e2;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-danger:hover {
    background: #b91c1c;
}

.modal-small {
    max-width: 400px;
}

.rule-detail {
    padding: 16px;
}

.rule-detail .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rule-detail .detail-header.active {
    background: #dcfce7;
}

.rule-detail .detail-header.inactive {
    background: #fee2e2;
}

.rule-detail .detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.info-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
}

.info-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.role-badge.superadmin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge.admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.role-badge.manager {
    background: #dcfce7;
    color: #166534;
}

.role-badge.support {
    background: #f3e8ff;
    color: #7c3aed;
}

/* =============================================
   TRANSACTION DETAIL STYLES
   ============================================= */

.transaction-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .transaction-detail-layout {
        grid-template-columns: 1fr;
    }
}

.transaction-main,
.transaction-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.transaction-header-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.transaction-header-card.credit,
.transaction-header-card.refund {
    border-color: var(--success);
    background: #f0fdf4;
}

.transaction-header-card.debit,
.transaction-header-card.payment {
    border-color: var(--warning);
    background: #fffbeb;
}

.transaction-amount {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.transaction-amount.credit {
    color: var(--success);
}

.transaction-amount.debit {
    color: var(--warning);
}

.transaction-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    margin-right: 8px;
}

.transaction-type-badge.credit,
.transaction-type-badge.refund {
    background: #dcfce7;
    color: #166534;
}

.transaction-type-badge.debit,
.transaction-type-badge.payment {
    background: #fef3c7;
    color: #92400e;
}

.transaction-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.transaction-status-badge.completed,
.transaction-status-badge.paid {
    background: #dcfce7;
    color: #166534;
}

.transaction-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.transaction-status-badge.failed,
.transaction-status-badge.refunded {
    background: #fee2e2;
    color: #991b1b;
}

.amount-credit {
    color: var(--success);
    font-weight: 600;
}

.amount-debit {
    color: var(--warning);
    font-weight: 600;
}

.related-entities {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entity-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.entity-card:hover {
    background: white;
    border-color: var(--primary);
}

.entity-icon {
    font-size: 24px;
}

.entity-info {
    flex: 1;
}

.entity-type {
    font-size: 12px;
    color: var(--gray-500);
}

.entity-id {
    font-weight: 600;
    font-family: monospace;
}

.entity-arrow {
    color: var(--gray-400);
}

.audit-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-item {
    display: flex;
    gap: 10px;
    font-size: 13px;
}

.audit-icon {
    width: 24px;
    text-align: center;
}

.audit-action {
    color: var(--gray-700);
}

.audit-meta {
    font-size: 11px;
    color: var(--gray-400);
}

/* Form checkbox style */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* =============================================
   ENHANCED DASHBOARD STYLES
   ============================================= */

/* Health Banner */
.health-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.health-banner.healthy {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
}

.health-banner.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.health-icon {
    font-size: 24px;
}

.health-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
}

.health-details {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-700);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

/* Stats Grid 6 columns */
.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .stats-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card styling */
.card-action {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
}

.card-action:hover {
    text-decoration: underline;
}

/* Finance Summary */
.finance-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.finance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.finance-value {
    font-weight: 600;
    font-family: monospace;
}

.finance-value.positive {
    color: var(--success);
}

.finance-value.warning {
    color: var(--warning);
}

.finance-value.negative {
    color: var(--danger);
}

/* Exception Orders */
.exception-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exception-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.exception-item:hover {
    background: var(--gray-100);
}

.exception-icon {
    font-size: 20px;
}

.exception-content {
    flex: 1;
}

.exception-title {
    font-weight: 600;
    font-size: 13px;
    font-family: monospace;
}

.exception-desc {
    font-size: 12px;
    color: var(--gray-500);
}

.exception-time {
    font-size: 12px;
    color: var(--gray-400);
}

.more-link {
    text-align: center;
    padding: 8px;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
}

/* Device Issues */
.device-issue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-issue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.device-issue-item:hover {
    background: var(--gray-100);
}

.device-issue-icon {
    font-size: 18px;
}

.device-issue-content {
    flex: 1;
}

.device-issue-id {
    font-weight: 600;
    font-size: 13px;
    font-family: monospace;
}

.device-issue-location {
    font-size: 12px;
    color: var(--gray-500);
}

.device-issue-status {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Payment Issues */
.payment-issue-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-issue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
}

.payment-issue-row.failed {
    background: #fee2e2;
}

.payment-issue-row.pending {
    background: #fef3c7;
}

.payment-issue-label {
    font-weight: 500;
}

.payment-issue-amount {
    font-weight: 600;
    font-family: monospace;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}

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

.activity-icon {
    font-size: 16px;
}

.activity-text {
    flex: 1;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-time {
    color: var(--gray-400);
    font-size: 12px;
    flex-shrink: 0;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 24px;
}

.quick-action-btn span:last-child {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
}

/* Loading/Empty States */
.loading-state-small {
    text-align: center;
    padding: 24px 16px;
    color: var(--gray-500);
    font-size: 14px;
}

.empty-state-small {
    text-align: center;
    padding: 24px 16px;
    color: var(--gray-500);
    font-size: 14px;
}


/* ============================================
   BOOKING MANAGEMENT STYLES
   ============================================ */

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

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

.booking-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .booking-detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-section {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
}

.detail-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-label {
    color: var(--gray-500);
    font-size: 13px;
}

.detail-value {
    font-weight: 500;
    text-align: right;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

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

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

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

.btn-icon-warning {
    color: var(--warning);
}

.btn-icon-warning:hover {
    background: var(--warning-light);
}


/* Pricing Tabs */
.pricing-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
}

.pricing-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.pricing-tab:hover {
    color: var(--primary);
}

.pricing-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Status Toggle */
.status-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background: var(--gray-100);
    transition: all 0.2s;
}

.status-toggle:hover {
    background: var(--gray-200);
}

.status-toggle.active {
    background: var(--success-light);
}

/* Inactive Row */
.inactive-row {
    opacity: 0.6;
    background: var(--gray-50) !important;
}

.inactive-row:hover {
    opacity: 0.8;
}

