@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS */
:root {
  --navy:        #092A49;
  --navy-deep:   #051A2E;
  --blue:        #03598D;
  --blue-light:  #4C8DBF;
  --white:       #FFFFFF;
  --bg:          #F6F9FC;
  --card-bg:     #FFFFFF;
  --text:        #092A49;
  --text-muted:  #5B7186;
  --text-dim:    #7A8FA6;
  --border:      #E2EAF0;
  --shadow:      0 10px 30px rgba(9,42,73,0.08);
  --shadow-hover:0 24px 48px rgba(9,42,73,0.16);
  --shadow-sm:   0 4px 12px rgba(9,42,73,0.06);
  --sidebar-bg:     #092A49;
  --sidebar-deep:   #051A2E;
  --sidebar-border: rgba(255,255,255,0.08);
  --nav-text:       rgba(255,255,255,0.65);
  --nav-hover-bg:   rgba(255,255,255,0.08);
  --nav-active-bg:  rgba(255,255,255,0.12);
  --nav-active-text:#FFFFFF;
  --sidebar-w: 260px;
}

[data-theme="dark"] {
  --bg:          #0D1B2A;
  --card-bg:     #122236;
  --text:        #E8EDF2;
  --text-muted:  #6B8090;
  --text-dim:    #8A9DB0;
  --border:      #1E3448;
  --shadow:      0 10px 30px rgba(0,0,0,0.3);
  --shadow-hover:0 24px 48px rgba(0,0,0,0.45);
  --shadow-sm:   0 4px 12px rgba(0,0,0,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
html.font-size-sm { font-size: 13px; }
html.font-size-md { font-size: 16px; }
html.font-size-lg { font-size: 20px; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.2s, color 0.2s;
}

/* BG DECOR */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-decor::before, .bg-decor::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; }
.bg-decor::before { width: 620px; height: 620px; top: -220px; right: -180px; background: radial-gradient(circle at 30% 30%, var(--blue-light), transparent 70%); }
.bg-decor::after  { width: 520px; height: 520px; bottom: -220px; left: calc(var(--sidebar-w) - 160px); background: radial-gradient(circle at 60% 60%, var(--blue), transparent 70%); opacity: 0.12; }
[data-theme="dark"] .bg-decor::before { opacity: 0.12; }
[data-theme="dark"] .bg-decor::after  { opacity: 0.07; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; box-shadow: 4px 0 24px rgba(9,42,73,0.15); }
.sidebar-top { flex: 1; overflow-y: auto; padding: 0; }
.sidebar-logo { display: flex; align-items: center; justify-content: center; padding: 28px 24px; background: var(--sidebar-deep); border-bottom: 1px solid var(--sidebar-border); min-height: 88px; }
.logo-img { max-width: 160px; max-height: 52px; object-fit: contain; }
.nav-section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); padding: 20px 22px 6px; }
.nav-links { list-style: none; padding: 8px 12px; }
.nav-links li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--nav-text); font-size: 0.84rem; font-weight: 600; transition: background 0.15s, color 0.15s; margin-bottom: 2px; min-height: 44px; }
.nav-links li a:hover { background: var(--nav-hover-bg); color: #fff; }
.nav-links li a.active { background: var(--nav-active-bg); color: var(--nav-active-text); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-divider { height: 1px; background: var(--sidebar-border); margin: 8px 12px; }
.font-toggle { display: flex; gap: 4px; padding: 8px 12px; margin: 4px 0; }
.font-btn { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.45); border-radius: 8px; padding: 6px 4px; font-family: 'Montserrat', sans-serif; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s; }
.font-btn:hover, .font-btn.active { background: rgba(255,255,255,0.14); color: #fff; }
.theme-toggle { padding: 4px 12px 12px; }
.theme-btn { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.45); border-radius: 8px; padding: 8px; font-size: 0.75rem; font-weight: 700; font-family: 'Montserrat', sans-serif; cursor: pointer; letter-spacing: 0.04em; transition: background 0.15s, color 0.15s; }
.theme-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--sidebar-border); background: var(--sidebar-deep); }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-avatar-placeholder { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.user-info { flex: 1; overflow: hidden; }
.user-name  { display: block; font-size: 0.8rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { color: rgba(255,255,255,0.3); text-decoration: none; font-size: 1.1rem; padding: 4px; flex-shrink: 0; transition: color 0.15s; }
.logout-btn:hover { color: #fff; }

/* MAIN */
.main-content { margin-left: var(--sidebar-w); flex: 1; padding: 40px 48px; max-width: 1200px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 36px; gap: 16px; }
.topbar-left { flex: 1; }
.topbar-title { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; animation: fadeDown 0.6s ease both; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; font-weight: 500; animation: fadeDown 0.6s ease 0.05s both; }
.topbar-right { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.search-trigger { background: var(--card-bg); border: 1px solid var(--border); color: var(--text-muted); border-radius: 10px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, color 0.15s; min-height: 44px; min-width: 44px; }
.search-trigger:hover { box-shadow: var(--shadow); color: var(--blue); }

/* CARDS */
.card { background: var(--card-bg); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); border: none; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.card-sm { background: var(--card-bg); border-radius: 18px; padding: 24px 20px; box-shadow: var(--shadow); border: none; transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s ease; animation: fadeUp 0.6s ease both; position: relative; overflow: hidden; }
.card-sm::after { content: ""; position: absolute; top: -50%; right: -30%; width: 200px; height: 200px; background: var(--blue-light); opacity: 0.05; border-radius: 50%; transition: transform 0.5s ease, opacity 0.3s ease; }
.card-sm:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-hover); }
.card-sm:hover::after { transform: scale(1.4); opacity: 0.1; }

/* TOOL LINKS */
.tool-link { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--text); }
.tool-icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--navy)); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 8px 20px rgba(3,89,141,0.25); transition: transform 0.3s cubic-bezier(.2,.8,.2,1); flex-shrink: 0; }
.card-sm:hover .tool-icon-wrap { transform: rotate(-6deg) scale(1.08); }
.tool-icon { font-size: 1.4rem; }
.tool-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.tool-desc { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; line-height: 1.4; }
.tool-link-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.07em; margin-top: auto; }
.tool-link-label svg { transition: transform 0.3s ease; }
.card-sm:hover .tool-link-label svg { transform: translateX(4px); }

/* PORTAL BUTTONS */
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.portal-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px 28px; background: var(--card-bg); border-radius: 22px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border: none; transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease; animation: fadeUp 0.7s ease both; position: relative; overflow: hidden; min-height: 160px; }
.portal-btn::after { content: ""; position: absolute; top: -60%; right: -40%; width: 240px; height: 240px; background: var(--blue-light); opacity: 0.06; border-radius: 50%; transition: transform 0.5s ease, opacity 0.35s ease; }
.portal-btn:hover { transform: translateY(-8px) scale(1.01); box-shadow: var(--shadow-hover); }
.portal-btn:hover::after { transform: scale(1.35); opacity: 0.12; }
.portal-btn-icon-wrap { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--blue), var(--navy)); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 10px 20px rgba(3,89,141,0.25); transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.portal-btn:hover .portal-btn-icon-wrap { transform: rotate(-6deg) scale(1.08); }
.portal-btn-icon { font-size: 1.8rem; }
.portal-btn-name { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.portal-btn-arrow { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.07em; }
.portal-btn-arrow svg { transition: transform 0.3s ease; }
.portal-btn:hover .portal-btn-arrow svg { transform: translateX(4px); }

/* SECTION LABELS */
.section-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 14px; margin-top: 36px; }
.section-label:first-child { margin-top: 0; }

/* ANNOUNCEMENTS */
.announcement { background: var(--card-bg); border-radius: 14px; padding: 20px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--blue); animation: fadeUp 0.6s ease both; }
.announcement-pinned { border-left-color: var(--navy); }
.announcement-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.announcement-body  { font-size: 0.85rem; color: var(--text-dim); line-height: 1.65; font-weight: 500; }
.announcement-date  { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; font-weight: 600; }
.pin-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; letter-spacing: 0.03em; }
[data-theme="dark"] .pin-badge { color: var(--blue-light); }

/* DOC LIST */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item-wrap { display: flex; align-items: center; }
.doc-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--card-bg); border-radius: 14px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); border: none; transition: transform 0.2s ease, box-shadow 0.2s ease; flex: 1; min-height: 56px; }
.doc-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.doc-icon { font-size: 1.3rem; flex-shrink: 0; }
.doc-name { font-size: 0.9rem; font-weight: 600; }
.doc-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.doc-arrow { margin-left: auto; color: var(--text-muted); font-size: 1rem; }

/* VALUES */
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 8px; }
.value-item { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--card-bg); border-radius: 14px; box-shadow: var(--shadow-sm); font-weight: 600; font-size: 0.85rem; }
.value-icon { font-size: 1.2rem; flex-shrink: 0; }

/* OPS */
.ops-section { background: var(--card-bg); border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.ops-section-header { display: flex; align-items: center; gap: 12px; padding: 15px 20px; cursor: pointer; transition: background 0.12s; user-select: none; min-height: 52px; }
.ops-section-header:hover { background: rgba(3,89,141,0.04); }
[data-theme="dark"] .ops-section-header:hover { background: rgba(255,255,255,0.04); }
.ops-section-icon { font-size: 1rem; flex-shrink: 0; }
.ops-section-name { font-size: 0.88rem; font-weight: 700; flex: 1; }
.ops-section-count { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.ops-chevron { font-size: 1.3rem; color: var(--text-muted); transition: transform 0.2s; margin-left: 4px; }
.ops-section.open .ops-chevron { transform: rotate(90deg); }
.ops-section-body { display: none; border-top: 1px solid var(--border); padding: 10px; background: var(--bg); }
.ops-section.open .ops-section-body { display: block; }
.ops-section-body .doc-item { border-radius: 10px; margin-bottom: 6px; }
.ops-section-body .doc-item:last-child { margin-bottom: 0; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--card-bg); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; cursor: pointer; font-size: 0.9rem; font-weight: 700; transition: background 0.12s; min-height: 52px; }
.faq-question:hover { background: rgba(3,89,141,0.04); }
[data-theme="dark"] .faq-question:hover { background: rgba(255,255,255,0.04); }
.faq-chevron { font-size: 1.3rem; color: var(--text-muted); transition: transform 0.2s; }
.faq-item.open .faq-chevron { transform: rotate(90deg); }
.faq-answer { display: none; padding: 0 20px 16px; font-size: 0.85rem; color: var(--text-dim); line-height: 1.7; font-weight: 500; }
.faq-item.open .faq-answer { display: block; }

/* TABLES */
.data-table-wrap { overflow-x: auto; border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 500px; }
.data-table th { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 500; }
.data-table tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 700; }
.badge-ops  { background: rgba(3,89,141,0.1); color: var(--blue); }
.badge-user { background: rgba(91,113,134,0.1); color: var(--text-muted); }

/* ADMIN MOBILE CARDS */
.admin-cards-mobile { display: none; }
.admin-table-desktop { display: block; }
.admin-user-card { border-bottom: 1px solid var(--border); padding: 14px 0; }
.admin-user-card:last-child { border-bottom: none; }
.admin-user-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.admin-user-name  { font-size: 0.9rem; font-weight: 700; }
.admin-user-email { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.admin-user-login { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; margin-left: 8px; }
.admin-role-row { display: flex; gap: 8px; }
.admin-role-btn { width: 100%; padding: 8px 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-family: 'Montserrat', sans-serif; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: background 0.12s, border-color 0.12s; }
.admin-role-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.admin-role-label { font-size: 0.7rem; font-weight: 700; }
.admin-role-status { font-size: 0.9rem; }

/* FORMS */
.input-row { display: flex; gap: 10px; margin-bottom: 10px; }
input[type="email"], input[type="text"], textarea { background: var(--bg); border: 1.5px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 14px; font-size: 0.85rem; font-family: 'Montserrat', sans-serif; font-weight: 500; flex: 1; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(3,89,141,0.12); }
.btn { padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer; font-size: 0.8rem; font-weight: 700; font-family: 'Montserrat', sans-serif; letter-spacing: 0.03em; transition: opacity 0.15s, transform 0.1s; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; box-shadow: 0 4px 14px rgba(3,89,141,0.3); }
.btn-navy    { background: var(--navy); color: #fff; }
.btn-danger  { background: #FEE2E2; color: #DC2626; }
.btn-ghost   { background: var(--bg); color: var(--text-muted); border: 1.5px solid var(--border); }
[data-theme="dark"] .btn-danger { background: rgba(220,38,38,0.15); color: #F87171; }
[data-theme="dark"] .btn-ghost  { background: rgba(255,255,255,0.06); color: var(--text-muted); border-color: var(--border); }

/* SEARCH MODAL */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(9,42,73,0.4); backdrop-filter: blur(6px); z-index: 999; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.search-overlay.open { display: flex; }
.search-modal { background: var(--card-bg); border-radius: 20px; width: 100%; max-width: 600px; box-shadow: var(--shadow-hover); overflow: hidden; animation: fadeDown 0.18s ease; }
.search-modal-input-wrap { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.search-modal-input { flex: 1; background: none; border: none; color: var(--text); font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 500; }
.search-modal-input:focus { outline: none; }
.search-modal-input::placeholder { color: var(--text-muted); }
.search-kbd { background: var(--bg); border: 1.5px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 0.72rem; color: var(--text-muted); font-family: 'Montserrat', sans-serif; font-weight: 700; }
.search-modal-hint { padding: 12px 24px; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; }

/* SEARCH PAGE */
.search-bar-wrap { margin-bottom: 28px; }
.search-input-wrap { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border-radius: 14px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); }
.search-icon { font-size: 1rem; flex-shrink: 0; color: var(--text-muted); }
.search-input { flex: 1; background: none; border: none; color: var(--text); font-family: 'Montserrat', sans-serif; font-size: 0.9rem; font-weight: 500; padding: 10px 0; }
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--text-muted); }

/* CONTENT MANAGER */
.admin-content-list { display: flex; flex-direction: column; gap: 8px; }
.admin-content-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg); border-radius: 12px; border: 1.5px solid var(--border); }
.admin-content-item.inactive { opacity: 0.5; }
.admin-content-icon { font-size: 1.3rem; flex-shrink: 0; width: 32px; text-align: center; }
.admin-content-info { flex: 1; overflow: hidden; }
.admin-content-name { font-size: 0.85rem; font-weight: 700; }
.admin-content-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-content-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ANIMATIONS */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px);  } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* MOBILE */
.mobile-header { display: none; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--sidebar-bg); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--sidebar-border); }
.mobile-logo img { max-height: 32px; max-width: 120px; object-fit: contain; }
.hamburger { background: none; border: none; cursor: pointer; padding: 4px; display: flex; flex-direction: column; gap: 5px; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.bottom-tab-bar { display: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(9,42,73,0.5); z-index: 199; }

@media (max-width: 768px) {
  body { display: block; padding-bottom: 70px; }
  .mobile-header { display: flex; }
  .sidebar { position: fixed; top: 0; left: -100%; width: 280px; height: 100%; transition: left 0.25s ease; z-index: 200; }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; padding: 16px; }
  .topbar { flex-direction: column; gap: 10px; margin-bottom: 20px; }
  .topbar-title { font-size: 1.3rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .portal-btn { padding: 22px 16px; min-height: 120px; }
  .portal-btn-icon-wrap { width: 46px; height: 46px; font-size: 1.3rem; }
  .portal-btn-name { font-size: 0.85rem; }
  .admin-table-desktop { display: none; }
  .admin-cards-mobile { display: block; }
  .data-table { font-size: 0.78rem; }
  .admin-content-item { flex-wrap: wrap; }
  .admin-content-actions { width: 100%; justify-content: flex-end; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .bottom-tab-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 70px; background: var(--sidebar-bg); border-top: 1px solid var(--sidebar-border); z-index: 300; padding-bottom: env(safe-area-inset-bottom); }
  .tab-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: none; color: rgba(255,255,255,0.45); font-family: 'Montserrat', sans-serif; font-size: 0.62rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: color 0.15s; padding: 8px 0; -webkit-tap-highlight-color: transparent; min-height: 44px; }
  .tab-btn:hover, .tab-btn.active { color: #fff; }
  .tab-icon { font-size: 1.3rem; opacity: 0.5; transition: opacity 0.15s; }
  .tab-btn.active .tab-icon, .tab-btn:hover .tab-icon { opacity: 1; }
}

@media (min-width: 769px) {
  .mobile-header { display: none; }
  .sidebar-overlay { display: none !important; }
}
