
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #8b35df;
    --primary-light: #f7ebfa;
    --bg-main: #f9f5fa;
    --sidebar-bg: #ffffff;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --text-light-gray: #9ca3af;
    --border: #e5e7eb;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Prompt', sans-serif; }
html, body { height: 100%; width: 100%; }
body { background-color: var(--bg-main); color: var(--text-dark); display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
@supports (-webkit-touch-callout: none) { body { height: -webkit-fill-available; } }
.layout { display: flex; width: 100%; height: 100%; flex: 1; min-height: 0; }

/* Sidebar */
.sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); display: flex; flex-direction: column; border-right: 1px solid var(--border); flex-shrink: 0; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); height: 100%; min-height: 0; position: relative; padding-bottom: 70px; }
.sidebar-brand { padding: 24px 24px; border-bottom: 1px solid var(--border); overflow: hidden; white-space: nowrap; flex-shrink: 0; }
.brand-link { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 38px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; transition: max-width 0.3s, opacity 0.2s; max-width: 200px; overflow: hidden; flex-shrink: 0; }
.brand-title { color: #111827; font-weight: 700; font-size: 1.05rem; line-height: 1.2; white-space: nowrap; }
.brand-subtitle { color: var(--text-light-gray); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }

.sidebar-nav { flex: 1 1 auto; padding: 8px 0; overflow-y: auto; overflow-x: hidden; min-height: 0; margin-bottom: env(safe-area-inset-bottom, 0px); }
.nav-item { display: flex; align-items: center; padding: 14px 24px; color: #4b5563; text-decoration: none; gap: 12px; font-weight: 500; font-size: 0.92rem; border-left: 3px solid transparent; transition: all 0.3s; white-space: nowrap; flex-shrink: 0; }
.nav-item i { font-size: 1.25rem; color: #6b7280; flex-shrink: 0; }
.nav-item span { transition: max-width 0.3s, opacity 0.2s; max-width: 200px; overflow: hidden; display: block; flex-shrink: 0; }
.nav-item:hover { background: #f9fafb; color: var(--text-dark); }
.nav-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }
.nav-item.active i { color: var(--primary); }

.sidebar-footer { padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 10px)) 0; border-top: 1px solid var(--border); overflow: hidden; white-space: nowrap; position: absolute; bottom: 0; left: 0; width: 100%; background: var(--sidebar-bg); z-index: 10; }

/* Sidebar Collapsed State */
.sidebar.collapsed { --sidebar-width: 76px; }
.sidebar.collapsed .brand-text { max-width: 0; opacity: 0; pointer-events: none; }
.sidebar.collapsed .nav-item span { max-width: 0; opacity: 0; pointer-events: none; }
.sidebar.collapsed .nav-item { padding: 16px 0; justify-content: center; gap: 0; }
.sidebar.collapsed .brand-link { gap: 0; justify-content: center; }
.sidebar.collapsed .sidebar-brand { padding: 24px 0; display: flex; justify-content: center; }

/* Main Content */
.main-content { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; min-width: 0; min-height: 0; height: 100%; }
.topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 36px; background: #fff; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.toggle-btn { background: none; border: none; font-size: 1.4rem; color: #4b5563; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 6px; transition: background 0.2s, color 0.2s; }
.toggle-btn:hover { background: #f3f4f6; color: #111827; }
.topbar-title { color: var(--primary); font-weight: 700; font-size: 1.05rem; }
.topbar-right { display: flex; align-items: center; gap: 18px; color: #4b5563; }
.topbar-right > i { font-size: 1.3rem; cursor: pointer; transition: color 0.2s; }
.topbar-right > i:hover { color: var(--text-dark); }
.notif-wrapper { position: relative; display: flex; align-items: center; }
.notif-wrapper > i { font-size: 1.3rem; cursor: pointer; transition: color 0.2s; }
.notif-wrapper > i:hover { color: var(--text-dark); }
.notif-badge { position: absolute; top: -4px; right: -6px; background: #ef4444; color: #fff; font-size: 0.55rem; font-weight: 700; width: 15px; height: 15px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.notif-dropdown { position: absolute; top: 40px; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; width: 300px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); z-index: 100; display: none; overflow-x: hidden; }
.notif-dropdown.show { display: block; }
.notif-header { padding: 12px 16px; font-weight: 700; font-size: 0.85rem; border-bottom: 1px solid var(--border); color: #111827; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #f9fafb; cursor: pointer; }
.notif-item:hover { background: #f9fafb; }
.notif-title { display: -webkit-box; font-size: 0.82rem; font-weight: 600; color: #111827; margin-bottom: 2px; word-break: break-word; overflow-wrap: break-word; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 0.72rem; color: var(--text-gray); }
.user-profile { display: flex; align-items: center; gap: 12px; border-left: 1px solid var(--border); padding-left: 18px; cursor: pointer; }
.user-text { display: flex; flex-direction: column; align-items: flex-end; }
.user-name { font-weight: 700; font-size: 0.88rem; color: #111827; line-height: 1.3; white-space: nowrap; }
.user-dept { font-size: 0.62rem; font-weight: 600; color: var(--text-light-gray); letter-spacing: 0.5px; text-transform: uppercase; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); display: block; transition: filter 0.25s; }
.avatar-wrap { position: relative; width: 38px; height: 38px; flex-shrink: 0; cursor: pointer; }
.avatar-wrap:hover .user-avatar { filter: brightness(0.72) blur(2px); }
.avatar-overlay { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s; color: white; font-size: 1.1rem; pointer-events: none; }
.avatar-wrap:hover .avatar-overlay { opacity: 1; }

/* Content area */
.content-area { flex: 1; padding: 56px 44px 50px 44px; overflow-y: auto; }

/* Hero Section */
.hero-section { display: flex; align-items: center; margin-bottom: 36px; gap: 0; }
.hero-text { flex: 0 0 57%; max-width: 57%; }
.hero-text h1 { font-size: 2.8rem; color: #111827; line-height: 1.15; margin-bottom: 16px; font-weight: 700; }
.hero-text p { color: #6b7280; font-size: 1rem; line-height: 1.7; max-width: 480px; margin-bottom: 26px; }

/* Status pills — 2 rows (4 + 5) */
.status-pills { display: flex; flex-wrap: wrap; gap: 12px; max-width: 100%; }
.status-pill {
    background: white; padding: 8px 18px; border-radius: 20px; font-size: 0.88rem;
    font-weight: 600; color: #4b5563; display: inline-flex; align-items: center; gap: 9px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07); border: 1px solid #e5e7eb; white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pill-fadein 0.4s ease both;
}
.status-pill:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); border-color: #d1d5db; }
.status-pill:nth-child(1) { animation-delay: 0.00s; }
.status-pill:nth-child(2) { animation-delay: 0.07s; }
.status-pill:nth-child(3) { animation-delay: 0.14s; }
.status-pill:nth-child(4) { animation-delay: 0.21s; }
.status-pill:nth-child(5) { animation-delay: 0.28s; }
.status-pill:nth-child(6) { animation-delay: 0.35s; }
.status-pill:nth-child(7) { animation-delay: 0.42s; }
.status-pill:nth-child(8) { animation-delay: 0.49s; }
.status-pill:nth-child(9) { animation-delay: 0.56s; }
@keyframes pill-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: #10b981; animation: dot-pulse 2s ease-in-out infinite; }
@keyframes dot-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.45); } 60% { box-shadow: 0 0 0 5px rgba(16,185,129,0); } }

/* Hero image — right column 43%, full logo centered */
.hero-image { flex: 0 0 43%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-right: 20px; }
.hero-image img { height: 260px; }
.hero-brand-name { color: var(--primary); font-weight: 700; font-size: 1.2rem; letter-spacing: 2.5px; }

/* Systems Grid */
.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.app-card { background: #ffffff; border-radius: 18px; padding: 32px 22px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #f0f3f7; }
.app-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.09); }

.icon-color-0 { background: #f3e8ff !important; color: #7e22ce !important; } /* Purple */
.icon-color-1 { background: #fce7f3 !important; color: #db2777 !important; } /* Pink */
.icon-color-2 { background: #ffedd5 !important; color: #ea580c !important; } /* Orange */
.icon-color-3 { background: #e0e7ff !important; color: #4338ca !important; } /* Indigo */
.icon-color-4 { background: #dcfce7 !important; color: #15803d !important; } /* Green */
.icon-color-5 { background: #fef9c3 !important; color: #ca8a04 !important; } /* Yellow */
.icon-color-6 { background: #fee2e2 !important; color: #b91c1c !important; } /* Red */
.icon-color-7 { background: #ccfbf1 !important; color: #0f766e !important; } /* Teal */

.app-icon { width: 68px; height: 68px; background: #fdf2f8; color: #db2777; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 18px; }
.app-title { font-weight: 700; font-size: 1.05rem; color: #111827; margin-bottom: 8px; }
.app-desc { font-size: 0.82rem; color: #6b7280; margin-bottom: 22px; line-height: 1.5; flex: 1; }
.app-btn { background: linear-gradient(90deg, #e42493 0%, #8b35df 100%); color: white; text-decoration: none; font-weight: 600; font-size: 0.88rem; padding: 11px 20px; border-radius: 30px; transition: background 0.15s, transform 0.12s; width: 100%; display: block; text-align: center; font-family: 'Prompt', sans-serif; border: none; cursor: pointer; }
.app-btn:hover { background: linear-gradient(90deg, #d41483 0%, #7b25cf 100%); }
.app-btn:active { transform: scale(0.96); background: #1a3fa0; }

/* Section Headers */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 700; color: #111827; }
.section-title-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: #f3e8ff; color: #7e22ce; border-radius: 8px; font-size: 1.1rem; }
.view-all-link { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 4px; }
.view-all-link:hover { text-decoration: underline; }

/* Announcement Cards (horizontal) */
.latest-news-list { display: flex; flex-direction: column; gap: 12px; }
.announcement-card { background: #ffffff; border-radius: 12px; display: flex; align-items: center; padding: 20px 28px; gap: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); cursor: pointer; transition: box-shadow 0.2s; border: 1px solid var(--border); }
.announcement-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.ann-date { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.day { font-size: 1.9rem; font-weight: 700; color: #111827; line-height: 1; }
.month-year { font-size: 0.6rem; font-weight: 600; color: var(--text-light-gray); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }
.ann-content { flex: 1; min-width: 0; }
.ann-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.tag-system-update, .tag-system { background: linear-gradient(90deg, #8139f7, #ff2397); color: white; }
.tag-maintenance { background: #ffebd2; color: #cc7926; }
.tag-new-feature, .tag-general, .tag-general-0 { background: #d4f7e1; color: #158b5a; }
.ann-title { font-size: 1rem; font-weight: 600; color: #111827; margin-bottom: 5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-desc { font-size: 0.85rem; color: #6b7280; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-arrow { color: #cbd5e1; font-size: 1.3rem; margin-left: 10px; }

/* Utility */
.hidden { display: none !important; }
.btn-primary { background: var(--primary); color: white; padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; display:inline-flex; align-items:center; gap:8px; font-size: 0.88rem; }
.btn-primary:hover { background: #154592; }
.btn-outline { background: transparent; color: var(--text-gray); padding: 8px 16px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.88rem; }
.btn-danger { background: #ef4444; color: white; padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.88rem; display: inline-flex; justify-content: center; align-items: center; text-align: center; }
.btn-danger:hover { background: #dc2626; }

/* Table overrides for announcements.html */
.table-responsive { margin-top: 20px; }
.table-responsive table { width: 100%; border-collapse: collapse; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-radius: 12px; overflow: hidden; }
.table-responsive th { background: #F8FAFC; color: var(--text-gray); text-align: left; padding: 14px 18px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.table-responsive td { padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.88rem; }
.btn-view { background: var(--primary-light); color: var(--primary); border: none; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 5px; }
.table-desc { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-gray); }

.btn-pin { background: transparent; color: var(--text-gray); border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-weight: 500; transition: color 0.2s; }
.btn-pin.pinned { color: var(--primary); }
.filters { display:flex; gap:10px; margin-bottom:16px; }
.filter-btn { padding:6px 16px; border-radius:20px; border:1px solid var(--border); background:white; cursor:pointer; font-weight:500; color:var(--text-gray); font-size: 0.85rem; transition:all 0.2s; }
.filter-btn.active { background:var(--primary-light); color:var(--primary); border-color:var(--primary); }
.search-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.search-bar .form-control { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.88rem; outline: none; background: white; }
.form-control { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.88rem; outline: none; background: white; font-family: 'Prompt', sans-serif; width: 100%; }
.form-control:focus { border-color: var(--primary); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; display: none; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-content { background: white; border-radius: 16px; padding: 28px 32px; max-width: 500px; width: 90%; max-height: 85vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: #111827; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--text-gray); display: flex; align-items: center; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* View News Modal */
.view-modal-content { background: white; border-radius: 20px; padding: 32px 36px; max-width: 640px; width: 92%; max-height: 88vh; overflow-y: auto; overflow-x: hidden; animation: vm-in 0.22s ease; }
@keyframes vm-in { from { opacity: 0; transform: scale(0.95) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.view-modal-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; gap: 12px; }
.view-modal-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view-modal-close { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 1.3rem; display: flex; align-items: center; padding: 4px 8px; border-radius: 8px; transition: background 0.2s, color 0.2s; flex-shrink: 0; }
.view-modal-close:hover { background: #f3f4f6; color: #374151; }
.view-modal-title { font-size: 1.4rem; font-weight: 700; color: #111827; line-height: 1.45; margin-bottom: 14px; word-break: break-word; overflow-wrap: break-word; }
.view-modal-meta { font-size: 0.87rem; color: #6b7280; margin-bottom: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.view-modal-meta .meta-sep { color: #d1d5db; }
.view-modal-body { background: #f8fafc; border-radius: 12px; padding: 20px 24px; margin-bottom: 24px; border: 1px solid #f1f5f9; }
.view-modal-body p { font-size: 0.93rem; color: #374151; line-height: 1.9; white-space: pre-wrap; margin: 0; word-break: break-word; overflow-wrap: break-word; }
.view-modal-footer { display: flex; justify-content: flex-end; }
.pinned-badge { background: #fef3c7; color: #92400e; padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #fde68a; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: #374151; }
.remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 0.88rem; }

/* Login Page */
body.login-body { display: block; height: 100vh; height: 100dvh; overflow: hidden; }
@supports (-webkit-touch-callout: none) { body.login-body { height: -webkit-fill-available; } }
.login-container { display: flex; height: 100vh; height: 100dvh; }
@supports (-webkit-touch-callout: none) { .login-container { height: -webkit-fill-available; } }
.login-left { width: 480px; display: flex; flex-direction: column; background: white; flex-shrink: 0; }
.login-header-bar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; border-bottom: 1px solid var(--border); height: 64px; }
.login-header-bar .brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 700; font-size: 1rem; color: #111827; }
.brand-sub { font-size: 0.58rem; font-weight: 600; color: var(--text-light-gray); letter-spacing: 0.5px; }
.header-right a { color: var(--text-gray); text-decoration: none; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.header-right a:hover { color: var(--primary); }
.login-form-wrapper { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 48px; }
.login-header { margin-bottom: 28px; }
.login-header h1 { font-size: 1.8rem; font-weight: 700; color: #111827; margin-bottom: 6px; }
.login-header p { color: var(--text-gray); font-size: 0.88rem; line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.input-icon-wrapper { position: relative; display: flex; align-items: center; }
.input-icon-wrapper i { position: absolute; left: 14px; color: var(--text-gray); font-size: 1.1rem; pointer-events: none; }
.input-icon-wrapper .password-toggle { left: auto; right: 14px; cursor: pointer; pointer-events: all; }
.rounded-input input { padding-left: 42px !important; }
.input-icon-wrapper input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.9rem; outline: none; font-family: 'Prompt', sans-serif; }
.input-icon-wrapper input:focus { border-color: var(--primary); }
.form-options { display: flex; justify-content: space-between; align-items: center; }
.forgot-password { color: var(--primary); font-size: 0.85rem; text-decoration: none; font-weight: 500; }
.forgot-password:hover { text-decoration: underline; }
.login-form .btn-primary { width: 100%; justify-content: center; padding: 12px; font-size: 0.95rem; border-radius: 10px; margin-top: 4px; }
.error-message { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.login-footer { text-align: center; padding: 16px 32px; font-size: 0.72rem; color: var(--text-light-gray); border-top: 1px solid var(--border); }
.login-right { flex: 1; background: linear-gradient(135deg, #ff8100 0%, #e21c5b 50%, #76228f 100%); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.login-right-overlay { position: absolute; inset: 0; background: url("data:image/svg+xml,...") center/cover; opacity: 0.05; }
.login-right-content { position: relative; z-index: 1; text-align: center; color: white; padding: 40px; }
.bmw-tagline h2 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 16px; letter-spacing: 1px; }
.bmw-tagline p { font-size: 1rem; color: rgba(255,255,255,0.7); }
/* ==============================================================
   Responsive Design (Media Queries)
   ============================================================== */

/* Tablet & Smaller Desktop */
@media (max-width: 1200px) {
    .grid-cards { grid-template-columns: repeat(3, 1fr); }
}

/* iPad & Tablets (Off-canvas sidebar kicks in) */
@media (max-width: 1024px) {
    /* Sidebar Off-canvas */
    .sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 1000; height: 100%; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 4px 0 15px rgba(0,0,0,0.1); }
    .sidebar.mobile-open { left: 0; }
    .sidebar.collapsed { --sidebar-width: 260px; /* Disable collapse shrink on mobile */ left: 0; }
    .sidebar.collapsed .brand-text, .sidebar.collapsed .nav-item span { max-width: 200px; opacity: 1; pointer-events: auto; }
    .sidebar.collapsed .nav-item { justify-content: flex-start; gap: 12px; padding: 14px 24px; }
    .sidebar.collapsed .brand-link { justify-content: flex-start; gap: 10px; }
    .sidebar.collapsed .sidebar-brand { padding: 24px 24px; justify-content: flex-start; }

    /* Layout & Content adjustments */
    .main-content { margin-left: 0; width: 100%; }
    .grid-cards { grid-template-columns: repeat(2, 1fr); }
    .hero-section { flex-direction: column-reverse; text-align: center; gap: 24px; }
    .hero-text { flex: 0 0 100%; max-width: 100%; align-items: center; display: flex; flex-direction: column; }
    .hero-text p { max-width: 100%; }
    .hero-image { flex: 0 0 auto; width: 100%; padding-right: 0; display: flex; justify-content: center; }
    .hero-image img { height: 180px; }
}

/* Mobile Phones */
@media (max-width: 768px) {
    .topbar { padding: 0 16px; }
    .topbar-left { min-width: 0; gap: 10px; }
    .topbar-title { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .content-area { padding: 30px 20px; }
    .grid-cards { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2rem; }
    .hero-image img { height: 140px; }
    
    /* Modals */
    .modal-content, .view-modal-content { width: 95%; padding: 20px 24px; margin: 10px; max-height: 90vh; }
    
    /* Table Wrapper for Horizontal Scroll */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; border-radius: 14px; }
    .ann-table { min-width: 700px; } /* Force width so it scrolls */
}

/* Overlay for Mobile Sidebar */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; display: none; opacity: 0; transition: opacity 0.3s ease; }
.sidebar-overlay.show { display: block; opacity: 1; }

