:root {
    --font-sans: "Segoe UI", "Aptos", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-headline: "Manrope", "Inter", "Segoe UI", sans-serif;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-strong: #0f172a;
    --border: #d8e1ec;
    --border-strong: #bcc9d8;
    --text: #122033;
    --text-muted: #5f6f83;
    --primary: #1d4ed8;
    --primary-strong: #173ea6;
    --accent: #0f766e;
    --warning: #d97706;
    --danger: #c2410c;
    --success: #047857;
    --sidebar: #10243f;
    --sidebar-muted: #8fa7c4;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

/* Ensure the HTML hidden attribute always wins over any display rule */
[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.app-shell__main {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 22px;
    background: linear-gradient(180deg, #10243f 0%, #122b4e 100%);
    color: #f8fbff;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sidebar__brand-subtitle {
    margin-top: 4px;
    color: var(--sidebar-muted);
    font-size: 0.9rem;
}

.sidebar__nav {
    display: grid;
    gap: 8px;
}

.sidebar__link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #d8e5f5;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar__group {
    border-radius: 16px;
}

.sidebar__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #d8e5f5;
    cursor: pointer;
    list-style: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar__group-toggle::-webkit-details-marker {
    display: none;
}

.sidebar__group-toggle:hover,
.sidebar__group[open] > .sidebar__group-toggle {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar__group-label {
    font-weight: 600;
}

.sidebar__group-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar__group[open] .sidebar__group-arrow {
    transform: rotate(225deg);
}

.sidebar__group-children {
    display: grid;
    gap: 6px;
    padding: 6px 0 4px 14px;
}

.sidebar__link--child {
    position: relative;
    padding-left: 18px;
    color: #c9d8ea;
}

.sidebar__link--child::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    transform: translateY(-50%);
    opacity: 0.65;
}

.sidebar__link:hover,
.sidebar__link.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar__footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar__user-name {
    font-weight: 600;
}

.sidebar__user-role {
    margin-top: 4px;
    color: var(--sidebar-muted);
    text-transform: capitalize;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.breadcrumb__link:hover {
    color: var(--primary);
}

.page-title {
    margin: 0;
    font-size: clamp(1.8rem, 2vw, 2.3rem);
    line-height: 1.15;
}

.page-description {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--text-muted);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar__user {
    text-align: right;
}

.topbar__user-name {
    font-weight: 600;
}

.topbar__user-email {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.app-content {
    padding: 0 32px 32px;
}

.page-grid {
    display: grid;
    gap: 24px;
}

.page-grid--cards {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel,
.summary-card,
.summary-strip,
.auth-card,
.career-card,
.careers-detail {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel__header {
    padding: 22px 24px 0;
}

.panel__header--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel__header h2,
.summary-card h2,
.career-card h2,
.careers-detail h2 {
    margin: 0;
    font-size: 1.1rem;
}

.panel__header p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.panel__body {
    padding: 24px;
}

.panel--compact {
    box-shadow: none;
}

.summary-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    padding: 24px;
}

.summary-card.is-muted {
    background: linear-gradient(180deg, #f8fafc 0%, #f2f6fa 100%);
}

.summary-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.summary-card__body p {
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.summary-card__footer {
    margin-top: 22px;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    overflow: hidden;
}

.summary-tile {
    padding: 20px 22px;
    background: var(--surface);
}

.summary-tile__label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-tile strong {
    display: block;
    margin-top: 10px;
    font-size: 1.8rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.toolbar input,
.toolbar select,
.form-field input,
.form-field select,
.form-field textarea,
.criteria-editor__inputs input,
.criteria-editor__inputs select,
.criteria-editor__inputs textarea,
.careers-hero__panel input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toolbar input:focus,
.toolbar select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.criteria-editor__inputs input:focus,
.criteria-editor__inputs select:focus,
.criteria-editor__inputs textarea:focus,
.careers-hero__panel input:focus {
    outline: none;
    border-color: rgba(29, 78, 216, 0.55);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.form-field input[readonly] {
    background: var(--surface-soft);
    color: var(--text-muted);
    cursor: default;
}

.toolbar__search {
    flex: 1 1 280px;
}

.toolbar__filters {
    width: 220px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table-subcopy {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lb-summary-shell {
    margin-top: 10px;
}

.lb-summary-toggle {
    min-height: 34px;
    padding: 6px 12px;
}

.lb-summary-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.24s ease, opacity 0.18s ease;
}

.lb-summary-panel.is-open {
    margin-top: 10px;
}

.lb-summary-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 7px 0;
    border-top: 1px dashed var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.lb-summary-line:first-child {
    border-top: none;
    padding-top: 0;
}

.lb-summary-line strong {
    color: var(--text);
}

.data-table th {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr:hover {
    background: var(--surface-soft);
}

.table-empty {
    color: var(--text-muted);
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.table-link {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.table-link:hover {
    color: var(--primary-dark, var(--primary));
}

.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.6;
    vertical-align: middle;
    transition: opacity 0.15s;
}

.button-icon:hover {
    opacity: 1;
}

.detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.detail-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.detail-card__label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-card__value {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 600;
    word-break: break-word;
}

.detail-card__value .status-pill {
    vertical-align: middle;
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.section-tabs__link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-muted);
    font-weight: 600;
}

.section-tabs__link.is-active {
    border-color: rgba(29, 78, 216, 0.28);
    background: #e8efff;
    color: var(--primary-strong);
}

.tag-list {
    display: grid;
    gap: 12px;
}

.tag-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.tag-card__body {
    min-width: 0;
}

.tag-card__body p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.tag-card__body code {
    color: var(--primary-strong);
}

.tag-list__action {
    min-width: 88px;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--danger);
    font-weight: 600;
}

.form-help {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.code-sample {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.9rem;
    overflow-x: auto;
}

.criteria-editor,
.action-stack {
    display: grid;
    gap: 18px;
}

.criteria-editor__grid {
    display: grid;
    gap: 14px;
}

.criteria-editor__row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.4fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.criteria-editor__inputs {
    display: grid;
    gap: 10px;
}

.criteria-editor__copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.appraisal-template-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(240px, 0.9fr);
    gap: 18px;
}

.assessment-sections {
    display: grid;
    gap: 16px;
}

.assessment-section {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.assessment-section__header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.assessment-section__header h3 {
    margin: 0;
}

.assessment-section__header p {
    margin: 6px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.assessment-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 22px;
}

.assessment-list__item {
    padding-left: 4px;
}

.rating-legend {
    display: grid;
    gap: 10px;
}

.rating-legend__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
}

.detail-card--stacked {
    display: grid;
    gap: 12px;
    align-content: start;
}

.appraisal-preview-list {
    display: grid;
    gap: 14px;
}

.appraisal-preview-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.appraisal-preview-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.appraisal-admin {
    display: grid;
    gap: 24px;
    padding: 18px 0 12px;
}

.appraisal-admin__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.appraisal-admin__hero-copy h2 {
    margin: 10px 0 0;
    font-family: var(--font-headline);
    font-size: clamp(2rem, 2.2vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.appraisal-admin__hero-copy p {
    max-width: 640px;
    margin: 12px 0 0;
    color: #405262;
    line-height: 1.7;
}

.appraisal-admin__eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.appraisal-admin__eyebrow-label {
    font-family: var(--font-headline);
    font-size: 0.95rem;
    font-weight: 800;
    color: #0c3d63;
}

.appraisal-admin__cycle-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #dfeeff;
    color: #0c4a73;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.appraisal-admin__hero-actions .button--primary {
    background: linear-gradient(135deg, #006193 0%, #197bb5 100%);
    box-shadow: 0 12px 24px rgba(0, 97, 147, 0.14);
}

.appraisal-admin__hero-actions .button--ghost {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(192, 199, 209, 0.4);
    color: #0c4a73;
}

.appraisal-admin__subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 6px 0 2px;
}

.appraisal-admin__subnav-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: #edf4ff;
    color: #415161;
    font-family: var(--font-headline);
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.appraisal-admin__subnav-link:hover {
    background: #dcecff;
    color: #0c4a73;
    transform: translateY(-1px);
}

.appraisal-admin__subnav-link.is-active {
    background: #dcecff;
    color: #0c4a73;
}

.appraisal-admin__summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.appraisal-metric-card {
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(8, 29, 45, 0.05);
}

.appraisal-metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.appraisal-metric-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #dfeeff;
    color: #0b5c8b;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.appraisal-metric-card__chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf4ff;
    color: #4a5a69;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.appraisal-metric-card__chip--success {
    background: #e6f8dc;
    color: #1e5100;
}

.appraisal-metric-card__chip--alert {
    background: #ffe6e3;
    color: #aa2323;
}

.appraisal-metric-card__label {
    margin: 0;
    color: #4b5b69;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.appraisal-metric-card__value {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 2.5vw, 2.8rem);
    line-height: 1;
}

.appraisal-metric-card__meta {
    margin: 0;
    color: #5d6d7e;
    line-height: 1.6;
}

.appraisal-metric-card--warm .appraisal-metric-card__icon {
    background: #ffefcd;
    color: #885600;
}

.appraisal-metric-card--alert .appraisal-metric-card__icon {
    background: #ffe0db;
    color: #ba1a1a;
}

.appraisal-metric-card--cool .appraisal-metric-card__icon {
    background: #d9ecff;
    color: #006193;
}

.appraisal-surface {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(8, 29, 45, 0.045);
}

.appraisal-surface--soft {
    background: #edf4ff;
}

.appraisal-surface--sticky {
    position: sticky;
    top: 24px;
}

.appraisal-surface__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 24px 0;
}

.appraisal-surface__header--split {
    align-items: center;
}

.appraisal-surface__header h3 {
    margin: 0;
    font-family: var(--font-headline);
    font-size: 1.15rem;
}

.appraisal-surface__header p {
    margin: 8px 0 0;
    color: #5a6b7c;
    line-height: 1.65;
}

.appraisal-surface__body {
    padding: 24px;
}

.appraisal-surface__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #edf4ff;
    color: #0c4a73;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.appraisal-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 0 24px 24px;
}

.appraisal-status-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.appraisal-status-card__label {
    color: #5c6c7c;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.appraisal-status-card__value {
    font-family: var(--font-headline);
    font-size: 1.5rem;
}

.appraisal-admin__workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.92fr);
    gap: 24px;
    align-items: start;
}

.appraisal-admin__main-column,
.appraisal-admin__side-column {
    display: grid;
    gap: 24px;
}

[data-tab-panel][hidden] {
    display: none;
}

.appraisal-template-library {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.appraisal-template-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
    background: #f7f9ff;
}

.appraisal-template-card__head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}

.appraisal-template-card__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #d8eaff;
    color: #0d5a86;
    font-family: var(--font-headline);
    font-weight: 800;
}

.appraisal-template-card__head h4 {
    margin: 0;
    font-family: var(--font-headline);
    font-size: 1rem;
}

.appraisal-template-card__head p {
    margin: 6px 0 0;
    color: #607081;
    line-height: 1.6;
}

.appraisal-template-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #657587;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.appraisal-template-card__list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
}

.appraisal-template-card__item {
    color: #122033;
    line-height: 1.55;
}

.appraisal-template-card__empty {
    padding: 14px 16px;
    border-radius: 14px;
    background: #edf4ff;
    color: #4d6073;
    line-height: 1.6;
}

.appraisal-rating-stack {
    gap: 12px;
}

.appraisal-rating-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7f9ff;
}

.appraisal-rating-row__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #2b6c00;
    color: #ffffff;
    font-family: var(--font-headline);
    font-size: 0.92rem;
}

.appraisal-rating-row:nth-child(2) .appraisal-rating-row__score {
    background: #197bb5;
}

.appraisal-rating-row:nth-child(3) .appraisal-rating-row__score {
    background: #a9c8e6;
    color: #0f2a3c;
}

.appraisal-rating-row:nth-child(4) .appraisal-rating-row__score {
    background: #ffddb1;
    color: #6a4300;
}

.appraisal-rating-row:nth-child(5) .appraisal-rating-row__score {
    background: #ffe0db;
    color: #aa2323;
}

.appraisal-rating-row__label {
    font-weight: 700;
}

.appraisal-filter-bar {
    margin-bottom: 18px;
}

.appraisal-table-wrap {
    border-radius: 16px;
    background: #f7f9ff;
}

.appraisal-data-table {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.appraisal-data-table thead th {
    padding-top: 0;
    padding-bottom: 6px;
    border-bottom: none;
}

.appraisal-data-table tbody td {
    background: #ffffff;
    border-bottom: none;
}

.appraisal-data-table tbody tr td:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.appraisal-data-table tbody tr td:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.appraisal-tip-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(0, 97, 147, 0.08) 0%, rgba(25, 123, 181, 0.16) 100%);
    color: #0c4a73;
}

.appraisal-tip-card__plus {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #006193 0%, #197bb5 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    line-height: 1;
}

.appraisal-tip-card__body {
    max-width: 280px;
}

.appraisal-tip-card__body h3 {
    margin: 0 0 8px;
    font-family: var(--font-headline);
}

.appraisal-tip-card__body p {
    margin: 0;
    line-height: 1.7;
}

.appraisal-recent-list {
    display: grid;
    gap: 12px;
}

.appraisal-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f7f9ff;
}

.appraisal-recent-item__body h4 {
    margin: 0;
    font-family: var(--font-headline);
    font-size: 1rem;
}

.appraisal-recent-item__body p {
    margin: 6px 0 0;
    color: #647587;
}

.appraisal-recent-item__meta {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.appraisal-recent-item__meta strong {
    font-family: var(--font-headline);
    font-size: 1.05rem;
}

.appraisal-recent-item--empty {
    justify-content: flex-start;
}

.appraisal-admin .form-field input,
.appraisal-admin .form-field select,
.appraisal-admin .form-field textarea,
.appraisal-admin .toolbar input,
.appraisal-admin .toolbar select {
    border: none;
    border-bottom: 2px solid rgba(112, 120, 129, 0.18);
    border-radius: 12px 12px 10px 10px;
    background: #edf4ff;
    box-shadow: none;
}

.appraisal-admin .form-field input:focus,
.appraisal-admin .form-field select:focus,
.appraisal-admin .form-field textarea:focus,
.appraisal-admin .toolbar input:focus,
.appraisal-admin .toolbar select:focus {
    border-color: #006193;
    box-shadow: none;
    background: #ffffff;
}

/* ── Appraisal Admin shell (aa-*) ────────────────────────────────────────── */

.aa-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aa-header {
    padding: 28px 0 20px;
    border-bottom: 1px solid rgba(112, 120, 129, 0.1);
    margin-bottom: 0;
}

.aa-header__eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted, #707881);
    margin: 0 0 4px;
}

.aa-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text, #1a1d20);
}

/* Two-column layout: sidebar + content */
.aa-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 180px);
}

/* ── Sidebar nav ──────────────────────────────────────────────────────────── */

.aa-nav {
    border-right: 1px solid rgba(112, 120, 129, 0.1);
    padding: 24px 0;
    background: #f9fafb;
}

.aa-nav__group {
    margin-bottom: 28px;
}

.aa-nav__group-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #707881);
    padding: 0 20px;
    margin: 0 0 6px;
}

.aa-nav__item {
    display: block;
    padding: 9px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text, #1a1d20);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.aa-nav__item:hover {
    background: rgba(0, 97, 147, 0.05);
    color: #006193;
}

.aa-nav__item.is-active {
    border-left-color: #006193;
    background: rgba(0, 97, 147, 0.07);
    color: #006193;
    font-weight: 600;
}

/* ── Content area ─────────────────────────────────────────────────────────── */

.aa-content {
    padding: 28px 32px;
}

.aa-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aa-section[hidden] {
    display: none;
}

.aa-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.aa-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text, #1a1d20);
}

.aa-section__desc {
    font-size: 0.875rem;
    color: var(--text-muted, #707881);
    margin: 0;
    max-width: 560px;
}

/* ── Stat strip ───────────────────────────────────────────────────────────── */

.aa-stat-strip {
    display: flex;
    gap: 0;
    background: #f3f6fb;
    border-radius: 14px;
    overflow: hidden;
}

.aa-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border-right: 1px solid rgba(112, 120, 129, 0.1);
}

.aa-stat:last-child {
    border-right: none;
}

.aa-stat--alert .aa-stat__value {
    color: #c0392b;
}

.aa-stat__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #707881);
}

.aa-stat__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text, #1a1d20);
    line-height: 1;
}

/* ── KPI workspace: staff list + editor ───────────────────────────────────── */

.aa-kpi-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    border: 1px solid rgba(112, 120, 129, 0.12);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    min-height: 420px;
}

.aa-staff-panel {
    border-right: 1px solid rgba(112, 120, 129, 0.1);
    display: flex;
    flex-direction: column;
}

.aa-staff-panel__hint {
    font-size: 0.75rem;
    color: var(--text-muted, #707881);
    padding: 12px 16px 8px;
    margin: 0;
    border-bottom: 1px solid rgba(112, 120, 129, 0.08);
    background: #f9fafb;
}

.aa-staff-list {
    flex: 1;
    overflow-y: auto;
}

.aa-staff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(112, 120, 129, 0.07);
    transition: background 0.12s ease;
}

.aa-staff-row:last-child {
    border-bottom: none;
}

.aa-staff-row:hover {
    background: rgba(0, 97, 147, 0.04);
}

.aa-staff-row.is-selected {
    background: rgba(0, 97, 147, 0.08);
}

.aa-staff-row--empty {
    cursor: default;
    font-size: 0.85rem;
    color: var(--text-muted, #707881);
    padding: 20px 16px;
    justify-content: flex-start;
}

.aa-staff-row--empty:hover {
    background: none;
}

.aa-staff-row__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.aa-staff-row__name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aa-staff-row__meta {
    font-size: 0.75rem;
    color: var(--text-muted, #707881);
}

.aa-editor-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aa-editor-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(112, 120, 129, 0.1);
    background: #fafbfc;
}

.aa-editor-panel__header h4 {
    margin: 0 0 2px;
    font-size: 0.95rem;
    font-weight: 700;
}

.aa-editor-panel__header p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted, #707881);
}

.aa-editor-panel .table-wrap {
    padding: 0;
    border-radius: 0;
    border: none;
}

.aa-editor-panel .data-table th,
.aa-editor-panel .data-table td {
    padding: 10px 16px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .aa-layout {
        grid-template-columns: 1fr;
    }

    .aa-nav {
        border-right: none;
        border-bottom: 1px solid rgba(112, 120, 129, 0.1);
        padding: 12px 0;
        display: flex;
        overflow-x: auto;
    }

    .aa-nav__group {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 0;
        padding: 0 12px;
        white-space: nowrap;
    }

    .aa-nav__group-label {
        display: none;
    }

    .aa-nav__item {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 14px;
        border-radius: 8px 8px 0 0;
    }

    .aa-nav__item.is-active {
        border-left-color: transparent;
        border-bottom-color: #006193;
    }

    .aa-kpi-workspace {
        grid-template-columns: 1fr;
    }

    .aa-staff-panel {
        border-right: none;
        border-bottom: 1px solid rgba(112, 120, 129, 0.1);
        max-height: 260px;
    }

    .aa-content {
        padding: 20px 16px;
    }
}

/* ── KPI Setup page ───────────────────────────────────────────────────────── */

.kpi-setup__summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-setup__workspace {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.kpi-staff-panel {
    position: sticky;
    top: 80px;
}

.kpi-staff-panel__body {
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
}

.kpi-staff-list {
    display: flex;
    flex-direction: column;
}

.kpi-staff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(112, 120, 129, 0.08);
    transition: background 0.15s ease;
}

.kpi-staff-row:last-child {
    border-bottom: none;
}

.kpi-staff-row:hover {
    background: rgba(0, 97, 147, 0.04);
}

.kpi-staff-row.is-selected {
    background: rgba(0, 97, 147, 0.08);
}

.kpi-staff-row--empty {
    cursor: default;
    color: var(--text-muted, #707881);
    font-size: 0.875rem;
    padding: 20px;
}

.kpi-staff-row--empty:hover {
    background: none;
}

.kpi-staff-row__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.kpi-staff-row__name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-staff-row__meta {
    font-size: 0.78rem;
    color: var(--text-muted, #707881);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-editor-panel {
    min-width: 0;
}

/* Form inputs inside kpi-setup use the same tonal style */
.kpi-setup .form-field input,
.kpi-setup .form-field select,
.kpi-setup .form-field textarea {
    border: none;
    border-bottom: 2px solid rgba(112, 120, 129, 0.18);
    border-radius: 12px 12px 10px 10px;
    background: #edf4ff;
    box-shadow: none;
}

.kpi-setup .form-field input:focus,
.kpi-setup .form-field select:focus,
.kpi-setup .form-field textarea:focus {
    border-color: #006193;
    box-shadow: none;
    background: #ffffff;
}

@media (max-width: 900px) {
    .kpi-setup__workspace {
        grid-template-columns: 1fr;
    }

    .kpi-staff-panel {
        position: static;
    }

    .kpi-staff-panel__body {
        max-height: 280px;
    }

    .kpi-setup__summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .appraisal-template-grid {
        grid-template-columns: 1fr;
    }

    .criteria-editor__row {
        grid-template-columns: 1fr;
    }
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-row--spacious {
    margin-top: 24px;
}

.button--primary {
    background: var(--primary);
    color: #ffffff;
}

.public-response-card {
    width: min(640px, 100%);
    margin: 48px auto 0;
    padding: 32px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.public-response-card h1 {
    margin: 16px 0 12px;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.offer-respond-details {
    margin: 20px 0;
    padding: 16px;
    background: var(--surface-alt, #f8f9fa);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.offer-respond-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.public-response-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

.button--primary:hover:not(:disabled) {
    background: var(--primary-strong);
}

.button--secondary {
    background: #e8efff;
    color: var(--primary-strong);
}

.button--ghost {
    background: transparent;
    border-color: var(--border-strong);
}

.button--danger {
    background: #fff0eb;
    color: var(--danger);
}

.button--block {
    width: 100%;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    font-weight: 600;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.inline-message {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.inline-message.is-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

.inline-message.is-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.inline-message.is-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pill--draft {
    background: #fff7ed;
    color: var(--warning);
}

.status-pill--published {
    background: #ecfdf5;
    color: var(--success);
}

.status-pill--danger {
    background: #fef2f2;
    color: #b91c1c;
}

.status-pill--default {
    background: #eff6ff;
    color: var(--primary);
}

.status-pill--info {
    background: #f0f9ff;
    color: #0369a1;
}

.status-pill--warning {
    background: #fffbeb;
    color: #b45309;
}

.status-pill--secondary {
    background: #f5f3ff;
    color: #6d28d9;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px 16px;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.18), transparent 30%),
        linear-gradient(180deg, #f7faff 0%, #eef3f9 100%);
}

.auth-card {
    width: min(100%, 480px);
    padding: 34px;
}

.auth-card__eyebrow,
.careers-hero__eyebrow {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8efff;
    color: var(--primary-strong);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-card h1 {
    margin: 16px 0 10px;
    font-size: 2rem;
}

.auth-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-card__footer a {
    color: var(--primary-strong);
    font-weight: 600;
}


.login-page .auth-shell {
    display: block;
    min-height: 100vh;
    padding: 0;
    background:
        radial-gradient(circle at top center, rgba(0, 97, 147, 0.05), transparent 28%),
        linear-gradient(180deg, #f6f8fe 0%, #f1f5fd 100%);
}

.login-quiet {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 24px 28px;
}

.login-quiet__center {
    flex: 1;
    display: grid;
    place-items: center;
}

.login-quiet__card {
    width: min(100%, 440px);
    padding: 28px 30px 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(8, 29, 45, 0.06);
}

.login-quiet__brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: 34px;
    text-align: center;
}

.login-quiet__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #006193;
    color: #ffffff;
    margin-bottom: 6px;
}

.login-quiet__mark svg {
    width: 24px;
    height: 24px;
}

.login-quiet__logo {
    margin-bottom: 10px;
}

.login-quiet__logo-img {
    height: 56px;
    width: auto;
    display: block;
}

.login-quiet__brand h1 {
    margin: 0;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-quiet__brand p {
    margin: 0;
    color: #5f7285;
    font-size: 0.95rem;
    font-weight: 500;
}

.login-quiet__brand--compact {
    margin-bottom: 28px;
}

.login-quiet__form {
    display: grid;
    gap: 22px;
}

.login-quiet__field {
    display: grid;
    gap: 10px;
}

.login-quiet__field label,
.login-quiet__field-head a {
    font-family: var(--font-headline);
}

.login-quiet__field label {
    color: #081d2d;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.login-quiet__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-quiet__field-head a {
    color: #006193;
    font-size: 0.82rem;
    font-weight: 700;
}

.login-quiet__field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 0;
    border-bottom: 2px solid rgba(192, 199, 209, 0.18);
    border-radius: 0;
    background: #edf4ff;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: 0.98rem;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.login-quiet__field input::placeholder {
    color: #7a8896;
}

.login-quiet__field input:focus {
    outline: none;
    background: #ffffff;
    border-bottom-color: #006193;
}

.login-quiet__submit {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #006193 0%, #197bb5 100%);
    color: #ffffff;
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 8px 18px rgba(0, 97, 147, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.login-quiet__submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 97, 147, 0.26);
}

.login-quiet__submit:disabled {
    opacity: 0.72;
}

.login-quiet .inline-message {
    margin-top: -4px;
}

.login-quiet__support-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    color: #5f7285;
    font-family: var(--font-headline);
    font-size: 0.84rem;
    font-weight: 700;
}

.login-quiet__support-links a {
    color: #006193;
}

.login-quiet__support-links a:hover {
    color: #197bb5;
}

.login-quiet__security {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 28px;
    color: #5d6670;
    font-size: 0.8rem;
    font-weight: 600;
}

.login-quiet__security svg {
    width: 16px;
    height: 16px;
}

.login-quiet__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: min(1200px, 100%);
    margin: 0 auto;
    color: #7f8c9a;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.login-quiet__footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.login-quiet__footer-brand strong {
    color: #3a5268;
    font-family: var(--font-headline);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: none;
}

.login-quiet__footer-brand span {
    letter-spacing: 0.18em;
}

.login-quiet__footer-links {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.login-quiet__footer-links a {
    color: #7f8c9a;
    font-size: 0.76rem;
    font-weight: 600;
}

.login-quiet__footer-links a:hover,
.login-quiet__field-head a:hover {
    color: #197bb5;
}


.dashboard-quiet {
    display: grid;
    gap: 34px;
}

.dashboard-quiet__hero h2 {
    margin: 0;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.dashboard-quiet__hero p {
    margin: 10px 0 0;
    color: #5f7285;
    font-size: 1rem;
    font-weight: 500;
}

.dashboard-quiet__featured {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-metric {
    position: relative;
    overflow: hidden;
    min-height: 208px;
    padding: 24px 22px 22px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(8, 29, 45, 0.04);
}

.dashboard-metric--primary {
    background: #ffffff;
}

.dashboard-metric--secondary {
    background: #ffffff;
}

.dashboard-metric--tertiary {
    background: #ffffff;
}

.dashboard-metric__watermark {
    position: absolute;
    top: 16px;
    right: 16px;
    color: rgba(8, 29, 45, 0.08);
    font-family: var(--font-headline);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.dashboard-metric__value {
    margin: 28px 0 8px;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: clamp(2rem, 2.9vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.dashboard-metric__caption {
    max-width: 30ch;
    margin: 0;
    color: #5f7285;
    line-height: 1.6;
}

.dashboard-spotlight {
    position: relative;
    overflow: hidden;
    min-height: 208px;
    padding: 24px 22px 22px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(8, 29, 45, 0.04);
}

.dashboard-spotlight.is-muted {
    opacity: 0.88;
}

.dashboard-spotlight--primary {
    background: #ffffff;
}

.dashboard-spotlight--secondary {
    background: #ffffff;
}

.dashboard-spotlight--tertiary {
    background: #ffffff;
}

.dashboard-spotlight--neutral {
    background: #ffffff;
}

.dashboard-spotlight__watermark {
    position: absolute;
    top: 16px;
    right: 16px;
    color: rgba(8, 29, 45, 0.08);
    font-family: var(--font-headline);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.dashboard-spotlight__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #5f7285;
    font-family: var(--font-headline);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dashboard-spotlight__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #edf4ff;
    color: #006193;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.dashboard-spotlight--secondary .dashboard-spotlight__glyph {
    background: #eef9e3;
    color: #2b6c00;
}

.dashboard-spotlight--tertiary .dashboard-spotlight__glyph {
    background: #fff0db;
    color: #7e5300;
}

.dashboard-spotlight--neutral .dashboard-spotlight__glyph {
    background: #e7edf5;
    color: #405061;
}

.dashboard-spotlight h3 {
    margin: 28px 0 8px;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: clamp(1.9rem, 2.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.dashboard-spotlight p {
    max-width: 28ch;
    margin: 0;
    color: #5f7285;
    line-height: 1.55;
}

.dashboard-spotlight__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-chip--positive {
    background: #a5f878;
    color: #2e7300;
}

.dashboard-chip--pending {
    background: #ffe4c6;
    color: #7e5300;
}

.dashboard-chip--neutral {
    background: #dfeaf9;
    color: #52708e;
}

.dashboard-chip--danger {
    background: #ffe0dc;
    color: #9e2018;
}

.dashboard-link {
    color: #006193;
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-link.is-disabled {
    color: #8da1b5;
}

.dashboard-quiet__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.dashboard-quiet__main,
.dashboard-side-card {
    border-radius: 22px;
}

.dashboard-quiet__section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.dashboard-quiet__section-head--stacked {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
}

.dashboard-quiet__section-head h3 {
    margin: 0;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-quiet__section-head span {
    color: #5f7285;
    font-size: 0.88rem;
    font-weight: 600;
}

.dashboard-activity-list {
    display: grid;
    gap: 10px;
    padding: 8px;
    border-radius: 24px;
    background: #edf4ff;
}

.dashboard-activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px;
    border-radius: 18px;
    background: #ffffff;
    transition: background 0.25s ease, transform 0.25s ease;
}

.dashboard-activity-item:hover {
    background: #f8fbff;
    transform: translateY(-1px);
}

.dashboard-activity-item.is-muted {
    opacity: 0.86;
}

.dashboard-activity-item__lead {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-activity-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-family: var(--font-headline);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-activity-item__icon--primary {
    background: #d9ecff;
    color: #006193;
}

.dashboard-activity-item__icon--secondary {
    background: #e6f6d9;
    color: #2b6c00;
}

.dashboard-activity-item__icon--tertiary {
    background: #ffe9cb;
    color: #7e5300;
}

.dashboard-activity-item__icon--neutral {
    background: #e8eef6;
    color: #5f7285;
}

.dashboard-activity-item h4 {
    margin: 0;
    color: #081d2d;
    font-size: 0.98rem;
    font-weight: 700;
}

.dashboard-activity-item p {
    margin: 6px 0 0;
    color: #5f7285;
    font-size: 0.9rem;
    line-height: 1.55;
}

.dashboard-activity-item__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.dashboard-quiet__side {
    display: grid;
    gap: 18px;
}

.dashboard-side-card {
    padding: 20px;
}

.dashboard-side-card--primary {
    background: #ffffff;
}

.dashboard-side-card--soft {
    background: #d8eaff;
}

.dashboard-side-card--note {
    background: #edf4ff;
}

.dashboard-action-stack {
    display: grid;
    gap: 12px;
}

.dashboard-action-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    background: #ffffff;
    color: #081d2d;
    font-size: 0.94rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(8, 29, 45, 0.04);
}

.dashboard-action-button.is-featured {
    background: linear-gradient(135deg, #006193 0%, #197bb5 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 97, 147, 0.22);
}

.dashboard-context-list {
    display: grid;
    gap: 12px;
}

.dashboard-context-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    color: #4c5d6f;
    font-size: 0.9rem;
}

.dashboard-context-item strong {
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: 0.96rem;
    font-weight: 700;
    text-align: right;
}

.dashboard-note-copy {
    margin: 0;
    color: #5f7285;
    line-height: 1.7;
}

.dashboard-home {
    display: grid;
    gap: 30px;
}

.dashboard-home__hero h2 {
    margin: 0;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.dashboard-home__hero p {
    margin: 10px 0 0;
    color: #5f7285;
    font-size: 1rem;
    font-weight: 500;
}

.dashboard-home__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-home-card {
    position: relative;
    overflow: hidden;
    min-height: 228px;
    padding: 24px 22px 20px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(8, 29, 45, 0.04);
}

.dashboard-home-card__watermark {
    position: absolute;
    top: 16px;
    right: 16px;
    color: rgba(8, 29, 45, 0.08);
    font-family: var(--font-headline);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.dashboard-home-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #5f7285;
    font-family: var(--font-headline);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dashboard-home-card__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #edf4ff;
    color: #006193;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.dashboard-home-card--secondary .dashboard-home-card__glyph {
    background: #eef9e3;
    color: #2b6c00;
}

.dashboard-home-card--tertiary .dashboard-home-card__glyph {
    background: #fff0db;
    color: #7e5300;
}

.dashboard-home-card__value {
    margin: 28px 0 8px;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: clamp(2.15rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.dashboard-home-card__subtitle {
    max-width: 30ch;
    margin: 0;
    color: #5f7285;
    line-height: 1.6;
}

.dashboard-home-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
}

.dashboard-progress {
    width: 100%;
    height: 7px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf4ff;
}

.dashboard-progress__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #006193 0%, #197bb5 100%);
}

.dashboard-home__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.dashboard-home__main,
.dashboard-home__side {
    min-width: 0;
}

.dashboard-home__side {
    display: grid;
    gap: 18px;
}

.dashboard-home__section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-home__section-head--stacked {
    flex-direction: column;
    align-items: flex-start;
}

.dashboard-home__section-head h3 {
    margin: 0;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.dashboard-home__section-head a,
.dashboard-home__section-head span {
    color: #5f7285;
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-home__section-head a:hover {
    color: #006193;
}

.dashboard-feed {
    display: grid;
    gap: 10px;
    padding: 8px;
    border-radius: 24px;
    background: #edf4ff;
}

.dashboard-feed__empty,
.dashboard-team-empty {
    padding: 22px;
    border-radius: 18px;
    background: #ffffff;
}

.dashboard-feed__empty h4,
.dashboard-team-empty h4 {
    margin: 0 0 8px;
    color: #081d2d;
    font-family: var(--font-headline);
}

.dashboard-feed__empty p,
.dashboard-team-empty p {
    margin: 0;
    color: #5f7285;
    line-height: 1.6;
}

.dashboard-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
}

.dashboard-feed-item__lead {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-feed-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-family: var(--font-headline);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-feed-item__icon--leave {
    background: #d9ecff;
    color: #006193;
}

.dashboard-feed-item__icon--appraisal {
    background: #e6f6d9;
    color: #2b6c00;
}

.dashboard-feed-item h4 {
    margin: 0;
    color: #081d2d;
    font-size: 0.98rem;
    font-weight: 700;
}

.dashboard-feed-item p {
    margin: 6px 0 0;
    color: #5f7285;
    font-size: 0.9rem;
    line-height: 1.55;
}

.dashboard-feed-item__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.dashboard-feed-item__time {
    color: #8da1b5;
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-action-button--featured {
    background: linear-gradient(135deg, #006193 0%, #197bb5 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 97, 147, 0.22);
}

.dashboard-action-button--muted {
    color: #8da1b5;
    background: #ffffff;
    opacity: 0.72;
}

.dashboard-side-note {
    margin: 14px 0 0;
    color: #5f7285;
    font-size: 0.86rem;
    line-height: 1.6;
}

.dashboard-team-list {
    display: grid;
    gap: 12px;
}

.dashboard-team-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-team-item__lead {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dashboard-team-item__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #ffffff;
    color: #081d2d;
    font-family: var(--font-headline);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 6px 18px rgba(8, 29, 45, 0.04);
}

.dashboard-team-item__name {
    color: #081d2d;
    font-size: 0.92rem;
    font-weight: 700;
}

.dashboard-team-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-team-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.dashboard-team-status--online {
    color: #2b6c00;
}

.dashboard-team-status--ooo {
    color: #8da1b5;
}

.dashboard-team-status--available {
    color: #006193;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(244, 247, 251, 0.88);
    border-bottom: 1px solid rgba(188, 201, 216, 0.45);
}

.public-header__inner,
.public-main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.public-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.public-brand {
    font-weight: 700;
    color: var(--surface-strong);
    letter-spacing: 0.01em;
}

.public-main {
    padding: 32px 0 48px;
}

.careers-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 24px;
    margin-bottom: 24px;
}

.careers-hero__copy,
.careers-hero__panel {
    padding: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.careers-hero__copy h1 {
    margin: 18px 0 14px;
    max-width: 18ch;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
}

.careers-hero__copy p,
.careers-hero__hint {
    color: var(--text-muted);
    line-height: 1.7;
}

.careers-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.careers-list {
    display: grid;
    gap: 16px;
}

.career-card {
    padding: 24px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.career-card:hover {
    border-color: var(--primary);
}

.career-card--active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 37,99,235), 0.12);
}

.career-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.career-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef4fa;
    color: var(--text);
    font-size: 0.88rem;
}

.careers-detail {
    position: sticky;
    top: 92px;
    padding: 26px;
}

.careers-detail__empty p,
.careers-detail p {
    color: var(--text-muted);
    line-height: 1.7;
}

.careers-detail__section + .careers-detail__section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

/* ── Apply success state ─────────────────────────────────────────────── */
.modal__eyebrow {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.careers-apply-success {
    padding: 32px 24px;
    text-align: center;
}

.careers-apply-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.careers-apply-success h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.careers-apply-success p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}

/* ── File upload widget ─────────────────────────────────────────────────── */
.file-upload-wrap {
    position: relative;
}

.file-upload-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    background: var(--surface-alt, #f8f9fa);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: center;
}

.file-upload-wrap:hover .file-upload-label,
.file-upload-wrap:focus-within .file-upload-label {
    border-color: var(--primary);
    background: var(--primary-subtle, #eff6ff);
}

.file-upload-icon {
    font-size: 2rem;
    line-height: 1;
    pointer-events: none;
}

.file-upload-cta {
    font-weight: 600;
    color: var(--primary);
    font-size: .875rem;
    pointer-events: none;
}

.file-upload-hint {
    font-size: .75rem;
    color: var(--text-muted);
    pointer-events: none;
}

.file-upload-filename {
    display: block;
    margin-top: 6px;
    font-size: .8rem;
    color: var(--text-muted);
    word-break: break-all;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow-y: auto;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.modal__dialog {
    position: relative;
    width: min(720px, calc(100% - 32px));
    margin: 48px auto;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 28px 54px rgba(15, 23, 42, 0.24);
    padding: 24px;
}

.modal .detail-grid {
    margin-bottom: 20px;
}

.modal__dialog--lg {
    width: min(860px, calc(100% - 32px));
}

.modal__dialog--sm {
    width: min(480px, calc(100% - 32px));
}

/* Overlay modal — sits on top of another open modal */
.modal--overlay {
    z-index: 50;
}

/* Radio group */
.radio-group {
    display: flex;
    gap: 24px;
    padding: 10px 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.modal__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(112, 120, 129, 0.12);
}

/* ── Bulk KPI table rows ──────────────────────────────────────────────────── */

.kpi-bulk-table {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(112, 120, 129, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.kpi-bulk-table__head {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 36px;
    gap: 8px;
    padding: 8px 12px;
    background: #f3f6fb;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #707881);
    border-bottom: 1px solid rgba(112, 120, 129, 0.1);
}

.kpi-bulk-row {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 36px;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(112, 120, 129, 0.08);
    background: #fff;
    transition: background 0.1s ease;
}

.kpi-bulk-row:last-child {
    border-bottom: none;
}

.kpi-bulk-row:focus-within {
    background: #f8fbff;
}

.kpi-bulk-row__num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted, #707881);
    text-align: center;
}

.kpi-bulk-row input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(112, 120, 129, 0.18);
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f9fafb;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.kpi-bulk-row input:focus {
    outline: none;
    border-color: #006193;
    background: #fff;
}

.kpi-bulk-row__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted, #707881);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.kpi-bulk-row__remove:hover {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
}

.kpi-bulk-add-row {
    align-self: flex-start;
    font-size: 0.85rem;
}

.required-star {
    color: #c0392b;
}

/* ── Staff type toggle ────────────────────────────────────────────────────── */

.aa-type-toggle {
    display: inline-flex;
    background: #f0f3f8;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.aa-type-toggle__btn {
    padding: 7px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #707881);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.aa-type-toggle__btn.is-active {
    background: #fff;
    color: #006193;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ── Weight summary bar ───────────────────────────────────────────────────── */

.aa-weight-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-muted, #707881);
}

.aa-weight-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.aa-weight-status--ok   { color: #27ae60; }
.aa-weight-status--warn { color: #c0392b; }

/* ── Section cards ────────────────────────────────────────────────────────── */

.q-sections-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.q-section-card {
    border: 1px solid rgba(112, 120, 129, 0.12);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.q-section-card__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: #f9fafb;
    border-bottom: 1px solid rgba(112, 120, 129, 0.1);
}

.q-section-card__badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #006193;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
}

.q-section-card__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.q-section-card__title {
    font-size: 0.95rem;
    font-weight: 700;
}

.q-section-card__desc {
    font-size: 0.8rem;
    color: var(--text-muted, #707881);
}

.q-section-card__weight {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.q-section-card__weight label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #707881);
}

.q-weight-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--text, #1a1d20);
}

.q-weight-input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid rgba(112, 120, 129, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: right;
    background: #fff;
    transition: border-color 0.15s ease;
}

.q-weight-input:focus {
    outline: none;
    border-color: #006193;
}

.q-section-card__body {
    padding: 16px 20px;
}

/* ── KPI section notice ───────────────────────────────────────────────────── */

.q-kpi-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #f0f7ff;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #004d73;
}

.q-kpi-notice__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Question list ────────────────────────────────────────────────────────── */

.q-question-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.q-question-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(112, 120, 129, 0.07);
}

.q-question-row:last-child {
    border-bottom: none;
}

.q-question-row__name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
}

.q-question-row__desc {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-muted, #707881);
}

.q-questions__empty {
    font-size: 0.85rem;
    color: var(--text-muted, #707881);
    padding: 8px 0;
    margin: 0 0 12px;
}

.q-questions__footer {
    padding-top: 4px;
}

/* ── Appraisal Periods ────────────────────────────────────────────────────── */

.p-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.p-type-card {
    cursor: pointer;
}

.p-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.p-type-card__inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    transition: border-color .15s, background .15s;
    text-align: center;
}

.p-type-card__inner strong {
    font-size: 0.85rem;
    color: var(--text);
}

.p-type-card__inner small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.p-type-card input[type="radio"]:checked + .p-type-card__inner {
    border-color: var(--primary);
    background: #eff6ff;
}

/* Period status badges */
.p-status--draft   { background: #f1f5f9; color: #475569; }
.p-status--active  { background: #dcfce7; color: #166534; }
.p-status--closed  { background: #fee2e2; color: #991b1b; }

.p-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Period type badges */
.p-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
}

.p-type-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.p-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
    border: 2px solid var(--primary, #2563eb);
    border-radius: 12px;
    background: #fff;
    color: var(--primary, #2563eb);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.p-type-btn:hover {
    background: var(--primary, #2563eb);
    color: #fff;
}

.p-type-btn__title {
    font-size: 1.05rem;
    font-weight: 700;
}

.p-type-btn__desc {
    font-size: 0.8125rem;
    opacity: 0.75;
}

@media (max-width: 640px) {
    .p-type-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2-column sub-grid inside each period type form */
.form-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-subgrid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-subgrid label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
}

.form-subgrid input,
.form-subgrid select {
    width: 100%;
}

@media (max-width: 640px) {
    .p-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-subgrid {
        grid-template-columns: 1fr;
    }
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 1.4rem;
}

.toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: grid;
    gap: 10px;
}

.toast {
    min-width: 280px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.toast--success {
    border-color: #a7f3d0;
}

.toast--error {
    border-color: #fecaca;
}

.toast--info {
    border-color: #bfdbfe;
}


.button--small,
.button--sm {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.notification-menu {
    position: relative;
}

.notification-menu__toggle {
    position: relative;
}

.notification-menu__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
}

.notification-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 40px));
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
    z-index: 30;
}

.notification-menu__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.notification-menu__header p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.notification-menu__header a,
.notification-menu__link {
    color: var(--primary-strong);
    font-weight: 600;
}

.notification-menu__link.is-disabled {
    color: var(--text-muted);
}

.notification-menu__list {
    display: grid;
    gap: 12px;
}

.notification-menu__item,
.notification-card {
    display: grid;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
}

.notification-menu__item {
    grid-template-columns: minmax(0, 1fr) auto;
    background: var(--surface-soft);
}

.notification-menu__copy,
.notification-card__body {
    min-width: 0;
}

.notification-menu__copy p,
.notification-card__body p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.notification-menu__meta,
.notification-card__time {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.notification-menu__actions,
.notification-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.notification-menu__actions {
    justify-content: flex-end;
    align-content: flex-start;
}

.notification-menu__empty,
.notification-card--empty {
    color: var(--text-muted);
}

.notification-list {
    display: grid;
    gap: 16px;
}

.notification-card.is-unread {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.notification-card h3,
.notification-menu__copy strong {
    margin: 0;
    font-size: 1rem;
}

.notification-card__topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.toolbar__filters--inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 18px;
    }

    .sidebar__nav {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .careers-layout,
    .careers-hero,
    .dashboard-quiet__featured,
    .dashboard-quiet__grid,
    .dashboard-home__summary,
    .dashboard-home__grid,
    .appraisal-admin__workspace,
    .appraisal-admin__summary-grid,
    .appraisal-status-grid,
    .appraisal-template-library {
        grid-template-columns: 1fr;
    }

    .careers-detail {
        position: static;
    }

    .appraisal-surface--sticky {
        position: static;
    }
}

@media (max-width: 760px) {
    .topbar,
    .app-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .topbar {
        flex-direction: column;
    }

    .topbar__actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .notification-menu__panel {
        right: auto;
        left: 0;
        width: min(100%, calc(100vw - 36px));
    }

    .notification-menu__item,
    .notification-card {
        grid-template-columns: 1fr;
    }

    .notification-card__topline,
    .notification-menu__actions,
    .notification-card__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .panel__header--split,
    .dashboard-spotlight__footer,
    .dashboard-activity-item,
    .dashboard-activity-item__lead,
    .dashboard-activity-item__meta,
    .dashboard-quiet__section-head,
    .dashboard-home__section-head,
    .dashboard-feed-item,
    .dashboard-feed-item__lead,
    .dashboard-feed-item__meta,
    .dashboard-team-item,
    .appraisal-admin__hero,
    .appraisal-surface__header--split,
    .appraisal-recent-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-card {
        padding: 24px;
    }

    .login-quiet {
        padding: 28px 16px 20px;
    }

    .login-quiet__card {
        padding: 24px 18px 24px;
    }

    .login-quiet__footer,
    .login-quiet__footer-brand,
    .login-quiet__footer-links,
    .login-quiet__support-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .auth-card__footer {
        flex-direction: column;
    }

    .appraisal-admin__hero-actions,
    .appraisal-admin__hero-actions .button,
    .appraisal-admin__subnav-link,
    .appraisal-admin .toolbar__filters,
    .appraisal-admin .toolbar__filters--inline {
        width: 100%;
    }

    .appraisal-admin .toolbar__filters--inline {
        align-items: flex-start;
        flex-direction: column;
    }

    .appraisal-recent-item__meta {
        justify-items: flex-start;
    }
}

/* ── Onboarding documents checklist ─────────────────────────────────────── */
.doc-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--surface);
    transition: border-color .15s;
}

.doc-item--verified {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.doc-item--rejected {
    border-color: #fecaca;
    background: #fff5f5;
}

.doc-item--uploaded {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.doc-item__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-item__icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.doc-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-item__type {
    font-size: .75rem;
    color: var(--text-muted);
}

.doc-item__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-file-link {
    font-size: .85rem;
    color: var(--primary);
    text-decoration: underline;
}

.doc-notes {
    margin: 8px 0 0 2.4rem;
    font-size: .82rem;
    color: var(--danger);
    font-style: italic;
}

.doc-upload-zone {
    margin-top: 12px;
    margin-left: 2.4rem;
}

.file-upload-label--compact {
    flex-direction: row;
    padding: 10px 14px;
    gap: 8px;
    justify-content: flex-start;
    border-radius: var(--radius-sm);
}

/* ── Signature modal ─────────────────────────────────────────────────────── */
.sig-modal-body {
    padding: 0 28px 28px;
}

.sig-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}

.sig-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 8px 18px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: color .15s, border-color .15s;
}

.sig-tab:hover { color: var(--text); }

.sig-tab--active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(29, 78, 216, .04);
}

.sig-canvas-wrap {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fafcff;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}

.sig-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
}

.sig-type-field {
    width: 100%;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 2rem;
    font-family: 'Brush Script MT', 'Dancing Script', cursive, var(--font-sans);
    color: var(--text);
    background: #fafcff;
    text-align: center;
}

.sig-type-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

/* ── Signature preview (HR view) ─────────────────────────────────────────── */
.signature-preview-img {
    max-width: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafcff;
    padding: 8px;
    display: block;
}

.signature-typed-display {
    font-family: 'Brush Script MT', 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--text);
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafcff;
    display: inline-block;
    min-width: 200px;
    text-align: center;
    margin-bottom: 8px;
}

/* ── Letter download widget ──────────────────────────────────────────────── */
.letter-download-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.letter-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.letter-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
