:root {
  --brand-primary: #1767d6;
  --brand-primary-dark: #1252ab;
  --brand-primary-soft: #e8f1ff;
  --brand-accent: #f7941d;
  --brand-navigation: #06152b;
  --brand-navigation-soft: #29384a;
  --brand-background: #f3f6fa;
  --navy-950: var(--brand-navigation);
  --navy-900: var(--brand-navigation);
  --navy-800: var(--brand-navigation-soft);
  --blue-700: var(--brand-primary);
  --blue-600: var(--brand-primary);
  --blue-100: var(--brand-primary-soft);
  --orange-500: var(--brand-accent);
  --green-600: #198754;
  --green-100: #e8f7ef;
  --amber-700: #996400;
  --amber-100: #fff4d6;
  --red-600: #cc334a;
  --red-100: #ffeaee;
  --ink: #132238;
  --muted: #67758a;
  --border: #dce3ec;
  --surface: #fff;
  --background: var(--brand-background);
  --shadow: 0 18px 50px rgba(8, 27, 53, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--background); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(35,120,231,.38); outline-offset: 3px; }
[hidden] { display: none !important; }

.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  color: white; font-weight: 900; font-size: 20px; letter-spacing: -.06em;
  background: linear-gradient(145deg, var(--blue-600), #004bad 65%, var(--orange-500) 66%);
  box-shadow: 0 10px 24px rgba(35, 120, 231, .28);
}
.brand-mark span { transform: translateX(-1px); }
.brand-mark.has-logo { padding: 5px; background: white; box-shadow: 0 10px 24px rgba(8,27,53,.22); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: inherit; }
.brand-mark-large { width: 64px; height: 64px; border-radius: 19px; font-size: 30px; }
.eyebrow { margin: 0 0 10px; color: var(--blue-600); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, 1.12fr) minmax(430px, .88fr); background: var(--surface); }
.login-brand { position: relative; overflow: hidden; padding: clamp(50px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; color: white; background: var(--navy-950); }
.login-brand::before { content: ""; position: absolute; width: 520px; height: 520px; right: -240px; top: -200px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 80px rgba(35,120,231,.05), 0 0 0 160px rgba(35,120,231,.04); }
.login-brand::after { content: ""; position: absolute; width: 220px; height: 6px; left: clamp(50px, 8vw, 120px); bottom: 0; background: linear-gradient(90deg, var(--blue-600) 65%, var(--orange-500) 65%); }
.login-brand > * { position: relative; z-index: 1; }
.login-brand .eyebrow { margin-top: 28px; color: #8ebfff; }
.login-brand h1 { max-width: 720px; margin: 0; white-space: pre-line; font-size: clamp(42px, 5vw, 76px); line-height: 1.02; letter-spacing: -.055em; }
.login-copy { max-width: 590px; margin: 28px 0; color: #c7d4e6; font-size: 17px; line-height: 1.75; }
.login-features { display: flex; flex-wrap: wrap; gap: 10px; }
.login-features span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #d9e4f3; font-size: 12px; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; background: var(--brand-background); }
.login-card { width: min(470px, 100%); padding: 44px; background: white; border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); }
.login-card h2 { margin: 20px 0 10px; font-size: 30px; letter-spacing: -.035em; }
.login-card > p { color: var(--muted); line-height: 1.6; }
.login-card .button-primary { width: 100%; margin-top: 18px; }
.login-footnote { margin: 25px 0 0 !important; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; }
.login-site-footer { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.direct-login-form { display: grid; gap: 17px; margin-top: 23px; }
.login-description { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.direct-login-form .field label { font-size: 12px; }
.direct-login-form .field input { min-height: 46px; font-size: 16px; }
.direct-login-form .button-primary { margin-top: 2px; }
.login-password-wrap { position: relative; }
.login-password-wrap input { padding-right: 65px; }
.login-password-wrap button { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 12px; border: 0; background: transparent; color: var(--blue-600); border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; }
.login-consent { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.login-consent ul { padding-left: 20px; margin-bottom: 0; }
.alternative-login { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; }
.alternative-login summary { cursor: pointer; color: var(--muted); }
.alternative-login p { color: var(--muted); line-height: 1.6; }
.alternative-login .button { width: 100%; }
.mobile-brand { display: none; align-items: center; gap: 10px; color: var(--navy-900); font-size: 19px; }

.button { border: 0; border-radius: 10px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: white; background: var(--blue-700); box-shadow: 0 8px 20px rgba(23,103,214,.22); }
.button-primary:hover { background: var(--brand-primary-dark); }
.button-secondary { color: var(--navy-900); background: white; border: 1px solid var(--border); }
.button-danger { color: var(--red-600); background: var(--red-100); }
.button-link { padding-inline: 0; color: var(--blue-700); background: transparent; box-shadow: none; }
.button-large { min-height: 50px; font-size: 15px; }
.button-small { padding: 7px 10px; font-size: 12px; }
.button-icon { font-size: 18px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 260px; display: flex; flex-direction: column; color: white; background: var(--navy-950); }
.sidebar-brand { min-height: 88px; padding: 20px 22px; display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand strong { display: block; letter-spacing: .08em; }
.sidebar-brand small { display: block; margin-top: 3px; color: #9fb0c8; font-size: 11px; }
.sidebar-nav { flex: 1; padding: 17px 12px; overflow-y: auto; }
.nav-label { margin: 19px 12px 8px; color: #697e9b; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.nav-item { min-height: 44px; margin: 4px 0; padding: 0 13px; display: flex; align-items: center; gap: 12px; border-radius: 9px; color: #aebdd1; text-decoration: none; font-weight: 600; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(35,120,231,.3), rgba(35,120,231,.1)); box-shadow: inset 3px 0 var(--blue-600); }
.nav-icon { width: 20px; color: #7ea8dc; text-align: center; font-size: 17px; }
.sidebar-footer { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; color: #71839c; font-size: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.connection-state { display: flex; align-items: center; gap: 8px; color: #a4b4c8; font-size: 11px; }
.connection-state i { width: 7px; height: 7px; border-radius: 50%; background: #43c681; box-shadow: 0 0 0 4px rgba(67,198,129,.12); }
.main-shell { min-height: 100vh; margin-left: 260px; }
.topbar { position: sticky; top: 0; z-index: 15; height: 88px; padding: 0 30px; display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.topbar-title { flex: 1; }
.topbar-title p { margin: 0 0 3px; color: var(--blue-600); font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.topbar-title h1 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); background: white; }
.icon-button:hover { background: #f4f7fb; }
.menu-button { display: none; }
.profile-wrap { position: relative; }
.profile-button { min-height: 48px; padding: 5px 8px; display: flex; align-items: center; gap: 10px; color: var(--ink); background: transparent; border: 0; border-radius: 10px; }
.profile-button:hover { background: #f4f7fb; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--navy-800); font-weight: 800; }
.profile-text { min-width: 120px; text-align: left; }
.profile-text b, .profile-text small { max-width: 160px; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-text b { font-size: 12px; }
.profile-text small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.profile-menu { position: absolute; right: 0; top: 57px; width: 260px; padding: 10px; background: white; border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); }
.profile-menu > div { padding: 10px; border-bottom: 1px solid var(--border); }
.profile-menu b, .profile-menu small { display: block; overflow-wrap: anywhere; }
.profile-menu small { margin-top: 4px; color: var(--muted); }
.profile-menu button { width: 100%; margin-top: 7px; padding: 10px; border: 0; border-radius: 8px; text-align: left; color: var(--red-600); background: transparent; }
.profile-menu button:hover { background: var(--red-100); }

.content { padding: 30px; }
.page-head { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-head h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.5; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.metric-card { position: relative; min-height: 142px; padding: 20px; overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 15px; }
.metric-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -25px; bottom: -30px; border-radius: 50%; background: var(--metric-soft, var(--blue-100)); }
.metric-icon { width: 34px; height: 34px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 10px; color: var(--metric, var(--blue-700)); background: var(--metric-soft, var(--blue-100)); font-weight: 900; }
.metric-card strong { display: block; font-size: 29px; letter-spacing: -.04em; }
.metric-card span { color: var(--muted); font-size: 12px; }
.metric-card.green { --metric: var(--green-600); --metric-soft: var(--green-100); }
.metric-card.orange { --metric: var(--orange-500); --metric-soft: #fff1df; }
.metric-card.navy { --metric: var(--navy-800); --metric-soft: #e9eef5; }
.grid-two { margin-top: 16px; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 16px; }
.panel { background: white; border: 1px solid var(--border); border-radius: 15px; overflow: hidden; }
.panel-header { min-height: 67px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 20px; }
.status-line { padding: 14px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #edf1f6; }
.status-line:last-child { border-bottom: 0; }
.app-symbol { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--blue-700); font-weight: 900; }
.app-symbol.orange { background: var(--orange-500); }
.status-line > div:nth-child(2) { min-width: 0; flex: 1; }
.status-line b, .status-line small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-line small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.health-box { padding: 18px; border-radius: 13px; color: #145d3d; background: var(--green-100); }
.health-box b { display: block; margin-bottom: 6px; }
.health-box p { margin: 0; font-size: 12px; line-height: 1.55; }
.help-box { margin-top: 12px; padding: 16px; border-radius: 13px; background: #f1f5fb; }
.help-box b { display: block; margin-bottom: 6px; }
.help-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.user-status-tabs { width: max-content; max-width: 100%; margin-bottom: 12px; padding: 4px; display: flex; gap: 4px; overflow-x: auto; background: #e9eef5; border-radius: 12px; }
.user-status-tabs button { min-height: 42px; padding: 8px 13px; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-weight: 700; }
.user-status-tabs button b { min-width: 24px; padding: 3px 7px; border-radius: 999px; color: inherit; background: rgba(88,107,132,.1); font-size: 10px; }
.user-status-tabs button.active { color: var(--blue-700); background: white; box-shadow: 0 3px 10px rgba(21,42,72,.09); }
.user-status-tabs button.active b { background: var(--blue-100); }
.danger-zone { border-color: #f4c5ca; background: #fffafb; }
.danger-zone h3 { color: var(--red-600); }
.toolbar { margin-bottom: 15px; padding: 13px; display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--border); border-radius: 13px; }
.search-box { position: relative; min-width: 230px; flex: 1; }
.search-box::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 19px; }
.search-box input { width: 100%; height: 40px; padding: 0 12px 0 40px; border: 1px solid var(--border); border-radius: 9px; outline: none; }
.search-box input:focus, input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(35,120,231,.12); outline: 0; }
.filter-select { height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); background: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; color: var(--muted); background: #f8fafc; font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 13px 16px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.user-cell { min-width: 230px; display: flex; align-items: center; gap: 11px; }
.user-cell .avatar { width: 35px; height: 35px; background: #e5efff; color: var(--blue-700); }
.user-cell b, .user-cell small { display: block; }
.user-cell small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-chips { max-width: 340px; display: flex; flex-wrap: wrap; gap: 5px; }
.role-chip { max-width: 210px; padding: 5px 8px; overflow: hidden; border-radius: 6px; color: #285b9b; background: var(--blue-100); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.role-chip.empty { color: var(--muted); background: #eef2f6; }
.status-pill { width: max-content; padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; color: var(--green-600); background: var(--green-100); font-size: 9px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.inactive, .status-pill-red { color: var(--red-600); background: var(--red-100); }
.status-pill-blue { color: var(--blue-700); background: var(--blue-100); }
.status-pill-amber { color: var(--amber-700); background: var(--amber-100); }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.empty-state { padding: 55px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 16px; }
.empty-icon { width: 55px; height: 55px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 16px; color: var(--blue-700); background: var(--blue-100); font-size: 24px; }

.app-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.application-card { padding: 20px; background: white; border: 1px solid var(--border); border-radius: 15px; }
.application-card-head { display: flex; gap: 12px; align-items: flex-start; }
.application-card-head > div:nth-child(2) { min-width: 0; flex: 1; }
.application-card h3 { margin: 2px 0 5px; font-size: 15px; }
.application-card p { height: 38px; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.55; }
.application-meta { margin: 17px 0; padding: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-block: 1px solid #edf1f6; }
.application-meta small, .application-meta b { display: block; }
.application-meta small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.application-meta b { margin-top: 4px; font-size: 11px; }
.application-actions { display: flex; gap: 7px; }
.application-actions .button:first-child { flex: 1; }

.audit-item { padding: 14px 18px; display: grid; grid-template-columns: 170px minmax(160px,.7fr) minmax(190px,1fr) 120px; gap: 12px; align-items: center; border-bottom: 1px solid #edf1f6; }
.audit-item:last-child { border-bottom: 0; }
.audit-time { color: var(--muted); font-size: 10px; line-height: 1.5; }
.audit-action b, .audit-entity b { display: block; font-size: 11px; }
.audit-action small, .audit-entity small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.audit-ip { color: var(--muted); font-family: ui-monospace, monospace; font-size: 9px; text-align: right; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,13,28,.62); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(720px,100%); max-height: calc(100vh - 44px); display: flex; flex-direction: column; background: white; border-radius: 18px; box-shadow: 0 28px 90px rgba(0,0,0,.3); }
.modal-card.modal-wide { width: min(900px,100%); }
.modal-header { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-header .eyebrow { margin-bottom: 5px; }
.modal-body { padding: 22px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { margin-bottom: 7px; display: block; color: #35465d; font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); background: white; }
.field textarea { min-height: 80px; resize: vertical; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-title { margin: 0 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form-section-title h3 { margin: 0; font-size: 14px; }
.form-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.form-actions { margin-top: 22px; padding-top: 17px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.switch { position: relative; width: 43px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd4df; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + span { background: var(--blue-600); }
.switch input:checked + span::after { transform: translateX(19px); }
.access-list { display: grid; gap: 10px; }
.access-row { padding: 13px; display: grid; grid-template-columns: minmax(190px,1fr) minmax(210px,1fr); gap: 14px; align-items: center; border: 1px solid var(--border); border-radius: 11px; }
.access-toggle { display: flex; align-items: center; gap: 11px; }
.access-toggle > div { min-width: 0; }
.access-toggle b, .access-toggle small { display: block; }
.access-toggle small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.access-role select { width: 100%; min-height: 39px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; }
.access-role select:disabled { color: #99a5b4; background: #f2f5f8; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.notice-warning { color: #79510c; background: var(--amber-100); border: 1px solid #f2d987; }
.notice-info { color: #24548d; background: var(--blue-100); border: 1px solid #c7dbfb; }
.recovery-box { padding: 14px; border: 1px dashed #9fbfe9; border-radius: 10px; background: #f4f8ff; }
.recovery-box code { display: block; margin: 8px 0; overflow-wrap: anywhere; color: var(--blue-700); font-size: 11px; }

.loading-panel { min-height: 330px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #d8e2ef; border-top-color: var(--blue-600); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-stack { position: fixed; right: 20px; top: 20px; z-index: 200; width: min(390px,calc(100vw - 40px)); display: grid; gap: 9px; }
.toast { padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; color: white; background: var(--navy-900); border-radius: 11px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.success { background: #156a47; }
.toast.error { background: #a72b3e; }
.toast b { display: block; margin-bottom: 3px; font-size: 11px; }
.toast span { font-size: 10px; line-height: 1.45; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }
.popup-page { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: var(--navy-950); }
.popup-card { width: min(430px,100%); padding: 38px; color: var(--ink); text-align: center; background: white; border-radius: 20px; box-shadow: var(--shadow); }
.popup-card .brand-mark { margin: 0 auto; }
.popup-card h1 { margin: 18px 0 8px; font-size: 24px; }
.popup-card p { margin: 0; color: var(--muted); }
.sidebar-backdrop { display: none; }

/* Super Admin appearance settings */
.appearance-layout { display: grid; grid-template-columns: minmax(0,1fr) 370px; gap: 18px; align-items: start; }
.appearance-editor { min-width: 0; display: grid; gap: 16px; }
.appearance-panel-body { padding: 21px; }
.appearance-panel .form-grid { margin-top: 0; }
.appearance-logo-control { margin-bottom: 20px; padding-bottom: 20px; display: flex; align-items: center; gap: 17px; border-bottom: 1px solid var(--border); }
.appearance-logo-current { width: 78px; height: 78px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: white; background: linear-gradient(145deg, var(--brand-primary), var(--brand-primary) 65%, var(--brand-accent) 66%); border-radius: 21px; box-shadow: 0 12px 28px rgba(8,27,53,.14); font-size: 24px; font-weight: 900; }
.appearance-logo-current.has-logo { padding: 8px; background: white; border: 1px solid var(--border); }
.appearance-logo-current img { width: 100%; height: 100%; object-fit: contain; }
.appearance-logo-control > div:last-child { min-width: 0; }
.appearance-logo-control b { display: block; margin-bottom: 4px; }
.appearance-logo-control p { margin: 0 0 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.appearance-color-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.appearance-color-field { padding: 14px; display: grid; gap: 9px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.appearance-color-field > span { font-weight: 750; }
.appearance-color-field > div { display: flex; align-items: center; gap: 10px; }
.appearance-color-field input { width: 48px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: white; cursor: pointer; }
.appearance-color-field output { color: var(--ink); font-family: ui-monospace, monospace; font-size: 11px; font-weight: 750; }
.appearance-color-field small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.appearance-savebar { position: sticky; z-index: 5; bottom: 14px; padding: 15px 17px; display: flex; align-items: center; gap: 14px; color: white; background: rgba(6,21,43,.95); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; box-shadow: 0 16px 38px rgba(6,21,43,.22); backdrop-filter: blur(12px); }
.appearance-savebar > div { min-width: 0; flex: 1; }
.appearance-savebar b, .appearance-savebar small { display: block; }
.appearance-savebar small { margin-top: 4px; color: #aebed2; font-size: 10px; }
.appearance-preview-wrap { position: sticky; top: 106px; }
.appearance-preview-label { margin-bottom: 9px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.appearance-preview { --preview-primary: #1767d6; --preview-primary-soft: #e8f1ff; --preview-accent: #f7941d; --preview-navigation: #06152b; --preview-background: #f3f6fa; min-height: 610px; padding-bottom: 15px; overflow: hidden; background: var(--preview-background); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 18px 45px rgba(8,27,53,.1); }
.appearance-preview-hero { min-height: 255px; padding: 25px; color: white; background: linear-gradient(145deg, var(--preview-navigation), var(--preview-primary)); }
.appearance-preview-logo { width: 52px; height: 52px; margin-bottom: 22px; display: grid; place-items: center; overflow: hidden; color: white; background: linear-gradient(145deg, var(--preview-primary), var(--preview-primary) 65%, var(--preview-accent) 66%); border-radius: 15px; font-size: 17px; font-weight: 900; }
.appearance-preview-logo.has-logo { padding: 5px; background: white; }
.appearance-preview-logo img { width: 100%; height: 100%; object-fit: contain; }
.appearance-preview-hero small { color: #bdd0e7; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.appearance-preview-hero h3 { margin: 9px 0; white-space: pre-line; font-size: 28px; line-height: 1.03; letter-spacing: -.04em; }
.appearance-preview-hero p { margin: 0; color: #d6e1ef; font-size: 11px; line-height: 1.5; }
.appearance-preview-card { margin: -20px 18px 0; padding: 20px; background: white; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 25px rgba(8,27,53,.1); }
.appearance-preview-card > span { width: max-content; padding: 5px 8px; display: block; color: var(--preview-primary); background: var(--preview-primary-soft); border-radius: 999px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.appearance-preview-card h4 { margin: 14px 0 6px; font-size: 19px; letter-spacing: -.03em; }
.appearance-preview-card p { min-height: 34px; margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.appearance-preview-card i { height: 34px; margin-top: 8px; display: block; background: #f9fbfd; border: 1px solid var(--border); border-radius: 7px; }
.appearance-preview-card button { width: 100%; min-height: 38px; margin-top: 12px; color: white; background: var(--preview-primary); border: 0; border-radius: 8px; font-weight: 750; }
.appearance-preview footer { padding: 18px 20px 0; color: var(--muted); text-align: center; font-size: 9px; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .audit-item { grid-template-columns: 150px 1fr 1fr; }
  .audit-ip { display: none; }
  .appearance-layout { grid-template-columns: 1fr; }
  .appearance-preview-wrap { position: static; order: -1; }
  .appearance-preview { min-height: 0; }
  .appearance-preview-hero { min-height: 220px; }
}
@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 20px; }
  .mobile-brand { display: flex; margin-bottom: 30px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(3,13,28,.55); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .main-shell { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { height: 76px; padding: 0 15px; }
  .content { padding: 18px 15px; }
  .grid-two { grid-template-columns: 1fr; }
  .profile-text { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .appearance-preview-wrap { display: none; }
}
@media (max-width: 600px) {
  .login-card { padding: 29px 23px; border-radius: 18px; }
  .metric-grid, .app-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .user-status-tabs { width: 100%; }
  .user-status-tabs button { flex: 1; justify-content: center; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filter-select { width: 100%; }
  .access-row { grid-template-columns: 1fr; }
  .audit-item { grid-template-columns: 1fr; gap: 5px; }
  .audit-ip { display: block; text-align: left; }
  .modal { padding: 0; place-items: stretch; }
  .modal-card, .modal-card.modal-wide { width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .topbar-title h1 { font-size: 18px; }
  .content { padding: 15px 11px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .appearance-panel-body { padding: 17px; }
  .appearance-logo-control { align-items: flex-start; flex-direction: column; }
  .appearance-color-grid { grid-template-columns: 1fr; }
  .appearance-savebar { bottom: 8px; align-items: stretch; flex-direction: column; }
  .appearance-savebar .button { width: 100%; }
}

/* AXINDO Access personal portal */
.portal-shell { min-height: 100vh; background: var(--brand-background); }
.portal-rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 255px; display: flex; flex-direction: column; color: white; background: linear-gradient(180deg, var(--brand-navigation) 0%, var(--brand-navigation-soft) 100%); }
.portal-brand { min-height: 90px; padding: 22px 24px; display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.portal-brand strong, .portal-brand small { display: block; }
.portal-brand strong { font-size: 16px; letter-spacing: .1em; }
.portal-brand small { margin-top: 3px; color: #9fb4d0; font-size: 13px; }
.portal-rail-nav { flex: 1; padding: 23px 13px; overflow-y: auto; }
.portal-nav-item { min-height: 50px; margin-bottom: 6px; padding: 0 14px; display: flex; align-items: center; gap: 13px; color: #b2c3da; text-decoration: none; border-radius: 13px; }
.portal-nav-item > span { width: 25px; color: #83addd; text-align: center; font-size: 21px; }
.portal-nav-item b { font-size: 14px; }
.portal-nav-item:hover, .portal-nav-item.active { color: white; background: rgba(69,143,241,.16); }
.portal-nav-item.active { box-shadow: inset 3px 0 var(--brand-primary); }
.portal-admin-item { margin-top: 25px; color: #ffd49d; border: 1px solid rgba(247,148,29,.22); }
.portal-admin-item > span { color: #f7a43e; }
.portal-rail-user { min-height: 84px; padding: 16px 18px; display: flex; align-items: center; gap: 11px; border-top: 1px solid rgba(255,255,255,.08); }
.portal-rail-user > div { min-width: 0; }
.portal-rail-user b, .portal-rail-user small { display: block; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-rail-user b { font-size: 14px; }
.portal-rail-user small { margin-top: 3px; color: #91a6c1; font-size: 12px; }
.portal-rail-user .avatar { background: var(--brand-primary); }
.portal-main { min-height: 100vh; margin-left: 255px; }
.portal-topbar { position: sticky; top: 0; z-index: 15; min-height: 80px; padding: 0 32px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.92); border-bottom: 1px solid #dae3ef; backdrop-filter: blur(14px); }
.portal-topbar-title { flex: 1; }
.portal-topbar-title small { display: block; color: var(--blue-700); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.portal-topbar-title h1 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.025em; }
.portal-mobile-brand { display: none; }
.portal-avatar-button { padding: 0; border: 0; border-radius: 14px; background: transparent; }
.portal-avatar-button .avatar { width: 44px; height: 44px; border-radius: 14px; font-size: 15px; background: linear-gradient(145deg, var(--brand-primary), var(--brand-primary-dark)); box-shadow: 0 8px 18px rgba(23,103,214,.2); }
.portal-content { width: min(1180px, 100%); margin: 0 auto; padding: 30px 32px 52px; }
.portal-welcome { position: relative; min-height: 190px; padding: 34px 38px; display: flex; align-items: center; overflow: hidden; color: white; background: linear-gradient(120deg, var(--brand-navigation) 0%, var(--brand-navigation-soft) 70%, var(--brand-primary) 100%); border-radius: 24px; box-shadow: 0 22px 55px rgba(6,21,43,.18); }
.portal-welcome::after { content: ""; position: absolute; width: 270px; height: 270px; right: -65px; top: -95px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.035), 0 0 0 90px rgba(255,255,255,.025); }
.portal-welcome > div { position: relative; z-index: 1; }
.portal-welcome p { margin: 0 0 5px; color: #b6c9e2; font-size: 16px; }
.portal-welcome h2 { margin: 0 0 14px; font-size: clamp(31px,4vw,46px); letter-spacing: -.045em; }
.portal-welcome span { color: #d8e5f5; font-size: 15px; }
.portal-welcome-mark { position: absolute; z-index: 1; right: 55px; color: rgba(255,255,255,.13) !important; font-size: 120px !important; font-weight: 900; line-height: 1; }
.portal-section-head { margin: 30px 2px 14px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.portal-section-head small, .portal-page-intro small { color: var(--blue-700); font-size: 12px; font-weight: 800; letter-spacing: .11em; }
.portal-section-head h3 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.025em; }
.portal-section-head a { color: var(--blue-700); font-size: 14px; font-weight: 750; text-decoration: none; }
.portal-app-list, .portal-app-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.portal-app-card { min-height: 128px; padding: 18px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; color: var(--ink); text-align: left; background: white; border: 1px solid #dbe4ef; border-radius: 18px; box-shadow: 0 8px 24px rgba(8,27,53,.045); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.portal-app-card:hover { transform: translateY(-2px); border-color: #a9c9f5; box-shadow: 0 14px 28px rgba(8,27,53,.09); }
.portal-app-icon { width: 54px; height: 54px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--brand-primary), var(--brand-primary-dark)); border-radius: 17px; font-size: 17px; font-weight: 900; box-shadow: 0 10px 20px rgba(23,103,214,.2); }
.portal-app-icon.media { background: linear-gradient(145deg, var(--brand-primary) 0%, var(--brand-primary) 66%, var(--brand-accent) 67%); }
.portal-app-icon.mini { width: 42px; height: 42px; border-radius: 13px; font-size: 14px; }
.portal-app-copy { min-width: 0; }
.portal-app-copy b, .portal-app-copy small, .portal-app-copy em { display: block; }
.portal-app-copy b { margin-bottom: 5px; font-size: 16px; }
.portal-app-copy small { min-height: 38px; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.4; }
.portal-app-copy em { width: max-content; max-width: 100%; margin-top: 9px; padding: 4px 8px; overflow: hidden; color: #175cae; background: #e9f2ff; border-radius: 7px; font-size: 12px; font-style: normal; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.portal-app-arrow { color: #7e91aa; font-size: 30px; font-weight: 300; }
.portal-security-banner, .portal-admin-banner { margin-top: 17px; padding: 20px 22px; display: flex; align-items: center; gap: 16px; background: white; border: 1px solid #dbe4ef; border-radius: 18px; }
.portal-security-icon { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; color: #168051; background: #e5f8ef; border-radius: 16px; font-size: 24px; }
.portal-security-banner > div, .portal-admin-banner > div { min-width: 0; flex: 1; }
.portal-security-banner small, .portal-admin-banner small { display: block; margin-bottom: 3px; color: var(--blue-700); font-size: 12px; font-weight: 800; letter-spacing: .09em; }
.portal-security-banner b, .portal-admin-banner b { display: block; font-size: 16px; }
.portal-security-banner p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.portal-security-banner > a { padding: 7px 11px; color: var(--blue-700); font-size: 31px; text-decoration: none; }
.portal-admin-banner { color: white; background: linear-gradient(115deg, var(--brand-navigation), var(--brand-navigation-soft)); border: 0; }
.portal-admin-banner small { color: #f6b65f; }
.portal-page-intro { margin: 3px 0 24px; }
.portal-page-intro h2 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.035em; }
.portal-page-intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.portal-empty { grid-column: 1 / -1; min-height: 250px; padding: 30px; display: grid; place-items: center; align-content: center; text-align: center; background: white; border: 1px dashed #bdcbdc; border-radius: 20px; }
.portal-empty > span { width: 58px; height: 58px; display: grid; place-items: center; color: var(--blue-700); background: var(--blue-100); border-radius: 18px; font-size: 26px; }
.portal-empty h3 { margin: 15px 0 6px; font-size: 18px; }
.portal-empty p { max-width: 380px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.security-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.security-overview article { min-height: 118px; padding: 19px; display: flex; align-items: center; gap: 14px; background: white; border: 1px solid #dbe4ef; border-radius: 18px; }
.security-overview small, .portal-form-head small { display: block; color: var(--blue-700); font-size: 12px; font-weight: 800; letter-spacing: .09em; }
.security-overview b { display: block; margin-top: 3px; font-size: 16px; }
.security-overview p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.security-badge { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: var(--blue-700); background: var(--blue-100); border-radius: 15px; font-size: 20px; font-weight: 800; }
.security-badge.good { color: #16724b; background: #e3f8ed; }
.portal-form-card { max-width: 720px; margin-top: 18px; padding: 25px; background: white; border: 1px solid #dbe4ef; border-radius: 20px; box-shadow: 0 10px 30px rgba(8,27,53,.05); }
.portal-form-head { margin-bottom: 21px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.portal-form-head h3 { margin: 5px 0 0; font-size: 21px; }
.step-chip { padding: 7px 10px; color: #24548d; background: #e9f2ff; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.self-password-form { display: grid; gap: 17px; }
.self-password-form .field label { font-size: 14px; }
.self-password-form .field input { min-height: 50px; font-size: 16px; }
.self-password-form .field-help { font-size: 13px; }
.self-password-form .button { width: 100%; min-height: 50px; }
.portal-form-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.profile-identity-card { padding: 25px; display: flex; align-items: center; gap: 18px; color: white; background: linear-gradient(120deg, var(--brand-navigation), var(--brand-navigation-soft)); border-radius: 22px; }
.profile-large-avatar { width: 76px; height: 76px; flex: 0 0 auto; display: grid; place-items: center; color: #0b3970; background: white; border-radius: 23px; font-size: 22px; font-weight: 900; }
.profile-identity-card h3 { margin: 0 0 5px; font-size: 24px; }
.profile-identity-card p { margin: 0 0 7px; color: #ccdaeb; font-size: 15px; }
.profile-identity-card span { color: #99bce2; font-size: 14px; }
.profile-detail-card { margin-top: 15px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; background: #dbe4ef; border: 1px solid #dbe4ef; border-radius: 18px; }
.profile-detail-card > div { padding: 19px; background: white; }
.profile-detail-card small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .06em; }
.profile-detail-card b { font-size: 15px; overflow-wrap: anywhere; }
.profile-role-card { margin-top: 15px; padding: 4px 20px 12px; background: white; border: 1px solid #dbe4ef; border-radius: 18px; }
.profile-role-card > div:not(.portal-section-head) { padding: 12px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid #edf1f6; }
.profile-role-card p { margin: 0; }
.profile-role-card p b, .profile-role-card p small { display: block; }
.profile-role-card p small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.portal-muted { color: var(--muted); font-size: 14px; }
.profile-logout { width: 100%; min-height: 52px; margin-top: 15px; color: var(--red-600); background: white; border: 1px solid #efcbd2; border-radius: 15px; font-weight: 750; }
.portal-app-detail { display: grid; place-items: center; text-align: center; }
.portal-app-detail > p { max-width: 500px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.portal-app-detail > div { width: 100%; margin: 10px 0 20px; padding: 14px; background: #f2f6fb; border-radius: 12px; }
.portal-app-detail small, .portal-app-detail b { display: block; }
.portal-app-detail small { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 750; }
.portal-app-detail .button { width: 100%; }
.portal-section-tabs { width: max-content; max-width: 100%; margin: 0 0 18px; padding: 5px; display: flex; gap: 5px; background: #e9eff7; border: 1px solid #d9e3ef; border-radius: 14px; }
.portal-section-tabs a { min-width: 125px; min-height: 42px; padding: 0 17px; display: flex; align-items: center; justify-content: center; color: #66778c; text-decoration: none; border-radius: 10px; font-size: 13px; font-weight: 800; }
.portal-section-tabs a.active { color: white; background: var(--brand-navigation); box-shadow: 0 7px 16px rgba(6,21,43,.15); }
.portal-bottom-nav { display: none; }

@media (max-width: 920px) {
  .portal-rail { width: 225px; }
  .portal-main { margin-left: 225px; }
  .portal-content { padding-inline: 22px; }
  .portal-app-list, .portal-app-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { overscroll-behavior-y: none; }
  .portal-rail { display: none; }
  .portal-main { margin-left: 0; }
  .portal-topbar { min-height: calc(68px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 17px 0; background: rgba(247,250,254,.94); }
  .portal-topbar-title { display: none; }
  .portal-mobile-brand { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; color: var(--navy-900); text-decoration: none; }
  .portal-mobile-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; }
  .portal-mobile-brand b { font-size: 17px; letter-spacing: .04em; }
  .portal-mobile-brand em { color: var(--blue-700); font-style: normal; font-weight: 650; letter-spacing: 0; }
  .portal-content { padding: 17px 15px calc(92px + env(safe-area-inset-bottom)); }
  .portal-bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; min-height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 8px env(safe-area-inset-bottom); display: flex; align-items: stretch; justify-content: space-around; background: rgba(255,255,255,.96); border-top: 1px solid #d8e1ec; box-shadow: 0 -8px 28px rgba(8,27,53,.08); backdrop-filter: blur(16px); }
  .portal-bottom-nav a { min-width: 58px; min-height: 54px; padding: 5px 7px; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #748398; text-decoration: none; border-radius: 12px; }
  .portal-bottom-nav a > span { font-size: 21px; line-height: 1; }
  .portal-bottom-nav a > b { font-size: 11px; }
  .portal-bottom-nav a.active { color: var(--blue-700); background: var(--brand-primary-soft); }
  .portal-welcome { min-height: 172px; padding: 25px 22px; border-radius: 21px; }
  .portal-welcome p { font-size: 14px; }
  .portal-welcome h2 { font-size: 32px; }
  .portal-welcome span { display: block; max-width: 230px; font-size: 14px; line-height: 1.45; }
  .portal-welcome-mark { right: 18px; font-size: 86px !important; }
  .portal-section-head { margin-top: 25px; }
  .portal-section-head h3 { font-size: 20px; }
  .portal-app-card { min-height: 112px; padding: 15px; gap: 12px; border-radius: 17px; }
  .portal-app-card.compact { min-height: 104px; }
  .portal-app-icon { width: 50px; height: 50px; border-radius: 15px; }
  .portal-app-copy b { font-size: 15px; }
  .portal-app-copy small { min-height: 0; max-height: 39px; font-size: 13px; }
  .portal-security-banner, .portal-admin-banner { padding: 17px; }
  .portal-security-banner p { display: none; }
  .portal-security-banner b, .portal-admin-banner b { font-size: 14px; line-height: 1.4; }
  .portal-page-intro { margin-bottom: 18px; }
  .portal-page-intro h2 { font-size: 25px; }
  .portal-page-intro p { font-size: 14px; }
  .security-overview { grid-template-columns: 1fr; }
  .security-overview article { min-height: 100px; padding: 16px; }
  .portal-form-card { padding: 19px 17px; border-radius: 18px; }
  .portal-form-head { align-items: flex-start; }
  .portal-form-head h3 { font-size: 19px; }
  .step-chip { font-size: 11px; }
  .profile-identity-card { padding: 21px 18px; border-radius: 20px; }
  .profile-large-avatar { width: 64px; height: 64px; border-radius: 19px; }
  .profile-identity-card h3 { font-size: 20px; }
  .profile-detail-card { grid-template-columns: 1fr; }
  .profile-detail-card > div { padding: 16px; }
  .modal { place-items: end center; padding: 0; }
  .modal-card.portal-sheet { width: 100%; min-height: 0; max-height: 88vh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-card.portal-sheet::before { content: ""; width: 44px; height: 4px; margin: 9px auto -4px; flex: 0 0 auto; background: #c4cedb; border-radius: 999px; }
}

@media (max-width: 430px) {
  .login-panel { min-height: 100dvh; padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)); align-items: center; }
  .login-card { padding: 26px 20px; border: 0; border-radius: 22px; box-shadow: 0 15px 45px rgba(8,27,53,.1); }
  .login-card h2 { font-size: 27px; }
  .mobile-brand { margin-bottom: 24px; }
  .portal-app-arrow { font-size: 25px; }
  .portal-app-copy em { font-size: 11px; }
  .portal-bottom-nav a { min-width: 0; padding-inline: 3px; flex: 1 1 20%; }
  .portal-bottom-nav a > b { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* AXINDO AI */
.ai-hero{position:relative;overflow:hidden;padding:28px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;color:white;background:linear-gradient(120deg,var(--brand-navigation),var(--brand-navigation-soft) 68%,var(--brand-primary));border-radius:22px;box-shadow:0 18px 46px rgba(6,21,43,.16)}
.ai-hero::after{content:"✦";position:absolute;right:24%;top:-34px;color:rgba(255,255,255,.08);font-size:150px;line-height:1}
.ai-hero>div{position:relative;z-index:1}.ai-hero small{color:#93bdf0;font-size:11px;font-weight:850;letter-spacing:.12em}.ai-hero h2{margin:5px 0 8px;font-size:34px}.ai-hero p{max-width:680px;margin:0;color:#d1deee;font-size:14px;line-height:1.55}
.ai-service-status{position:relative;z-index:1;min-width:170px;padding:12px 14px;display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.12);border-radius:14px}
.ai-service-status i{width:9px;height:9px;border-radius:50%;background:#f0b44b;box-shadow:0 0 0 5px rgba(240,180,75,.12)}.ai-service-status.good i{background:#43c681;box-shadow:0 0 0 5px rgba(67,198,129,.12)}
.ai-service-status b,.ai-service-status small{display:block}.ai-service-status small{margin-top:2px;color:#b9c9dc;font-size:10px;letter-spacing:0}
.ai-admin-bar{margin-top:12px;padding:12px 14px;display:flex;align-items:center;gap:16px;background:#fff;border:1px solid var(--border);border-radius:14px}.ai-admin-bar>div{min-width:0;flex:1}.ai-admin-bar b,.ai-admin-bar span{display:block}.ai-admin-bar span{margin-top:3px;color:var(--muted);font-size:11px}
.ai-examples{margin:16px 0 12px;display:flex;gap:8px;flex-wrap:wrap}.ai-examples button{padding:9px 12px;color:#24548d;background:#eef5ff;border:1px solid #d3e4fb;border-radius:999px;font-size:11px;font-weight:700}.ai-examples button:hover{background:#e2efff}
.ai-chat-card{background:#fff;border:1px solid var(--border);border-radius:20px;overflow:hidden;box-shadow:0 10px 32px rgba(8,27,53,.05)}
.ai-chat-list{height:min(56vh,620px);min-height:360px;padding:22px;overflow-y:auto;background:linear-gradient(180deg,#fbfdff,#f5f8fc)}
.ai-empty{height:100%;display:grid;place-items:center;align-content:center;text-align:center;color:var(--muted)}.ai-empty>span{width:64px;height:64px;display:grid;place-items:center;color:white;background:linear-gradient(145deg,var(--brand-primary),var(--brand-navigation));border-radius:20px;font-size:28px;box-shadow:0 14px 28px rgba(23,103,214,.2)}.ai-empty h3{margin:16px 0 6px;color:var(--ink);font-size:20px}.ai-empty p{max-width:450px;margin:0;line-height:1.5}
.ai-message{margin:0 0 18px;display:flex;gap:11px;align-items:flex-start}.ai-message>div{max-width:min(780px,86%);padding:14px 16px;background:#fff;border:1px solid #dce5f0;border-radius:16px;box-shadow:0 6px 16px rgba(8,27,53,.04)}.ai-message small{display:block;margin-bottom:6px;color:var(--blue-700);font-size:9px;font-weight:850;letter-spacing:.12em}.ai-message p{margin:0;font-size:13px;line-height:1.65}
.ai-message.user{justify-content:flex-end}.ai-message.user>div{color:white;background:var(--brand-primary);border-color:var(--brand-primary);border-bottom-right-radius:5px}.ai-message.user small{color:#d8e9ff}
.ai-message.assistant>div{border-bottom-left-radius:5px}.ai-avatar{width:34px;height:34px;flex:0 0 auto;display:grid;place-items:center;color:white;background:linear-gradient(145deg,var(--brand-navigation),var(--brand-primary));border-radius:11px;font-size:15px}.ai-thinking{color:var(--muted);font-style:italic}
.ai-sources{margin-top:14px;padding-top:11px;border-top:1px solid #edf1f6}.ai-sources>small{margin-bottom:7px}.ai-sources a,.ai-sources>div{margin-top:6px;padding:9px 10px;display:grid;grid-template-columns:1fr auto;gap:2px 10px;color:var(--ink);text-decoration:none;background:#f7faff;border:1px solid #e1eaf5;border-radius:10px}.ai-sources a:hover{border-color:#b6d3f6}.ai-sources b{font-size:11px}.ai-sources span{grid-column:1;color:var(--muted);font-size:9px}.ai-sources i{grid-column:2;grid-row:1/3;align-self:center;color:var(--blue-700);font-style:normal}
.ai-composer{padding:13px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;border-top:1px solid var(--border)}.ai-composer textarea{width:100%;min-height:48px;max-height:140px;padding:12px 13px;resize:vertical;border:1px solid var(--border);border-radius:12px;line-height:1.45}.ai-composer .button{min-height:48px;padding-inline:22px}
.ai-footnote{margin:0;padding:0 15px 13px;color:var(--muted);font-size:9px;line-height:1.45}
@media(max-width:720px){.portal-bottom-nav a{min-width:0;padding-inline:4px;flex:1 1 20%}.portal-bottom-nav a>b{font-size:10px}.ai-hero{padding:22px 19px;align-items:flex-start;flex-direction:column;border-radius:19px}.ai-hero h2{font-size:28px}.ai-service-status{width:100%;min-width:0}.ai-admin-bar{align-items:flex-start;flex-direction:column}.ai-admin-bar .button{width:100%}.ai-chat-list{height:calc(100vh - 365px);min-height:330px;padding:15px}.ai-message>div{max-width:89%;padding:12px 13px}.ai-composer{grid-template-columns:1fr}.ai-composer .button{width:100%}.ai-examples{overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.ai-examples button{white-space:nowrap}}

.ai-schedule-panel{display:block}.ai-schedule-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.ai-schedule-head>div{min-width:0;flex:1}
.ai-schedule-form{margin-top:12px;padding-top:12px;display:flex;align-items:end;gap:10px;flex-wrap:wrap;border-top:1px solid var(--border)}
.ai-schedule-form label{display:grid;gap:5px;min-width:120px}.ai-schedule-form label>span{font-size:10px;font-weight:750;color:var(--muted)}
.ai-schedule-form select,.ai-schedule-form input{height:36px;padding:0 10px;background:#fff;border:1px solid var(--border);border-radius:9px;color:var(--ink)}
.ai-schedule-form [hidden]{display:none!important}
@media(max-width:720px){.ai-schedule-head{width:100%;align-items:flex-start;flex-direction:column}.ai-schedule-head .button{width:100%}.ai-schedule-form{width:100%;display:grid;grid-template-columns:1fr 1fr}.ai-schedule-form label{min-width:0}.ai-schedule-form .button{grid-column:1/-1;width:100%}}


/* Bank Data portal */
.bank-intro,.mail-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}
.bank-count{padding:8px 11px;color:var(--blue-700);background:var(--brand-primary-soft);border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}
.bank-toolbar{margin-bottom:16px;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 190px auto;gap:10px;background:#fff;border:1px solid #dbe4ef;border-radius:15px}
.bank-toolbar .search-box{min-width:0}.bank-toolbar select{min-height:40px;padding:0 10px;background:#fff;border:1px solid var(--border);border-radius:10px}
.bank-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.bank-grid>.bank-empty{grid-column:1/-1}
.bank-card{padding:18px;background:#fff;border:1px solid #dbe4ef;border-radius:18px;box-shadow:0 8px 24px rgba(8,27,53,.045)}
.bank-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.bank-type,.bank-ai-ready{padding:5px 8px;border-radius:999px;font-size:10px;font-weight:850}
.bank-type{color:var(--blue-700);background:#edf5ff}.bank-ai-ready{color:#16774a;background:#e8f7ef}
.bank-card h3{margin:13px 0 7px;font-size:17px;line-height:1.35}.bank-meta{margin:0;color:var(--muted);font-size:11px;line-height:1.55}
.bank-notes{margin:12px 0 0;display:-webkit-box;overflow:hidden;color:#536276;font-size:12px;line-height:1.55;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.bank-actions{margin-top:16px;display:flex;gap:8px;flex-wrap:wrap}

/* Native Mail */
.mail-head-actions{display:flex;gap:8px}.mail-empty-setup{min-height:360px;padding:36px;display:grid;place-items:center;align-content:center;text-align:center;background:#fff;border:1px solid #dbe4ef;border-radius:20px}
.mail-empty-setup>span{width:72px;height:72px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,var(--brand-primary),var(--brand-navigation));border-radius:22px;font-size:30px}.mail-empty-setup h3{margin:18px 0 6px}.mail-empty-setup p{max-width:520px;margin:0 0 20px;color:var(--muted);line-height:1.6}
.mail-shell{min-height:620px;display:grid;grid-template-columns:235px minmax(0,1fr);overflow:hidden;background:#fff;border:1px solid #dbe4ef;border-radius:20px;box-shadow:0 10px 30px rgba(8,27,53,.05)}
.mail-sidebar{padding:16px;background:#f7faff;border-right:1px solid #e1e8f1}.mail-sidebar>label{display:grid;gap:5px}.mail-sidebar>label span{font-size:10px;font-weight:800;color:var(--muted)}.mail-sidebar select{min-height:40px;padding:0 9px;background:#fff;border:1px solid var(--border);border-radius:10px}.mail-sidebar>.button{width:100%;margin-top:8px}
.mail-account-mini{margin-top:18px}.mail-account-mini>div{padding:9px 0;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;border-top:1px solid #e4ebf4}.mail-account-mini>div>span{width:34px;height:34px;display:grid;place-items:center;color:#fff;background:var(--brand-primary);border-radius:10px;font-size:11px;font-weight:850}.mail-account-mini p{min-width:0;margin:0}.mail-account-mini b,.mail-account-mini small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-account-mini b{font-size:11px}.mail-account-mini small{color:var(--muted);font-size:9px}.mail-account-mini em{color:#16774a;font-size:8px;font-style:normal;font-weight:800}
.mail-inbox{min-width:0}.mail-inbox>header{min-height:70px;padding:13px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e8edf4}.mail-inbox>header small,.mail-inbox>header h3{display:block}.mail-inbox>header small{color:var(--blue-700);font-size:9px;font-weight:850;letter-spacing:.12em}.mail-inbox>header h3{margin:3px 0 0;font-size:19px}.mail-inbox>header>span{color:var(--muted);font-size:11px}
.mail-inbox>.notice{margin:12px}.mail-list{max-height:660px;overflow-y:auto}.mail-row{width:100%;min-height:82px;padding:12px 16px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;color:var(--ink);text-align:left;background:#fff;border:0;border-bottom:1px solid #edf1f6}.mail-row:hover{background:#f8fbff}.mail-row.unread{background:#f3f8ff}.mail-avatar{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;color:#fff;background:linear-gradient(145deg,var(--brand-primary),var(--brand-navigation));border-radius:13px;font-size:12px;font-weight:850}.mail-row-copy{min-width:0}.mail-row-copy>*{display:block}.mail-row-head{display:flex!important;align-items:center;justify-content:space-between;gap:12px}.mail-row-head b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.mail-row-head time{flex:0 0 auto;color:var(--muted);font-size:9px}.mail-row-copy strong{margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.mail-row-copy small{margin-top:4px;color:var(--muted);font-size:9px}.mail-unread-dot{width:8px;height:8px;background:var(--brand-primary);border-radius:50%}
.mail-account-manager{display:grid;gap:10px}.mail-account-card{padding:13px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;border:1px solid #dce5ef;border-radius:14px}.mail-account-card>div{min-width:0}.mail-account-card b,.mail-account-card small,.mail-account-card em{display:block}.mail-account-card small{margin-top:2px;color:var(--muted);font-size:11px}.mail-account-card em{margin-top:4px;color:#7a8899;font-size:9px;font-style:normal}.mail-account-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.mail-reader>header{padding-bottom:14px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;border-bottom:1px solid #e5ebf2}.mail-reader>header>div{min-width:0}.mail-reader>header b,.mail-reader>header small,.mail-reader>header em{display:block}.mail-reader>header small{color:var(--muted);font-size:11px}.mail-reader>header em{margin-top:3px;color:#8290a2;font-size:9px;font-style:normal}.mail-reader-body{padding:18px 2px;overflow-wrap:anywhere;font-size:13px;line-height:1.65}.mail-reader-body pre{white-space:pre-wrap;font:inherit}.mail-reader-body table{max-width:100%;border-collapse:collapse}.mail-reader-body a{color:var(--blue-700)}.mail-attachments{padding-top:12px;border-top:1px solid #e5ebf2}.mail-attachments>small{display:block;margin-bottom:8px;color:var(--muted);font-size:9px;font-weight:850}.mail-attachments a{margin-top:6px;padding:10px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--ink);text-decoration:none;background:#f7faff;border:1px solid #e1eaf5;border-radius:10px}.mail-attachments b{font-size:11px}.mail-attachments span{color:var(--muted);font-size:9px}
.check-row{min-height:42px;padding:9px 10px;display:flex!important;align-items:center;gap:9px;background:#f8fafc;border:1px solid #e3e9f1;border-radius:10px}.check-row input{width:17px;height:17px}.check-row span{font-size:11px;font-weight:700}
.portal-loading{min-height:260px;display:grid;place-items:center;align-content:center;gap:10px;color:var(--muted)}

@media(max-width:920px){.bank-grid{grid-template-columns:1fr}.mail-shell{grid-template-columns:190px minmax(0,1fr)}}
@media(max-width:720px){
  .portal-bottom-nav{justify-content:space-around;overflow:visible}.portal-bottom-nav a{min-width:0;flex:1 1 20%}
  .portal-section-tabs{width:100%}.portal-section-tabs a{min-width:0;flex:1}
  .bank-intro,.mail-intro{align-items:flex-start;flex-direction:column}.bank-toolbar{grid-template-columns:1fr}.bank-toolbar .button{width:100%}.bank-actions{display:grid;grid-template-columns:1fr}.bank-actions .button{width:100%}
  .mail-head-actions{width:100%}.mail-head-actions .button{flex:1}.mail-shell{min-height:0;display:block}.mail-sidebar{padding:12px;border-right:0;border-bottom:1px solid #e1e8f1}.mail-account-mini{display:none}.mail-sidebar>.button{margin-top:8px}.mail-inbox>header{min-height:60px;padding:11px 13px}.mail-list{max-height:none}.mail-row{min-height:78px;padding:11px 12px;grid-template-columns:38px minmax(0,1fr) auto}.mail-avatar{width:38px;height:38px;border-radius:11px}.mail-row-head time{max-width:92px;overflow:hidden;white-space:nowrap}.mail-account-card{grid-template-columns:38px minmax(0,1fr)}.mail-account-card>.status-pill{grid-column:2}.mail-reader>header{grid-template-columns:38px minmax(0,1fr)}.mail-reader>header>.button{grid-column:1/-1;width:100%}
}
