/* =============================================
   AWS CONNECT - MAIN STYLES
   ============================================= */

:root {
    --primary: #1a2332;
    --primary-light: #2a3a52;
    --accent: #f5a623;
    --accent-hover: #e0991a;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1a2332;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --radius: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    width: 260px;
    background: var(--primary);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-header .logo i {
    color: var(--accent);
    font-size: 24px;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link i {
    width: 20px;
    font-size: 16px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-link.active {
    background: var(--accent);
    color: #fff;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 12px 16px;
}

.nav-link.logout {
    color: rgba(255,100,100,0.7);
}

.nav-link.logout:hover {
    background: rgba(255,0,0,0.1);
    color: #ff6b6b;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

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

.user-info .avatar {
    font-size: 32px;
    color: var(--accent);
}

.user-info .info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-weight: 500;
    font-size: 14px;
}

.user-info .role {
    font-size: 12px;
    opacity: 0.6;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

.header-left h1 {
    font-size: 20px;
    font-weight: 600;
}

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

.header-right .branch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.notification-btn,
.profile-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
    position: relative;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-btn:hover,
.profile-btn:hover {
    background: var(--bg);
}

.notification-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 600;
}

/* Content Wrapper */
.content-wrapper {
    padding: 24px 32px;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.stat-card .label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-card .label i {
    margin-right: 4px;
    color: var(--accent);
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
}

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

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

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

/* =============================================
   METRICS GRID (Clickable Cards)
   ============================================= */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #f1f3f5;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: var(--accent);
}

.metric-card::after {
    content: '\f35d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 12px;
    color: #d1d5db;
    opacity: 0;
    transition: opacity 0.2s;
}

.metric-card:hover::after {
    opacity: 1;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.metric-icon.blue { background: #eff6ff; color: #2563eb; }
.metric-icon.indigo { background: #eef2ff; color: #4f46e5; }
.metric-icon.red { background: #fef2f2; color: #dc2626; }
.metric-icon.green { background: #ecfdf5; color: #059669; }
.metric-icon.yellow { background: #fffbeb; color: #d97706; }
.metric-icon.purple { background: #f5f3ff; color: #7c3aed; }
.metric-icon.pink { background: #fdf2f8; color: #db2777; }
.metric-icon.teal { background: #f0fdfa; color: #0d9488; }
.metric-icon.emerald { background: #ecfdf5; color: #059669; }
.metric-icon.orange { background: #fff7ed; color: #ea580c; }
.metric-icon.slate { background: #f1f5f9; color: #475569; }
.metric-icon.cyan { background: #ecfeff; color: #0891b2; }

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

.metric-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    display: block;
    line-height: 1.2;
}

/* =============================================
   DASHBOARD GRID
   ============================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.dashboard-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #f1f3f5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.dashboard-card .card-header {
    padding: 16px 22px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
}

.dashboard-card .card-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.dashboard-card .card-header h3 i {
    color: var(--accent);
    margin-right: 8px;
}

.btn-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    color: #d97706;
    text-decoration: underline;
}

.dashboard-card .card-body {
    padding: 16px 22px;
}

/* =============================================
   WELCOME BANNER
   ============================================= */
.welcome-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 28px 36px;
    margin-bottom: 28px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.welcome-content p {
    margin: 4px 0 0;
    opacity: 0.75;
    font-size: 14px;
}

.welcome-actions {
    display: flex;
    gap: 10px;
}

.welcome-actions .btn {
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.welcome-actions .btn-primary {
    background: var(--accent);
    color: #0f172a;
}

.welcome-actions .btn-primary:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.welcome-actions .btn-outline {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}

.welcome-actions .btn-outline:hover {
    background: rgba(255,255,255,0.15);
}

/* =============================================
   STATUS BAR
   ============================================= */
.status-bar {
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #f1f3f5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.status-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 12px;
}

.status-bar-label i {
    margin-right: 6px;
}

.status-bar-label strong {
    color: #0f172a;
}

.status-bar-track {
    display: flex;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.status-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    transition: width 0.8s ease;
    min-width: 40px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status-segment.released { background: linear-gradient(135deg, #10b981, #059669); }
.status-segment.transit { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.status-segment.awaiting { background: linear-gradient(135deg, #f59e0b, #d97706); }
.status-segment.delayed { background: linear-gradient(135deg, #ef4444, #dc2626); }

.status-bar-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
    flex-wrap: wrap;
}

.status-bar-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-bar-legend .dot.released { background: #10b981; }
.status-bar-legend .dot.transit { background: #3b82f6; }
.status-bar-legend .dot.awaiting { background: #f59e0b; }
.status-bar-legend .dot.delayed { background: #ef4444; }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid #f1f3f5;
    overflow: hidden;
}

.card-header {
    padding: 14px 22px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    flex-wrap: wrap;
    gap: 8px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.card-header h3 i {
    color: var(--accent);
    margin-right: 8px;
}

.card-body {
    padding: 16px 22px;
    overflow-x: auto;
}

/* =============================================
   TABLES
   ============================================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 10px 14px;
    background: #f8fafc;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f3f5;
    color: #1e293b;
}

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

.table td strong {
    color: #0f172a;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-primary { background: #eef2ff; color: #3730a3; }
.badge-secondary { background: #f1f3f5; color: #374151; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #0f172a;
}

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

.btn-success {
    background: var(--success);
    color: #fff;
}

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

.btn-danger {
    background: var(--danger);
    color: #fff;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #1e293b;
}

.btn-outline:hover {
    background: #f3f4f6;
}

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

/* =============================================
   FORMS
   ============================================= */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}

.form-control.invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

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

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

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

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

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2332 0%, #0d1520 100%);
    margin: 0;
}

.login-box {
    background: #fff;
    padding: 48px 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-box .logo {
    text-align: center;
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 8px;
}

.login-box h2 {
    text-align: center;
    font-weight: 700;
    color: var(--primary);
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 28px;
}

.login-box .demo-creds {
    margin-top: 20px;
    padding: 12px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

.login-box .demo-creds code {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text);
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.modal-header h3 i {
    color: var(--accent);
    margin-right: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0 8px;
    line-height: 1;
}

.modal-close:hover {
    color: #ef4444;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* =============================================
   NOTE ITEMS
   ============================================= */
.note-item {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent);
}

.note-item .note-text {
    margin: 0 0 4px;
    color: #1e293b;
    font-size: 14px;
}

.note-item .note-meta {
    font-size: 12px;
    color: #6b7280;
}

.note-item .note-meta strong {
    color: #0f172a;
}

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

.no-notes {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
}

.no-notes i {
    font-size: 32px;
    color: #e5e7eb;
    display: block;
    margin-bottom: 8px;
}

/* =============================================
   STATUS DROPDOWN
   ============================================= */
.status-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.status-dropdown .badge {
    cursor: pointer;
    transition: all 0.2s;
}

.status-dropdown .badge:hover {
    opacity: 0.8;
}

.status-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    z-index: 10;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-dropdown:hover .status-dropdown-menu {
    display: block;
}

.status-option {
    display: block;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 4px;
}

.status-option:hover {
    background: #f3f4f6;
}

.status-option .badge {
    display: block;
    text-align: center;
}

/* =============================================
   BUTTON GROUP & ICONS
   ============================================= */
.btn-group {
    display: flex;
    gap: 4px;
    position: relative;
    align-items: center;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-icon.primary {
    background: #eff6ff;
    color: #2563eb;
}

.btn-icon.primary:hover {
    background: #dbeafe;
}

.btn-icon.success {
    background: #ecfdf5;
    color: #059669;
}

.btn-icon.success:hover {
    background: #d1fae5;
}

.btn-icon.danger {
    background: #fef2f2;
    color: #dc2626;
}

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

.btn-icon.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-icon.secondary:hover {
    background: #e5e7eb;
}

.btn-icon.dropdown-toggle {
    background: #f3f4f6;
    color: #374151;
}

.btn-icon.dropdown-toggle:hover {
    background: #e5e7eb;
}

/* =============================================
   NOTES BUTTON
   ============================================= */
.notes-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
    color: var(--accent);
}

.notes-btn:hover {
    background: #f3f4f6;
}

.notes-btn .note-count {
    position: absolute;
    top: -6px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

.w-100 { width: 100%; }

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a7ae;
}

/* =============================================
   MOBILE OVERLAY (Base)
   ============================================= */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* =============================================
   RESPONSIVE DESIGN - TABLET (768px - 1024px)
   ============================================= */
@media (max-width: 1024px) {
    /* Sidebar */
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    /* Stats Grid - 4 columns */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px;
    }
    
    /* Metrics Grid - 4 columns */
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px;
    }
    
    /* Dashboard Grid - 2 columns */
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px;
    }
    
    /* Form - 2 columns */
    .form-grid-3 {
        grid-template-columns: 1fr 1fr !important;
    }
    
    /* Table font size */
    .table {
        font-size: 13px;
    }
    
    .table th, .table td {
        padding: 8px 10px;
    }
    
    /* Welcome banner */
    .welcome-banner {
        padding: 20px 24px;
    }
    
    .welcome-content h2 {
        font-size: 20px;
    }
}

/* =============================================
   RESPONSIVE DESIGN - MOBILE (up to 768px)
   ============================================= */
@media (max-width: 768px) {
    /* ===== SIDEBAR ===== */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        position: fixed;
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .close-sidebar {
        display: block !important;
    }
    
    .mobile-overlay.active {
        display: block !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* ===== TOP HEADER ===== */
    .top-header {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .menu-toggle {
        display: block !important;
    }
    
    .header-left h1 {
        font-size: 16px;
    }
    
    .header-right .branch {
        display: none;
    }
    
    .notification-btn .badge {
        font-size: 9px;
        padding: 1px 5px;
    }
    
    /* ===== WELCOME BANNER ===== */
    .welcome-banner {
        padding: 16px 20px;
        border-radius: 10px;
    }
    
    .welcome-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .welcome-content h2 {
        font-size: 18px;
    }
    
    .welcome-content p {
        font-size: 13px;
    }
    
    .welcome-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .welcome-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* ===== STATS CARDS ===== */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px 14px;
        border-radius: 8px;
    }
    
    .stat-card .label {
        font-size: 11px;
    }
    
    .stat-card .value {
        font-size: 20px;
    }
    
    /* ===== METRICS GRID ===== */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .metric-card {
        padding: 12px 14px;
        gap: 12px;
        border-radius: 10px;
    }
    
    .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .metric-value {
        font-size: 18px;
    }
    
    .metric-label {
        font-size: 10px;
    }
    
    /* ===== STATUS BAR ===== */
    .status-bar {
        padding: 12px 16px;
        border-radius: 10px;
    }
    
    .status-bar-label {
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .status-bar-track {
        height: 24px;
        border-radius: 6px;
    }
    
    .status-segment {
        font-size: 9px;
        min-width: 24px;
    }
    
    .status-bar-legend {
        font-size: 11px;
        gap: 12px;
    }
    
    /* ===== DASHBOARD GRID ===== */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    
    .dashboard-card {
        border-radius: 10px;
    }
    
    .dashboard-card .card-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .dashboard-card .card-header h3 {
        font-size: 14px;
    }
    
    .dashboard-card .card-body {
        padding: 12px 16px;
        overflow-x: auto;
    }
    
    /* ===== TABLES ===== */
    .table {
        font-size: 12px;
    }
    
    .table th {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    .table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* ===== FORMS ===== */
    .form-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* ===== MODALS ===== */
    .modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 14px 16px;
    }
    
    /* ===== BUTTONS ===== */
    .btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    .btn-sm {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    /* ===== BADGES ===== */
    .badge {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    /* ===== CONTENT WRAPPER ===== */
    .content-wrapper {
        padding: 12px 16px;
    }
    
    /* ===== CARD ===== */
    .card {
        border-radius: 10px;
        margin-bottom: 14px;
    }
    
    .card-header {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .card-header h3 {
        font-size: 14px;
    }
    
    .card-body {
        padding: 10px 14px;
    }
    
    /* ===== NOTES FORM ===== */
    #addNoteForm {
        flex-direction: column;
    }
    
    #addNoteForm .form-control {
        width: 100%;
    }
    
    #addNoteForm .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   RESPONSIVE DESIGN - SMALL MOBILE (up to 480px)
   ============================================= */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }
    
    .stat-card .value {
        font-size: 18px;
    }
    
    .metric-value {
        font-size: 16px;
    }
    
    .welcome-content h2 {
        font-size: 16px;
    }
    
    .top-header {
        padding: 8px 12px;
    }
    
    .header-left h1 {
        font-size: 14px;
    }
    
    .content-wrapper {
        padding: 8px 12px;
    }
    
    .table {
        font-size: 11px;
    }
    
    .table th, .table td {
        padding: 4px 6px;
    }
    
    .badge {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 2px 8px;
        font-size: 10px;
    }
    
    .btn-icon {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .metric-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* =============================================
   HIDDEN ELEMENTS ON MOBILE
   ============================================= */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hide-small {
        display: none !important;
    }
}