.auth-page { min-height: 100vh; background: #f4f7fb; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); }
.auth-story { min-height: 100vh; padding: clamp(35px, 5vw, 72px); display: flex; flex-direction: column; color: white; overflow: hidden; position: relative; background: radial-gradient(circle at 75% 35%, rgba(20,119,255,.28), transparent 32%), linear-gradient(145deg, #06152d, #092b62); }
.auth-story::after { content: ""; width: 520px; height: 520px; position: absolute; right: -180px; bottom: -150px; border: 1px solid rgba(130,180,255,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(100,160,255,.045), 0 0 0 140px rgba(100,160,255,.03); }
.auth-brand { align-self: flex-start; color: white; position: relative; z-index: 1; }.auth-brand small { color: #96afd0; }
.story-copy { max-width: 570px; margin: auto 0; position: relative; z-index: 1; }
.story-copy h1 { margin: 0; font: 700 clamp(3.3rem, 6vw, 6.2rem)/.98 "Manrope", sans-serif; letter-spacing: -.065em; }
.story-copy > p:last-child { max-width: 490px; margin: 28px 0 0; color: #adbed5; font-size: 1.05rem; line-height: 1.75; }
.security-note { max-width: 420px; display: flex; align-items: center; gap: 15px; position: relative; z-index: 1; }
.security-note p { margin: 0; color: #9fb1ca; font-size: .82rem; line-height: 1.55; }.security-note strong { color: white; }
.security-symbol { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid rgba(126,176,246,.3); border-radius: 50%; color: #75b2ff; }
.auth-form-panel { display: grid; place-items: center; padding: 45px 30px; background: white; }
.form-wrap { width: min(450px, 100%); }
.back-link { display: inline-flex; gap: 9px; margin-bottom: 65px; color: #718096; font-size: .82rem; font-weight: 600; text-decoration: none; }
.form-heading .eyebrow { margin-bottom: 15px; }
.form-heading h2, .modal h2 { margin: 0; color: var(--navy); font: 700 clamp(2.2rem, 4vw, 3.1rem)/1.08 "Manrope", sans-serif; letter-spacing: -.045em; }
.form-heading > p:last-child { margin: 12px 0 29px; color: #788599; }
.provider-button { width: 100%; min-height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #273449; border: 1px solid #d8dee8; border-radius: 10px; background: white; font: 700 .9rem/1 "DM Sans"; cursor: pointer; transition: border-color .2s, background .2s; }
.provider-button:hover { border-color: #afbdd1; background: #fafcff; }.provider-button svg { width: 20px; height: 20px; }
.divider { margin: 27px 0; display: flex; align-items: center; gap: 13px; color: #9ba6b5; font-size: .73rem; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: #e3e7ed; }
.field { margin-bottom: 20px; display: block; }
.field > span:first-child, .field > label:first-child { display: block; margin-bottom: 8px; color: #344158; font-size: .78rem; font-weight: 700; }
.field input { width: 100%; height: 52px; padding: 0 15px; color: var(--ink); outline: 0; border: 1px solid #d8dee8; border-radius: 9px; background: #fbfcfe; font: 500 .93rem/1 "DM Sans"; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,89,230,.11); }
.password-control { display: block; position: relative; }.password-control input { padding-right: 73px; }
.password-control button { height: 34px; padding: 0 10px; position: absolute; top: 9px; right: 7px; color: var(--blue); border: 0; background: transparent; font-size: .73rem; font-weight: 700; cursor: pointer; }
.form-options { margin: 3px 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #919cac; font-size: .71rem; }
.link-button { padding: 0; color: var(--blue); border: 0; background: transparent; font: 700 .72rem/1 "DM Sans"; cursor: pointer; }
.submit-button { width: 100%; margin-top: 3px; }
.submit-button span { margin-left: auto; }
button:disabled { opacity: .65; cursor: wait; transform: none !important; }
.access-help { margin: 26px 0 0; color: #8a96a7; font-size: .75rem; text-align: center; }
.notice { margin: 0 0 18px; padding: 12px 14px; border-radius: 8px; font-size: .79rem; line-height: 1.5; }
.notice-error { color: #9e2734; border: 1px solid #f3c6cb; background: #fff2f3; }
.notice-info { color: #245b9c; border: 1px solid #c9dff8; background: #f1f7ff; }
.notice-success { color: #17663e; border: 1px solid #bde6d0; background: #effbf4; }
.modal { width: min(440px, calc(100% - 30px)); padding: 0; overflow: auto; overscroll-behavior: contain; border: 0; border-radius: 18px; box-shadow: 0 30px 90px rgba(3,19,43,.27); }
.modal::backdrop { background: rgba(4,17,39,.68); backdrop-filter: blur(5px); }.modal form { padding: 38px; position: relative; }
.modal-close { width: 44px; height: 44px; position: absolute; top: 7px; right: 7px; display: grid; place-items: center; color: #6f7b8e; border: 0; border-radius: 8px; background: transparent; font-size: 1.7rem; cursor: pointer; }
.modal-icon { width: 46px; height: 46px; margin-bottom: 20px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--sky); }
.modal h2 { padding-right: 42px; font-size: 1.8rem; }.modal h2 + p { margin: 10px 0 25px; color: #788599; font-size: .88rem; line-height: 1.6; }

@media (max-width: 900px) { .auth-layout { grid-template-columns: 1fr; }.auth-story { min-height: 360px; }.story-copy { margin: 70px 0; }.security-note { display: none; }.auth-form-panel { padding-block: 65px; }.back-link { margin-bottom: 45px; } }
@media (max-width: 560px) { .auth-story { min-height: 300px; padding: 26px 24px; }.story-copy { margin: 50px 0 20px; }.story-copy h1 { font-size: 3rem; }.story-copy > p:last-child { display: none; }.auth-form-panel { padding: 45px 22px; }.form-options { align-items: flex-start; flex-direction: column; gap: 10px; }.modal form { padding: 32px 23px; } }

.app-page { min-height: 100vh; background: #f2f5f9; }
.skip-link { padding: 12px 16px; position: fixed; top: 12px; left: 12px; z-index: 30; color: white; border-radius: 8px; background: #071a37; font-size: .78rem; font-weight: 800; text-decoration: none; transform: translateY(calc(-100% - 20px)); transition: transform .16s; }
.skip-link:focus { transform: translateY(0); }
.app-page :is(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid rgba(15, 105, 235, .55); outline-offset: 2px; }
.app-page :is(a, button, summary, select) { touch-action: manipulation; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { min-height: 100vh; padding: 30px 20px 24px; display: flex; flex-direction: column; color: #d8e2f2; background: linear-gradient(180deg, #071a37, #06142b); }
.app-brand { margin-left: 9px; color: white; }.app-brand small { color: #849ab9; }
.app-nav { margin-top: 58px; display: flex; flex-direction: column; gap: 6px; }
.app-nav p { margin: 28px 13px 8px; color: #7086a5; font-size: .59rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.app-nav a { min-height: 45px; padding: 0 13px 0 18px; display: flex; align-items: center; position: relative; color: #9fb0c8; border-radius: 9px; font-size: .84rem; font-weight: 600; text-decoration: none; }
.app-nav a span { display: none; }
.app-nav a.active::before { content: ""; width: 2px; position: absolute; top: 11px; bottom: 11px; left: 7px; border-radius: 2px; background: #d3ae52; }
.app-nav a:hover, .app-nav a.active { color: white; background: rgba(70,133,230,.16); }.app-nav a.active span { color: #55a0ff; }
.sidebar-security { margin-top: auto; padding: 15px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid rgba(116,157,214,.15); border-radius: 11px; background: rgba(49,99,172,.1); }
.sidebar-security > span { display: none; }
.sidebar-security strong, .sidebar-security small { display: block; }.sidebar-security strong { color: #dbe7f7; font-size: .7rem; }.sidebar-security small { margin-top: 4px; color: #7086a6; font-size: .6rem; line-height: 1.45; }
.app-main { min-width: 0; }
.app-topbar { height: 82px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e0e5ec; background: white; }
.app-topbar > div:first-of-type small, .app-topbar > div:first-of-type strong { display: block; }.app-topbar > div:first-of-type small { margin-bottom: 4px; color: #5d697a; font-size: .63rem; }.app-topbar > div:first-of-type strong { font: 700 1rem/1 "Manrope"; }
.user-menu { display: flex; align-items: center; gap: 11px; }.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 10px; background: linear-gradient(135deg, #157cff, #0349c4); font-size: .74rem; font-weight: 800; }
.user-label strong, .user-label small { display: block; }.user-label strong { max-width: 190px; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }.user-label small { margin-top: 3px; color: #5d697a; font-size: .62rem; }
.user-menu button { margin-left: 8px; padding: 8px 11px; color: #67758a; border: 1px solid #dfe4eb; border-radius: 7px; background: white; font-size: .68rem; font-weight: 700; cursor: pointer; }
.mobile-menu { display: none; }
.menu-lines,
.menu-lines::before,
.menu-lines::after { width: 18px; height: 2px; display: block; border-radius: 2px; background: currentColor; }
.menu-lines { position: relative; }
.menu-lines::before,
.menu-lines::after { content: ""; position: absolute; left: 0; }
.menu-lines::before { top: -6px; }
.menu-lines::after { top: 6px; }
.app-content { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 53px 0 70px; }
.welcome-block { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.welcome-block .eyebrow { margin-bottom: 13px; }.welcome-block h1 { margin: 0; color: var(--navy); font: 700 clamp(2.2rem, 4vw, 3.8rem)/1.05 "Manrope"; letter-spacing: -.05em; text-wrap: balance; }.welcome-block h1 span { color: var(--blue); }.welcome-block > div > p:last-child { margin: 13px 0 0; color: #596779; font-size: .9rem; }
.today { color: #596779; font-size: .74rem; text-transform: capitalize; }
.overview-grid { margin-top: 35px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.overview-card { min-height: 180px; padding: 23px; position: relative; border: 1px solid #dfe5ec; border-radius: 16px; background: white; }
.overview-card .card-icon { width: 37px; height: 37px; position: absolute; top: 20px; right: 20px; display: grid; place-items: center; color: var(--blue); border-radius: 10px; background: var(--sky); font-size: .82rem; }
.portal-stats .card-icon { display: none; }
.overview-card p { margin: 0 0 33px; color: #596779; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }.overview-card strong { display: block; color: var(--navy); font: 700 1.45rem/1.2 "Manrope"; }.overview-card small { display: block; margin-top: 9px; color: #596779; font-size: .68rem; }
.overview-card.primary-card { color: white; border-color: transparent; background: linear-gradient(140deg, #0965ed, #0345b8); box-shadow: 0 18px 38px rgba(7,89,230,.16); }.primary-card p, .primary-card small { color: #bed7ff; }.primary-card strong { color: white; }.primary-card .card-icon { color: white; background: rgba(255,255,255,.15); }
.workspace-grid { margin-top: 16px; display: grid; grid-template-columns: 1.4fr .8fr; gap: 15px; }
.workspace-card { min-height: 285px; padding: 25px; border: 1px solid #dfe5ec; border-radius: 16px; background: white; }
.workspace-card header { display: flex; align-items: center; justify-content: space-between; }.workspace-card header span { color: #596779; font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }.workspace-card h2 { margin: 5px 0 0; color: var(--navy); font: 700 1.16rem/1.2 "Manrope"; }.workspace-card .live-badge { padding: 6px 9px; color: #137348; border-radius: 20px; background: #eaf8f1; font-size: .54rem; }
.activity-row { margin-top: 27px; padding: 17px 0; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 13px; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }.activity-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #148557; border-radius: 10px; background: #eaf8f1; }.activity-row strong, .activity-row small { display: block; }.activity-row strong { font-size: .76rem; }.activity-row small, .activity-row time { margin-top: 4px; color: #929dad; font-size: .64rem; }.empty-note { margin: 18px 0 0; color: #99a4b3; font-size: .66rem; line-height: 1.5; }
.identity-card dl { margin: 21px 0 0; }.identity-card dl > div { padding: 11px 0; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid #edf0f4; }.identity-card dt { color: #8b97a8; font-size: .67rem; }.identity-card dd { max-width: 65%; margin: 0; overflow: hidden; color: #27354a; font-size: .69rem; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.admin-callout { margin-top: 16px; padding: 35px 38px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-radius: 17px; color: white; background: linear-gradient(125deg, #091c3c, #0a3675); }.admin-callout .eyebrow { margin-bottom: 9px; }.admin-callout h2 { max-width: 650px; margin: 0; font: 700 clamp(1.5rem, 2.7vw, 2.3rem)/1.2 "Manrope"; letter-spacing: -.04em; }

@media (max-width: 980px) { .app-shell { grid-template-columns: 1fr; }.sidebar { width: 260px; position: fixed; inset: 0 auto 0 0; z-index: 10; box-shadow: 20px 0 50px rgba(0,0,0,.2); transform: translateX(-104%); transition: transform .25s; }.sidebar.open { transform: translateX(0); }.mobile-menu { width: 44px; height: 44px; margin-right: 12px; display: grid; place-items: center; border: 1px solid #dfe5ec; border-radius: 9px; background: white; }.app-topbar { position: sticky; top: 0; z-index: 9; justify-content: flex-start; }.app-topbar .user-menu { margin-left: auto; } }
@media (max-width: 720px) { .app-topbar { padding: 0 16px; }.app-topbar > div:first-of-type { display: none; }.user-label { display: none; }.app-content { width: calc(100% - 30px); padding-top: 35px; }.welcome-block { align-items: flex-start; flex-direction: column; }.overview-grid, .workspace-grid { grid-template-columns: 1fr; }.overview-card { min-height: 145px; padding: 22px; }.workspace-card { min-height: 210px; padding: 22px; }.admin-callout { align-items: stretch; flex-direction: column; }.admin-callout .button { width: 100%; }.today { display: none; } }

.sr-only { width: 1px; height: 1px; padding: 0; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }.admin-heading .eyebrow { margin-bottom: 12px; }.admin-heading h1 { margin: 0; color: var(--navy); font: 700 clamp(2.5rem, 4vw, 3.7rem)/1 "Manrope"; letter-spacing: -.055em; text-wrap: balance; }.admin-heading > div > p:last-child { margin: 13px 0 0; color: #596779; font-size: .86rem; }
.table-card { min-width: 0; max-width: 100%; margin-top: 30px; overflow: visible; border: 1px solid #dfe5ec; border-radius: 16px; background: white; }.table-toolbar { min-height: 82px; padding: 18px 23px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid #e8ecf1; }.table-toolbar h2 { margin: 0; color: var(--navy); font: 700 1.1rem/1.2 "Manrope"; }.table-toolbar h2 + span { display: block; margin-top: 5px; color: #929dac; font-size: .64rem; }.table-filters { display: flex; gap: 9px; }.table-filters input, .table-filters select, .field select { height: 39px; padding: 0 12px; color: #455269; outline: 0; border: 1px solid #dce2ea; border-radius: 8px; background: #fafbfd; font: 500 .72rem/1 "DM Sans"; }.table-filters input { width: 210px; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; contain: paint; } table { width: 100%; min-width: 710px; border-collapse: collapse; } th { padding: 12px 18px; color: #8b97a7; background: #fafbfd; font-size: .59rem; letter-spacing: .1em; text-align: left; text-transform: uppercase; } td { padding: 16px 18px; border-top: 1px solid #edf0f4; color: #455269; font-size: .72rem; } tbody tr:hover { background: #fbfcfe; }
.table-user { min-width: 205px; display: flex; align-items: center; gap: 11px; }.mini-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; color: #1969d8; border-radius: 9px; background: #eaf3ff; font-size: .66rem; font-weight: 800; }.table-user strong, .table-user small { display: block; }.table-user strong { color: #263449; font-size: .74rem; }.table-user small { max-width: 220px; margin-top: 4px; overflow: hidden; color: #8a96a7; font-size: .64rem; text-overflow: ellipsis; }
.inline-select { min-width: 105px; padding: 7px 9px; color: #425067; border: 1px solid #dfe4eb; border-radius: 7px; background: white; font: 600 .67rem/1 "DM Sans"; }.status-pill { padding: 5px 9px; display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; font-size: .61rem; font-weight: 700; }.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.status-pill.active { color: #17734b; background: #eaf8f1; }.status-pill.pending { color: #896315; background: #fff6dc; }.status-pill.inactive { color: #8b4450; background: #f8edef; }.date-cell { color: #7e8999; white-space: nowrap; }
.row-menu { position: relative; }.row-menu summary { width: 30px; height: 28px; display: grid; place-items: center; color: #718096; border-radius: 6px; cursor: pointer; list-style: none; }.row-menu summary::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 6px 0 currentColor, 12px 0 currentColor; transform: translateX(-6px); }.row-menu summary::-webkit-details-marker { display: none; }.row-menu[open] summary { background: #eef3fa; }.row-menu > div { width: 190px; padding: 6px; position: absolute; z-index: 5; top: 34px; right: 0; border: 1px solid #dfe5ec; border-radius: 9px; background: white; box-shadow: 0 15px 35px rgba(12,31,60,.15); }.menu-action { width: 100%; padding: 9px 10px; color: #405069; border: 0; border-radius: 6px; background: transparent; font: 600 .67rem/1 "DM Sans"; text-align: left; cursor: pointer; }.menu-action:hover { background: #f2f6fb; }.menu-action.danger { color: #a33443; }.menu-note { display: block; padding: 8px; color: #8490a1; font-size: .62rem; line-height: 1.5; }.loading-cell { padding: 35px !important; color: #8995a5; text-align: center; }
.history-card { margin-top: 16px; }.event-list { padding: 0 22px; }.event-item { min-height: 68px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f4; }.event-item:last-child { border-bottom: 0; }.event-item strong, .event-item small { display: block; }.event-item strong { color: #334157; font-size: .7rem; }.event-item small, .event-item time { margin-top: 3px; color: #8c98a8; font-size: .61rem; }
.admin-modal { width: min(560px, calc(100% - 30px)); }.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.field select { width: 100%; height: 52px; font-size: .9rem; }.admin-modal .field { margin-bottom: 15px; }.field-help { margin-top: 8px; display: block; color: #7f8b9c; font-size: .67rem; line-height: 1.5; }.invite-steps { margin: -8px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none; }.invite-steps li { min-width: 0; padding: 12px; border: 1px solid #e3e7ed; border-radius: 10px; background: #fafbfd; }.invite-steps span, .invite-steps strong, .invite-steps small { display: block; }.invite-steps span { width: 22px; height: 22px; margin-bottom: 9px; display: grid; place-items: center; color: #7d5a13; border-radius: 50%; background: #f4e6bd; font-size: .6rem; font-weight: 800; }.invite-steps strong { color: #2f3e54; font-size: .65rem; }.invite-steps small { margin-top: 5px; color: #8994a4; font-size: .57rem; line-height: 1.45; }
.dialog-actions { margin-top: 3px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }.dialog-actions .button { width: 100%; margin: 0; }

@media (max-width: 720px) { .admin-heading { align-items: stretch; flex-direction: column; }.table-toolbar { align-items: stretch; flex-direction: column; }.table-filters { flex-direction: column; }.table-filters input, .table-filters select { width: 100%; }.field-pair, .invite-steps { grid-template-columns: 1fr; }.invite-steps li { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; }.invite-steps span { grid-row: 1 / 3; margin: 0; }.invite-steps small { grid-column: 2; }.event-item { grid-template-columns: 1fr; }.event-item time { grid-column: 1; }.admin-content { padding-top: 35px; } }
@media (max-width: 560px) { .dialog-actions { grid-template-columns: 1fr; }.dialog-actions .dialog-cancel { order: 2; } }

@media (max-width: 720px) {
  .table-card .table-scroll { padding: 12px; overflow: visible; contain: none; }
  .table-card table { min-width: 0; display: block; }
  .table-card thead {
    width: 1px;
    height: 1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .table-card tbody { display: grid; gap: 11px; }
  .table-card tbody tr {
    min-width: 0;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(105px, .72fr);
    gap: 15px 14px;
    position: relative;
    border: 1px solid #e1e6ed;
    border-radius: 12px;
    background: #fbfcfe;
  }
  .table-card tbody tr:hover { background: #fbfcfe; }
  .table-card td { min-width: 0; padding: 0; border: 0; }
  .table-card td:first-child { grid-column: 1 / -1; padding-right: 52px; }
  .table-card td:nth-child(4) { grid-column: 1 / -1; }
  .table-card td:nth-child(5) { position: absolute; top: 8px; right: 8px; }
  .table-card td:nth-child(2)::before,
  .table-card td:nth-child(3)::before,
  .table-card td:nth-child(4)::before {
    display: block;
    margin-bottom: 7px;
    color: #8b97a7;
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .table-card td:nth-child(2)::before { content: "Role"; }
  .table-card td:nth-child(3)::before { content: "Access"; }
  .table-card td:nth-child(4)::before { content: "Last access"; }
  .table-card .table-user { min-width: 0; }
  .table-card .table-user small { overflow-wrap: anywhere; }
  .table-card .inline-select { width: 100%; min-width: 0; }
  .table-card .date-cell { white-space: normal; }
  .table-card .row-menu summary { width: 44px; height: 44px; }
  .table-card .row-menu > div { top: 48px; }
  .table-card .menu-action { min-height: 44px; }
}

/* SIMO premium security identity */
.auth-page, .app-page {
  --blue: #b89132;
  --blue-bright: #d3ae52;
  --sky: #f8f1df;
}
.brand-mark {
  width: 43px;
  height: 49px;
  clip-path: none;
  background: url('/logo-mark.svg?v=20260803-nyc1') center / contain no-repeat;
  filter: drop-shadow(0 7px 12px rgba(0,0,0,.3));
}
.brand-mark span { display: none; }
.auth-story { background: radial-gradient(circle at 78% 34%, rgba(201,168,76,.16), transparent 34%), linear-gradient(145deg, #07080f, #10131f); }
.auth-story::after { border-color: rgba(201,168,76,.14); box-shadow: 0 0 0 70px rgba(201,168,76,.025), 0 0 0 140px rgba(201,168,76,.018); }
.security-symbol { color: #e0c06a; border-color: rgba(201,168,76,.3); background: rgba(201,168,76,.08); }
.app-page { background: #f4f2ed; }
.sidebar { background: linear-gradient(180deg, #07080f, #0d1019); border-right: 1px solid rgba(201,168,76,.16); }
.app-nav a:hover, .app-nav a.active { background: rgba(201,168,76,.11); }
.app-nav a.active span, .app-nav a:hover span { color: #e0c06a; }
.sidebar-security { border-color: rgba(201,168,76,.15); background: rgba(201,168,76,.06); }
.sidebar-security > span { color: #e0c06a; background: rgba(201,168,76,.12); }
.button-primary { color: #0b0c11; background: linear-gradient(135deg, #e0c06a, #a67e29); box-shadow: 0 14px 28px rgba(139,104,33,.2); }
.overview-card.primary-card { background: linear-gradient(140deg, #bd963a, #8f691f); box-shadow: 0 18px 38px rgba(110,80,22,.18); }
.overview-card.primary-card, .overview-card.primary-card p, .overview-card.primary-card strong, .overview-card.primary-card small { color: #111713; }
.overview-card.primary-card .card-icon { color: #111713; background: rgba(255,255,255,.38); }
.overview-card .card-icon, .activity-icon, .event-icon { color: #a47c29; background: #faf4e5; }
.eyebrow { color: #715216; }
.welcome-block h1 span { color: #715216; }

.portal-stats { grid-template-columns: repeat(4, 1fr); }
.portal-workspace { grid-template-columns: 1fr 1fr; }
.portal-message-card { min-height: auto; margin-top: 16px; }
.quiet-link { color: #715216; font-size: .68rem; font-weight: 800; text-decoration: none; }
.portal-list { margin-top: 20px; }
.portal-list-row { min-height: 67px; padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #edf0f4; }
.portal-list-row strong, .portal-list-row small { display: block; }
.portal-list-row strong { color: #263449; font-size: .75rem; }
.portal-list-row small { margin-top: 5px; color: #596779; font-size: .64rem; }
.portal-status { padding: 5px 9px; color: #526076; border-radius: 20px; background: #eef1f5; font-size: .57rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.portal-status.confirmed, .portal-status.in_progress, .portal-status.severity-routine, .portal-status.severity-low { color: #17663e; background: #eaf8f1; }
.portal-status.severity-medium { color: #896315; background: #fff6dc; }
.portal-status.severity-high, .portal-status.severity-critical { color: #9e2734; background: #fff0f2; }
.portal-empty { margin: 0; padding: 28px 0 12px; color: #596779; font-size: .72rem; line-height: 1.6; }
.portal-list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.conversation-preview { min-height: 116px; padding: 17px; display: flex; flex-direction: column; position: relative; color: inherit; border: 1px solid #e3e6eb; border-radius: 12px; background: #fafbfc; text-decoration: none; }
.conversation-preview:hover { border-color: #d6bd80; background: #fffcf4; }
.conversation-preview strong { color: #263449; font-size: .72rem; }
.conversation-preview span { margin-top: 9px; overflow: hidden; color: #7c8797; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-preview small { margin-top: auto; color: #a0a8b4; font-size: .58rem; }
.unread-badge { min-width: 20px; height: 20px; padding: 0 6px; position: absolute; top: 12px; right: 12px; display: grid; place-items: center; color: #0b0c11; border-radius: 999px; background: #d2ac4d; font-size: .56rem; }

@media (max-width: 1150px) { .portal-stats { grid-template-columns: repeat(2, 1fr); }.portal-list-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .portal-stats, .portal-workspace, .portal-list-grid { grid-template-columns: 1fr; } }

.module-heading { margin-bottom: 28px; }
.module-card { min-height: 280px; overflow: hidden; border: 1px solid #dfe5ec; border-radius: 16px; background: white; }
.module-loading, .module-empty { padding: 45px 28px; color: #8995a5; font-size: .78rem; text-align: center; }
.record-grid { padding: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.record-card { min-width: 0; padding: 22px; border: 1px solid #e1e6ed; border-radius: 13px; background: #fcfdfe; }
.record-primary { margin-bottom: 17px; padding-bottom: 16px; border-bottom: 1px solid #e7ebf0; }
.record-primary small { color: #a37c2d; font-size: .59rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.record-primary h2 { margin: 6px 0 0; color: #17243a; font: 700 1rem/1.35 "Manrope"; }
.record-field { padding: 7px 0; display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); gap: 14px; }
.record-field span { color: #8b96a6; font-size: .62rem; }
.record-field strong { overflow-wrap: anywhere; color: #425067; font-size: .68rem; font-weight: 600; line-height: 1.5; text-align: right; }
.record-card > .button { margin-top: 16px; }
#record-fields { max-height: 55vh; padding-right: 5px; overflow-y: auto; }
#record-fields textarea { width: 100%; padding: 13px 14px; resize: vertical; color: #263449; border: 1px solid #d8dee8; border-radius: 9px; background: #fbfcfe; font: 500 .85rem/1.5 "DM Sans"; }

.message-workspace { min-height: 600px; display: grid; grid-template-columns: 320px 1fr; }
.thread-list { overflow-y: auto; border-right: 1px solid #e4e8ed; background: #fafbfd; }
.thread-button { width: 100%; padding: 18px; display: block; color: inherit; border: 0; border-bottom: 1px solid #e7ebf0; background: transparent; text-align: left; cursor: pointer; }
.thread-button:hover, .thread-button:focus { background: #fffaf0; }
.thread-button strong, .thread-button span { display: block; }
.thread-button strong { color: #29374c; font-size: .72rem; }
.thread-button span { margin-top: 7px; overflow: hidden; color: #8a95a5; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.thread-panel { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; }
.thread-header { min-height: 76px; padding: 18px 22px; border-bottom: 1px solid #e4e8ed; }
.thread-header small { color: #a37c2d; font-size: .57rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.thread-header h2 { margin: 5px 0 0; color: #243248; font: 700 1rem/1.2 "Manrope"; }
.message-log { max-height: 470px; padding: 22px; overflow-y: auto; background: #f7f8fa; }
.message-bubble { width: min(520px, 86%); margin: 0 0 13px; padding: 14px 16px; border: 1px solid #e1e5eb; border-radius: 4px 13px 13px 13px; background: white; }
.message-bubble.mine { margin-left: auto; border-color: #dbc687; border-radius: 13px 4px 13px 13px; background: #fffaf0; }
.message-bubble strong { color: #344158; font-size: .61rem; }.message-bubble p { margin: 7px 0; overflow-wrap: anywhere; color: #455269; font-size: .72rem; line-height: 1.65; white-space: pre-wrap; }.message-bubble time { color: #9ba4b1; font-size: .54rem; }
.message-compose { padding: 16px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; border-top: 1px solid #e4e8ed; background: white; }
.message-compose textarea { width: 100%; padding: 12px 13px; resize: vertical; color: #263449; outline: 0; border: 1px solid #d8dee8; border-radius: 9px; font: 500 .75rem/1.5 "DM Sans"; }

/* Client-intake queue: each request reads like an assignment brief, with the
   follow-up decision kept beside the original message. */
.inquiry-queue { min-height: 280px; }
.inquiry-toolbar {
  min-height: 88px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid #e5e8ec;
  background: #faf9f5;
}
.inquiry-count { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.inquiry-count strong { color: #17243a; font: 700 1.7rem/1 "Manrope", sans-serif; }
.inquiry-count span { color: #596779; font-size: .64rem; font-weight: 700; }
.inquiry-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.inquiry-filters button {
  min-height: 34px;
  padding: 0 11px;
  color: #697588;
  border: 1px solid #dde2e8;
  border-radius: 999px;
  background: white;
  font: 700 .62rem/1 "DM Sans", sans-serif;
  cursor: pointer;
}
.inquiry-filters button[aria-pressed="true"] { color: #161b1f; border-color: #c49a3d; background: #f4e7c1; }
.inquiry-grid { padding: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.inquiry-card {
  min-width: 0;
  padding: 22px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e0e4e9;
  border-radius: 13px;
  background: #fff;
}
.inquiry-card::before { content: ""; width: 4px; position: absolute; inset: 0 auto 0 0; background: #aab2be; }
.inquiry-card.status-new::before { background: #bd9130; }
.inquiry-card.status-reviewed::before { background: #4977a8; }
.inquiry-card.status-contacted::before { background: #2a7a57; }
.inquiry-card.status-closed::before { background: #667080; }
.inquiry-card.status-spam::before { background: #a04c56; }
.inquiry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inquiry-meta { margin: 0; color: #9a772b; font-size: .57rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inquiry-head h2 { margin: 7px 0 0; color: #18263b; font: 700 1.15rem/1.2 "Manrope", sans-serif; }
.inquiry-status { padding: 6px 9px; border-radius: 999px; color: #596477; background: #eef1f4; font-size: .57rem; font-weight: 800; white-space: nowrap; }
.inquiry-status.status-new { color: #785815; background: #fff2ce; }
.inquiry-status.status-reviewed { color: #285680; background: #eaf3fc; }
.inquiry-status.status-contacted { color: #17623e; background: #e8f7ef; }
.inquiry-status.status-spam { color: #8b3540; background: #faecee; }
.inquiry-contacts { margin-top: 17px; display: flex; flex-wrap: wrap; gap: 8px; }
.inquiry-contact {
  min-height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34445b;
  border: 1px solid #e0e4e9;
  border-radius: 7px;
  background: #fbfcfd;
  font-size: .65rem;
  font-weight: 700;
  text-decoration: none;
}
.inquiry-contact-label { flex: 0 0 auto; color: #a07827; font-size: .54rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.inquiry-contact-value { min-width: 0; overflow-wrap: anywhere; }
.inquiry-message { margin: 18px 0; padding: 16px 17px; overflow-wrap: anywhere; color: #445167; border: 0; border-left: 2px solid #c8a454; background: #faf8f1; font-size: .72rem; line-height: 1.7; }
.inquiry-review { padding-top: 18px; display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr); gap: 12px; border-top: 1px solid #e9ecf0; }
.inquiry-review .field { margin: 0; }
.inquiry-review select,
.inquiry-review textarea {
  width: 100%;
  color: #344158;
  border: 1px solid #d9dfe6;
  border-radius: 8px;
  background: #fbfcfd;
  font: 500 .7rem/1.5 "DM Sans", sans-serif;
}
.inquiry-review select { height: 42px; padding: 0 10px; }
.inquiry-review textarea { min-height: 76px; padding: 10px 11px; resize: vertical; }
.inquiry-review .button { grid-column: 1 / -1; justify-self: end; }
.inquiry-empty { margin: 0; }

@media (max-width: 850px) { .record-grid, .inquiry-grid { grid-template-columns: 1fr; }.message-workspace { grid-template-columns: 1fr; }.thread-list { max-height: 245px; border-right: 0; border-bottom: 1px solid #e4e8ed; }.message-compose { grid-template-columns: 1fr; } }

.sidebar-close,
.portal-backdrop { display: none; }

@media (max-width: 980px) {
  body.portal-menu-open { overflow: hidden; }
  .app-topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .app-topbar .user-menu button { min-height: 44px; }
  .sidebar {
    width: min(310px, 86vw);
    height: 100dvh;
    min-height: 0;
    padding-top: max(76px, calc(env(safe-area-inset-top) + 62px));
    padding-left: max(20px, env(safe-area-inset-left));
    z-index: 12;
    overflow: hidden;
  }
  .sidebar .app-nav {
    min-height: 0;
    margin-top: 32px;
    padding-bottom: 18px;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .sidebar .app-nav p:first-child { margin-top: 0; }
  .sidebar .sidebar-security { margin-top: 12px; }
  .sidebar-close {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d8e2f2;
    border: 1px solid rgba(201,168,76,.25);
    border-radius: 8px;
    background: rgba(201,168,76,.08);
    font: 700 .68rem/1 "DM Sans", sans-serif;
    cursor: pointer;
  }
  .portal-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 11;
    border: 0;
    background: rgba(4,8,12,.64);
    backdrop-filter: blur(3px);
    cursor: default;
  }
  .portal-backdrop[hidden] { display: none; }
}

@media (max-width: 620px) {
  .button-small, button.link-button { min-height: 44px; }
  .module-card { min-height: 180px; }
  .module-loading, .module-empty { padding: 36px 22px; }
  #record-dialog { max-height: calc(100dvh - 30px); overflow: hidden; }
  #record-form { max-height: calc(100dvh - 30px); display: flex; flex-direction: column; overflow: hidden; }
  #record-fields { min-height: 0; max-height: none; padding: 2px 5px 2px 0; flex: 1 1 auto; overscroll-behavior: contain; }
  #record-submit { flex: 0 0 auto; }
  .inquiry-toolbar { align-items: flex-start; flex-direction: column; }
  .inquiry-filters button, .inquiry-contact { min-height: 44px; }
  .inquiry-filters { justify-content: flex-start; }
  .inquiry-card { padding: 19px 17px; }
  .inquiry-review { grid-template-columns: 1fr; }
  .inquiry-review .button { width: 100%; grid-column: auto; justify-self: stretch; }
  .inquiry-contact { max-width: 100%; overflow-wrap: anywhere; }
}
