body[data-brand] {
    --app-muted: color-mix(in srgb, var(--app-ink) 58%, #fff);
    --app-border: color-mix(in srgb, var(--app-brand) 13%, #fff);
    --app-focus: 0 0 0 3px color-mix(in srgb, var(--app-accent) 48%, transparent);
    --app-shadow: 0 20px 60px color-mix(in srgb, var(--app-brand-strong) 8%, transparent);
    background:
        radial-gradient(ellipse at 5% 5%, color-mix(in srgb, var(--app-accent) 8%, transparent), transparent 45%),
        var(--app-canvas);
}

body[data-brand] .app-header {
    border-top: 3px solid var(--app-accent);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--app-brand-strong) 5%, transparent);
}

.company-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.company-brand-logo {
    display: grid;
    flex: 0 0 auto;
    width: 88px;
    height: 76px;
    padding: 7px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: var(--company-logo-background, #fff);
}

.company-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-brand-copy { display: grid; gap: 5px; min-width: 0; }
.company-brand-copy strong {
    color: var(--app-ink);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.company-brand-copy > span { color: var(--app-muted); font-size: 13px; line-height: 1.65; text-align: start; }
.company-brand-copy small { color: var(--app-muted); font-size: 11px; line-height: 1.6; }
.company-brand--panel { margin-bottom: 24px; }

.company-brand--header { gap: 11px; min-width: max-content; }
.company-brand--header .company-brand-logo { width: 68px; height: 54px; padding: 4px; border-radius: 10px; }
.company-brand--header .company-brand-copy { max-width: none; gap: 1px; }
.company-brand--header strong,
.company-brand--header .company-brand-copy > span {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}
.company-brand--header strong { font-size: 13px; }
.company-brand--header .company-brand-copy > span { font-size: 10px; }

body[data-brand] .app-header-inner { align-items: center; }
body[data-brand] .app-brand { flex: 0 0 auto; min-width: max-content; }
body[data-brand] .app-nav-desktop {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}
body[data-brand] .app-nav-link { padding-inline: 10px; white-space: nowrap; }
body[data-brand] .app-nav-link small { display: none; }
body[data-brand] .header-actions { gap: 7px; }
.locale-switcher { margin: 0; }
.guest-locale-switcher { position: fixed; top: 16px; inset-inline-end: 20px; z-index: 30; margin: 0; }
.locale-switcher-button {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--app-border);
    border-radius: 11px;
    background: var(--app-surface);
    color: var(--app-brand-strong);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.locale-switcher-button:hover { background: var(--app-brand-soft); }
.locale-switcher--mobile { padding: 4px 6px 10px; }
.locale-switcher--mobile .locale-switcher-button { width: 100%; }
.entry-avatar-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.entry-avatar img[hidden], .entry-avatar-fallback[hidden] { display: none !important; }
body[data-brand] .entry-card { align-self: start; }
body[data-brand] .entry-card .entry-card-actions { margin-top: 0; align-content: start; }
html[dir="rtl"] body[data-brand] { direction: rtl; }
html[dir="ltr"] body[data-brand] { direction: ltr; }
html[dir="rtl"] body[data-brand] .app-nav-desktop { justify-content: center; }
html[dir="rtl"] body[data-brand] .entry-card-copy { text-align: right; }
body[data-brand] .app-nav-link.is-active {
    background: var(--app-brand-soft);
    color: var(--app-brand-strong);
    box-shadow: inset 0 -2px 0 var(--app-accent);
}
body[data-brand] .role-badge { color: var(--app-brand-strong); }
body[data-brand] .btn-primary {
    background: var(--app-brand);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--app-brand) 12%, transparent);
}
body[data-brand] .btn-primary:hover {
    background: var(--app-brand-strong);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--app-brand) 18%, transparent);
}
body[data-brand] .app-main input:not([type="checkbox"]):not([type="radio"]),
body[data-brand] .app-main select,
body[data-brand] .app-main textarea { border-color: var(--app-border); }
body[data-brand] .app-main input:focus,
body[data-brand] .app-main select:focus,
body[data-brand] .app-main textarea:focus { border-color: var(--app-brand); }
body[data-brand] .app-nav-link:focus-visible,
body[data-brand] .mobile-nav summary:focus-visible,
body[data-brand] .app-signout:focus-visible,
body[data-brand] .app-brand:focus-visible,
body[data-brand] .auth-form .btn:focus-visible,
body[data-brand] .app-main input:focus-visible,
body[data-brand] .app-main select:focus-visible,
body[data-brand] .app-main textarea:focus-visible {
    outline: 2px solid var(--app-brand-strong);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px var(--app-accent);
}
body[data-brand] .app-main input:focus-visible,
body[data-brand] .app-main select:focus-visible,
body[data-brand] .app-main textarea:focus-visible { border-color: var(--app-brand); }
body[data-brand] .app-nav-link.is-active:focus-visible { outline-offset: 1px; }

body[data-brand] .auth-shell {
    width: min(100%, 1060px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    padding-block: 40px;
    align-items: stretch;
}
body[data-brand] .auth-hero {
    min-height: 650px;
    gap: 42px;
    padding: 44px;
    border: 1px solid var(--app-brand-strong);
    border-radius: 24px 0 0 24px;
    background: linear-gradient(145deg, var(--app-brand), var(--app-brand-strong));
    box-shadow: var(--app-shadow);
}
body[data-brand] .auth-hero::before {
    inset: auto -100px -210px auto;
    width: 480px;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--app-accent) 45%, transparent);
    box-shadow: 0 0 0 50px color-mix(in srgb, var(--app-accent) 6%, transparent),
        0 0 0 100px color-mix(in srgb, var(--app-accent) 4%, transparent);
}
body[data-brand] .auth-hero::after { opacity: .6; }
body[data-brand] .auth-hero-glow { display: none; }
.company-brand--hero { flex-direction: column; align-items: flex-start; gap: 22px; }
.company-brand--hero .company-brand-logo {
    width: 166px;
    height: 128px;
    padding: 12px;
    border-color: color-mix(in srgb, var(--app-accent) 40%, #fff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgb(0 0 0 / 8%);
}
.company-brand--hero .company-brand-copy { gap: 8px; }
.company-brand--hero strong { color: #fff; font-size: clamp(1.3rem, 2.3vw, 1.8rem); letter-spacing: -.025em; }
.company-brand--hero .company-brand-copy > span { color: #fff; opacity: .8; font-size: 15px; }
body[data-brand] .auth-hero-kicker {
    display: inline-block;
    padding-inline-start: 12px;
    border-inline-start: 3px solid var(--app-accent);
    letter-spacing: .03em;
}
body[data-brand] .auth-hero-copy h2 { font-size: clamp(1.6rem, 2.5vw, 2rem); line-height: 1.3; }
body[data-brand] .auth-hero-copy > p:last-child { max-width: 36ch; font-size: 13px; }
body[data-brand] .auth-hero-foot { margin-top: 0; font-size: 11px; letter-spacing: 0; }
body[data-brand] .auth-layout { max-width: none; display: flex; animation: none; }
body[data-brand] .auth-panel {
    width: 100%;
    padding: 42px 38px;
    border: 1px solid var(--app-border);
    border-inline-start: 0;
    border-radius: 0 24px 24px 0;
    background: #fff;
    box-shadow: var(--app-shadow);
}
body[data-brand] .auth-panel .page-title { margin-bottom: 2px; font-size: 27px; }
body[data-brand] .auth-panel .page-title-ar { color: var(--app-muted); font-size: 17px; }
body[data-brand] .auth-panel .page-description { font-size: 12px; line-height: 1.8; }
.auth-developer-credit {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}
.auth-developer-credit a {
    color: var(--app-brand);
    font-weight: 700;
    text-decoration: none;
}
.auth-developer-credit a:hover { text-decoration: underline; }
body.is-central-admin-portal .auth-hero {
    background: linear-gradient(145deg, #1c4c3b, #12372b);
}
body[data-brand] .auth-form { gap: 18px; }
body[data-brand] .auth-form label { font-size: 12px; }
body[data-brand] .auth-form input:not([type="checkbox"]) { min-height: 48px; }
body[data-brand] .auth-form .btn { min-height: 48px; }
body[data-brand] .auth-form .checkbox-row { font-size: 11px; }
body[data-brand] .auth-footer-link { padding-top: 18px; border-top: 1px solid var(--app-border); font-size: 12px; }

@media (max-width: 760px) {
    body[data-brand] .auth-shell { max-width: 480px; grid-template-columns: minmax(0, 1fr); padding-block: 24px; }
    body[data-brand] .auth-hero { display: none; }
    body[data-brand] .auth-panel {
        padding: 30px 26px;
        border: 1px solid var(--app-border);
        border-top: 4px solid var(--app-accent);
        border-radius: 20px;
    }
    .company-brand--panel { gap: 12px; }
    .company-brand--panel .company-brand-logo { width: 76px; height: 64px; padding: 5px; }
    .company-brand--panel .company-brand-copy { gap: 3px; }
    .company-brand--panel strong { font-size: 15px; }
    .company-brand--panel .company-brand-copy > span { font-size: 11px; }
    .company-brand--panel .company-brand-copy small { font-size: 10px; }
    .company-brand--header .company-brand-copy { max-width: none; }
}

@media (max-width: 390px) {
    body[data-brand] .auth-panel { padding: 26px 20px; }
    .company-brand--header { gap: 7px; min-width: 0; }
    .company-brand--header .company-brand-logo { width: 48px; height: 42px; }
    .company-brand--header .company-brand-copy { max-width: none; }
    .company-brand--header strong,
    .company-brand--header .company-brand-copy > span { white-space: normal; }
    .company-brand--header strong { font-size: 12px; }
    .company-brand--header .company-brand-copy > span { font-size: 10px; }
    body[data-brand] .app-brand { min-width: 0; }
    .company-brand--panel { gap: 9px; }
    .company-brand--panel .company-brand-logo { width: 66px; height: 58px; }
    .company-brand--panel strong { font-size: 14px; }
    .company-brand--panel .company-brand-copy > span { font-size: 10px; }
    body[data-brand] .auth-panel { padding-inline: 16px; }
}

/* Workspace navigation and task-focused dashboard */
body[data-brand] .app-header {
    border-top: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--app-brand-strong) 10%, #fff);
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 8px 24px rgb(20 48 32 / 5%);
}
body[data-brand] .app-header-inner {
    width: min(100% - 40px, 1460px);
    min-height: 78px;
    gap: 22px;
    flex-wrap: nowrap;
}
body[data-brand] .app-brand { min-width: 0; flex: 0 1 275px; }
body[data-brand] .company-brand--header { gap: 10px; min-width: 0; }
body[data-brand] .company-brand--header .company-brand-logo {
    width: 48px;
    height: 46px;
    padding: 3px;
    border-radius: 12px;
}
body[data-brand] .company-brand--header .company-brand-copy { max-width: 190px; }
body[data-brand] .company-brand--header .company-brand-copy strong,
body[data-brand] .company-brand--header .company-brand-copy > span {
    overflow: hidden;
    text-overflow: ellipsis;
}
body[data-brand] .company-brand--header strong { font-size: 12px; }
body[data-brand] .company-brand--header .company-brand-copy > span { font-size: 10px; }
body[data-brand] .app-nav-desktop {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 3px;
    margin-inline-start: 0;
}
body[data-brand] .app-nav-link {
    min-height: 46px;
    padding: 7px 11px;
    border-radius: 12px;
    color: #48594e;
    font-size: 13px;
    font-weight: 700;
}
body[data-brand] .app-nav-link span,
body[data-brand] .app-nav-link small { display: block; }
body[data-brand] .app-nav-link small {
    margin-top: 1px;
    color: inherit;
    font-size: 9px;
    font-weight: 550;
    opacity: .7;
    line-height: 1.1;
}
body[data-brand] .app-nav-link.is-active {
    background: var(--app-brand-soft);
    color: var(--app-brand-strong);
    box-shadow: inset 0 -2px 0 var(--app-accent);
}
body[data-brand] .app-nav-link:hover { background: var(--app-brand-soft); color: var(--app-brand-strong); }
.admin-nav-group { position: relative; }
.admin-nav-group > summary { list-style: none; cursor: pointer; }
.admin-nav-group > summary::-webkit-details-marker { display: none; }
.admin-nav-group > summary::after { content: "⌄"; margin-inline-start: 7px; color: var(--app-muted); }
.admin-nav-panel,
.account-menu-panel {
    position: absolute;
    top: calc(100% + 9px);
    inset-inline-end: 0;
    z-index: 40;
    display: grid;
    min-width: 190px;
    padding: 7px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--app-shadow);
}
.admin-nav-panel a,
.account-menu-panel a,
.account-menu-panel button {
    display: grid;
    gap: 2px;
    padding: 9px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--app-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}
.admin-nav-panel a:hover,
.account-menu-panel a:hover,
.account-menu-panel button:hover { background: var(--app-brand-soft); }
.admin-nav-panel small,
.account-menu-panel small { color: var(--app-muted); font-size: 10px; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.header-actions .company-switcher summary { min-height: 38px; padding: 7px 10px; font-size: 11px; }
.account-menu { position: relative; }
.account-menu > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 4px 0 4px 4px;
    list-style: none;
    cursor: pointer;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--app-accent) 38%, #fff);
    border-radius: 50%;
    background: var(--app-brand-soft);
    color: var(--app-brand-strong);
    font-size: 14px;
    font-weight: 800;
}
.account-menu-copy { display: grid; max-width: 130px; }
.account-menu-copy strong { overflow: hidden; color: var(--app-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-copy small { overflow: hidden; color: var(--app-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-caret { color: var(--app-muted); font-size: 13px; }
.account-menu-panel { min-width: 220px; }
.account-menu-panel form { margin: 0; }
.account-menu-panel button { width: 100%; }
.mobile-nav { display: none; }
.mobile-nav .company-switcher { display: none; }
body[data-brand] .mobile-nav > summary::after { content: none; }

.app-main { width: min(100% - 56px, 1360px); padding-top: 34px; }
.page-heading { align-items: center; margin-bottom: 24px; padding-bottom: 20px; }
.page-heading h1 { color: var(--app-brand-strong); font-size: clamp(24px, 2.7vw, 32px); letter-spacing: -.025em; }
.page-heading p { color: var(--app-muted); font-size: 12px; }
.page-heading .page-kicker { color: var(--app-brand); font-size: 10px; }
.page-heading .btn { flex: 0 0 auto; }
.filter-panel { padding: 16px; border-radius: 15px; }
.filter-panel label { color: var(--app-ink); font-size: 11px; }
.filter-panel .filter-actions { flex-wrap: wrap; }
.entry-list { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 13px; }
.entry-card { padding: 17px; border-radius: 16px; box-shadow: 0 4px 16px rgb(20 48 32 / 4%); }
.entry-card:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgb(20 48 32 / 8%); }
.entry-card-name { font-size: 14px; }
.entry-card-email { font-size: 11px; }
.entry-card-meta { gap: 6px; }
.entry-card .entry-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding-top: 10px; }
.entry-card .entry-card-actions > .btn-primary { grid-column: 1 / -1; }
.entry-card .entry-card-actions > .employee-actions-menu { grid-column: 1 / -1; }
.entry-card .entry-card-actions > .employee-actions-menu > summary { width: 100%; }
.entry-card .entry-card-actions > form { margin: 0; }
.entry-card .entry-card-actions > form .btn { width: 100%; }
.entry-card .employee-actions-menu .entry-card-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 22px; text-align: center; }
.entry-empty p { color: var(--app-muted); font-size: 12px; }
.entry-pagination { margin-top: 18px; }
.workspace-footer { width: min(100% - 56px, 1360px); color: var(--app-muted); font-size: 10px; }
.company-switcher-panel { padding: 7px; }
.company-switcher-link { font-size: 11px; }
.mobile-nav-panel .app-nav-link { border-radius: 10px; }
.mobile-nav-panel .app-nav-link.is-active { background: var(--app-brand-soft); color: var(--app-brand-strong); }
.workspace-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 30px 34px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--app-brand) 14%, #fff);
    border-radius: 22px;
    background: linear-gradient(118deg, #fff 0%, #f4f8f3 72%, color-mix(in srgb, var(--app-accent) 13%, #fff) 100%);
    box-shadow: 0 18px 42px rgb(22 54 35 / 6%);
}
.workspace-hero-copy { min-width: 0; }
.workspace-hero .page-kicker { margin: 0 0 9px; color: var(--app-muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.workspace-hero h1 { margin: 0; color: var(--app-brand-strong); font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.workspace-hero-en { margin: 2px 0 0; color: var(--app-brand); font-size: 13px; font-weight: 650; }
.workspace-hero-description { margin: 10px 0 0; color: var(--app-muted); font-size: 13px; }
.workspace-primary-action { min-height: 52px; flex: 0 0 auto; padding-inline: 18px; }
.workspace-primary-action > span:first-child { font-size: 20px; }
.workspace-primary-action small { display: block; margin-top: 2px; color: rgb(255 255 255 / 78%); font-size: 10px; font-weight: 500; }
.workspace-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.workspace-metric {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 108px;
    padding: 19px;
    border: 1px solid var(--app-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 22px rgb(22 54 35 / 4%);
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.workspace-metric:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--app-brand) 26%, #fff); box-shadow: 0 13px 28px rgb(22 54 35 / 8%); }
.metric-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--app-brand-soft); color: var(--app-brand); font-size: 20px; font-weight: 800; }
.metric-review .metric-icon { background: #fbf4e5; color: #8b681f; }
.metric-approved .metric-icon { background: #e9f5ed; color: #277249; }
.metric-invites .metric-icon { background: #eef1f7; color: #445c83; }
.metric-copy { display: grid; gap: 5px; }
.metric-copy small { color: var(--app-muted); font-size: 11px; font-weight: 650; }
.metric-copy strong { color: var(--app-ink); font-size: 27px; line-height: 1; }
.workspace-section { margin-top: 34px; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-eyebrow { margin: 0 0 5px; color: var(--app-muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.section-title-row h2,
.invite-panel-heading h2,
.invite-process-panel h2 { margin: 0; color: var(--app-brand-strong); font-size: 19px; font-weight: 800; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--app-brand); font-size: 12px; font-weight: 750; text-decoration: none; }
.text-link:hover { color: var(--app-brand-strong); text-decoration: underline; }
.workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.workflow-card { position: relative; min-height: 204px; padding: 20px 21px; border: 1px solid var(--app-border); border-radius: 17px; background: #fff; box-shadow: 0 8px 22px rgb(22 54 35 / 4%); }
.workflow-number { position: absolute; inset-block-start: 17px; inset-inline-end: 19px; color: #9aa69d; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.workflow-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 14px; border-radius: 11px; background: var(--app-brand-soft); color: var(--app-brand); font-size: 17px; font-weight: 800; }
.workflow-card-review .workflow-icon { background: #fbf4e5; color: #8b681f; }
.workflow-card h3 { margin: 0; color: var(--app-ink); font-size: 14px; font-weight: 800; }
.workflow-card p { min-height: 42px; margin: 6px 0 14px; color: var(--app-muted); font-size: 11px; line-height: 1.7; }
.workflow-card > a { display: inline-flex; align-items: center; gap: 7px; color: var(--app-brand); font-size: 11px; font-weight: 750; text-decoration: none; }
.workspace-bottom-note { display: flex; align-items: start; gap: 12px; margin-top: 18px; padding: 15px 17px; border: 1px solid color-mix(in srgb, var(--app-accent) 32%, #fff); border-radius: 14px; background: color-mix(in srgb, var(--app-accent) 8%, #fff); }
.note-mark { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border: 1px solid color-mix(in srgb, var(--app-accent) 48%, #fff); border-radius: 50%; color: var(--app-brand-strong); font-family: serif; font-size: 13px; font-weight: 800; }
.workspace-bottom-note p { margin: 0; color: var(--app-muted); font-size: 11px; line-height: 1.7; }
.workspace-bottom-note strong { color: var(--app-brand-strong); }

.invite-page-heading { align-items: center; }
.invite-page-heading h1 { margin: 0; color: var(--app-brand-strong); font-size: clamp(25px, 3vw, 33px); font-weight: 800; }
.invite-page-heading > div > p:last-child { margin: 7px 0 0; color: var(--app-muted); font-size: 13px; }
.invite-page-heading .btn-secondary small { color: var(--app-muted); font-size: 10px; }
.invite-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 16px; }
.invite-create-panel, .invite-process-panel { padding: 23px; }
.invite-panel-heading { display: flex; align-items: center; gap: 12px; }
.invite-panel-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--app-brand-soft); color: var(--app-brand); font-size: 22px; font-weight: 800; }
.invite-explainer { max-width: 600px; margin: 16px 0 18px; color: var(--app-muted); font-size: 12px; line-height: 1.8; }
.invite-form { display: flex; align-items: end; gap: 10px; }
.invite-form label { flex: 1; color: var(--app-ink); font-size: 12px; font-weight: 750; }
.invite-form label small { display: block; color: var(--app-muted); font-size: 10px; font-weight: 500; }
.invite-form input { margin-top: 5px !important; }
.invite-form .btn { flex: 0 0 auto; }
.invite-permission-note { display: flex; gap: 9px; margin-top: 18px; padding: 12px; border-radius: 12px; background: #f7f8f5; }
.invite-permission-note > span { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border: 1px solid var(--app-border); border-radius: 50%; color: var(--app-brand); font-size: 11px; font-weight: 800; }
.invite-permission-note p { margin: 0; color: var(--app-muted); font-size: 10px; line-height: 1.7; }
.invite-permission-note strong { color: var(--app-ink); font-size: 11px; }
.invite-process-panel h2 { margin-bottom: 12px; }
.invite-process-list { display: grid; gap: 14px; margin: 0 0 17px; padding: 0; list-style: none; }
.invite-process-list li { display: flex; align-items: start; gap: 11px; }
.invite-process-list li > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--app-brand-soft); color: var(--app-brand); font-size: 11px; font-weight: 800; }
.invite-process-list li div { display: grid; gap: 2px; }
.invite-process-list strong { color: var(--app-ink); font-size: 12px; }
.invite-process-list small { color: var(--app-muted); font-size: 10px; }
.invite-list-section { margin-top: 30px; }
.invite-count { color: var(--app-muted); font-size: 11px; font-weight: 650; }
.invite-list { display: grid; gap: 9px; }
.invite-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; }
.invite-row-icon { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #f2f5f1; color: var(--app-brand); }
.invite-row-copy { display: grid; flex: 1 1 auto; min-width: 120px; gap: 3px; }
.invite-row-copy strong { overflow: hidden; color: var(--app-ink); font-size: 12px; text-overflow: ellipsis; }
.invite-row-copy small, .invite-row-state small { color: var(--app-muted); font-size: 10px; }
.invite-row-state { display: grid; justify-items: start; gap: 4px; }
.invite-row-actions { display: flex; align-items: center; gap: 6px; }
.invite-row-actions form { margin: 0; }
.invite-empty { display: grid; justify-items: center; gap: 6px; padding: 30px; color: var(--app-muted); text-align: center; }
.invite-empty > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--app-brand-soft); color: var(--app-brand); font-size: 20px; }
.invite-empty strong { color: var(--app-ink); font-size: 13px; }
.invite-empty p { margin: 0; font-size: 11px; }
.team-invite-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.team-invite-card { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 13px; padding: 20px; }
.team-role-icon { display: grid; width: 42px; height: 42px; grid-row: span 2; place-items: center; border-radius: 13px; background: var(--app-brand-soft); color: var(--app-brand); font-size: 20px; font-weight: 800; }
.team-review-card .team-role-icon { background: #fbf4e5; color: #8b681f; }
.team-invite-card h2 { margin: 0; color: var(--app-brand-strong); font-size: 17px; font-weight: 800; }
.team-invite-card > p { grid-column: 1 / -1; margin: 15px 0 6px; color: var(--app-muted); font-size: 11px; }
.team-invite-card ul { grid-column: 1 / -1; display: grid; gap: 5px; margin: 0; padding-inline-start: 18px; color: var(--app-ink); font-size: 10px; }
.team-send-panel { margin-top: 16px; padding: 23px; }
.team-invite-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 12px; }
.team-invite-form label { color: var(--app-ink); font-size: 11px; font-weight: 750; }
.team-invite-form label small { display: block; color: var(--app-muted); font-size: 10px; font-weight: 500; }
.team-invite-form input { margin-top: 5px !important; }
.team-invite-form .btn { white-space: nowrap; }
.team-members-section { margin-top: 30px; }
.team-member-list { display: grid; gap: 8px; }
.team-member-row { display: flex; align-items: center; gap: 11px; min-height: 68px; padding: 12px 15px; }
.team-member-row .account-avatar { width: 36px; height: 36px; }
.team-member-role { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid var(--app-border); border-radius: 999px; background: #f6f8f6; color: var(--app-ink); font-size: 10px; font-weight: 700; white-space: nowrap; }
.role-reviewer { border-color: #eadcb5; background: #fbf5e7; color: #76591b; }
.role-data_entry { border-color: #cde0d3; background: #edf5ef; color: #235d3e; }
.team-member-row .invite-row-actions { flex: 0 0 auto; }
.workspace-invite-accept { width: min(100%, 520px); justify-self: center; padding: 34px; }
.workspace-invite-accept > .invite-panel-icon { margin-bottom: 15px; }
.workspace-invite-accept h1 { margin: 0; color: var(--app-brand-strong); font-size: 27px; font-weight: 800; }
.accept-intro { color: var(--app-muted); font-size: 12px; }
.accepted-role-card { display: grid; gap: 4px; margin: 18px 0 10px; padding: 14px; border: 1px solid var(--app-border); border-radius: 13px; background: #f8faf8; }
.accepted-role-card > span, .accepted-role-card > small { color: var(--app-muted); font-size: 10px; }
.accepted-role-card > strong { color: var(--app-brand-strong); font-size: 14px; }
.accept-role-description { color: var(--app-muted); font-size: 11px; line-height: 1.8; }
.accept-invite-form { display: grid; gap: 12px; margin-top: 18px; }
.accept-invite-form label { color: var(--app-ink); font-size: 11px; font-weight: 750; }
.accept-invite-form label small { display: block; color: var(--app-muted); font-size: 10px; font-weight: 500; }
.accept-invite-form input { margin-top: 5px !important; }
.accept-invite-form .btn { width: 100%; }
.accept-invite-form .btn small { font-size: 10px; font-weight: 550; }
.accept-footnote { margin: 14px 0 0; color: var(--app-muted); font-size: 10px; text-align: center; }

@media (max-width: 1160px) {
    body[data-brand] .app-header-inner { gap: 14px; }
    body[data-brand] .app-brand { flex-basis: 220px; }
    body[data-brand] .company-brand--header .company-brand-copy { max-width: 150px; }
    body[data-brand] .app-nav-link { padding-inline: 8px; font-size: 12px; }
    .account-menu-copy { display: none; }
}
@media (max-width: 1160px) {
    body[data-brand] .app-header-inner { min-height: 70px; flex-wrap: wrap; justify-content: space-between; padding-block: 8px; }
    body[data-brand] .app-brand { flex: 1 1 auto; }
    body[data-brand] .app-nav-desktop { display: none; }
    .header-actions { margin-inline-start: auto; }
    .mobile-nav { position: relative; display: block; order: 3; }
    .mobile-nav > summary { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 12px; border: 1px solid var(--app-border); border-radius: 11px; background: #fff; color: var(--app-ink); font-size: 12px; font-weight: 700; }
    .mobile-nav-panel { top: calc(100% + 7px); right: 0; left: auto; display: grid; gap: 3px; }
    .mobile-nav-panel .app-nav-link { display: grid; justify-content: start; min-height: 44px; padding: 7px 10px; text-align: start; }
    .mobile-nav-panel .app-nav-link small { color: inherit; font-size: 9px; }
    .workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .app-main { width: min(100% - 28px, 1360px); padding-top: 22px; }
    .workspace-hero { align-items: stretch; flex-direction: column; gap: 17px; padding: 22px; }
    .workspace-primary-action { align-self: flex-start; }
    .workspace-metrics { gap: 9px; }
    .workspace-metric { min-height: 90px; gap: 10px; padding: 13px; }
    .metric-icon { width: 36px; height: 36px; }
    .metric-copy small { font-size: 10px; }
    .metric-copy strong { font-size: 23px; }
    .workflow-grid { grid-template-columns: minmax(0, 1fr); }
    .workflow-card { min-height: 0; }
    .workflow-card p { min-height: 0; }
    .section-title-row { align-items: start; }
    .invite-layout { grid-template-columns: minmax(0, 1fr); }
    .invite-page-heading { align-items: start; flex-direction: column; }
    .invite-form { align-items: stretch; flex-direction: column; }
    .invite-form .btn { align-self: flex-start; }
    .invite-row { align-items: start; flex-wrap: wrap; }
    .invite-row-copy { flex-basis: calc(100% - 56px); }
    .invite-row-state { margin-inline-start: 50px; }
    .invite-row-actions { margin-inline-start: auto; }
    .page-heading { align-items: start; }
    .entry-card .entry-card-actions { grid-template-columns: 1fr 1fr; }
    .workspace-footer { width: min(100% - 28px, 1360px); }
    .team-invite-grid { grid-template-columns: minmax(0, 1fr); }
    .team-invite-form { grid-template-columns: minmax(0, 1fr); }
    .team-invite-form .btn { justify-self: start; }
    .team-member-row { align-items: start; flex-wrap: wrap; }
    .team-member-row .invite-row-copy { flex: 1 1 calc(100% - 58px); }
    .team-member-row .team-member-role { margin-inline-start: 47px; }
    .workspace-invite-accept { padding: 24px 20px; }
}
@media (max-width: 420px) {
    body[data-brand] .app-header-inner { width: min(100% - 24px, 1460px); }
    body[data-brand] .company-brand--header .company-brand-logo { width: 42px; height: 40px; }
    body[data-brand] .company-brand--header .company-brand-copy { max-width: 150px; }
    .header-actions .company-switcher { display: none; }
    .mobile-nav .company-switcher { display: block; width: 100%; }
    .mobile-nav .company-switcher summary { display: flex; justify-content: space-between; min-height: 42px; padding: 8px 10px; border-radius: 10px; background: #f7f9f7; font-size: 12px; font-weight: 700; }
    .mobile-nav .company-switcher-panel { display: grid; position: static; width: 100%; margin-top: 5px; box-shadow: none; }
    .workspace-metric { align-items: start; flex-direction: column; }
}

/* Locale switch and compact employee cards */
body[data-brand] .app-nav-link { flex-direction: row; }
body[data-brand] [hidden] { display: none !important; }
body[data-brand] .entry-card { height: auto; }
body[data-brand] .entry-card .entry-card-actions { margin-top: 0; }
body[data-brand] .entry-card .employee-actions-menu .entry-card-secondary { align-items: stretch; }
body[data-brand] .entry-card .entry-card-actions .btn { min-height: 40px; }
.employee-directory-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
    margin-top: 20px;
}
.employee-directory-card {
    display: flex;
    min-width: 0;
    min-height: 420px;
    flex-direction: column;
    align-self: stretch !important;
    gap: 0;
    padding: 22px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: var(--app-surface, #fff);
    box-shadow: 0 5px 18px rgb(20 48 32 / 5%);
}
.employee-directory-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--app-brand) 28%, var(--app-border));
    box-shadow: 0 14px 30px rgb(20 48 32 / 10%);
}
.employee-directory-card .entry-card-main { flex: 1; gap: 17px; }
.employee-directory-card .entry-card-identity {
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr);
    min-height: 190px;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-border);
}
.employee-directory-card .entry-avatar {
    width: 152px;
    height: 172px;
    border: 4px solid #fff;
    border-radius: 20px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--app-brand) 18%, transparent), 0 10px 22px rgb(18 59 43 / 14%);
}
.employee-directory-card .entry-avatar img { object-position: center 22%; }
.employee-directory-card .entry-avatar-fallback { font-size: 42px; }
.employee-directory-card .entry-card-copy { flex: 1; }
.employee-directory-card .entry-card-name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.employee-directory-card .entry-card-email {
    overflow: hidden;
    margin-top: 5px;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.employee-directory-card .entry-card-meta { gap: 7px; }
.employee-directory-card .entry-card-meta > span {
    min-height: 28px;
    padding-inline: 10px;
    font-size: 11px;
}
.employee-directory-card .entry-card-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: start;
    align-items: center;
    gap: 8px;
    margin-top: auto !important;
    padding-top: 17px;
    border-top: 1px solid var(--app-border);
}
.employee-directory-card .entry-card-actions > .btn-primary,
.employee-directory-card .entry-card-actions > .btn-secondary {
    grid-column: auto;
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding: 9px 8px;
    font-size: 12px;
}
.employee-directory-card .entry-card-actions > .btn-quiet,
.employee-directory-card .entry-card-actions > form .btn-danger {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    padding: 8px;
    font-size: 11px;
}
.employee-directory-card .entry-card-actions > .btn-quiet {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-brand-soft);
    color: var(--app-brand-strong);
}
.employee-directory-card .entry-card-actions > form { min-width: 0; margin: 0; }
.employee-directory-card .entry-card-actions > form .btn { width: 100%; }
.employee-directory-card .entry-waiting {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    text-align: center;
}
@media (max-width: 1100px) {
    .employee-directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .employee-directory-list { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    .employee-directory-card { min-height: 0; padding: 17px; }
    .employee-directory-card .entry-card-identity { grid-template-columns: 112px minmax(0, 1fr); min-height: 144px; gap: 13px; }
    .employee-directory-card .entry-avatar { width: 112px; height: 130px; border-radius: 17px; }
    .employee-directory-card .entry-avatar-fallback { font-size: 34px; }
    .employee-directory-card .entry-card-actions { padding-top: 13px; }
}
html[dir="rtl"] .company-switcher summary::after,
html[dir="rtl"] .mobile-nav summary::after { margin-right: 8px; margin-left: 0; }
html[dir="rtl"] .mobile-nav-panel { right: auto; left: 0; }
@media (max-width: 980px) {
    .locale-switcher--mobile { display: block; }
}

/* Meridian workspace system from the approved Stitch screens. */
:root {
    --app-ink: #0f172a;
    --app-muted: #475569;
    --app-surface: #ffffff;
    --app-canvas: #f4f6f9;
    --app-border: #dce2ec;
    --app-brand: #0037b0;
    --app-brand-strong: #002682;
    --app-brand-soft: #dbeafe;
    --app-accent: #0037b0;
    --app-accent-soft: #dbeafe;
    --app-gold: #b45309;
    --app-gold-soft: #fef3c7;
    --app-danger: #ba1a1a;
    --app-danger-soft: #ffdad6;
    --app-success: #15803d;
    --app-success-soft: #dcfce7;
    --app-warning: #b45309;
    --app-warning-soft: #fef3c7;
    --app-shadow: 0 8px 24px rgb(15 23 42 / 7%);
    --app-radius: 8px;
    --app-radius-sm: 6px;
    --app-focus: 0 0 0 3px rgb(0 55 176 / 18%);
}

body[data-brand] {
    --app-muted: #475569;
    --app-border: #dce2ec;
    --app-focus: 0 0 0 3px rgb(0 55 176 / 18%);
    --app-shadow: 0 8px 24px rgb(15 23 42 / 7%);
    background: #f4f6f9;
}

body.app-body { color: var(--app-ink); background: var(--app-canvas); }
body[data-brand] .app-header { border: 0; box-shadow: none; }

.workspace-shell {
    --app-ink: #0f172a;
    --app-muted: #475569;
    --app-surface: #ffffff;
    --app-canvas: #f4f6f9;
    --app-border: #dce2ec;
    --app-brand: #0037b0;
    --app-brand-strong: #002682;
    --app-brand-soft: #dbeafe;
    --app-accent: #0037b0;
    --app-accent-soft: #dbeafe;
    --app-gold: #b45309;
    --app-gold-soft: #fef3c7;
    --app-danger: #ba1a1a;
    --app-danger-soft: #ffdad6;
    --app-success: #15803d;
    --app-success-soft: #dcfce7;
    --app-warning: #b45309;
    --app-warning-soft: #fef3c7;
    --app-shadow: 0 8px 24px rgb(15 23 42 / 7%);
    --app-radius: 8px;
    --app-radius-sm: 6px;
    --app-focus: 0 0 0 3px rgb(0 55 176 / 18%);
    display: flex;
    min-height: 100vh;
}
.workspace-sidebar {
    position: sticky;
    inset-block-start: 0;
    z-index: 30;
    display: flex;
    flex: 0 0 248px;
    flex-direction: column;
    gap: 18px;
    width: 248px;
    height: 100vh;
    padding: 20px 14px 12px;
    overflow-y: auto;
    border-inline-end: 1px solid var(--app-border);
    background: #fff;
}
.workspace-brand { display: block; padding: 0 4px 4px; color: inherit; text-decoration: none; }
.workspace-brand .company-brand--header { gap: 10px; min-width: 0; }
.workspace-brand .company-brand--header .company-brand-logo { width: 38px; height: 38px; padding: 2px; border: 0; border-radius: 6px; box-shadow: none; }
.workspace-brand .company-brand--header .company-brand-copy { max-width: 164px; }
.workspace-brand .company-brand--header .company-brand-copy strong { color: #0f172a; font-size: 14px; font-weight: 700; }
.workspace-brand .company-brand--header .company-brand-copy > span { display: none; }
.workspace-sidebar > .company-switcher { display: block; }
.workspace-sidebar > .company-switcher summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 8px 10px;
    border: 1px solid var(--app-border);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--app-ink);
    font-size: 12px;
    font-weight: 600;
}
.workspace-sidebar > .company-switcher summary::after { content: '⌄'; }
.workspace-sidebar .company-switcher-panel { inset-inline: 0; width: auto; }
.company-switcher-link img { border: 1px solid var(--app-border); border-radius: 4px; background: #fff; }
.workspace-navigation { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.workspace-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color .12s ease, color .12s ease;
}
.workspace-nav-link:hover { background: #f1f5f9; color: #0f172a; }
.workspace-nav-link.is-active { background: #dbeafe; color: #0037b0; font-weight: 650; }
.workspace-nav-icon { display: inline-grid; flex: 0 0 20px; width: 20px; place-items: center; color: currentColor; font-size: 18px; line-height: 1; }
.workspace-nav-section {
    margin: 12px 0 2px;
    padding: 10px 10px 3px;
    border-top: 1px solid var(--app-border);
    color: #64748b;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.workspace-sidebar-account {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 4px 0;
    border-top: 1px solid var(--app-border);
}
.workspace-sidebar-account .account-avatar { flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--app-border); border-radius: 6px; background: #e2e8f0; color: #1e293b; box-shadow: none; }
.workspace-sidebar-account .account-menu-copy { display: grid; flex: 1; gap: 1px; min-width: 0; }
.workspace-sidebar-account .account-menu-copy strong { overflow: hidden; color: var(--app-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-sidebar-account .account-menu-copy small { color: #64748b; font-size: 10px; }
.workspace-sidebar-account .account-menu { position: relative; }
.workspace-sidebar-account .account-menu > summary { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 5px; cursor: pointer; list-style: none; }
.workspace-sidebar-account .account-menu > summary::-webkit-details-marker { display: none; }
.workspace-sidebar-account .account-menu-panel { inset-inline-end: 0; inset-block-end: 36px; inset-block-start: auto; }

.workspace-main { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 100vh; }
.workspace-topbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 10px 30px;
    border-bottom: 1px solid var(--app-border);
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(10px);
}
.workspace-topbar-title, .workspace-topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.workspace-breadcrumb { overflow: hidden; color: #475569; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-topbar .company-switcher { display: none; }
.workspace-topbar .locale-switcher { margin: 0; }
.workspace-mobile-brand, .workspace-mobile-navigation { display: none; }
.workspace-mobile-more { display: none; position: relative; }
.workspace-mobile-brand .company-brand--header { gap: 8px; min-width: 0; }
.workspace-mobile-brand .company-brand--header .company-brand-logo { width: 32px; height: 32px; padding: 1px; border: 0; border-radius: 4px; }
.workspace-mobile-brand .company-brand--header .company-brand-copy { max-width: 160px; }
.workspace-mobile-brand .company-brand--header .company-brand-copy strong { font-size: 12px; }
.workspace-mobile-brand .company-brand--header .company-brand-copy > span { display: none; }
.workspace-topbar .company-switcher summary, .locale-switcher-button { min-height: 34px; border: 1px solid var(--app-border); border-radius: 6px; background: #fff; color: #334155; font-size: 12px; }
.workspace-topbar .company-switcher summary { padding: 6px 9px; }
.workspace-topbar .company-switcher-panel { inset-inline-end: 0; }
.workspace-topbar .locale-switcher-button { padding: 6px 10px; }
.app-main { width: min(100% - 56px, 1400px); margin: 0 auto; padding: 28px 0 46px; flex: 1; }
.workspace-footer { display: flex; justify-content: space-between; gap: 12px; width: min(100% - 56px, 1400px); margin: auto auto 0; padding: 15px 0 18px; border-top: 1px solid var(--app-border); color: #64748b; font-size: 10px; }
.workspace-mobile-navigation { display: none; }

.page-heading { align-items: center; margin: 0 0 20px; padding: 0 0 16px; border-color: var(--app-border); }
.page-heading h1, .page-title { color: #0f172a; font-size: clamp(23px, 2.1vw, 30px); font-weight: 650; letter-spacing: -.025em; }
.page-heading p { margin: 5px 0 0; color: #64748b; font-size: 13px; }
.page-heading .page-kicker { margin: 0 0 5px; color: #64748b; font-size: 10px; font-weight: 650; letter-spacing: .065em; }
.surface-panel, .task-board-heading, .task-row, .task-summary a, .filter-panel, .table-panel {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 3%);
}
.btn { min-height: 36px; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; box-shadow: none; }
.btn-primary, body[data-brand] .btn-primary { border-color: #0037b0; background: #0037b0; color: #fff; }
.btn-primary:hover, body[data-brand] .btn-primary:hover { border-color: #002682; background: #002682; }
.btn-secondary, .btn-quiet { border-color: var(--app-border); background: #fff; color: #334155; }
.btn-secondary:hover, .btn-quiet:hover { background: #f8fafc; color: #0f172a; }
.btn-danger { border-color: #fecaca; background: #fff; color: #b91c1c; }
.status-badge, .type-badge, .entry-chip, .role-badge { min-height: 23px; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.status-approved, .status-active { border-color: #bbf7d0; background: #dcfce7; color: #166534; }
.status-submitted, .status-draft { border-color: #fde68a; background: #fef3c7; color: #92400e; }
.status-rejected, .status-inactive { border-color: #fecaca; background: #fee2e2; color: #991b1b; }
.type-badge, .entry-chip { border: 1px solid var(--app-border); background: #f8fafc; color: #475569; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 38px; padding: 8px 10px; border-color: #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: #2563eb; box-shadow: var(--app-focus); }
label, legend { color: #334155; font-size: 12px; font-weight: 600; }
.form-hint, .panel-description { color: #64748b; font-size: 12px; }
.panel-padding { padding: 18px; }
.panel-heading { margin: 0 0 4px; color: #0f172a; font-size: 16px; font-weight: 650; }
.form-grid { gap: 14px; }

.task-board { gap: 14px; }
.task-board-heading { padding: 20px 22px; border-radius: 8px; }
.task-board-heading h1 { color: #0f172a; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.task-board-heading p { color: #64748b; font-size: 12px; }
.task-summary { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.task-summary a { min-height: 72px; padding: 12px 14px; border-radius: 7px; box-shadow: none; transition: border-color .12s ease, background .12s ease; }
.task-summary a:hover { border-color: #93c5fd; background: #f8fbff; }
.task-summary strong { color: #0f172a; font-size: 21px; font-weight: 650; }
.task-summary span { color: #64748b; font-size: 11px; }
.task-list { gap: 0; overflow: hidden; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; }
.task-row { min-height: 78px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--app-border); border-radius: 0; box-shadow: none; }
.task-row:last-child { border-bottom: 0; }
.task-row h2 { color: #0f172a; font-size: 13px; font-weight: 650; }
.task-row p { color: #64748b; font-size: 11px; }
.task-row .btn { flex: 0 0 auto; }
.task-empty { padding: 24px; border-color: var(--app-border); border-radius: 8px; background: #fff; }
.task-empty strong { color: #0f172a; font-size: 14px; }
.queue-tabs { gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--app-border); }
.queue-tabs a { padding: 9px 12px; border: 0; border-radius: 5px 5px 0 0; background: transparent; color: #64748b; font-size: 12px; }
.queue-tabs a.is-active { border-bottom: 2px solid #0037b0; background: #eff6ff; color: #0037b0; }

.entry-list { grid-template-columns: 1fr; gap: 8px; }
.entry-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-radius: 7px; box-shadow: none; }
.entry-card:hover { transform: none; border-color: #cbd5e1; box-shadow: 0 2px 5px rgb(15 23 42 / 4%); }
.entry-card-main { display: flex; flex: 1; align-items: center; gap: 18px; min-width: 0; }
.entry-card-identity { flex: 0 0 min(290px, 32%); gap: 12px; }
.entry-avatar { width: 44px; height: 50px; border: 1px solid var(--app-border); border-radius: 5px; background: #e2e8f0; color: #334155; box-shadow: none; }
.entry-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center top; }
.employee-directory-avatar { width: 50px; height: 56px; }
.entry-card-name { color: #0f172a; font-size: 13px; font-weight: 650; line-height: 1.4; }
.entry-card-email { color: #64748b; font-size: 11px; line-height: 1.45; }
.entry-card-meta { flex: 1; gap: 6px; }
.entry-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0; border: 0; }
.entry-card-actions > .btn-primary, .entry-card-actions > .btn-secondary { width: auto; }
.employee-directory-card .entry-card-actions { flex-direction: row; }
.employee-directory-card .entry-card-actions > .btn-primary { flex: 0 0 auto; }
.employee-directory-card .entry-card-actions > .employee-actions-menu > summary { width: auto; }
.employee-actions-menu .entry-card-secondary { inset-inline-end: 0; width: 210px; border-color: var(--app-border); border-radius: 7px; box-shadow: var(--app-shadow); }
.entry-empty { padding: 28px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fff; }
.entry-pagination { color: #64748b; font-size: 11px; }

.filter-panel { margin-bottom: 12px; padding: 14px; border-radius: 8px; box-shadow: none; }
.filter-grid { align-items: end; gap: 10px; }
.filter-grid label { gap: 5px; font-size: 11px; }
.employee-filter-grid { grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(140px, 1fr)) auto; }
.filter-actions { display: flex; gap: 7px; }

.team-invite-grid, .invite-layout { gap: 12px; }
.team-invite-card, .invite-create-panel, .invite-process-panel { padding: 18px; border-radius: 8px; box-shadow: none; }
.team-send-panel { padding: 18px; border-radius: 8px; box-shadow: none; }
.team-invite-form, .invite-form { gap: 10px; }
.team-member-list, .invite-list { gap: 7px; }
.team-member-row, .invite-row { gap: 14px; padding: 12px 14px; border-radius: 7px; box-shadow: none; }
.team-role-icon, .invite-panel-icon, .invite-row-icon { border-radius: 6px; background: #dbeafe; color: #0037b0; }
.invite-permission-note { border-radius: 7px; background: #f8fafc; }
.invite-process-list li > span { border: 1px solid #dbeafe; background: #eff6ff; color: #0037b0; }
.section-eyebrow { color: #64748b; font-size: 10px; font-weight: 650; letter-spacing: .055em; }

.company-wizard { width: min(100%, 850px); gap: 10px; }
.company-wizard .surface-panel { padding: 18px; border-radius: 8px; }
.company-wizard h2 { margin-bottom: 12px; color: #0f172a; font-size: 14px; font-weight: 650; }
.logo-picker { grid-template-columns: 120px auto; align-items: center; justify-items: start; gap: 12px; }
.logo-picker img { width: 112px; height: 78px; border-color: var(--app-border); border-radius: 6px; }
.logo-picker .form-hint { grid-column: 2; margin: -28px 0 0; }
.company-switcher-link { border-radius: 5px; }
.company-switcher-link:hover { background: #eff6ff; }
.account-menu-panel, .company-switcher-panel { border-color: var(--app-border); border-radius: 7px; box-shadow: var(--app-shadow); }
.flash-message { border-radius: 7px; box-shadow: none; }

.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; }
th { background: #f8fafc; color: #64748b; font-size: 10px; font-weight: 650; text-align: start; text-transform: none; }
td { color: #334155; font-size: 12px; }
thead th { border-bottom: 1px solid var(--app-border); }
tbody tr { border-bottom: 1px solid var(--app-border); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }

@media (max-width: 980px) {
    .workspace-sidebar { flex-basis: 218px; width: 218px; padding-inline: 10px; }
    .workspace-topbar { padding-inline: 20px; }
    .app-main { width: min(100% - 36px, 1400px); }
    .workspace-footer { width: min(100% - 36px, 1400px); }
}
@media (max-width: 760px) {
    .workspace-shell { display: block; padding-bottom: 62px; }
    .workspace-sidebar { display: none; }
    .workspace-main { min-height: 100vh; }
    .workspace-topbar { min-height: 56px; padding: 8px 14px; }
    .workspace-topbar-title { flex: 1; }
    .workspace-mobile-brand { display: block; }
    .workspace-breadcrumb { display: none; }
    .workspace-topbar .company-switcher { display: inline-block; }
    .workspace-topbar-actions { gap: 7px; }
    .workspace-mobile-more { display: block; }
    .workspace-mobile-more > summary { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 8px; border: 1px solid var(--app-border); border-radius: 6px; background: #fff; color: #334155; font-size: 11px; font-weight: 600; list-style: none; cursor: pointer; }
    .workspace-mobile-more > summary::-webkit-details-marker { display: none; }
    .workspace-mobile-more-panel { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 7px); z-index: 50; display: grid; width: min(230px, calc(100vw - 24px)); padding: 7px; border: 1px solid var(--app-border); border-radius: 7px; background: #fff; box-shadow: var(--app-shadow); }
    .workspace-mobile-more-panel a, .workspace-mobile-more-panel button { display: block; width: 100%; padding: 9px; border: 0; border-radius: 4px; background: transparent; color: #334155; font: inherit; font-size: 12px; text-align: start; text-decoration: none; cursor: pointer; }
    .workspace-mobile-more-panel a:hover, .workspace-mobile-more-panel button:hover { background: #f1f5f9; }
    .workspace-topbar .company-switcher summary { max-width: 126px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .workspace-topbar .locale-switcher-button { min-height: 32px; padding-inline: 8px; }
    .workspace-mobile-navigation { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; display: flex; justify-content: space-around; gap: 2px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--app-border); background: rgb(255 255 255 / 97%); backdrop-filter: blur(12px); }
    .workspace-mobile-navigation a { display: flex; flex: 1; justify-content: center; min-height: 38px; padding: 9px 4px; border-radius: 5px; color: #64748b; font-size: 10px; font-weight: 600; text-decoration: none; }
    .workspace-mobile-navigation a.is-active { background: #dbeafe; color: #0037b0; }
    .app-main { width: min(100% - 28px, 620px); padding: 20px 0 28px; }
    .workspace-footer { display: none; }
    .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 9px; padding-bottom: 12px; }
    .page-heading > div { flex: 1 1 100%; }
    .page-heading h1 { font-size: 23px; }
    .page-heading > .btn { flex: 1 1 auto; }
    .task-board-heading { align-items: flex-start; flex-direction: column; padding: 16px; }
    .task-board-heading h1 { font-size: 21px; }
    .task-row { align-items: flex-start; flex-direction: column; gap: 10px; }
    .task-row .btn { width: 100%; }
    .task-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .employee-filter-grid, .filter-grid { grid-template-columns: 1fr; }
    .entry-card { align-items: stretch; flex-direction: column; gap: 10px; padding: 12px; }
    .entry-card-main { align-items: flex-start; flex-direction: column; gap: 10px; }
    .entry-card-identity { flex: auto; width: 100%; }
    .entry-card-actions { width: 100%; }
    .entry-card-actions > .btn-primary, .entry-card-actions > .btn-secondary { flex: 1; }
    .employee-directory-card .entry-card-actions > .btn-primary { flex: 1; }
    .team-member-row, .invite-row { align-items: flex-start; flex-wrap: wrap; }
    .company-wizard { width: 100%; }
    .logo-picker { grid-template-columns: 1fr; }
    .logo-picker .form-hint { grid-column: auto; margin: 0; }
    .table-scroll table { min-width: 700px; }
}
html[dir="rtl"] .workspace-shell { direction: rtl; }
html[dir="rtl"] .workspace-navigation, html[dir="rtl"] .workspace-sidebar { text-align: right; }
html[dir="rtl"] .workspace-mobile-navigation { direction: rtl; }
@media (prefers-reduced-motion: reduce) {
    .workspace-nav-link, .task-summary a, .entry-card, .btn { transition: none !important; }
}

.workspace-sidebar .company-switcher summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.company-switcher-current { display: flex; align-items: center; gap: 8px; min-width: 0; }
.company-switcher-current img { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid var(--app-border); border-radius: 4px; object-fit: contain; }
.company-switcher-current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switcher summary > small { grid-column: 1; color: #64748b; font-size: 10px; font-weight: 500; }
.workspace-sidebar .company-switcher summary::after { grid-column: 2; grid-row: 1 / span 2; }
.workspace-topbar .company-switcher summary { display: flex; align-items: center; gap: 6px; max-width: 220px; }
.workspace-topbar .company-switcher summary > small { display: none; }
.workspace-topbar .company-switcher summary::after { content: '⌄'; }
.task-employee { display: flex; align-items: center; gap: 11px; min-width: 0; }
.task-avatar { display: grid; flex: 0 0 40px; width: 40px; height: 46px; place-items: center; overflow: hidden; border: 1px solid var(--app-border); border-radius: 5px; background: #e2e8f0; color: #334155; font-weight: 650; }
.task-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.task-employee-copy { min-width: 0; }
.task-employee-copy h2 { overflow-wrap: anywhere; }
.task-employee-copy p { gap: 6px 10px; }
.task-row-status { display: grid; justify-items: start; gap: 3px; min-width: 140px; }
.task-row-status .task-note { margin: 0; color: #64748b; font-size: 10px; line-height: 1.4; }
.task-row { display: grid; grid-template-columns: minmax(220px, 1.35fr) minmax(130px, 1fr) auto; align-items: center; }
.directory-employee { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.directory-avatar { display: grid; flex: 0 0 42px; width: 42px; height: 48px; place-items: center; overflow: hidden; border: 1px solid var(--app-border); border-radius: 5px; background: #e2e8f0; color: #334155; font-size: 14px; font-weight: 650; }
.directory-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.directory-employee-copy { display: grid; gap: 2px; min-width: 0; }
.directory-employee-copy strong { color: #0f172a; font-size: 11px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.directory-employee-copy small { color: #64748b; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.directory-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.directory-actions .employee-actions-menu { position: relative; }
.directory-actions .employee-actions-menu > summary { list-style: none; cursor: pointer; }
.directory-actions .employee-actions-menu > summary::-webkit-details-marker { display: none; }
.table-cell-note, .table-time { display: block; margin-top: 3px; color: #64748b; font-size: 10px; }
.employee-directory-table table { width: 100%; min-width: 920px; }
.employee-directory-table th, .employee-directory-table td, .company-management-table th, .company-management-table td, .review-queue-table th, .review-queue-table td { padding: 11px 14px; vertical-align: middle; }
.employee-directory-table th:first-child, .employee-directory-table td:first-child { padding-inline-start: 18px; }
.employee-directory-table th:last-child, .employee-directory-table td:last-child { padding-inline-end: 18px; }
.review-table-heading { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--app-border); background: #f8fafc; }
.review-table-heading > div { display: flex; align-items: center; gap: 9px; }
.review-table-heading h2 { margin: 0; color: #0f172a; font-size: 13px; font-weight: 650; }
.review-table-heading span { color: #64748b; font-size: 10px; }
.review-queue-table table { width: 100%; min-width: 740px; }
.review-queue-table .directory-employee { min-width: 245px; }
.review-queue-table td:last-child { text-align: end; }
.review-empty-state { display: grid; justify-items: center; gap: 8px; text-align: center; }
.review-empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 6px; background: #dcfce7; color: #15803d; font-size: 22px; }
.review-empty-state strong { color: #0f172a; font-size: 14px; }
.review-empty-state p { max-width: 48ch; margin: 0 0 6px; color: #64748b; font-size: 12px; }
.company-management-table table { width: 100%; min-width: 780px; }
.company-table-identity { min-width: 250px; }
.company-table-logo { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; overflow: hidden; border: 1px solid var(--app-border); border-radius: 5px; background: #fff; color: #334155; font-weight: 650; }
.company-table-logo img { width: 100%; height: 100%; object-fit: contain; }
.company-admin-chip { display: inline-flex; margin: 2px; padding: 4px 7px; border: 1px solid var(--app-border); border-radius: 4px; background: #f8fafc; color: #334155; font-size: 10px; }
.company-record-count { color: #334155; font-size: 11px; font-variant-numeric: tabular-nums; }
.table-empty-cell { padding: 28px !important; color: #64748b; text-align: center; }
.company-wizard .form-grid label { display: grid; gap: 6px; }
.company-wizard .checkbox-row { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 0; }
.company-wizard .logo-picker .btn { cursor: pointer; }
.company-wizard .form-actions { position: sticky; inset-block-end: 0; z-index: 5; display: flex; justify-content: flex-end; padding: 12px; border: 1px solid var(--app-border); border-radius: 7px; background: rgb(255 255 255 / 96%); }
.team-invite-card { min-height: 208px; }
.team-role-icon, .invite-panel-icon { display: grid; width: 34px; height: 34px; place-items: center; font-size: 16px; }
.invite-panel-heading h2 { margin: 0; color: #0f172a; font-size: 16px; }
.team-invite-card h2 { color: #0f172a; font-size: 15px; }
.team-invite-card p, .invite-explainer { color: #64748b; font-size: 12px; }
.team-invite-card ul { padding-inline-start: 18px; color: #475569; font-size: 11px; }
.section-title-row h2 { color: #0f172a; font-size: 16px; }
.invite-row-copy strong, .invite-row-copy small { overflow-wrap: anywhere; }
.auth-panel, .auth-hero, .public-profile-shell { border-radius: 8px; }

@media (max-width: 760px) {
    .task-row { display: flex; }
    .task-row-status { width: 100%; }
    .directory-actions { width: 100%; }
    .directory-actions > .btn-primary { flex: 1; justify-content: center; }
    .directory-actions .employee-actions-menu > summary { min-width: 68px; text-align: center; }
    .employee-directory-table .table-scroll table { min-width: 760px; }
    .review-queue-table .table-scroll table { min-width: 690px; }
    .company-management-table .table-scroll table { min-width: 700px; }
    .team-invite-grid { grid-template-columns: 1fr; }
    .team-invite-card { min-height: 0; }
}

/* Give employee records more breathing room and make staff photos easier to recognize. */
.employee-directory-table table { min-width: 1080px; font-size: 14px; }
.employee-directory-table th,
.employee-directory-table td { padding-block: 16px; }
.employee-directory-table tbody tr { min-height: 104px; }
.employee-directory-table .directory-employee { min-width: 280px; gap: 14px; }
.employee-directory-table .directory-avatar { flex-basis: 62px; width: 62px; height: 72px; border-radius: 8px; font-size: 19px; }
.employee-directory-table .directory-employee-copy { gap: 5px; }
.employee-directory-table .directory-employee-copy strong { font-size: 14px; line-height: 1.5; }
.employee-directory-table .directory-employee-copy small { font-size: 12px; }
.employee-directory-table .directory-actions { gap: 9px; }
.employee-directory-table .directory-actions .btn { min-height: 42px; padding-inline: 15px; font-size: 13px; }

@media (max-width: 760px) {
    .employee-directory-table .table-scroll table { min-width: 920px; }
    .employee-directory-table .directory-avatar { flex-basis: 58px; width: 58px; height: 68px; }
}

.team-entry-link-panel { display: grid; gap: 12px; margin-block: 18px; scroll-margin-top: 24px; }
.team-entry-link-panel .invite-explainer { margin: 0; }
.team-entry-history { border-top: 1px solid var(--app-border); padding-top: 12px; }
.team-entry-history > summary { display: flex; align-items: center; gap: 9px; color: var(--app-ink); cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
.team-entry-history > summary::-webkit-details-marker { display: none; }
.team-entry-history > summary::after { content: '+'; margin-inline-start: auto; color: var(--app-muted); }
.team-entry-history[open] > summary::after { content: '−'; }
.team-entry-history > .invite-list { margin-top: 12px; }
.company-admin-email-field { display: grid; gap: 6px; max-width: 520px; margin-block: 12px 6px; color: var(--app-ink); font-size: 12px; font-weight: 700; }

@media (max-width: 760px) {
    .team-entry-link-panel .invite-form .btn { width: 100%; justify-content: center; }
    .company-admin-email-field { max-width: none; }
}

.employee-directory-table table { min-width: 980px; table-layout: fixed; }
.employee-directory-table th:nth-child(1), .employee-directory-table td:nth-child(1) { width: 36%; }
.employee-directory-table th:nth-child(2), .employee-directory-table td:nth-child(2) { width: 14%; }
.employee-directory-table th:nth-child(3), .employee-directory-table td:nth-child(3) { width: 50%; }
.employee-directory-table .directory-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px 12px; min-width: 0; white-space: normal; }
.employee-directory-table .directory-actions form { display: contents; }
.employee-directory-table .directory-action-link { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 3px; border: 0; border-radius: 4px; background: transparent; color: var(--app-brand-strong); font: inherit; font-size: 13px; font-weight: 650; line-height: 1.35; text-align: start; text-decoration: none; cursor: pointer; }
.employee-directory-table .directory-action-link:hover { background: var(--app-brand-soft); text-decoration: underline; text-underline-offset: 3px; }
.employee-directory-table .directory-action-link::after { content: '↗'; margin-inline-start: 5px; font-size: 11px; }
.employee-directory-table .directory-action-danger { color: #b42318; }
.employee-directory-table .directory-action-danger:hover { background: #fef3f2; }
.employee-directory-table tbody tr:hover { background: #f8fafc; }

@media (max-width: 760px) {
    .employee-directory-table table { min-width: 920px; }
    .employee-directory-table th:nth-child(1), .employee-directory-table td:nth-child(1) { width: 32%; }
    .employee-directory-table th:nth-child(2), .employee-directory-table td:nth-child(2) { width: 14%; }
    .employee-directory-table th:nth-child(3), .employee-directory-table td:nth-child(3) { width: 54%; }
}

.employee-directory-table .directory-actions { align-items: center; justify-content: flex-end; gap: 4px 16px; }
.employee-directory-table .directory-actions .directory-action-link,
.employee-directory-table .directory-actions button.directory-action-link,
.employee-directory-table .directory-actions a.directory-action-link {
    appearance: none;
    display: inline-block;
    min-height: 0;
    margin: 0;
    padding: 5px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #174a79;
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}
.employee-directory-table .directory-actions .directory-action-link::after { content: none; }
.employee-directory-table .directory-actions .directory-action-link:hover { background: transparent; color: #0b2e57; text-decoration: underline; text-underline-offset: 4px; }
.employee-directory-table .directory-actions .directory-action-danger { color: #a83232; }
.employee-directory-table .directory-actions .directory-action-danger:hover { background: transparent; color: #7f1d1d; }
.employee-directory-table .directory-actions form { display: inline-flex; margin: 0; }

/* Super-admin workspace: make invitations and company access feel like one focused task. */
.admin-page-actions { display: flex; align-items: center; gap: 10px; }
.admin-page-actions .btn { min-height: 42px; }
.admin-invite-panel { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.8fr); gap: 26px; margin-bottom: 16px; padding: 24px; border: 1px solid #dce5e1; border-radius: 14px; background: linear-gradient(120deg, #fff 0%, #f8fbf9 100%); box-shadow: 0 12px 32px rgb(15 23 42 / 4%); }
.admin-invite-intro { display: flex; align-items: flex-start; gap: 13px; }
.admin-invite-intro .invite-panel-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; background: #eaf2ed; color: #174a35; font-size: 18px; }
.admin-invite-intro h2 { margin: 3px 0 8px; color: #142a20; font-size: 20px; letter-spacing: -.02em; }
.admin-invite-intro p:last-child { max-width: 290px; margin: 0; color: #687a71; font-size: 13px; line-height: 1.7; }
.admin-invite-form { display: grid; gap: 17px; }
.admin-invite-email { display: grid; gap: 7px; color: #33483c; font-size: 12px; font-weight: 700; }
.admin-invite-email input { min-height: 46px; }
.admin-company-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; border: 0; }
.admin-company-choice-grid legend { margin-bottom: 9px; color: #33483c; font-size: 12px; font-weight: 750; }
.admin-company-option { position: relative; display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 64px; padding: 10px 38px 10px 11px; border: 1px solid #dfe7e2; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.app-main .surface-panel label.admin-company-option { display: flex; align-items: center; color: #25382e; font-size: 12px; font-weight: 600; line-height: 1.35; }
.admin-company-option:has(input:checked) { border-color: #2b7251; background: #f0f7f2; box-shadow: inset 0 0 0 1px #2b7251; }
.app-main .admin-company-option input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.admin-company-option:focus-within { outline: 3px solid rgb(43 114 81 / 18%); outline-offset: 2px; }
.admin-company-option-logo { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; overflow: hidden; border: 1px solid #e3e9e5; border-radius: 9px; background: #fff; color: #284a38; font-size: 13px; font-weight: 800; }
.admin-company-option-logo img { width: 100%; height: 100%; object-fit: contain; }
.admin-company-option-copy { display: grid; min-width: 0; gap: 3px; }
.admin-company-option-copy strong, .admin-company-option-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-company-option-copy strong { color: #25382e; font-size: 12px; }
.admin-company-option-copy small { color: #84928a; font-size: 10px; }
.admin-company-option-check { position: absolute; top: 50%; inset-inline-end: 12px; display: grid; place-items: center; width: 20px; height: 20px; transform: translateY(-50%); border: 1px solid #d9e2dc; border-radius: 50%; color: transparent; font-size: 12px; }
.admin-company-option:has(input:checked) .admin-company-option-check { border-color: #256749; background: #256749; color: #fff; }
.admin-invite-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid #e6ece8; }
.admin-invite-submit > span { color: #77867e; font-size: 11px; }
.admin-invite-submit .btn { min-height: 42px; }
.admin-page-actions .btn-secondary { background: #fff; }
.admin-empty-state { min-height: 160px; border: 1px dashed #cedbd2; border-radius: 14px; background: #fff; }
.admin-empty-state .invite-panel-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #edf4ef; color: #34654c; font-size: 19px; }
.admin-empty-state strong { color: #23382c; font-size: 15px; }
.admin-empty-state p { max-width: 420px; margin: 0; line-height: 1.6; }
.user-card { align-items: center; border-radius: 12px; }
.user-card .entry-card-meta { max-width: 720px; }
.user-role-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; align-items: center; gap: 8px; }
.user-role-form select { min-width: 180px; min-height: 40px; }
.user-card .entry-card-actions > form:last-child { flex: 0 0 auto; }

@media (max-width: 900px) {
    .admin-invite-panel { grid-template-columns: 1fr; gap: 18px; }
    .admin-invite-intro p:last-child { max-width: 560px; }
}
@media (max-width: 640px) {
    .admin-page-actions { width: 100%; }
    .admin-page-actions .btn { flex: 1; justify-content: center; }
    .admin-company-choice-grid { grid-template-columns: 1fr; }
    .admin-invite-submit { align-items: stretch; flex-direction: column; }
    .admin-invite-submit .btn { width: 100%; justify-content: center; }
    .user-role-form { grid-template-columns: 1fr; }
}

.workflow-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0; }
.workflow-summary article { display: grid; gap: 5px; padding: 16px 18px; border: 1px solid #dfe7e2; border-radius: 12px; background: #fff; }
.workflow-summary article strong { color: #173c2a; font-size: 25px; line-height: 1; }
.workflow-summary article span { color: #708078; font-size: 12px; }
.workflow-entry-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.workflow-import-panel { margin-block: 12px 20px; border-radius: 12px; }
.workflow-import-panel > summary { color: #1d392a; cursor: pointer; font-size: 14px; font-weight: 750; }
.workflow-import-form { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
.workflow-import-form label { display: grid; gap: 5px; }
.workflow-record-row { gap: 14px; }
.workflow-record-row .invite-row-copy { min-width: 180px; }
.workflow-record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-inline-start: auto; }
.workflow-record-actions form { margin: 0; }
.workflow-finish-form { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px; border: 1px solid #dce7df; border-radius: 12px; background: #f8fbf9; }
.workflow-finish-form > span, .workflow-batch-note { color: #718078; font-size: 12px; }
.workflow-waiting-state { display: grid; justify-items: center; max-width: 720px; margin: 70px auto; padding: 48px 32px; border: 1px solid #e0e9e3; border-radius: 18px; text-align: center; }
.workflow-waiting-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 14px; border-radius: 18px; background: #eaf3ed; color: #275d40; font-size: 27px; }
.workflow-waiting-state h1 { max-width: 560px; margin: 0; color: #173c2a; font-size: clamp(22px, 3vw, 30px); }
.workflow-waiting-state > p:not(.section-eyebrow) { max-width: 540px; color: #718078; font-size: 14px; line-height: 1.8; }
.workflow-waiting-status { margin-top: 8px; padding: 8px 12px; border-radius: 999px; background: #f0f5f1; color: #456250; font-size: 12px; }
.workflow-review-actions { align-items: flex-start; flex-wrap: wrap; }
.workflow-return-form { display: grid; flex: 1 1 360px; gap: 10px; }
.workflow-return-form label { display: grid; gap: 6px; }

@media (max-width: 760px) {
    .workflow-summary { grid-template-columns: 1fr; }
    .workflow-import-form { grid-template-columns: 1fr; }
    .workflow-record-row { align-items: flex-start; flex-direction: column; }
    .workflow-record-actions { justify-content: flex-start; margin: 0; }
    .workflow-finish-form { align-items: stretch; flex-direction: column; }
    .workflow-waiting-state { margin: 30px auto; padding: 30px 20px; }
}

.card-design-section { display: grid; gap: 18px; }
.card-design-section-heading h2 { margin: 0 0 6px; }
.card-design-section-heading .form-hint { max-width: 720px; margin: 0; }
.card-template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.card-template-option { position: relative; display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--app-border); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.card-template-option:hover { transform: translateY(-2px); border-color: var(--app-accent); box-shadow: 0 8px 24px rgb(20 45 30 / 9%); }
.card-template-option > input { position: absolute; z-index: 2; inset-block-start: 18px; inset-inline-start: 18px; width: 19px; height: 19px; margin: 0; accent-color: var(--app-brand); }
.card-template-option:has(> input:checked) { border-color: var(--app-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-brand) 18%, transparent); }
.card-template-preview { position: relative; display: block; width: min(100%, 176px); aspect-ratio: 768 / 1217; margin-inline: auto; overflow: hidden; border: 1px solid rgb(26 47 35 / 12%); border-radius: 13px; background: var(--template-surface); color: var(--template-ink); box-shadow: 0 4px 12px rgb(15 35 25 / 10%); direction: ltr; }
.card-template-preview-top { position: absolute; inset: 0 0 auto; height: 21%; background: var(--template-primary); }
.card-template-preview-brand { position: absolute; z-index: 1; inset-block-start: 4%; inset-inline-start: 22%; display: grid; place-items: center; width: 56%; height: 13%; overflow: hidden; border: 1px solid rgb(20 40 30 / 10%); border-radius: 7px; background: #fff; }
.card-template-logo { display: block; width: 90%; height: 90%; object-fit: contain; }
.card-template-logo-placeholder { color: var(--template-primary); font-size: 10px; font-weight: 800; }
.card-template-preview-photo { position: absolute; inset-block-start: 27%; inset-inline-start: 30%; width: 40%; height: 27%; border: 3px solid #fff; border-radius: 10px; background: linear-gradient(145deg, #d7e0da, #f4f6f4 58%, #b4c2b8); box-shadow: 0 2px 7px rgb(15 35 25 / 15%); }
.card-template-preview-photo::after { position: absolute; inset: 17% 26% 0; border-radius: 50% 50% 18% 18%; background: color-mix(in srgb, var(--template-primary) 58%, #fff); content: ''; }
.card-template-preview-name, .card-template-preview-job { position: absolute; inset-inline: 8%; display: block; overflow: hidden; color: var(--template-ink); text-align: center; white-space: nowrap; }
.card-template-preview-name { inset-block-start: 59%; font-size: clamp(7px, 1vw, 10px); font-weight: 850; }
.card-template-preview-job { inset-block-start: 65%; color: color-mix(in srgb, var(--template-ink) 72%, #fff); font-size: clamp(6px, .8vw, 8px); }
.card-template-preview-bottom { position: absolute; inset: auto 0 0; height: 14%; background: var(--template-accent); }
.card-template-preview-bottom::before { position: absolute; inset: 0; background: linear-gradient(140deg, transparent 45%, rgb(255 255 255 / 22%) 46% 49%, transparent 50%); content: ''; }
.card-template-style-botanical .card-template-preview-top::after { position: absolute; inset-block-start: 34%; inset-inline-end: 12%; width: 34%; height: 80%; border: 2px solid color-mix(in srgb, var(--template-accent) 82%, #fff); border-radius: 100% 0 100% 0; transform: rotate(-25deg); content: ''; }
.card-template-style-diagonal .card-template-preview-bottom { clip-path: polygon(0 38%, 100% 0, 100% 100%, 0 100%); }
.card-template-style-luxury { background: var(--template-primary); }
.card-template-style-luxury .card-template-preview-top { height: 20%; background: #080a08; border-bottom: 2px solid var(--template-accent); }
.card-template-style-luxury .card-template-preview-name, .card-template-style-luxury .card-template-preview-job { color: var(--template-accent); }
.card-template-style-luxury .card-template-preview-bottom { height: 18%; background: #080a08; border-top: 2px solid var(--template-accent); }
.card-template-style-double-line .card-template-preview-top { border-bottom: 3px double var(--template-accent); }
.card-template-style-sand .card-template-preview-bottom { height: 18%; background: linear-gradient(165deg, var(--template-surface) 0 16%, var(--template-accent) 17% 28%, var(--template-primary) 29%); }
.card-template-style-minimal .card-template-preview-top { height: 7%; }
.card-template-style-minimal .card-template-preview-bottom { height: 7%; }
.card-template-style-side-line::before { position: absolute; inset-block: 20% 12%; inset-inline-start: 0; width: 4%; background: var(--template-accent); content: ''; }
.card-template-style-copper .card-template-preview-top { height: 24%; }
.card-template-option { gap: 13px; padding: 14px; border-radius: 17px; }
.card-template-preview { width: min(100%, 188px); border: 1px solid rgb(19 42 30 / 15%); border-radius: 17px; box-shadow: 0 10px 22px rgb(16 35 25 / 12%); }
.card-template-preview-top { z-index: 0; }
.card-template-preview-brand { z-index: 3; border-radius: 9px; box-shadow: 0 5px 14px rgb(10 25 18 / 13%); }
.card-template-preview-photo { z-index: 2; overflow: hidden; border: 3px solid #fff; }
.card-template-preview-name { z-index: 4; font-size: clamp(7px, 1vw, 10px); }
.card-template-preview-job { z-index: 4; }
.card-template-preview-bottom { z-index: 1; }
.card-template-option-copy > span { min-height: 32px; }

/* Each option uses a distinct composition that mirrors its generated card. */
.card-template-layout-garden-classic { background: linear-gradient(180deg, var(--template-primary) 0 19%, var(--template-surface) 19% 87%, var(--template-primary) 91%); }
.card-template-layout-garden-classic .card-template-preview-top { height: 19%; }
.card-template-layout-garden-classic .card-template-preview-brand { inset-block-start: 3.5%; inset-inline-start: 22%; width: 56%; height: 13%; }
.card-template-layout-garden-classic .card-template-preview-photo { inset-block-start: 25%; inset-inline-start: 25%; width: 50%; height: 31%; }
.card-template-layout-garden-classic .card-template-preview-name { inset-block-start: 63%; }
.card-template-layout-garden-classic .card-template-preview-job { inset-block-start: 70%; }
.card-template-layout-garden-classic .card-template-preview-bottom { height: 13%; clip-path: polygon(0 35%, 50% 0, 100% 35%, 100% 100%, 0 100%); }

.card-template-layout-botanical { background: linear-gradient(90deg, var(--template-primary) 0 43%, var(--template-surface) 43%); }
.card-template-layout-botanical .card-template-preview-top { width: 43%; height: 100%; background: linear-gradient(160deg, var(--template-primary), color-mix(in srgb, var(--template-primary) 70%, #071c11)); }
.card-template-layout-botanical .card-template-preview-brand { inset-block-start: 9%; inset-inline-start: 7%; width: 34%; height: 13%; }
.card-template-layout-botanical .card-template-preview-photo { inset-block-start: 20%; inset-inline-start: 50%; width: 43%; height: 40%; border-radius: 45% 45% 12px 12px; }
.card-template-layout-botanical .card-template-preview-name, .card-template-layout-botanical .card-template-preview-job { inset-inline-start: 6%; width: 36%; color: #fff; text-align: start; white-space: normal; }
.card-template-layout-botanical .card-template-preview-name { inset-block-start: 62%; }
.card-template-layout-botanical .card-template-preview-job { inset-block-start: 70%; color: rgb(255 255 255 / 78%); }
.card-template-layout-botanical .card-template-preview-bottom { inset-inline-start: 0; width: 43%; height: 7%; background: var(--template-accent); }

.card-template-layout-modern-navy { background: linear-gradient(90deg, var(--template-strong) 0 48%, var(--template-surface) 48%); }
.card-template-layout-modern-navy .card-template-preview-top { inset: 0 auto 0 0; width: 48%; height: 100%; background: var(--template-strong); }
.card-template-layout-modern-navy .card-template-preview-brand { inset-block-start: 7%; inset-inline-start: 7%; width: 35%; height: 12%; }
.card-template-layout-modern-navy .card-template-preview-photo { inset-block-start: 8%; inset-inline-start: 53%; width: 43%; height: 79%; border-radius: 8px; }
.card-template-layout-modern-navy .card-template-preview-name, .card-template-layout-modern-navy .card-template-preview-job { inset-inline-start: 6%; width: 38%; color: #fff; text-align: start; white-space: normal; }
.card-template-layout-modern-navy .card-template-preview-name { inset-block-start: 43%; }
.card-template-layout-modern-navy .card-template-preview-job { inset-block-start: 54%; color: rgb(255 255 255 / 76%); }
.card-template-layout-modern-navy .card-template-preview-bottom { inset: 0 auto 0 47%; width: 2%; height: 100%; background: var(--template-accent); }

.card-template-layout-black-gold { background: #10120f; box-shadow: inset 0 0 0 5px #d6b45a; }
.card-template-layout-black-gold::before { position: absolute; z-index: 1; inset: 3.5%; border: 1px solid var(--template-accent); border-radius: 12px; content: ''; }
.card-template-layout-black-gold .card-template-preview-top { height: 57%; background: linear-gradient(145deg, #20251f, #080a08 75%); }
.card-template-layout-black-gold .card-template-preview-photo { inset-block-start: 12%; inset-inline-start: 13%; width: 74%; height: 40%; border-color: #d6b45a; border-radius: 7px; }
.card-template-layout-black-gold .card-template-preview-brand { inset-block-start: 61%; inset-inline-start: 25%; width: 50%; height: 12%; }
.card-template-layout-black-gold .card-template-preview-name, .card-template-layout-black-gold .card-template-preview-job { color: var(--template-accent); }
.card-template-layout-black-gold .card-template-preview-name { inset-block-start: 77%; }
.card-template-layout-black-gold .card-template-preview-job { inset-block-start: 84%; }
.card-template-layout-black-gold .card-template-preview-bottom { height: 2%; background: var(--template-accent); }

.card-template-layout-coastal-blue { background: linear-gradient(180deg, var(--template-primary) 0 48%, var(--template-surface) 48% 65%, var(--template-primary) 65%); }
.card-template-layout-coastal-blue .card-template-preview-top { inset-block-start: 0; height: 48%; border-radius: 0 0 50% 50% / 0 0 17% 17%; background: linear-gradient(145deg, var(--template-primary), color-mix(in srgb, var(--template-primary) 58%, #fff)); }
.card-template-layout-coastal-blue .card-template-preview-photo { inset-block-start: 8%; inset-inline-start: 8%; width: 84%; height: 43%; border-radius: 14px 14px 40% 12px; }
.card-template-layout-coastal-blue .card-template-preview-brand { inset-block-start: 61%; inset-inline-start: 24%; width: 52%; height: 12%; }
.card-template-layout-coastal-blue .card-template-preview-name { inset-block-start: 76%; color: #fff; }
.card-template-layout-coastal-blue .card-template-preview-job { inset-block-start: 83%; color: rgb(255 255 255 / 78%); }
.card-template-layout-coastal-blue .card-template-preview-bottom { height: 8%; background: var(--template-accent); }

.card-template-layout-heritage-burgundy { background: var(--template-surface); }
.card-template-layout-heritage-burgundy::before { position: absolute; z-index: 1; inset: 4%; border: 1px solid var(--template-accent); border-radius: 11px; content: ''; }
.card-template-layout-heritage-burgundy .card-template-preview-top { height: 16%; background: var(--template-primary); }
.card-template-layout-heritage-burgundy .card-template-preview-brand { inset-block-start: 5%; inset-inline-start: 30%; width: 40%; height: 10%; }
.card-template-layout-heritage-burgundy .card-template-preview-photo { inset-block-start: 21%; inset-inline-start: 28%; width: 44%; height: 34%; border: 4px solid #fff; outline: 1px solid var(--template-accent); border-radius: 5px; }
.card-template-layout-heritage-burgundy .card-template-preview-name { inset-block-start: 62%; }
.card-template-layout-heritage-burgundy .card-template-preview-job { inset-block-start: 69%; }
.card-template-layout-heritage-burgundy .card-template-preview-bottom { height: 7%; background: var(--template-primary); }

.card-template-layout-desert-sand { background: linear-gradient(155deg, var(--template-surface) 0 64%, var(--template-accent) 64% 70%, var(--template-primary) 70% 84%, var(--template-strong) 84%); }
.card-template-layout-desert-sand .card-template-preview-top { width: 43%; height: 100%; background: linear-gradient(150deg, var(--template-surface), rgb(255 255 255 / 30%)); }
.card-template-layout-desert-sand .card-template-preview-brand { inset-block-start: 8%; inset-inline-start: 7%; width: 34%; height: 13%; }
.card-template-layout-desert-sand .card-template-preview-photo { inset-block-start: 25%; inset-inline-start: 49%; width: 44%; height: 43%; border-radius: 45% 8px 8px 8px; }
.card-template-layout-desert-sand .card-template-preview-name, .card-template-layout-desert-sand .card-template-preview-job { inset-inline-start: 6%; width: 39%; text-align: start; white-space: normal; }
.card-template-layout-desert-sand .card-template-preview-name { inset-block-start: 43%; }
.card-template-layout-desert-sand .card-template-preview-job { inset-block-start: 55%; }
.card-template-layout-desert-sand .card-template-preview-bottom { height: 17%; background: linear-gradient(165deg, transparent 0 35%, var(--template-accent) 36% 48%, var(--template-primary) 49% 74%, var(--template-strong) 75%); }

.card-template-layout-minimal-slate { background: linear-gradient(90deg, var(--template-primary) 0 4%, var(--template-surface) 4% 49%, #fff 49%); }
.card-template-layout-minimal-slate .card-template-preview-top { inset: 0 auto 0 0; width: 4%; height: 100%; background: var(--template-accent); }
.card-template-layout-minimal-slate .card-template-preview-photo { inset-block: 8%; inset-inline-start: 6%; width: 39%; height: 80%; border-radius: 5px; }
.card-template-layout-minimal-slate .card-template-preview-brand { inset-block-start: 11%; inset-inline-start: 55%; width: 36%; height: 12%; }
.card-template-layout-minimal-slate .card-template-preview-name, .card-template-layout-minimal-slate .card-template-preview-job { inset-inline-start: 53%; width: 40%; text-align: start; white-space: normal; }
.card-template-layout-minimal-slate .card-template-preview-name { inset-block-start: 39%; }
.card-template-layout-minimal-slate .card-template-preview-job { inset-block-start: 52%; }
.card-template-layout-minimal-slate .card-template-preview-bottom { inset-inline-start: 54%; width: 38%; height: 1%; background: var(--template-primary); }

.card-template-layout-emerald-line { background: linear-gradient(180deg, var(--template-surface) 0 86%, var(--template-strong) 86%); }
.card-template-layout-emerald-line .card-template-preview-top { inset: 0 auto 0 4%; width: 3%; height: 70%; background: var(--template-primary); }
.card-template-layout-emerald-line .card-template-preview-photo { inset-block-start: 17%; inset-inline-start: 20%; width: 60%; height: 40%; border-radius: 50% 50% 9px 9px; }
.card-template-layout-emerald-line .card-template-preview-name { inset-block-start: 65%; }
.card-template-layout-emerald-line .card-template-preview-job { inset-block-start: 72%; }
.card-template-layout-emerald-line .card-template-preview-brand { inset-block-start: 88%; inset-inline-start: 28%; width: 44%; height: 9%; }
.card-template-layout-emerald-line .card-template-preview-bottom { inset-block-start: 86%; height: 14%; background: var(--template-strong); }

.card-template-layout-copper-executive { background: linear-gradient(90deg, var(--template-strong) 0 39%, var(--template-surface) 39%); }
.card-template-layout-copper-executive .card-template-preview-top { inset: 0 auto 0 0; width: 39%; height: 100%; background: var(--template-strong); }
.card-template-layout-copper-executive .card-template-preview-brand { inset-block-start: 8%; inset-inline-start: 6%; width: 32%; height: 13%; }
.card-template-layout-copper-executive .card-template-preview-photo { inset-block-start: 14%; inset-inline-start: 45%; width: 48%; height: 47%; border-radius: 8px 38% 8px 8px; }
.card-template-layout-copper-executive .card-template-preview-name, .card-template-layout-copper-executive .card-template-preview-job { inset-inline-start: 6%; width: 31%; color: #fff; text-align: start; white-space: normal; }
.card-template-layout-copper-executive .card-template-preview-name { inset-block-start: 40%; }
.card-template-layout-copper-executive .card-template-preview-job { inset-block-start: 53%; color: rgb(255 255 255 / 78%); }
.card-template-layout-copper-executive .card-template-preview-bottom { inset-inline-start: 31%; width: 9%; height: 100%; background: var(--template-accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

.card-template-option-copy { display: grid; gap: 2px; padding-inline-start: 28px; }
.card-template-option-copy strong { color: var(--app-ink); font-size: 13px; line-height: 1.4; }
.card-template-option-copy > span { color: var(--app-muted); font-size: 11px; line-height: 1.5; }
.card-template-custom-option { --template-primary: #183923; --template-accent: #bd8057; --template-ink: #183923; --template-surface: #f4f0ec; }
.card-template-style-custom { display: grid; align-content: center; justify-items: center; gap: 8px; background: radial-gradient(circle at 70% 20%, rgb(189 128 87 / 28%), transparent 35%), linear-gradient(145deg, #f5f0e8, #e8eee8 55%, #d6dfd7); }
.custom-design-mark { color: #8e5b3e; font-size: 42px; line-height: 1; }
.custom-design-caption { padding: 4px 8px; border-radius: 999px; background: #fff; color: #3b503f; font-size: 10px; font-weight: 750; }
.card-artwork-fields { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--app-border); border-radius: 12px; background: var(--app-canvas); }
.card-artwork-heading { display: grid; gap: 3px; }
.card-artwork-heading strong { color: var(--app-ink); }
.card-artwork-heading span, .card-artwork-fields small { color: var(--app-muted); font-size: 12px; font-weight: 400; }
.card-artwork-fields label { display: grid; align-content: start; gap: 7px; }
.card-artwork-fields input[type="file"] { width: 100%; padding: 10px; border: 1px dashed var(--app-border); border-radius: 9px; background: #fff; }
.card-artwork-fields textarea { min-height: 86px; resize: vertical; }
.card-design-locked { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--app-border); border-radius: 12px; background: var(--app-canvas); }
.card-design-locked img { width: 54px; height: 54px; object-fit: contain; padding: 4px; border: 1px solid var(--app-border); border-radius: 10px; background: #fff; }
.card-design-locked div { display: grid; gap: 3px; }
.card-design-locked span { color: var(--app-muted); font-size: 12px; }

@media (max-width: 760px) {
    .card-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card-template-option { padding: 9px; }
    .card-template-preview { width: min(100%, 150px); }
}

@media (max-width: 380px) {
    .card-template-grid { grid-template-columns: 1fr; }
}
/* Shared authentication layout and global developer attribution. */
body.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.app-body.is-guest { display: flex; flex-direction: column; }

body.app-body.is-guest .app-main {
    flex: 1;
    min-height: 0;
    align-items: center;
}

body[data-brand] .auth-shell.auth-shell--single {
    display: flex;
    justify-content: center;
    width: min(100%, 560px);
    padding-block: 36px;
}

body[data-brand] .auth-shell--single .auth-layout {
    width: 100%;
    max-width: 520px;
}

body[data-brand] .auth-shell--single .auth-panel {
    padding: clamp(26px, 5vw, 42px);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(15 23 42 / 7%);
}

.auth-remember-hint { margin: -10px 0 0 !important; font-size: 12px !important; }
.auth-resend-form { margin-top: 12px; }

.developer-credit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: min(100% - 56px, 1400px);
    margin: auto auto 0;
    padding: 14px 0 calc(18px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--app-border, #dce2ec);
    color: var(--app-muted, #64748b);
    font-size: 12px;
    text-align: center;
}

.developer-credit a {
    color: var(--app-brand, #1c4c3b);
    font-weight: 700;
    text-decoration: none;
}

.developer-credit a:hover { text-decoration: underline; text-underline-offset: 3px; }

.workspace-main > .developer-credit { width: min(100% - 56px, 1400px); }

@media (max-width: 760px) {
    body[data-brand] .auth-shell.auth-shell--single { width: min(100%, 480px); padding-block: 20px; }
    body[data-brand] .auth-shell--single .auth-panel { padding: 26px 22px; border-top: 3px solid var(--app-accent); }
    .developer-credit, .workspace-main > .developer-credit { width: calc(100% - 28px); padding-block: 12px calc(14px + env(safe-area-inset-bottom)); font-size: 11px; }
}
