/* ============================================
   ABHS Portal - Unified Design System
   Matching SSO, CAI, FC visual identity
   Colors: #156b68 (teal), #caa453 (gold)
   Font: Cairo
   ============================================ */

:root {
    --primary: #156b68;
    --primary-light: #1a8a86;
    --primary-dark: #0e4f4d;
    --primary-bg: rgba(21, 107, 104, 0.08);
    --gold: #caa453;
    --gold-light: #e0c175;
    --gold-bg: rgba(202, 164, 83, 0.08);
    --bg-page: #f0f4f3;
    --bg-card: #ffffff;
    --bg-hover: #f5f9f8;
    --bg-surface: #f8faf9;
    --text-primary: #1a2332;
    --text-secondary: #5a6a7a;
    --text-muted: #8a99ab;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --border: rgba(21, 107, 104, 0.1);
    --border-light: #e8eeec;
    --shadow: 0 4px 24px rgba(21, 107, 104, 0.08);
    --shadow-lg: 0 12px 40px rgba(21, 107, 104, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ LOGIN PAGE ============ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #0a4240 0%, #156b68 40%, #1a8a86 70%, #caa453 100%);
}

.bg-animation {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
}

.bg-circle-1 {
    width: 600px; height: 600px;
    background: var(--gold);
    top: -200px; right: -200px;
    animation: float1 20s ease-in-out infinite;
}

.bg-circle-2 {
    width: 400px; height: 400px;
    background: #fff;
    bottom: -100px; left: -100px;
    animation: float2 25s ease-in-out infinite;
}

.bg-circle-3 {
    width: 300px; height: 300px;
    background: var(--gold);
    top: 50%; left: 50%;
    animation: float3 30s ease-in-out infinite;
}

@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 50px); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -40px); } }
@keyframes float3 { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-40%, -60%); } }

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo-img {
    width: 90px;
    height: 90px;
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(21, 107, 104, 0.15));
}

.logo-icon {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 32px rgba(21, 107, 104, 0.2);
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
}

.login-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--error);
    font-size: 14px;
}

.sso-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(21, 107, 104, 0.3);
}

.sso-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(21, 107, 104, 0.4);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
}

.sso-login-btn .btn-arrow {
    margin-right: auto;
    opacity: 0.7;
    transition: var(--transition);
}

.sso-login-btn:hover .btn-arrow {
    transform: translateX(-4px);
    opacity: 1;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.login-hint {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary);
    font-size: 12px;
}

/* Install Prompt */
.install-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
}

.install-btn {
    padding: 6px 16px;
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Cairo';
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.dismiss-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 4px;
}

/* ============ NAVBAR ============ */
.portal-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.nav-brand i {
    color: var(--primary);
    font-size: 22px;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notification-bell {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo';
    animation: badge-pop 0.3s ease;
}

@keyframes badge-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Push Toggle Button */
.push-toggle-wrap {
    position: relative;
}

.push-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 17px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.push-toggle-btn:hover {
    background: var(--bg-hover);
}

.push-status-dot {
    position: absolute;
    bottom: 5px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    transition: var(--transition);
}

.dot-on {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.dot-off {
    background: var(--text-muted);
}

.dot-denied {
    background: var(--error);
}

.push-toggle-btn.push-on {
    color: var(--gold);
}

.push-toggle-btn.push-on:hover {
    color: var(--gold-light);
    background: var(--gold-bg);
}

.push-toggle-btn.push-off {
    color: var(--text-muted);
}

.push-toggle-btn.push-off:hover {
    color: var(--primary);
}

.push-toggle-btn.push-denied {
    color: var(--error);
    opacity: 0.7;
}

/* First-time hint pulse */
@keyframes push-pulse {
    0% { box-shadow: 0 0 0 0 rgba(202, 164, 83, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(202, 164, 83, 0); }
    100% { box-shadow: 0 0 0 0 rgba(202, 164, 83, 0); }
}

.push-hint-pulse {
    animation: push-pulse 1.5s ease infinite;
    background: var(--gold-bg) !important;
    color: var(--gold) !important;
}

/* Hint tooltip */
.push-hint-tooltip {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Cairo';
    white-space: nowrap;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    animation: tooltip-in 0.3s ease;
}

.push-hint-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--primary-dark);
}

.push-hint-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
}

@keyframes tooltip-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Denied help modal */
.push-denied-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo';
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.push-denied-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 380px;
    width: calc(100% - 40px);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.push-denied-content h4 {
    margin: 12px 0 8px;
    color: var(--text-primary);
    font-size: 16px;
}

.push-denied-content p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.6;
}

.push-denied-instructions {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 12px 0 !important;
    font-size: 13px !important;
    direction: ltr;
    text-align: left;
}

.push-denied-close {
    margin-top: 16px;
    padding: 10px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo';
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.push-denied-close:hover {
    background: var(--primary-dark);
}

/* Mobile responsive for tooltip */
@media (max-width: 480px) {
    .push-hint-tooltip {
        left: auto;
        right: 0;
        transform: none;
        white-space: normal;
        max-width: 200px;
    }
    .push-hint-tooltip::before {
        left: auto;
        right: 12px;
        transform: none;
    }
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo';
    font-size: 14px;
}

.user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.user-name-text {
    color: var(--text-primary);
}

.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
}

.user-dropdown.show { display: block; }

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-surface);
}

.dropdown-avatar {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.dropdown-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.dropdown-email {
    color: var(--text-muted);
    font-size: 12px;
    direction: ltr;
    text-align: right;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.dropdown-logout:hover {
    color: var(--error);
}

/* ============ NOTIFICATION PANEL ============ */
.notif-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 300;
}

.notif-overlay.show { display: block; }

.notif-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--border-light);
    z-index: 301;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notif-panel.show {
    transform: translateX(0);
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.notif-panel-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.notif-panel-actions {
    display: flex;
    gap: 4px;
}

.notif-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.notif-action-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notif-tabs {
    display: flex;
    padding: 8px 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
}

.notif-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Cairo';
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.notif-tab.active {
    background: var(--primary);
    color: white;
}

.notif-tab:hover:not(.active) {
    background: var(--bg-hover);
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item.unread {
    background: var(--primary-bg);
    border-color: rgba(21, 107, 104, 0.12);
}

.notif-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notif-icon.info { background: rgba(59,130,246,0.1); color: var(--info); }
.notif-icon.success { background: rgba(34,197,94,0.1); color: var(--success); }
.notif-icon.warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.notif-icon.error { background: rgba(239,68,68,0.1); color: var(--error); }
.notif-icon.message { background: var(--primary-bg); color: var(--primary); }
.notif-icon.task { background: var(--gold-bg); color: var(--gold); }

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.notif-title .app-tag {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-surface);
    color: var(--text-muted);
}

.notif-msg {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-unread-dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-loading, .notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.notif-loading i, .notif-empty i {
    font-size: 32px;
}

/* ============ MAIN CONTENT ============ */
.portal-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--gold) 100%);
    border-radius: var(--radius);
    margin-bottom: 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.welcome-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.welcome-stats {
    display: flex;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 24px;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: white;
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

/* ============ APPS GRID ============ */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.app-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
    opacity: 0;
    transition: var(--transition);
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 107, 104, 0.2);
    box-shadow: var(--shadow-lg);
}

.app-card:hover::before {
    opacity: 1;
}

.app-card.app-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.app-card.app-disabled:hover {
    transform: none;
    box-shadow: none;
}

.app-icon-wrap {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.app-info {
    flex: 1;
    margin-bottom: 16px;
}

.app-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.app-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.app-status-badge {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
}

.app-status-badge.available {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.app-status-badge.coming {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.app-status-badge.maintenance {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.app-arrow {
    color: var(--text-muted);
    transition: var(--transition);
}

.app-card:hover .app-arrow {
    color: var(--primary);
    transform: translateX(-4px);
}

.app-notif-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--error);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-apps {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-apps i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--text-muted);
}

.no-apps h3 { margin-bottom: 8px; color: var(--text-secondary); }

/* ============ PWA INSTALL BANNER ============ */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 480px;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 500;
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-primary);
}

.install-banner-content i {
    font-size: 24px;
    color: var(--gold);
}

.install-banner-content small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
}

.install-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-install {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Cairo';
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-install:hover { background: var(--primary-dark); }

.btn-dismiss {
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: 'Cairo';
    cursor: pointer;
}

/* ============ OFFLINE PAGE ============ */
.offline-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
}

.offline-content {
    text-align: center;
    padding: 40px;
}

.offline-icon {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.offline-content h1 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.offline-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.retry-btn {
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo';
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .portal-navbar {
        padding: 0 16px;
    }

    .user-name-text { display: none; }

    .portal-main {
        padding: 16px;
    }

    .welcome-section {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .notif-panel {
        width: 100%;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-logo-img {
        width: 75px;
        height: 75px;
        max-width: 75px;
        max-height: 75px;
    }

    .user-dropdown {
        left: auto;
        right: 0;
    }
}

@media (max-width: 480px) {
    .welcome-stats { gap: 12px; }
    .stat-item { padding: 12px 16px; }
    .stat-number { font-size: 22px; }
    .welcome-content h2 { font-size: 20px; }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; opacity: 0.3; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }
