/* ======================================================================
   SencorpWhite Partner Portal Design System
   Reusable across the full site. Telerik components inherit these tokens.
   ====================================================================== */

:root {
    --sw-blue: #226295;
    --sw-blue-dark: #123f62;
    --sw-blue-deep: #0b2f4b;
    --sw-blue-soft: #eaf3f9;
    --sw-steel: #58778d;
    --sw-charcoal: #333333;
    --sw-copy: #666666;
    --sw-muted: #7e8a93;
    --sw-border: #dfe5e9;
    --sw-surface: #f4f6f7;
    --sw-surface-blue: #f5f9fc;
    --sw-white: #ffffff;
    --sw-success: #247657;
    --sw-success-bg: #e7f5ef;
    --sw-gold: #a66b00;
    --sw-gold-bg: #fff3d9;
    --sw-danger: #b42318;
    --sw-danger-bg: #fff0ef;
    --shadow-sm: 0 1px 3px rgba(15, 47, 70, .08);
    --shadow-md: 0 12px 32px rgba(15, 47, 70, .12);
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --sidebar-width: 252px;
    --topbar-height: 72px;
    --font-sans: "Open Sans", Arial, sans-serif;
}

.auth-brand > .auth-brand-logo {
    display: block;
    width: 75%;
    max-width: none;
    height: auto;
    max-height: none;
    align-self: start;
    object-fit: contain;
}

/* Tenant logos on the blue sign-in panel may themselves be white artwork.
   Keep them transparent here so the blue panel provides the contrast. */
.auth-brand > .tenant-auth-logo {
    padding: 0;
    background: transparent;
    border-radius: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: var(--font-sans); color: var(--sw-charcoal); background: var(--sw-surface); }
body { font-size: 14px; line-height: 1.5; }
a { color: var(--sw-blue); text-decoration: none; }
a:hover { color: var(--sw-blue-dark); }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 38px); line-height: 1.16; letter-spacing: -.025em; color: var(--sw-charcoal); }
h2 { margin-bottom: 6px; font-size: 21px; line-height: 1.3; color: var(--sw-charcoal); }
h3 { font-size: 16px; }
.muted { color: var(--sw-muted); }
.eyebrow { display: block; margin-bottom: 7px; color: var(--sw-blue); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.eyebrow--light { color: #a9d5f1; }

/* Shell */
.app-shell { min-height: 100vh; }
.side-nav { position: fixed; z-index: 50; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; background: var(--sw-blue-deep); color: #fff; }
.brand-lockup { height: var(--topbar-height); padding: 18px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; }
.brand-lockup .tenant-brand-logo { width: 46px; height: 40px; padding: 3px; object-fit: contain; background: #fff; border-radius: 5px; flex: 0 0 auto; }
.brand-lockup .tenant-brand-name { overflow: hidden; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; }
.nav-footer__address { display: block; max-width: 100%; margin-top: 8px; color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.45; }
.tenant-auth-logo { width: 210px; max-height: 90px; padding: 6px; object-fit: contain; background: #fff; border-radius: 6px; }
.brand-lockup:hover { color: #fff; }
.brand-lockup img { width: 150px; height: auto; }
.brand-lockup span { padding-left: 11px; border-left: 1px solid rgba(255,255,255,.3); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.nav-stack { padding: 24px 14px; display: grid; gap: 6px; }
.nav-item { min-height: 46px; padding: 0 14px; display: flex; align-items: center; gap: 12px; border-radius: 6px; color: rgba(255,255,255,.72); font-weight: 600; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: var(--sw-blue); box-shadow: inset 3px 0 #7bc0ea; }
.nav-icon { width: 22px; font-size: 20px; text-align: center; opacity: .9; }
.nav-footer { margin: auto 24px 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.nav-footer__label { display: block; margin-bottom: 5px; font-size: 9px; font-weight: 700; letter-spacing: .15em; color: rgba(255,255,255,.48); }
.nav-footer a { color: #fff; font-size: 16px; font-weight: 700; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.top-bar { position: sticky; z-index: 40; top: 0; height: var(--topbar-height); padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--sw-border); backdrop-filter: blur(10px); }
.global-search { width: min(520px, 48vw); height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 9px; color: var(--sw-muted); background: var(--sw-surface); border: 1px solid transparent; border-radius: 7px; }
.global-search:focus-within { border-color: var(--sw-blue); background: #fff; }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--sw-charcoal); }
.global-search kbd { padding: 2px 6px; border: 1px solid #ccd5da; border-radius: 4px; background: #fff; color: var(--sw-muted); font-size: 10px; }
.top-actions, .user-chip { display: flex; align-items: center; gap: 12px; }
.user-chip { padding-left: 12px; border-left: 1px solid var(--sw-border); }
.avatar, .account-avatar { flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--sw-blue), var(--sw-blue-dark)); font-weight: 700; }
.avatar { width: 36px; height: 36px; font-size: 12px; }
.user-copy { display: grid; line-height: 1.25; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--sw-muted); font-size: 10px; }
.icon-button, .mobile-menu, .close-button { border: 0; background: transparent; cursor: pointer; color: var(--sw-copy); }
.icon-button { width: 34px; height: 34px; border-radius: 50%; font-size: 19px; }
.icon-button:hover { background: var(--sw-surface); color: var(--sw-blue); }
.sign-out { font-size: 18px; }
.mobile-menu { display: none; font-size: 22px; }
.content-shell { width: min(1500px, 100%); margin: 0 auto; padding: 34px 38px 64px; }

/* Page framework */
.page-heading { margin-bottom: 26px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.page-heading p { margin: 0; color: var(--sw-copy); font-size: 15px; }
.page-heading--compact h1 { font-size: 32px; }
.page-loading, .app-loading { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--sw-muted); }
.app-loading { min-height: 100vh; flex-direction: column; background: var(--sw-surface); }
.loading-ring { width: 26px; height: 26px; display: inline-block; border: 3px solid #cddbe5; border-top-color: var(--sw-blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); }
.alert--error { color: var(--sw-danger); background: var(--sw-danger-bg); border: 1px solid #f2c4bf; }
.panel, .data-panel { background: #fff; border: 1px solid var(--sw-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.panel-heading { padding: 22px 24px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sw-border); }
.panel-heading h2 { margin: 0; }
.panel-heading .eyebrow { margin-bottom: 3px; }
.panel-heading > a { font-weight: 600; }

/* Buttons */
.pp-button, .k-button.pp-button { min-height: 40px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent !important; border-radius: 5px !important; font-weight: 700; font-size: 13px; box-shadow: none !important; cursor: pointer; }
.pp-button--primary, .k-button.pp-button--primary { color: #fff !important; background: var(--sw-blue) !important; border-color: var(--sw-blue) !important; }
.pp-button--primary:hover, .k-button.pp-button--primary:hover { background: var(--sw-blue-dark) !important; }
.pp-button--secondary, .k-button.pp-button--secondary { color: var(--sw-blue) !important; background: var(--sw-blue-soft) !important; border-color: #c5dbe9 !important; }
.pp-button--ghost, .k-button.pp-button--ghost { color: var(--sw-copy) !important; background: #fff !important; border-color: var(--sw-border) !important; }
.pp-button--danger { color: #fff !important; background: var(--sw-danger) !important; border-color: var(--sw-danger) !important; }
.pp-button--danger:hover { filter: brightness(.92); }
.pp-button--full { width: 100%; }
.account-contact-logins { margin-top: 24px; padding: 22px 24px; }
.account-contact-logins > .section-heading { margin: 0 0 8px; align-items: flex-start; }
.account-contact-logins > .section-heading h3 { margin: 0; font-size: 20px; }
.account-contact-logins > .section-heading p { max-width: 900px; margin-top: 7px; line-height: 1.55; }
.account-contact-logins__table { width: 100%; min-width: 760px; border-collapse: collapse; }
.account-contact-logins__table th, .account-contact-logins__table td { padding: 12px 14px; border-bottom: 1px solid var(--sw-border); text-align: left; vertical-align: middle; }
.account-contact-logins__actions { white-space: nowrap; }
.account-contact-logins__actions .pp-button + .pp-button { margin-left: 8px; }
.account-contact-logins__actions .pp-button { min-height: 34px; padding-inline: 11px; }
.account-contact-logins .data-panel { overflow-x: auto; }
.account-contact-logins__confirm { padding-bottom: 80px; }
.account-contact-logins__domains { margin: 18px 0 14px; padding: 16px; background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--radius-sm); }
.account-contact-logins__domains h4 { margin: 0 0 5px; }
.account-contact-logins__domains p, .account-contact-logins__domains small { color: var(--sw-muted); }
.account-contact-logins__domains p { margin: 5px 0; line-height: 1.5; }
.account-contact-logins__domain-list { margin: 10px 0; padding: 0; list-style: none; }
.account-contact-logins__domain-list li { padding: 7px 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sw-border); }
.account-contact-logins__domain-add { margin: 10px 0 6px; display: flex; gap: 8px; }
.account-contact-logins__domain-add input { width: min(320px, 100%); min-height: 40px; padding: 0 12px; border: 1px solid var(--sw-border); border-radius: 5px; }
.account-contact-logins__domain-add input:focus { border-color: var(--sw-blue); outline: 3px solid rgba(34,98,149,.12); }

/* Dashboard */
.metric-grid { margin-bottom: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { min-height: 132px; padding: 22px; display: flex; align-items: center; gap: 17px; color: inherit; background: #fff; border: 1px solid var(--sw-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: .18s ease; }
.metric-card:hover { transform: translateY(-2px); color: inherit; border-color: #b8d2e3; box-shadow: var(--shadow-md); }
.metric-card__icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; font-size: 22px; }
.metric-card__icon--blue { color: var(--sw-blue); background: var(--sw-blue-soft); }
.metric-card__icon--navy { color: #fff; background: var(--sw-blue-dark); }
.metric-card__icon--steel { color: var(--sw-steel); background: #edf2f5; }
.metric-card__icon--gold { color: var(--sw-gold); background: var(--sw-gold-bg); }
.metric-card > span:last-child { display: grid; }
.metric-card small { font-size: 9px; color: var(--sw-muted); font-weight: 700; letter-spacing: .1em; }
.metric-card strong { margin: 2px 0; color: var(--sw-charcoal); font-size: 28px; line-height: 1.1; }
.metric-card em { color: var(--sw-muted); font-size: 11px; font-style: normal; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .8fr); gap: 20px; }
.account-list__row { min-height: 73px; padding: 12px 22px; display: flex; align-items: center; gap: 13px; color: inherit; border-bottom: 1px solid #edf0f2; }
.account-list__row:last-child { border-bottom: 0; }
.account-list__row:hover { color: inherit; background: var(--sw-surface-blue); }
.account-avatar { width: 42px; height: 42px; font-size: 12px; }
.account-avatar--small { width: 34px; height: 34px; font-size: 10px; }
.account-avatar--hero { width: 68px; height: 68px; border-radius: 12px; font-size: 19px; }
.account-list__main { flex: 1; display: grid; }
.account-list__main small { color: var(--sw-muted); }
.account-list__row time { color: var(--sw-muted); font-size: 11px; }
.chevron { color: var(--sw-muted); font-size: 22px; }
.quick-start { padding-bottom: 20px; }
.step-list { margin: 8px 22px 22px; padding: 0; list-style: none; }
.step-list li { position: relative; min-height: 68px; display: flex; gap: 12px; }
.step-list li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 1px; background: var(--sw-border); }
.step-list li > span { z-index: 1; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--sw-blue); background: var(--sw-blue-soft); border: 1px solid #bcd7e8; font-size: 11px; font-weight: 700; }
.step-list li.complete > span { color: #fff; background: var(--sw-success); border-color: var(--sw-success); }
.step-list div { display: grid; align-content: start; }
.step-list small { color: var(--sw-muted); }
.quick-start > .pp-button { width: calc(100% - 44px); margin: 0 22px; }
.inline-empty { min-height: 140px; padding: 30px; display: grid; place-content: center; gap: 5px; text-align: center; color: var(--sw-muted); }
.inline-empty strong { color: var(--sw-charcoal); }

/* Filters and grids */
.filter-bar { margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.search-box { width: min(420px, 100%); position: relative; }
.search-box > span { position: absolute; z-index: 2; top: 7px; left: 12px; color: var(--sw-muted); font-size: 18px; }
.search-box .k-input { padding-left: 34px; }
.result-count { margin-left: auto; color: var(--sw-muted); font-size: 12px; }
.data-panel { overflow: hidden; }
.portal-grid.k-grid { border: 0; font-family: var(--font-sans); }
.portal-grid .k-grid-header { color: var(--sw-copy); background: #f7f9fa; border-color: var(--sw-border); }
.portal-grid .k-table-th { padding-block: 13px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.portal-grid .k-table-td { padding-block: 13px; border-color: #edf0f2; }
.portal-grid .k-table-row:hover { background: var(--sw-surface-blue); }
.grid-account { display: flex; align-items: center; gap: 11px; color: inherit; }
.grid-account > span:last-child { min-width: 0; display: grid; }
.grid-account strong { overflow: hidden; color: var(--sw-charcoal); text-overflow: ellipsis; white-space: nowrap; }
.grid-account small { overflow: hidden; color: var(--sw-muted); text-overflow: ellipsis; white-space: nowrap; }
.row-action { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--sw-blue); background: var(--sw-blue-soft); font-size: 21px; }
.type-pill, .status-badge { width: fit-content; display: inline-flex; align-items: center; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.type-pill { padding: 4px 9px; color: var(--sw-blue-dark); background: var(--sw-blue-soft); font-size: 10px; }
.status-badge { padding: 4px 9px; font-size: 10px; }
.status-badge--active { color: var(--sw-success); background: var(--sw-success-bg); }
.status-badge--inactive { color: var(--sw-muted); background: #eceff1; }
.status-badge--gold { color: var(--sw-gold); background: var(--sw-gold-bg); }

/* Account workspace */
.breadcrumbs { margin-bottom: 18px; display: flex; gap: 8px; color: var(--sw-muted); font-size: 12px; }
.account-hero { margin-bottom: 20px; padding: 24px 26px; display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--sw-border); border-radius: var(--radius-md); }
.account-hero__copy { flex: 1; }
.account-hero h1 { margin: 0; font-size: 28px; }
.account-hero p { margin: 3px 0 8px; color: var(--sw-muted); }
.title-line, .hero-tags, .hero-actions { display: flex; align-items: center; gap: 10px; }
.hero-tags > span:not(.type-pill) { padding-left: 10px; border-left: 1px solid var(--sw-border); color: var(--sw-muted); font-size: 11px; }
.workspace-tabs { margin-bottom: 20px; display: flex; border-bottom: 1px solid var(--sw-border); }
.workspace-tabs button { padding: 13px 17px; border: 0; border-bottom: 3px solid transparent; color: var(--sw-muted); background: transparent; font-weight: 700; cursor: pointer; }
.workspace-tabs button.active { color: var(--sw-blue); border-bottom-color: var(--sw-blue); }
.workspace-tabs span { margin-left: 4px; padding: 2px 6px; border-radius: 10px; background: #e8edf0; font-size: 9px; }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.detail-card { min-height: 260px; padding: 26px; }
.detail-card > p { max-width: 740px; color: var(--sw-copy); line-height: 1.75; }
.fact-list { margin: 15px 0 0; }
.fact-list > div { padding: 12px 0; display: flex; justify-content: space-between; border-bottom: 1px solid #edf0f2; }
.fact-list dt { color: var(--sw-muted); }
.fact-list dd { margin: 0; font-weight: 700; }
.section-heading { margin: 22px 0 14px; display: flex; align-items: end; justify-content: space-between; }
.section-heading p { margin: 0; color: var(--sw-muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 16px; }
.location-card { min-height: 220px; padding: 21px; display: flex; flex-direction: column; color: inherit; background: #fff; border: 1px solid var(--sw-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: .18s ease; }
.location-card:hover { transform: translateY(-2px); color: inherit; border-color: #b8d2e3; box-shadow: var(--shadow-md); }
.location-card__top { margin-bottom: 18px; display: flex; justify-content: space-between; }
.location-card h3 { margin-bottom: 8px; font-size: 18px; }
.location-card p { color: var(--sw-muted); }
.location-card__footer { margin-top: auto; padding-top: 13px; display: flex; justify-content: space-between; border-top: 1px solid #edf0f2; color: var(--sw-muted); font-size: 11px; }
.location-card__footer span:last-child { color: var(--sw-blue); font-weight: 700; }

/* Forms and Telerik controls */
.k-input, .k-picker, .k-multiselect, .k-textarea { border-color: #cfd9df !important; border-radius: 5px !important; background: #fff; }
.k-input:focus-within, .k-picker:focus-within, .k-multiselect:focus-within, .k-textarea:focus-within { border-color: var(--sw-blue) !important; box-shadow: 0 0 0 3px rgba(34,98,149,.12) !important; }
.modal-backdrop { position: fixed; z-index: 1000; inset: 0; display: flex; justify-content: flex-end; background: rgba(7, 27, 42, .48); backdrop-filter: blur(2px); }
.side-panel { width: min(590px, 100vw); height: 100%; overflow: auto; background: #fff; box-shadow: -14px 0 40px rgba(7,27,42,.2); animation: slide-in .2s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: .5; } }
.side-panel__header { position: sticky; z-index: 3; top: 0; padding: 21px 26px 17px; display: flex; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--sw-border); }
.side-panel__header h2 { margin: 0; font-size: 24px; }
.close-button { width: 34px; height: 34px; border-radius: 50%; background: var(--sw-surface); font-size: 23px; }
.editor-form { padding: 24px 26px 90px; display: grid; gap: 8px; }
.editor-form > label, .form-row label { margin-top: 8px; color: var(--sw-copy); font-size: 11px; font-weight: 700; }
.editor-form label > span { color: var(--sw-danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row > div { min-width: 0; display: grid; gap: 6px; }
.form-row--postal { grid-template-columns: 2fr 1fr; }
.form-section { margin: 14px -26px 4px; padding: 16px 26px 8px; border-top: 1px solid var(--sw-border); }
.form-section:first-of-type { margin-top: -8px; border-top: 0; }
.form-section h3 { margin-bottom: 2px; }
.form-section p { margin: 0; color: var(--sw-muted); font-size: 11px; }
.switch-row { margin-top: 13px; padding: 13px; display: flex; align-items: center; gap: 11px; background: var(--sw-surface); border-radius: 6px; }
.switch-row > span { display: grid; }
.switch-row small { color: var(--sw-muted); }
.switch-row--compact { margin-top: 26px; }
.side-panel__footer { position: fixed; z-index: 4; right: 0; bottom: 0; width: min(590px, 100vw); padding: 14px 26px; display: flex; justify-content: flex-end; gap: 9px; background: rgba(255,255,255,.96); border-top: 1px solid var(--sw-border); backdrop-filter: blur(8px); }
.validation-message, .field-validation { color: var(--sw-danger); font-size: 11px; }
.validation-summary { color: var(--sw-danger); background: var(--sw-danger-bg); border-radius: 5px; }
.validation-summary:empty { display: none; }

/* Authentication */
.auth-page { min-height: 100vh; background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(410px, .92fr) 1.08fr; }
.auth-brand { position: relative; overflow: hidden; padding: 45px clamp(38px, 6vw, 88px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(145deg, rgba(11,47,75,.97), rgba(34,98,149,.88)), url("../images/storage-pattern.svg") center/cover; }
.auth-brand::after { content: ""; position: absolute; right: -100px; bottom: -140px; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand > img { width: 210px; }
.auth-brand h1 { margin: 10px 0 18px; color: #fff; font-size: clamp(38px, 4.2vw, 60px); line-height: 1.07; }
.auth-brand p { max-width: 510px; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.7; }
.auth-brand small { color: rgba(255,255,255,.55); }
.auth-form-panel { display: grid; place-items: center; padding: 40px; }
.auth-form { width: min(410px, 100%); display: grid; gap: 8px; }
.auth-form h2 { margin: 2px 0 0; font-size: 31px; }
.auth-form > p { margin-bottom: 19px; }
.auth-form > label, .label-row { margin-top: 8px; color: var(--sw-copy); font-size: 11px; font-weight: 700; }
.auth-input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #cfd9df; border-radius: 5px; outline: 0; }
.auth-input:focus { border-color: var(--sw-blue); box-shadow: 0 0 0 3px rgba(34,98,149,.12); }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500 !important; }
.auth-form .pp-button { margin-top: 14px; height: 47px; }
.first-run, .auth-help { margin: 18px 0 0 !important; text-align: center; color: var(--sw-muted); font-size: 12px; }
.auth-help { padding-top: 18px; border-top: 1px solid var(--sw-border); }
.auth-mobile-logo { display: none; }
.auth-page--simple { display: grid; place-items: center; padding: 30px; background: var(--sw-surface); }
.setup-card { width: min(560px, 100%); padding: 36px 42px; background: #fff; border: 1px solid var(--sw-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.setup-card > img { width: 210px; margin-bottom: 32px; }
.auth-form--setup { width: 100%; }

.empty-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state__icon { width: 58px; height: 58px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 50%; color: var(--sw-blue); background: var(--sw-blue-soft); font-size: 27px; font-weight: 700; }
.empty-state p { color: var(--sw-muted); }

@media (max-width: 1120px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    :root { --sidebar-width: 236px; }
    .side-nav { transform: translateX(-100%); transition: transform .2s ease; }
    .nav-open .side-nav { transform: translateX(0); }
    .nav-scrim { position: fixed; z-index: 45; inset: 0; border: 0; background: rgba(7,27,42,.45); }
    .app-main { margin-left: 0; }
    .mobile-menu { display: block; }
    .global-search { flex: 1; width: auto; }
    .global-search kbd, .user-copy { display: none; }
    .content-shell { padding: 28px 20px 50px; }
    .page-heading { align-items: start; }
    .account-hero { align-items: flex-start; flex-wrap: wrap; }
    .hero-actions { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-mobile-logo { width: 210px; margin-bottom: 45px; display: block; }
}

@media (max-width: 580px) {
    .metric-grid, .card-grid { grid-template-columns: 1fr; }
    .top-bar { padding: 0 14px; }
    .top-actions .icon-button:first-child, .global-search { display: none; }
    .page-heading, .section-heading { align-items: stretch; flex-direction: column; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .result-count { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .account-hero__copy { min-width: calc(100% - 90px); }
    .title-line { align-items: start; flex-direction: column; }
    .workspace-tabs { overflow-x: auto; }
    .auth-form-panel { padding: 26px; }
    .setup-card { padding: 28px 22px; }
    .account-contact-logins { padding: 16px 14px; }
    .account-contact-logins__domains { padding: 13px; }
    .account-contact-logins__domain-add { align-items: stretch; flex-direction: column; }
    .account-contact-logins__domain-add input { width: 100%; }
}

.account-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-filter-bar .search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.account-filter-bar .search-box > span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.account-filter-bar .result-count {
    margin-left: auto;
    white-space: nowrap;
}

@media (max-width: 580px) {
    .account-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .account-filter-bar .result-count {
        margin-left: 0;
    }
}
.account-search {
    width: min(420px, 100%);
    min-width: 0;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nav-group-title::-webkit-details-marker {
    display: none;
}

.nav-group-title::after {
    content: "›";
    margin-left: auto;
    transition: transform 150ms ease;
}

.nav-group[open] > .nav-group-title::after {
    transform: rotate(90deg);
}

.nav-children {
    margin: 4px 0 8px 20px;
    padding-left: 10px;
    border-left: 1px solid currentColor;
}

.nav-children .nav-item {
    padding-left: 12px;
    font-size: 0.92rem;
}
