:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #293241; background: #f5f7fc; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
.access-page, .hub-page { min-height: 100vh; padding: 28px; background: radial-gradient(circle at 9% 8%, #eaf0ff 0, transparent 34%), #f5f7fc; }
.access-page { display: grid; place-items: center; }
.login-card { width: min(100%, 420px); padding: clamp(28px, 5vw, 44px); border: 1px solid #e0e6f0; border-radius: 18px; background: #fff; box-shadow: 0 18px 45px #2943750b; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #293241; }
.brand img { width: 43px; height: 43px; border-radius: 10px; }
.brand strong { font-size: 24px; line-height: 1; letter-spacing: -.045em; }
.login-card form { margin-top: 38px; }
.field { display: block; margin-top: 19px; }
.field:first-child { margin-top: 0; }
.field span { display: block; margin-bottom: 9px; color: #384453; font-size: 13px; font-weight: 650; }
.field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cfd8e4; border-radius: 8px; outline: 0; background: #fff; color: #293241; }
.field input::placeholder { color: #9ba7b5; }
.field input:focus { border-color: #4879df; box-shadow: 0 0 0 3px #4879df25; }
.primary-button { width: 100%; min-height: 48px; margin-top: 27px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 8px; background: #1d5bea; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 7px 18px #1d5bea24; cursor: pointer; }
.primary-button:hover { background: #124bd0; }
.primary-button:focus-visible, .app-card:focus-visible, .text-link:focus-visible { outline: 3px solid #4879df80; outline-offset: 3px; }
.hub-page { display: flex; flex-direction: column; }
.hub-header, .hub-main, .hub-footer { width: min(100%, 1160px); margin-left: auto; margin-right: auto; }
.hub-main { width: min(100%, 880px); flex: 1; display: flex; align-items: center; padding: 64px 0 100px; }
.hub-main h1 { margin: 0; font-size: clamp(32px, 4.5vw, 49px); line-height: 1.1; letter-spacing: -.055em; }
.hub-main > p { margin: 13px 0 32px; color: #68758a; font-size: 15px; }
.app-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.app-card { min-height: 252px; padding: 32px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 44px; border: 1px solid #dfe6f0; border-radius: 20px; background: #fff; box-shadow: 0 12px 30px #29437508; color: inherit; text-decoration: none; transition: border-color .18s, transform .18s, box-shadow .18s; }
a.app-card:hover { border-color: #7aa0eb; box-shadow: 0 18px 40px #29437512; transform: translateY(-3px); }
.app-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: #edf3ff; color: #1d5bea; }
.app-icon svg { width: 30px; height: 30px; }
.app-card strong { margin: 0; font-size: 25px; letter-spacing: -.035em; font-weight: 650; }
.app-card-bottom { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-open { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #1d5bea; background: #edf3ff; }
.app-open svg { width: 20px; height: 20px; }
.app-card small { margin-top: 7px; color: #68758a; font-size: 13px; line-height: 1.5; }
.app-card .arrow { margin-top: auto; align-self: flex-end; color: #1d5bea; font-size: 22px; line-height: 1; }
.hub-footer { color: #8893a3; font-size: 12px; }
.placeholder { width: min(100%, 580px); margin: auto; padding: 40px; border: 1px solid #dfe6f0; border-radius: 14px; background: #fff; text-align: center; }
.placeholder .app-icon { margin: 0 auto; }
.placeholder h1 { margin: 20px 0 9px; font-size: 30px; letter-spacing: -.04em; }
.placeholder p { margin: 0 0 22px; color: #68758a; line-height: 1.6; }
.text-link { color: #1d5bea; font-weight: 650; text-decoration: none; }
@media (max-width: 650px) { .access-page, .hub-page { padding: 20px; } .login-card { padding: 30px 24px; } .hub-main { padding: 52px 0; } .app-grid { grid-template-columns: 1fr; } .app-card { min-height: 185px; } .placeholder { padding: 32px 22px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
button, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #4879df80; outline-offset: 3px; }
.hub-page #portal-root { min-height: calc(100vh - 56px); display: flex; flex-direction: column; }
.access-page #portal-root { width: min(100%, 460px); }
.login-card { margin: auto; }
.hub-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 18px 24px; border: 1px solid #e2e7f0; border-radius: 18px; background: #ffffffd9; box-shadow: 0 5px 22px #29437505; }
.hub-header .brand img { width: 44px; height: 44px; }
.hub-header .brand strong { font-size: 26px; }
.portal-navigation { display: flex; align-items: center; justify-content: center; gap: 6px; }
.portal-nav-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 10px; color: #647184; font-size: 14px; font-weight: 600; text-decoration: none; }
.portal-nav-link:hover { color: #1d5bea; background: #f3f6fc; }
.portal-nav-link[aria-current="page"] { color: #1d5bea; background: #edf3ff; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; font-size: 13px; min-width: 0; }
.account-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.identity-avatar { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid #e3e9f4; border-radius: 50%; background: #f1f5fc; color: #536582; font-size: 12px; font-weight: 700; }
.identity { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.identity strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.identity .muted { max-width: 230px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-signout { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border: 1px solid #e0e6ef; border-radius: 10px; background: #fff; color: #647184; font-size: 13px; font-weight: 600; cursor: pointer; }
.header-signout svg { width: 17px; height: 17px; }
.header-signout:hover { background: #f7f9fc; color: #293241; }
.muted, .eyebrow { color: #68758a; font-size: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: .11em; font-weight: 700; margin: 0 0 14px; }
.demo-notice { width: min(100%, 1010px); margin: 22px auto 0; padding: 10px 14px; border: 1px solid #dfe6f0; border-radius: 8px; background: #ffffff80; color: #68758a; font-size: 12px; line-height: 1.6; }
.login-card .demo-notice { margin: 22px 0 0; }
.login-card h1 { font-size: 26px; letter-spacing: -.035em; margin: 26px 0 9px; }
.login-card p { line-height: 1.6; color: #68758a; font-size: 13px; }
.login-card form { margin-top: 25px; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #cfd8e4; border-radius: 8px; color: #293241; background: #fff; }
.field select { font-size: 13px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 14px; border: 1px solid #cfd8e4; border-radius: 8px; background: #fff; color: #384453; cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 650; }
.secondary-button:hover { background: #f0f4fc; }
.link-button { border: 0; padding: 10px 0; background: transparent; color: #1d5bea; cursor: pointer; font-size: 13px; }
.badge { display: inline-block; padding: 5px 9px; background: #edf3ff; color: #1d5bea; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge.gray { background: #f0f2f6; color: #68758a; }
.badge.amber { background: #fff4df; color: #865b12; }
.app-card.disabled { color: #6b7586; background: #ffffff9e; border-color: #e2e7f0; box-shadow: none; }
.app-card.disabled .app-icon { color: #68758a; background: #f0f2f6; }
.app-card .badge { margin-top: 20px; }
.app-card .arrow { padding-top: 16px; }
.hub-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; }
.admin-main { width: min(100%, 1010px); margin: 48px auto 0; }
.admin-main h1 { font-size: 34px; letter-spacing: -.04em; margin: 0; }
.admin-main > p { color: #68758a; font-size: 14px; line-height: 1.6; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 16px; }
.section-heading h2 { font-size: 20px; margin: 0; letter-spacing: -.025em; }
.section-heading input { min-height: 42px; max-width: 100%; padding: 8px 12px; border: 1px solid #cfd8e4; border-radius: 8px; }
.user-list { display: grid; gap: 10px; }
.user-row { display: grid; grid-template-columns: 1.4fr 1fr auto; align-items: center; gap: 20px; padding: 20px; border: 1px solid #dfe6f0; border-radius: 12px; background: #fff; }
.user-row h3 { margin: 0 0 5px; font-size: 15px; }
.user-row p { margin: 6px 0 0; color: #68758a; font-size: 12px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { padding: 24px; border: 1px solid #dfe6f0; border-radius: 14px; background: #fff; margin: 18px 0; }
.panel h2 { font-size: 20px; margin: 0 0 10px; }
.panel p { color: #68758a; font-size: 13px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .field { margin: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; margin-top: 18px; }
.check input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; accent-color: #1d5bea; }
fieldset { border: 1px solid #dfe6f0; border-radius: 8px; padding: 16px; margin: 20px 0 0; }
legend { font-size: 13px; font-weight: 650; padding: 0 6px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.form-actions .primary-button { width: auto; margin: 0; }
.message { color: #865b12; background: #fff4df; padding: 14px; border-radius: 8px; font-size: 13px; line-height: 1.6; margin: 18px 0; overflow-wrap: anywhere; }
.message.error { color: #a03434; background: #fff0f0; }
.message.success { color: #226346; background: #eaf7f0; }
.message:empty { display: none; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { padding: 16px 0; border-bottom: 1px solid #e0e6f0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.history-list small { display: block; color: #68758a; }
details { margin-top: 10px; }
summary { cursor: pointer; color: #1d5bea; font-size: 12px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; color: #68758a; }
.qr-illustration { display: grid; place-items: center; width: 150px; height: 150px; margin: 20px auto; border: 8px solid #edf3ff; border-radius: 12px; background: #f5f7fc; text-align: center; color: #68758a; font-size: 12px; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; border-radius: 8px; background: #f5f7fc; font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 650px) {
  .hub-page #portal-root { min-height: calc(100vh - 40px); }
  .hub-header { display: flex; flex-wrap: wrap; gap: 18px; padding: 16px; border-radius: 16px; }
  .hub-header .brand { gap: 9px; }
  .hub-header .brand img { width: 36px; height: 36px; }
  .hub-header .brand strong { font-size: 23px; }
  .header-actions { margin-left: auto; gap: 12px; }
  .account-identity .identity { display: none; }
  .identity-avatar { width: 34px; height: 34px; }
  .header-signout { min-height: 36px; padding: 8px 10px; }
  .portal-navigation { order: 3; width: 100%; justify-content: flex-start; padding-top: 12px; border-top: 1px solid #edf0f6; }
  .portal-nav-link { min-height: 40px; flex: 1; }
  .hub-main { padding: 40px 0; }
  .app-grid { gap: 16px; }
  .app-card { min-height: 208px; padding: 26px; gap: 34px; border-radius: 18px; }
  .app-icon { width: 52px; height: 52px; border-radius: 14px; }
  .app-icon svg { width: 26px; height: 26px; }
  .app-card strong { font-size: 23px; }
  .form-grid, .user-row { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 20px; }
  .admin-main { margin-top: 32px; }
  .user-row { padding: 18px; }
  .recovery-codes { grid-template-columns: 1fr; }
}

.preview-caption { text-align: center; color: #8893a3; font-size: 12px; margin: 20px 0 0; }

.brand-link { text-decoration: none; border-radius: 6px; }
.brand-link:focus-visible { outline: 3px solid #4879df80; outline-offset: 6px; }
@media (min-width: 651px) and (max-width: 1000px) {
  .hub-header { gap: 16px; padding: 16px 20px; }
  .account-identity .identity { display: none; }
  .header-actions { gap: 12px; }
  .portal-navigation { justify-content: flex-end; }
}
