/* =====================================================================
   MBI DIGITAL HUB — Gaya portal (tema identiti MBI Selangor)
   Biru logo #1070B0, oren #F19024, biru tua #1C244B, fon Ubuntu,
   tajuk huruf besar tebal, butang pil, kaki halaman kelabu gelap.
   Pemboleh ubah --brand-* boleh ditukar di Tetapan (brand_style.php)
   ===================================================================== */
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ubuntu-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ubuntu-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ubuntu-latin-700-normal.woff2") format("woff2"); }

:root {
  --brand-primary: #1070B0;   /* biru MBI */
  --brand-secondary: #1C244B; /* biru tua */
  --brand-accent: #F19024;    /* oren MBI */

  --ink: #1C244B;
  --ink-2: #4A5468;
  --ink-3: #69727D;
  --line: #E3E6EB;
  --line-2: #D2D7DF;
  --paper: #FFFFFF;
  --canvas: #F6F6F6;
  --tint: #EAF3FA;
  --charcoal: #333333;
  --black: #000000;

  --ok: #1B7A46;      --ok-bg: #E4F4EA;
  --warn: #A55A00;    --warn-bg: #FEF0DE;
  --bad: #B42318;     --bad-bg: #FDECEA;
  --neutral: #5B6476; --neutral-bg: #EEF0F4;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --pill: 100px;
  --shadow: 0 1px 2px rgba(28, 36, 75, .06), 0 2px 10px rgba(28, 36, 75, .05);
  --shadow-hover: 0 10px 28px rgba(16, 112, 176, .14);
  --font: "Ubuntu", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 35%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: #333; background: var(--canvas); }
h1, h2, h3 { line-height: 1.2; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: var(--brand-primary); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 36px; height: 36px; }

/* ---------- Butang ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; font-size: 14px; letter-spacing: .02em;
  padding: 10px 20px; border-radius: var(--pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-secondary); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-danger { background: var(--paper); color: var(--bad); border-color: #F2C4BF; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-disabled { background: var(--neutral-bg); color: var(--ink-3); cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-primary); text-decoration: underline; cursor: pointer; }
.pill {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: var(--pill);
  background: var(--brand-accent); color: #fff; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; text-decoration: none; white-space: nowrap;
  transition: background-color .15s;
}
.pill:hover { background: color-mix(in srgb, var(--brand-accent) 85%, black); }

/* ---------- Pengepala (gaya dua tingkat laman MBI) ---------- */
.topbar { background: var(--paper); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 14px rgba(28, 36, 75, .08); }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px 28px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { height: 52px; width: auto; max-width: 150px; object-fit: contain; }
.brand-placeholder {
  width: 48px; height: 48px; border-radius: 10px; flex: none;
  border: 1.5px dashed color-mix(in srgb, var(--brand-primary) 55%, transparent);
  display: grid; place-items: center; align-content: center; line-height: 1;
  color: var(--brand-primary); background: var(--tint);
}
.brand-placeholder-text { font-weight: 700; font-size: 13px; font-style: italic; }
.brand-placeholder-tag { font-size: 8.5px; color: var(--ink-3); margin-top: 2px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; padding-left: 14px; border-left: 2px solid var(--brand-accent); }
.brand-title { font-weight: 700; font-size: 17px; letter-spacing: .02em; color: var(--brand-secondary); white-space: nowrap; text-transform: uppercase; }
.brand-subtitle { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

.topbar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 1; min-width: 0; }
.utility-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-tools { display: flex; align-items: center; gap: 14px; width: 100%; justify-content: flex-end; }

.search { position: relative; display: flex; align-items: center; width: 100%; max-width: 460px; }
.search-icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; width: 18px; height: 18px; }
.search input {
  width: 100%; font: inherit; font-size: 14.5px;
  padding: 9px 40px 9px 42px; border-radius: var(--pill);
  border: 1px solid var(--line-2); background: var(--canvas); color: var(--ink);
  transition: border-color .15s, background-color .15s;
}
.search input:focus { outline: none; background: var(--paper); border-color: var(--brand-primary); box-shadow: var(--focus); }
.search-kbd { position: absolute; right: 12px; font: 500 11px/1 var(--font); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; background: var(--paper); }

.user-menu { position: relative; flex: none; }
.user-btn {
  display: flex; align-items: center; gap: 10px; font: inherit; color: var(--ink);
  background: none; border: 1px solid transparent; border-radius: var(--pill); padding: 3px 10px 3px 3px; cursor: pointer;
}
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--canvas); border-color: var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-primary); color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 2px var(--brand-accent);
}
.user-name { font-weight: 500; font-size: 14px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px;
  background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--brand-accent); border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(28, 36, 75, .16); padding: 6px; z-index: 30;
}
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; gap: 1px; }
.dropdown-head strong { font-size: 14.5px; color: var(--ink); }
.dropdown-head span { font-size: 13px; color: var(--ink-3); word-break: break-all; }
.dropdown-head .dropdown-role { color: var(--brand-primary); font-weight: 500; margin-top: 6px; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-size: 14px; color: var(--ink); text-decoration: none;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 0; background: none; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--canvas); }
.dropdown form { margin: 0; }

/* ---------- Hero (gradien biru MBI + motif garisan) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--brand-primary) 92%, white) 0%, var(--brand-primary) 35%, var(--brand-secondary) 100%);
}
.hero-lines {
  position: absolute; inset: 0;
  background: url("../img/hero-lines.svg") right center / cover no-repeat;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 48px 28px 52px; }
.hero-date { display: inline-block; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .85); margin-bottom: 10px; }
.hero h1 { color: #fff; font-size: clamp(28px, 4vw, 46px); font-weight: 700; letter-spacing: -0.01em; max-width: 18ch; }
.hero p { margin-top: 12px; font-size: clamp(15px, 1.6vw, 19px); font-weight: 500; color: rgba(255, 255, 255, .92); max-width: 46ch; }
.btn-hero {
  margin-top: 26px; background: #fff; color: #000; font-size: 15px; font-weight: 500;
  text-transform: uppercase; padding: 12px 26px; letter-spacing: .03em;
}
.btn-hero:hover { background: var(--brand-accent); color: #fff; }

/* ---------- Susun atur ---------- */
.portal { max-width: 1280px; margin: 0 auto; padding: 36px 28px 60px; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.portal-main { min-width: 0; display: flex; flex-direction: column; gap: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; text-transform: uppercase; color: #000; letter-spacing: .005em; }
.result-count { font-size: 13.5px; color: var(--ink-3); }

/* ---------- Notis ---------- */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px;
  border: 1px solid var(--line); border-left-width: 4px; background: var(--paper);
}
.notice .icon { margin-top: 2px; }
.notice-info { border-left-color: var(--brand-primary); color: var(--ink); }
.notice-info .icon { color: var(--brand-primary); }
.notice-success { background: var(--ok-bg); border-color: #BFE3CE; border-left-color: var(--ok); color: var(--ok); }
.notice-warning, .notice-maintenance { background: var(--warn-bg); border-color: #F6D3A6; border-left-color: var(--brand-accent); color: #7A4300; }
.notice-error { background: var(--bad-bg); border-color: #F5C2BC; border-left-color: var(--bad); color: var(--bad); }

/* ---------- Kegemaran ---------- */
.favourites .section-title { margin-bottom: 14px; }
.fav-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.fav-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 16px 6px 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--pill);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; box-shadow: var(--shadow);
}
.fav-chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.fav-chip-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: grid; place-items: center; }

/* ---------- Penapis ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--pill);
  padding: 7px 16px; cursor: pointer;
}
.chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.chip.is-active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }

/* ---------- Kad aplikasi ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.app-card {
  position: relative; background: var(--paper); border-radius: var(--radius);
  padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow); border-top: 4px solid var(--brand-primary);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.app-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-top-color: var(--brand-accent); }
.app-card.is-blocked { border-top-color: var(--line-2); }
.app-card.is-blocked:hover { transform: none; box-shadow: var(--shadow); }
.app-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.app-icon {
  --app-accent: var(--brand-primary);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--app-accent) 10%, white);
  color: var(--app-accent);
  overflow: hidden;
}
.app-icon .icon { width: 25px; height: 25px; }
.app-icon img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.fav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; background: none;
  color: var(--ink-3); cursor: pointer; display: grid; place-items: center; margin: -4px -6px 0 0;
}
.fav-btn:hover { background: var(--canvas); color: var(--brand-accent); }
.fav-btn[aria-pressed="true"] { color: var(--brand-accent); }
.fav-btn[aria-pressed="true"] .icon-star { fill: currentColor; }
.fav-btn.is-busy { opacity: .5; pointer-events: none; }
.app-name { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; color: #000; }
.app-category { font-size: 12.5px; color: var(--brand-accent); font-weight: 700; }
.app-desc {
  color: var(--ink-2); font-size: 14px; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.app-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; }
.app-last { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.app-status-msg { font-size: 13px; color: var(--warn); }
.app-actions { margin-top: 14px; }
.app-actions .btn { width: 100%; text-transform: uppercase; font-size: 13.5px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: var(--pill); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-available { color: var(--ok); background: var(--ok-bg); }
.status-maintenance { color: var(--warn); background: var(--warn-bg); }
.status-unavailable { color: var(--bad); background: var(--bad-bg); }
.status-unknown { color: var(--neutral); background: var(--neutral-bg); }

.empty { text-align: center; padding: 48px 24px; background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.empty .icon-lg { color: var(--ink-3); margin: 0 auto 10px; }
.empty h3 { font-size: 16px; margin-bottom: 4px; color: var(--ink); }

/* ---------- Bar sisi ---------- */
.portal-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 112px; padding-top: 6px; }
.side-card { background: var(--paper); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.side-card h2 { font-size: 15px; font-weight: 700; text-transform: uppercase; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #000; }
.side-card p { font-size: 13.5px; color: var(--ink-2); }
.side-sso { background: var(--brand-secondary); }
.side-sso h2 { color: #fff; }
.side-sso h2 .icon { color: var(--brand-accent); }
.side-sso p { color: rgba(255, 255, 255, .82); }
.side-note { font-size: 12px !important; color: var(--ink-3) !important; margin-top: 10px; }
.side-empty { color: var(--ink-3) !important; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.recent-list a, .recent-disabled { display: flex; gap: 10px; align-items: center; padding: 7px 8px; margin: 0 -8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.recent-list a:hover { background: var(--canvas); }
.recent-disabled { opacity: .6; }
.recent-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--tint); color: var(--brand-primary); display: grid; place-items: center; flex: none; }
.recent-text { display: flex; flex-direction: column; min-width: 0; }
.recent-text strong { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-text small { font-size: 12px; color: var(--ink-3); }

/* ---------- Kaki halaman (kelabu gelap + bar hitam seperti laman MBI) ---------- */
.footer { position: relative; background: var(--charcoal); color: #fff; overflow: hidden; }
.footer-lines { position: absolute; right: 4%; top: 0; bottom: 0; width: 320px; background: url("../img/lines.svg") center / cover no-repeat; opacity: .9; pointer-events: none; }
.footer-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 40px 28px; display: flex; gap: 56px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-title { font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.footer-org, .footer-dept { font-size: 14px; color: rgba(255, 255, 255, .78); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-heading { font-weight: 700; text-transform: uppercase; font-size: 14px; }
.footer-line { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 14px; }
a.footer-line:hover { color: var(--brand-accent); }
.footer-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-accent); display: grid; place-items: center; color: #fff; flex: none; }
.footer-bar { position: relative; background: var(--black); }
.footer-bar-inner { max-width: 1280px; margin: 0 auto; padding: 14px 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .8); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--brand-secondary); color: #fff; padding: 10px 20px; border-radius: var(--pill); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 50; }
.toast.is-error { background: var(--bad); }

/* ---------- Log masuk ---------- */
.page-login { background: var(--paper); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); }
.login-panel { padding: 56px clamp(24px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 44px; }
.login-brand .brand-text { padding-left: 14px; }
.login-panel h1 { font-size: 26px; font-weight: 700; text-transform: uppercase; color: #000; }
.login-lead { color: var(--ink-2); margin: 8px 0 26px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--focus); }
.form .btn-primary { text-transform: uppercase; padding: 12px 20px; }
.btn-sso { background: var(--paper); color: var(--ink); border-color: var(--line-2); padding: 12px 16px; width: 100%; font-size: 15px; }
.btn-sso:hover { border-color: var(--brand-primary); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-3); margin-top: 20px; }
.login-note .icon { margin-top: 3px; }
.dev-banner { margin-top: 24px; font-size: 12.5px; color: var(--warn); background: var(--warn-bg); padding: 8px 12px; border-radius: var(--radius-sm); }
.login-aside {
  position: relative; overflow: hidden; color: #fff; display: flex; align-items: flex-end; padding: 56px;
  background: radial-gradient(130% 120% at 0% 100%, color-mix(in srgb, var(--brand-primary) 90%, white) 0%, var(--brand-primary) 40%, var(--brand-secondary) 100%);
}
.login-aside::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 30%; background: url("../img/lines.svg") center / cover no-repeat; opacity: .95; }
.login-aside-inner { position: relative; max-width: 440px; }
.login-aside-quote { font-size: clamp(28px, 3.2vw, 42px); font-weight: 700; line-height: 1.15; text-transform: uppercase; margin-bottom: 28px; }
.login-aside-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 12px; color: rgba(255, 255, 255, .9); font-weight: 500; }
.login-aside-list li { display: flex; gap: 10px; align-items: center; }
.login-aside-list .icon { color: var(--brand-accent); }

/* ---------- Ralat ---------- */
.page-error { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-box { max-width: 520px; text-align: center; background: var(--paper); border-top: 4px solid var(--brand-accent); border-radius: var(--radius-lg); padding: 40px 32px; box-shadow: var(--shadow); }
.error-code { font-size: 56px; font-weight: 700; color: var(--brand-primary); line-height: 1; }
.error-box h1 { font-size: 20px; margin: 10px 0 8px; text-transform: uppercase; }
.error-box p { color: var(--ink-2); margin-bottom: 24px; }
.dev-detail { text-align: left; white-space: pre-wrap; font-size: 12px; background: var(--canvas); padding: 12px; border-radius: 8px; margin-bottom: 20px; }

/* ---------- Responsif ---------- */
@media (max-width: 1024px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding-top: 0; }
}
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .topbar-right { width: 100%; align-items: stretch; flex: none; }
  .utility-nav { display: none; }
  .search { max-width: none; }
  .user-name, .brand-subtitle, .search-kbd { display: none; }
  .brand-logo { height: 40px; }
  .hero-inner { padding: 30px 16px 34px; }
  .portal { padding: 24px 16px 44px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .footer-inner { padding: 30px 16px; gap: 28px; }
  .footer-lines { width: 160px; right: -20px; opacity: .5; }
  .footer-bar-inner { padding: 12px 16px; }
}
@media (max-width: 520px) {
  .app-grid { grid-template-columns: 1fr; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -16px; scrollbar-width: none; }
  .chip { flex: none; }
  .btn-hero { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .portal-side, .fav-btn, .filters, .hero-lines, .footer-lines { display: none; }
}
