:root {
    --app-ink: #17251f;
    --app-muted: #64756c;
    --app-surface: #ffffff;
    --app-canvas: #f3f6f4;
    --app-border: #e0e7e2;
    --app-brand: #0f5138;
    --app-brand-strong: #0a3a27;
    --app-brand-soft: #e8f2ec;
    --app-gold: #c29a3f;
    --app-gold-soft: #faf4e4;
    --app-danger: #b3403a;
    --app-danger-soft: #fdeeec;
    --app-success: #1f7a4d;
    --app-success-soft: #e6f4ec;
    --app-warning: #8a6416;
    --app-warning-soft: #fbf4e2;
    --app-shadow: 0 16px 40px rgb(12 40 28 / 8%), 0 2px 8px rgb(12 40 28 / 4%);
    --app-radius: 16px;
    --app-radius-sm: 10px;
    --app-focus: 0 0 0 3px rgb(15 81 56 / 20%);
    --app-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }

body.app-body {
    min-height: 100vh;
    margin: 0;
    color: var(--app-ink);
    font-family: var(--app-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background:
        radial-gradient(90% 55% at 100% -10%, rgb(194 154 63 / 10%), transparent 55%),
        radial-gradient(70% 50% at -10% 100%, rgb(15 81 56 / 8%), transparent 50%),
        var(--app-canvas);
}

[lang="ar"] {
    line-height: 1.7;
}

body.app-body.is-guest {
    display: grid;
    grid-template-rows: 1fr;
    align-items: stretch;
}

body.app-body.is-guest .app-main {
    width: min(100% - 32px, 1120px);
    margin: 0 auto;
    padding: 0;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--app-surface) 92%, transparent);
    border-bottom: 1px solid var(--app-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgb(201 162 75 / 35%);
}

.app-header-inner {
    width: min(100% - 48px, 1320px);
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--app-ink);
    text-decoration: none;
    flex-shrink: 0;
}

.app-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: 0 8px 18px rgb(18 59 43 / 16%);
}
.app-brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.app-brand-copy { display: flex; align-items: baseline; gap: 10px; }
.app-brand-name, .app-brand-caption { display: block; }
.app-brand-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.app-brand-caption {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.app-nav, .app-account {
    display: flex;
    align-items: center;
}

.app-nav { gap: 4px; }
.app-nav-desktop { margin-left: auto; }
.app-account { gap: 10px; }
.app-account form, .mobile-nav-panel form { margin: 0; }

.app-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #536159;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.app-nav-link:hover { background: var(--app-brand-soft); color: var(--app-ink); }
.app-nav-link.is-active {
    background: var(--app-brand);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 18px rgb(18 59 43 / 18%);
}
.app-nav-link:focus-visible, .mobile-nav summary:focus-visible { outline: none; box-shadow: var(--app-focus); }
.app-signout { color: #68756d; }
.app-signout:hover { color: var(--app-danger); background: var(--app-danger-soft); }

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid color-mix(in srgb, var(--app-gold) 35%, var(--app-border));
    border-radius: 999px;
    background: var(--app-gold-soft);
    color: #6f5520;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.mobile-nav { display: none; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: "⌄"; margin-left: 8px; color: var(--app-muted); }
.mobile-nav-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    width: min(300px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}
.mobile-nav-panel .app-nav-link { width: 100%; justify-content: flex-start; }
.mobile-nav-panel .app-nav-link.is-active { box-shadow: none; }

.app-main {
    width: min(100% - 48px, 1320px);
    margin: 0 auto;
    padding: 32px 0 72px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 80%, transparent);
}

.page-heading h1, .page-title {
    margin: 0;
    color: var(--app-brand-strong);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.page-title-ar {
    margin: 4px 0 0;
    color: color-mix(in srgb, var(--app-brand) 78%, var(--app-muted));
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 600;
    line-height: 1.45;
}

.page-heading p, .page-description {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--app-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
}

.surface-panel {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: color-mix(in srgb, var(--app-surface) 96%, white);
    box-shadow: 0 12px 32px rgb(15 42 29 / 5%);
}

.panel-heading { margin: 0; color: var(--app-ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.panel-description { margin: 6px 0 18px; color: var(--app-muted); font-size: 13px; font-weight: 550; }
.filter-panel { margin-bottom: 16px; padding: 18px; }
.filter-grid { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; align-items: end; gap: 12px; }
.employee-filter-grid { grid-template-columns: minmax(240px, 2fr) minmax(160px, 1fr) auto; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .btn { min-width: 82px; }

.form-label, .filter-panel label, .surface-panel label {
    display: block;
    color: #3c4941;
    font-size: 13px;
    font-weight: 700;
}

.app-main input:not([type="checkbox"]):not([type="radio"]),
.app-main select,
.app-main textarea {
    width: 100%;
    min-height: 44px;
    margin-top: 7px;
    padding: 10px 13px;
    border: 1px solid #c7d3cb;
    border-radius: var(--app-radius-sm);
    background: #fff;
    color: var(--app-ink);
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.app-main textarea { min-height: 100px; resize: vertical; }
.app-main input[type="file"] { padding: 9px; }
.app-main input::placeholder, .app-main textarea::placeholder { color: #8b9690; }
.app-main input:focus, .app-main select:focus, .app-main textarea:focus {
    outline: none;
    border-color: var(--app-brand);
    box-shadow: var(--app-focus);
}
.app-main input[type="checkbox"], .app-main input[type="radio"] { accent-color: var(--app-brand); }
.app-main fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.app-main fieldset:disabled { opacity: .76; }
.app-main input:disabled, .app-main select:disabled, .app-main textarea:disabled { background: #f3f5f3; cursor: not-allowed; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--app-radius-sm);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--app-focus); }
.btn-primary {
    background: linear-gradient(180deg, #164834 0%, var(--app-brand-strong) 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgb(18 59 43 / 18%);
}
.btn-primary:hover { background: var(--app-brand-strong); transform: translateY(-1px); }
.btn-secondary { border-color: #c7d3cb; background: #fff; color: #33423a; }
.btn-secondary:hover { background: var(--app-brand-soft); border-color: #aebdb2; }
.btn-danger { border-color: #e6c6c3; background: #fff; color: var(--app-danger); }
.btn-danger:hover { background: var(--app-danger-soft); }
.btn-quiet { background: transparent; color: #526057; }
.btn-quiet:hover { background: #f1f4f1; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 12px; }

.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.app-main table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.app-main thead { background: linear-gradient(180deg, #f4f8f5, #eef4f0); }
.app-main th {
    padding: 13px 16px;
    border-bottom: 1px solid var(--app-border);
    color: #5d6c63;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.app-main td { padding: 15px 16px; border-bottom: 1px solid #edf0ed; color: #39473f; vertical-align: middle; }
.app-main tbody tr:last-child td { border-bottom: 0; }
.app-main tbody tr:hover { background: color-mix(in srgb, var(--app-brand-soft) 55%, white); }
.app-main th[scope="col"] { text-align: inherit; }
.table-cell-primary { color: var(--app-ink); font-weight: 750; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.table-pagination { padding: 12px 16px; border-top: 1px solid var(--app-border); background: #fafcfb; }
.table-pagination nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.table-pagination a, .table-pagination span { color: #58665d; font-size: 12px; font-weight: 650; }

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}
.status-active, .status-approved { border-color: #d3e8da; background: var(--app-success-soft); color: #276247; }
.status-inactive, .status-draft { border-color: #e3e7e3; background: #f3f5f3; color: #59665e; }
.status-submitted { border-color: #eee1bd; background: var(--app-warning-soft); color: #795a20; }
.status-rejected { border-color: #eccdca; background: var(--app-danger-soft); color: #9c3934; }

.flash-message {
    margin-bottom: 16px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 550;
    box-shadow: 0 8px 18px rgb(15 42 29 / 4%);
}
.flash-success { border-color: #cde3d5; background: var(--app-success-soft); color: #245d43; }
.flash-error { border-color: #edcfcc; background: var(--app-danger-soft); color: #8d3935; }
.flash-warning { border-color: #ead9ae; background: var(--app-warning-soft); color: #73571d; }
.flash-title { margin: 0 0 4px; font-weight: 800; }
.flash-message ul { margin: 0; padding-left: 19px; }

.empty-state { padding: 44px 24px !important; color: var(--app-muted) !important; text-align: center; }
.empty-state strong { display: block; margin-bottom: 4px; color: #344239; font-size: 15px; font-weight: 800; }
.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;
}
.section-stack { display: grid; gap: 16px; }
.panel-padding { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-hint { display: block; margin-top: 5px; color: var(--app-muted); font-size: 12px; font-weight: 500; }
.form-required { color: #a63d38; }
.profile-choice {
    display: flex !important;
    align-items: center;
    gap: 14px !important;
    min-height: 92px;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.profile-choice:hover { border-color: color-mix(in srgb, var(--app-brand) 35%, var(--app-border)); }
.profile-choice:has(input:checked) {
    border-color: var(--app-brand);
    background: var(--app-brand-soft);
    box-shadow: inset 3px 0 0 var(--app-gold);
}
.profile-choice img { width: 128px; height: 54px; object-fit: contain; }
.profile-choice-copy { color: var(--app-muted); font-size: 12px; font-weight: 550; }
.profile-choice-copy strong { display: block; margin-bottom: 2px; color: var(--app-ink); font-size: 13px; font-weight: 800; }
.brand-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-photo {
    display: block;
    width: 96px;
    height: 96px;
    margin-top: 8px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    object-fit: cover;
    object-position: center top;
}
.photo-cropper { display: grid; gap: 8px; }
.photo-cropper label { margin: 0; }
body.photo-cropper-open { overflow: hidden; }
.photo-cropper-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgb(15 42 29 / 52%);
}
.photo-cropper-modal[hidden] { display: none !important; }
.photo-cropper-dialog {
    width: min(100%, 560px);
    max-height: min(92vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgb(15 42 29 / 28%);
}
.photo-cropper-header h3 {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.05rem;
    font-weight: 800;
}
.photo-cropper-header p {
    margin: 4px 0 0;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 600;
}
.photo-cropper-stage {
    min-height: 280px;
    max-height: min(58vh, 460px);
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: #111;
}
.photo-cropper-stage img { display: block; max-width: 100%; }
.photo-cropper-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.private-panel {
    border-color: color-mix(in srgb, var(--app-gold) 45%, var(--app-border));
    background: linear-gradient(180deg, #fffcf6, #faf6ec);
}
.private-panel .panel-description { color: #766743; }
.private-panel .panel-heading { color: #5f4a1d; }
.review-change { background: #fbf5e8; }
.private-data-panel {
    border-color: color-mix(in srgb, var(--app-gold) 45%, var(--app-border));
    background: linear-gradient(180deg, #fffcf6, #faf6ec);
}
.data-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.data-list dt { color: var(--app-muted); font-size: 11px; font-weight: 700; }
.data-list dd { margin: 3px 0 0; color: var(--app-ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.review-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-action-card { padding: 20px; }
.review-action-card h2 { margin: 0; font-size: 16px; font-weight: 800; }
.review-action-card p { margin: 6px 0 14px; color: var(--app-muted); font-size: 13px; }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-list li { padding: 11px 0; border-bottom: 1px solid #edf0ed; font-size: 13px; }
.history-list li:last-child { border-bottom: 0; }
.history-date { color: var(--app-muted); font-size: 12px; font-weight: 600; }
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: color-mix(in srgb, var(--app-surface) 88%, var(--app-brand-soft));
    box-shadow: 0 10px 24px rgb(15 42 29 / 5%);
}
.form-actions.is-sticky {
    position: sticky;
    bottom: 14px;
    z-index: 5;
}
.form-actions-note { color: var(--app-muted); font-size: 12px; font-weight: 550; }
.profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.profile-public-link { color: var(--app-brand); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.profile-secondary { color: var(--app-muted); font-size: 13px; font-weight: 600; }
.account-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 16px; }
.account-details, .account-password { padding: 24px; }
.account-details dl { display: grid; gap: 0; margin: 18px 0 0; }
.account-details dl > div { display: grid; grid-template-columns: minmax(145px, .7fr) minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--app-border); }
.account-details dt { color: var(--app-muted); font-size: 12px; font-weight: 700; }
.account-details dd { margin: 0; color: var(--app-ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.submit-review-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--app-muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--app-brand); text-decoration: underline; }
.review-page-heading { margin-bottom: 22px; }
.change-indicator {
    display: inline-flex;
    margin-left: 7px;
    padding: 2px 7px;
    border-radius: 7px;
    background: #f0e5c7;
    color: #725820;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
}
.audit-details summary { color: var(--app-brand); font-size: 12px; font-weight: 700; cursor: pointer; }
.audit-details dl { display: grid; gap: 7px; min-width: 180px; margin: 9px 0 0; }
.audit-details dl > div { padding-top: 6px; border-top: 1px solid var(--app-border); }
.audit-details dt { color: var(--app-muted); font-size: 10px; font-weight: 750; }
.audit-details dd { margin: 2px 0 0; color: var(--app-ink); font-size: 12px; overflow-wrap: anywhere; }
.role-select { min-width: 130px; }

.auth-shell {
    width: min(100%, 1040px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    gap: 24px;
    align-items: stretch;
    padding-block: clamp(24px, 6vh, 56px);
    animation: auth-rise .55s ease both;
}
.auth-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 460px;
    padding: clamp(26px, 4vw, 40px);
    border-radius: 28px;
    background: linear-gradient(155deg, #174f38 0%, var(--app-brand) 42%, var(--app-brand-strong) 100%);
    color: #fff;
    box-shadow: var(--app-shadow);
}
.auth-hero::before {
    position: absolute;
    inset: auto -18% -40% auto;
    width: 300px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgb(194 154 63 / 26%);
    content: "";
}
.auth-hero::after {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 70%);
    content: "";
    pointer-events: none;
}
.auth-hero-glow {
    position: absolute;
    inset: -18% auto auto -10%;
    width: 220px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgb(255 255 255 / 10%);
    filter: blur(2px);
    z-index: 0;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.auth-hero-brand img {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 14px 32px rgb(0 0 0 / 24%);
}
.auth-hero-brand strong {
    display: block;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.auth-hero-brand span {
    display: block;
    margin-top: 4px;
    opacity: .88;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}
.auth-hero-kicker {
    margin: 0 0 10px !important;
    opacity: .78 !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.auth-hero-copy h2 {
    margin: 0 0 8px;
    max-width: 16ch;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}
.auth-hero-ar {
    margin: 0 0 14px !important;
    max-width: 22ch !important;
    opacity: .92 !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
}
.auth-hero p {
    margin: 0;
    max-width: 36ch;
    opacity: .88;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.65;
}
.auth-hero-foot {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid rgb(255 255 255 / 18%);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .03em;
    opacity: .82;
}

.auth-layout {
    width: min(100%, 480px);
    margin: 0;
    animation: auth-rise .55s ease .08s both;
}
.auth-shell .auth-layout { width: 100%; }
.auth-panel {
    padding: clamp(26px, 4vw, 36px);
    border-radius: 28px;
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(8px);
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.auth-brand img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgb(18 59 43 / 14%);
}
.auth-brand-copy { min-width: 0; }
.auth-brand-copy strong {
    display: block;
    color: var(--app-brand-strong);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.auth-brand-copy span {
    display: block;
    margin-top: 2px;
    color: var(--app-brand);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.4;
}
.auth-brand-copy em {
    display: block;
    margin-top: 4px;
    color: var(--app-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}
.auth-panel .page-title { font-size: 1.75rem; }
.auth-panel .page-title-ar { margin-bottom: 6px; }
.auth-panel .page-description { margin-bottom: 22px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .btn { width: 100%; margin-top: 2px; min-height: 46px; font-size: 14px; }
.auth-form .checkbox-row { display: flex; align-items: center; gap: 9px; font-weight: 500; line-height: 1.45; }
.auth-form .checkbox-row input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.auth-footer-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: var(--app-brand);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.auth-footer-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-kicker {
    margin: 0 0 6px;
    color: var(--app-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.entry-heading { align-items: flex-start; }
.entry-filters { margin-bottom: 18px; }
.import-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px;
}
.import-panel .panel-heading { margin: 0 0 4px; }
.import-panel .panel-description { margin: 0; }
.import-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
}
.import-form label { margin: 0; }
.import-form button { min-height: 42px; }
.import-summary {
    margin-bottom: 18px;
    padding: 16px 20px;
    color: var(--app-ink);
}
.import-summary ul { margin: 8px 0 0; padding-left: 20px; color: var(--app-danger); }
.entry-list { display: grid; gap: 12px; }
.entry-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, .9fr);
    gap: 18px;
    padding: 18px 20px;
    align-items: center;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.entry-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--app-brand) 28%, var(--app-border));
    box-shadow: 0 16px 36px rgb(15 42 29 / 8%);
}
.entry-card-main { display: grid; gap: 12px; min-width: 0; }
.entry-card-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.entry-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(160deg, var(--app-brand), var(--app-brand-strong));
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgb(18 59 43 / 16%);
}
.entry-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.entry-card-copy { min-width: 0; }
.entry-card-name {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.entry-card-email {
    margin: 3px 0 0;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.entry-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entry-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: #fff;
    color: var(--app-ink);
    font-size: 12px;
    font-weight: 700;
}
.entry-chip img {
    width: 28px;
    height: 20px;
    object-fit: contain;
}
.entry-chip-muted {
    color: var(--app-muted);
    background: #f7f9f7;
}
.entry-card-actions {
    display: grid;
    gap: 10px;
    justify-items: stretch;
    align-content: center;
    min-width: 0;
}
.entry-card-actions > .btn-primary,
.entry-card-actions > .btn-secondary { width: 100%; }
.entry-card-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}
.entry-waiting {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--app-warning-soft);
    color: var(--app-warning);
    font-size: 12px;
    font-weight: 750;
}
.entry-empty {
    padding: 48px 24px;
    text-align: center;
}
.entry-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--app-ink);
    font-size: 16px;
    font-weight: 800;
}
.entry-empty p {
    margin: 0 0 18px;
    color: var(--app-muted);
    font-size: 14px;
}
.entry-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 4px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 650;
}
.entry-pagination-summary { margin-right: auto; }
.entry-pagination-nav, .entry-pagination-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.entry-pagination .is-current {
    border-color: var(--app-brand);
    background: var(--app-brand);
    color: #fff;
    cursor: default;
}
.entry-pagination .is-disabled {
    background: #f3f5f3;
    color: var(--app-muted);
    cursor: not-allowed;
}
.entry-you {
    display: inline-flex;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--app-gold-soft);
    color: #6f5520;
    font-size: 11px;
    font-weight: 750;
    vertical-align: middle;
}
.user-role-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.user-role-form .role-select {
    min-height: 34px;
    margin: 0;
    min-width: 160px;
}
.user-card .entry-card-actions { gap: 12px; }
.audit-avatar {
    background: linear-gradient(160deg, #2f5f4a, var(--app-brand-strong));
}
.audit-details-card {
    width: 100%;
}
.audit-details-card > summary {
    list-style: none;
    display: inline-flex;
    width: auto;
    cursor: pointer;
}
.audit-details-card > summary::-webkit-details-marker { display: none; }
.audit-details-card[open] > summary { margin-bottom: 10px; }
.audit-details-card dl {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #f7f9f7;
}
.audit-card { align-items: start; }

.card-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.card-preview-company { min-width: 0; padding: 16px; }
.card-preview-brand-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-preview-brand-header h2 { margin: 0; color: var(--app-ink); font-size: 14px; font-weight: 800; }
.card-preview-brand-header p { margin: 3px 0 0; color: var(--app-muted); font-size: 11px; font-weight: 600; }
.card-preview-status { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 8px; font-size: 10px; font-weight: 750; }
.card-preview-status.is-selected { background: var(--app-success-soft); color: var(--app-success); }
.card-preview-status.is-preview-only { background: #f3f5f3; color: var(--app-muted); }
.card-preview-faces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card-preview-face { min-width: 0; margin: 0; }
.card-preview-image-frame { padding: 6px; border: 1px solid var(--app-border); border-radius: 12px; background: #f7f9f7; }
.card-preview-image-frame img { display: block; width: 100%; height: auto; border-radius: 6px; }
.card-preview-face figcaption { margin-top: 6px; color: var(--app-muted); font-size: 11px; font-weight: 650; text-align: center; }
.review-photo-preview { display: block; width: 76px; height: 76px; border: 1px solid var(--app-border); border-radius: 12px; object-fit: cover; object-position: center top; }

@media (max-width: 1000px) {
    .app-header-inner { gap: 16px; }
    .app-nav { gap: 0; }
    .app-nav-link { padding-inline: 8px; font-size: 12px; }
    .role-badge { display: none; }
    .auth-shell { grid-template-columns: 1fr; width: min(100%, 520px); }
    .auth-hero { min-height: auto; }
}

@media (max-width: 1040px) {
    .app-header-inner { width: min(100% - 32px, 1320px); min-height: 66px; }
    .app-nav-desktop, .app-account { display: none; }
    .mobile-nav { display: block; margin-left: auto; }
    .mobile-nav summary {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 8px 12px;
        border: 1px solid var(--app-border);
        border-radius: 10px;
        background: #fff;
        color: var(--app-ink);
        font-size: 13px;
        font-weight: 700;
    }
    .app-main { width: min(100% - 32px, 1320px); padding-top: 26px; }
    body.app-body.is-guest .app-main { width: min(100% - 24px, 1120px); }
    .filter-grid, .employee-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid > :first-child,
    .employee-filter-grid > :first-child { grid-column: 1 / -1; }
    .filter-actions { justify-content: flex-start; }
}

@media (max-width: 900px) {
    .entry-card {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 14px;
    }
    .entry-card-actions { width: 100%; }
}

@media (max-width: 600px) {
    .app-main { width: min(100% - 28px, 1320px); padding: 22px 0 42px; }
    .app-header-inner { width: min(100% - 28px, 1320px); }
    .app-brand-copy { display: block; }
    .app-brand-caption { margin-top: 2px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
    .page-heading h1, .page-title { font-size: 25px; }
    .filter-panel, .panel-padding { padding: 16px; }
    .filter-grid, .employee-filter-grid, .form-grid, .review-actions, .data-list { grid-template-columns: minmax(0, 1fr); }
    .filter-grid > :first-child,
    .employee-filter-grid > :first-child,
    .form-grid .span-all { grid-column: auto; }
    .profile-choice img { width: 94px; height: 44px; }
    .brand-choice-grid { grid-template-columns: minmax(0, 1fr); }
    .card-preview-grid { grid-template-columns: minmax(0, 1fr); }
    .card-preview-company { padding: 15px; }
    .card-preview-faces { gap: 8px; }
    .card-preview-image-frame { padding: 4px; }
    .app-main table { min-width: 680px; }
    .app-main .queue-table { min-width: 560px; }
    .app-main .review-compare-table { min-width: 720px; }
    .auth-shell { padding-block: 18px; gap: 14px; }
    .auth-hero { padding: 20px; border-radius: 18px; }
    .auth-panel { padding: 22px; border-radius: 18px; }
    .profile-meta { gap: 7px; }
    .account-grid { grid-template-columns: 1fr; }
    .account-details, .account-password { padding: 18px; }
    .account-details dl > div { grid-template-columns: minmax(125px, .8fr) minmax(0, 1fr); gap: 10px; }
    .form-actions.is-sticky { bottom: 8px; }
    .entry-card { padding: 16px; }
    .entry-avatar { width: 42px; height: 42px; border-radius: 12px; }
    .entry-pagination { flex-direction: column; align-items: flex-start; }
    .import-form { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
    .auth-shell, .auth-layout { animation: none; }
    .entry-card:hover { transform: none; }
}

/* ------------------------------------------------------------------ */
/* Components added after the main stylesheet (employee types,        */
/* documents, directory filters, profile overview). Styled to match   */
/* the brand theme above.                                             */
/* ------------------------------------------------------------------ */

.skip-link {
    position: fixed;
    top: -120px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--app-brand-strong);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

.workspace-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    width: min(1120px, calc(100% - 48px));
    margin: auto;
    padding-block: 14px 20px;
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 600;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid color-mix(in srgb, var(--app-brand) 30%, white);
    border-radius: 8px;
    background: var(--app-brand-soft);
    color: var(--app-brand-strong);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.employee-actions-menu { flex: 0 0 100%; }
.employee-actions-menu summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.employee-actions-menu summary::-webkit-details-marker { display: none; }
.employee-actions-menu summary::after { content: " +"; margin-inline-start: 8px; }
.employee-actions-menu[open] summary::after { content: " −"; }
.employee-actions-menu .entry-card-secondary {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: #f7f9f7;
}
.employee-actions-menu .entry-card-secondary form { margin: 0; }

.import-panel summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: 750;
    color: var(--app-ink);
}
.import-panel[open] summary { margin-bottom: 12px; }
.import-instructions { margin: 0 0 14px; padding-inline-start: 22px; color: var(--app-muted); font-size: 13px; }
.import-instructions li { padding-block: 4px; }

.field-error { margin: 8px 0 0; color: var(--app-danger); font-size: 13px; font-weight: 650; }

/* Employee profile overview (entry/show) */
.profile-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.profile-identity-panel { text-align: center; }
.profile-identity-panel h2 { margin: 12px 0 4px; font-size: 20px; }
.profile-identity-panel .profile-meta { justify-content: center; }
.profile-identity-panel > p { color: var(--app-muted); font-size: 13px; }
.profile-portrait {
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
    margin-inline: auto;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 18px;
    background: var(--app-brand);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--app-gold) 60%, white);
    color: #fff;
    font-size: 34px;
    font-weight: 800;
}
.profile-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.identity-details { margin: 14px 0 0; }
.profile-detail-list { margin-top: 0; }
.readiness-list { margin: 8px 0 0; padding-inline-start: 20px; color: var(--app-muted); font-size: 13px; }
.readiness-list li { padding-block: 4px; }

/* Employee type + number fields on the profile form */
.classification-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-block: 16px; }
.classification-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #fff;
    cursor: pointer;
}
.classification-choice:has(input:checked) {
    border-color: var(--app-brand);
    background: var(--app-brand-soft);
}
.classification-choice input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--app-brand); }
.classification-choice strong, .classification-choice small { display: block; }
.classification-choice strong { font-size: 15px; }
.classification-choice small { margin-top: 4px; color: var(--app-muted); font-size: 12px; font-weight: 500; }
.employee-number-label { max-width: 560px; }

/* Private employee documents */
.document-summary .document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.document-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #fbfdfb;
}
.document-item h3 { margin: 0 0 8px; font-size: 14px; font-weight: 750; }
.document-symbol {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--app-brand-soft);
    color: var(--app-brand-strong);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}
.document-filename { margin: 6px 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.document-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.document-actions form { margin: 0; }

.document-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 14px;
    border: 2px solid var(--app-brand);
    border-radius: 12px;
    background: #fff;
    color: var(--app-brand-strong);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.app-main .document-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.switch-track {
    display: block;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid #9aa79e;
    border-radius: 20px;
    background: #9aa79e;
    pointer-events: none;
    transition: background .15s ease;
}
.switch-track::after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}
.document-switch input:checked + .switch-track { border-color: var(--app-brand); background: var(--app-brand); }
.document-switch input:checked + .switch-track::after { transform: translateX(20px); }
.document-switch input:focus-visible + .switch-track { outline: 3px solid var(--app-focus); outline-offset: 2px; }

@media (max-width: 900px) {
    .profile-overview { grid-template-columns: 1fr; }
    .classification-grid { grid-template-columns: 1fr; }
    .workspace-footer { width: calc(100% - 32px); }
}
@media (max-width: 640px) {
    .workspace-footer { width: calc(100% - 28px); font-size: 11px; }
    .document-summary .document-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* UI/UX refresh — modernized buttons, navigation, cards and forms.   */
/* ------------------------------------------------------------------ */

::selection { background: color-mix(in srgb, var(--app-brand) 18%, white); }

/* Header + navigation: softer bar, pill links */
.app-header {
    background: color-mix(in srgb, var(--app-surface) 88%, transparent);
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 1px 0 rgb(255 255 255 / 60%) inset, 0 8px 24px rgb(12 40 28 / 4%);
}
.app-header-inner { min-height: 68px; }
.app-brand-mark { border-radius: 12px; box-shadow: 0 6px 14px rgb(15 81 56 / 14%); }
.app-nav { gap: 6px; }
.app-nav-link {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--app-muted);
}
.app-nav-link:hover { background: var(--app-brand-soft); color: var(--app-brand-strong); }
.app-nav-link.is-active {
    background: var(--app-brand);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 18px rgb(15 81 56 / 22%);
}
.app-signout { color: var(--app-muted); }
.role-badge { border-radius: 999px; }

/* Page headings */
.page-heading { padding-bottom: 16px; }
.page-heading h1, .page-title { font-weight: 750; letter-spacing: -.025em; }
.page-kicker { color: var(--app-brand); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: 11px; }
.panel-heading { font-weight: 750; letter-spacing: -.01em; }

/* Panels: cleaner surface, softer lift */
.surface-panel {
    border-color: var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: 0 1px 2px rgb(12 40 28 / 4%), 0 10px 28px rgb(12 40 28 / 5%);
}
.panel-padding { padding: 26px; }

/* Buttons: consistent shape, clearer states */
.btn {
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
}
.btn-primary {
    background: linear-gradient(180deg, #136045 0%, var(--app-brand-strong) 100%);
    border-color: transparent;
    box-shadow: 0 8px 18px rgb(15 81 56 / 20%), inset 0 1px 0 rgb(255 255 255 / 14%);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #0f543c 0%, #082f20 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgb(15 81 56 / 26%), inset 0 1px 0 rgb(255 255 255 / 14%);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    border-color: var(--app-border);
    background: #fff;
    color: var(--app-ink);
    box-shadow: 0 1px 2px rgb(12 40 28 / 5%);
}
.btn-secondary:hover { background: var(--app-brand-soft); border-color: color-mix(in srgb, var(--app-brand) 30%, var(--app-border)); color: var(--app-brand-strong); }
.btn-danger { border-color: color-mix(in srgb, var(--app-danger) 30%, white); }
.btn-quiet { border-radius: 10px; }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn:disabled, .btn.is-disabled { box-shadow: none; }

/* Form controls: softer borders, clearer focus */
.app-main input:not([type="checkbox"]):not([type="radio"]),
.app-main select,
.app-main textarea {
    min-height: 44px;
    border: 1px solid #ccd8d1;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.app-main input:hover, .app-main select:hover, .app-main textarea:hover { border-color: #b9c9bf; }
.app-main input:focus, .app-main select:focus, .app-main textarea:focus {
    border-color: var(--app-brand);
    box-shadow: var(--app-focus);
    background: #fff;
}
.app-main input[readonly] { background: #f6f8f7; }
.form-hint { font-size: 12px; }

/* Badges and chips: pill shape */
.status-badge, .entry-chip, .type-badge, .entry-waiting, .entry-you, .card-preview-status {
    border-radius: 999px;
    font-weight: 700;
}
.entry-chip { background: #fff; }
.type-badge { border-color: color-mix(in srgb, var(--app-brand) 30%, white); }

/* Employee cards: subtle lift on hover */
.entry-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.entry-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--app-brand) 28%, var(--app-border));
    box-shadow: var(--app-shadow);
}
.entry-avatar { border-radius: 12px; }
.entry-card-actions .btn { border-radius: 10px; }

/* Data lists and history: airier rows */
.data-list > div, .account-details dl > div { padding-block: 14px; }
.history-list li { padding: 12px 0; }

/* Tables: cleaner header */
.app-main thead { background: var(--app-brand-soft); }
.app-main th { letter-spacing: .04em; }
.app-main tbody tr { transition: background .12s ease; }

/* Flash messages + sticky actions */
.flash-message { border-radius: 12px; }
.form-actions.is-sticky { box-shadow: var(--app-shadow); }

/* Auth pages: softer hero */
.auth-hero {
    border-radius: 24px;
    background: linear-gradient(155deg, #136045 0%, var(--app-brand) 45%, var(--app-brand-strong) 100%);
}
.auth-panel { border-radius: var(--app-radius); }

@media (prefers-reduced-motion: reduce) {
    .entry-card, .btn { transition: none !important; }
}

@media (max-width: 640px) {
    .panel-padding { padding: 18px; }
    .app-header-inner { min-height: 60px; }
}

/* ------------------------------------------------------------------ */
/* Directory cards — employees & HR queue render as a card grid.      */
/* ------------------------------------------------------------------ */

.entry-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.entry-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: var(--app-radius);
}

.entry-card-main { gap: 12px; }

.entry-card-identity {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--app-border);
}

.entry-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.entry-card .entry-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--app-border);
}

.entry-card .entry-card-actions > .btn,
.entry-card .entry-card-actions > .employee-actions-menu > summary {
    width: 100%;
}

.entry-card .employee-actions-menu { flex: none; }
.entry-card .employee-actions-menu .entry-card-secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    margin-top: 8px;
}
.entry-card .employee-actions-menu .entry-card-secondary .btn { width: 100%; }
.entry-card .entry-waiting { justify-content: center; }

@media (max-width: 640px) {
    .entry-list { grid-template-columns: 1fr; }
}
