:root {
    --navy: #173A63;
    --navy-deep: #15385F;
    --navy-text: #123760;
    --nav-button-bg: #EEF4FB;
    --nav-button-border: #7D9FC7;
    --background: #F4F7FB;
    --surface: #FFFFFF;
    --text: #183A61;
    --body-text: #30465F;
    --muted: #71849B;
    --border: #D9E4EF;
    --field-border: #9DB9D9;
    --primary: #245F97;
    --success: #198754;
    --warning: #D99A16;
    --danger: #C94C4C;
    --radius: 11px;
    --font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 13px; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--body-text);
    font-family: var(--font-family);
    line-height: 1.55;
}
button, input, select { font: inherit; }
a { color: inherit; }

/* ===== AUDITNA approved header baseline ===== */
.app-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: var(--navy-deep);
    color: #fff;
    box-shadow: 0 2px 7px rgba(20,52,87,.16);
}
.app-header__brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 2px solid #8FA9C5;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
}
.brand-name {
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -.2px;
}
.app-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-tool {
    height: 42px;
    min-width: 42px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #7E9ABB;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.header-language { min-width: 62px; font-size: 12.5px; }

/* ===== Large pale navigation buttons ===== */
.main-nav {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    background: #F5F8FC;
    border-bottom: 1px solid #D8E2EE;
    overflow-x: auto;
    white-space: nowrap;
}
.main-nav__item {
    height: 44px;
    flex: 1 0 180px;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    color: var(--navy-text);
    background: var(--nav-button-bg);
    border: 2px solid var(--nav-button-border);
    border-radius: 10px;
    box-shadow: 0 2px 0 #B4C6DB;
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1;
}
.main-nav__item.active { background: #F3F7FC; }
.main-nav__item.disabled { cursor: default; }
.nav-icon {
    display: inline-grid;
    place-items: center;
    min-width: 17px;
    font-size: 17px;
    font-weight: 500;
}

.page-shell {
    width: 100%;
    margin: 0 auto;
    padding: 0 14px 30px;
    box-sizing: border-box;
}
.page-header {
    width: min(1540px, calc(100% - 36px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 4px 10px;
}
.page-header h1 {
    margin: 0;
    color: var(--navy-text);
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}
.page-header p {
    margin: 4px 0 0;
    color: #667E99;
    font-size: 12.5px;
    font-weight: 400;
}

/* Existing preview components keep the approved Auditna palette */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: min(1540px, calc(100% - 36px));
    margin: 0 auto;
    padding: 16px;
    background: #245F97;
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(38,74,111,.12);
}
.summary-card {
    min-height: 82px;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.78);
    border-radius: 10px;
    padding: 9px 14px;
    color: #fff;
}
.summary-card__label { display:block; color:#EDF6FF; font-size:12px; font-weight:700; margin-bottom:5px; }
.summary-card__value { color:#fff; font-size:15px; font-weight:800; }

.panel {
    width: min(1540px, calc(100% - 36px));
    margin: 22px auto 0;
    background: #fff;
    border: 2px solid #2D679E;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(28,76,119,.08);
}
.panel__header {
    min-height: 58px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:11px 18px;
}
.panel__header h2 { margin:0; color:var(--navy-text); font-size:17px; font-weight:800; }
.panel__header p { margin:4px 0 0; color:var(--muted); font-size:12px; }

.btn {
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: 700;
}
.btn:disabled { opacity:.55; cursor:not-allowed; }
.btn-primary { background:#245F97; border-color:#173F69; color:#fff; box-shadow:0 2px 5px rgba(28,70,111,.16); }
.btn-secondary { background:#fff; border-color:#94B4D5; color:var(--navy-text); }
.btn-success { background:var(--success); border-color:var(--success); color:#fff; }
.btn-warning { background:#F0A61A; border-color:#D18A08; color:#fff; }
.btn-danger { background:var(--danger); border-color:var(--danger); color:#fff; }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; padding:12px 22px 20px; }
.field { min-width:0; }
.field label,.filter-field label { display:block; margin-bottom:5px; font-size:12px; font-weight:800; color:#455B72; }
.field input,.field select,.filter-field select,.search-box input {
    width:100%; height:38px; border:2px solid var(--field-border); border-radius:9px; background:#fff; color:var(--body-text); padding:7px 11px; outline:none;
}
.field input:focus,.field select:focus,.filter-field select:focus,.search-box input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(36,95,151,.10); }
.form-actions { display:flex; gap:9px; padding-top:5px; }
.span-2 { grid-column:span 2; }

.filter-bar { display:flex; align-items:end; gap:9px; margin:0 20px 14px; padding:12px; border:1px solid #C8D9E9; border-radius:10px; background:#F7FAFD; }
.search-box { flex:1 1 320px; }
.filter-field { min-width:160px; }
.table-wrap { width:calc(100% - 40px); margin:0 20px 20px; overflow-x:auto; border:1px solid #A9C4DE; border-radius:9px; }
.data-table { width:100%; border-collapse:collapse; min-width:760px; }
.data-table th,.data-table td { border:1px solid #C9D8E7; padding:7px 9px; text-align:right; vertical-align:middle; }
.data-table thead th { background:#245F97; color:#fff; font-weight:800; font-size:12px; }
.data-table tbody td { font-size:12px; background:#fff; }
.data-table tbody tr:hover td { background:#F2F7FC; }
.actions-col { text-align:center !important; width:130px; }

.badge { display:inline-flex; align-items:center; min-height:25px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; }
.badge-success { background:rgba(25,135,84,.11); color:var(--success); }
.badge-primary { background:rgba(36,95,151,.11); color:var(--primary); }
.badge-warning { background:rgba(217,154,22,.14); color:#9B6900; }
.badge-danger { background:rgba(201,76,76,.10); color:var(--danger); }
.badge-muted { background:#EEF3F7; color:var(--muted); }
.badge-row { display:flex; flex-wrap:wrap; gap:8px; padding:5px 22px 20px; }
.prototype-switch { width:min(1540px,calc(100% - 36px)); margin:18px auto 0; display:flex; gap:8px; justify-content:center; color:var(--muted); font-size:12px; }
.text-link { color:var(--primary); 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; }

/* Approved dark appearance from header control */
body.dark-ui { background:#17283C; color:#E9F0F8; }
body.dark-ui .main-nav { background:#20344B; border-bottom-color:#36506D; }
body.dark-ui .main-nav__item { background:#29435F; color:#F4F8FC; border-color:#6D8BAA; box-shadow:0 3px 0 #172A3E; }
body.dark-ui .page-header h1, body.dark-ui .page-header p { color:#F4F8FC; }
body.dark-ui .panel { background:#20344B; border-color:#5A7C9F; }
body.dark-ui .panel__header h2, body.dark-ui .panel__header p { color:#F2F7FC; }
body.dark-ui .data-table tbody td { background:#20344B; color:#F2F7FC; }
body.dark-ui .field input, body.dark-ui .field select, body.dark-ui .filter-field select, body.dark-ui .search-box input { background:#172B40; color:#F2F7FC; }
body.dark-ui .filter-bar { background:#223A54; border-color:#4F6D8C; }

html[dir="ltr"] .data-table th, html[dir="ltr"] .data-table td { text-align:left; }
html[dir="ltr"] .actions-col { text-align:center !important; }

@media (max-width: 900px) {
    .app-header { height:64px; }
    .brand-mark { width:42px; height:42px; flex-basis:42px; border-radius:11px; }
    .brand-name { font-size:19px; }
    .header-tool { height:40px; min-width:40px; }
    .main-nav { min-height:60px; padding:8px 10px; }
    .main-nav__item { height:55px; flex-basis:185px; min-width:185px; font-size:15px; }
    .summary-grid { grid-template-columns:1fr; }
    .form-grid { grid-template-columns:1fr; }
    .span-2 { grid-column:span 1; }
    .filter-bar { align-items:stretch; flex-wrap:wrap; }
    .search-box { flex-basis:100%; }
    .filter-field { flex:1 1 180px; }
}

@media (max-width: 600px) {
    html { font-size:12px; }
    .app-header { padding:0 10px; }
    .brand-name { font-size:17px; }
    .header-language { min-width:62px; }
    .main-nav { padding:8px; }
    .main-nav__item { min-width:150px; flex-basis:150px; font-size:13.5px; padding:0 12px; }
    .page-header { width:calc(100% - 20px); }
    .page-header h1 { font-size:17px; }
    .page-header p { font-size:12px; }
    .panel { width:calc(100% - 20px); margin-top:14px; }
    .table-wrap { width:calc(100% - 24px); margin:0 12px 12px; }
    .filter-bar { margin:0 12px 12px; }
}

/* Secure foundation utilities — no change to the approved V5-CALM visual identity. */
.header-form { margin: 0; }
.header-logout { min-width: 58px; font-size: 12px; }
.summary-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.table-wrap--top { margin-top: 20px; }
.empty-cell { text-align: center !important; color: var(--muted); padding: 22px !important; }
.actions-inline { display: flex; justify-content: center; gap: 6px; white-space: nowrap; }
.btn-small { min-height: 30px; padding: 4px 9px; font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.panel-footer-actions { display: flex; gap: 8px; padding: 0 20px 18px; }
.validation-summary, .field-error { color: var(--danger); font-size: 11.5px; }
.validation-summary:empty, .field-error:empty { display: none; }
.validation-summary ul { margin: 0; padding-inline-start: 18px; }
.flash { width: min(1540px, calc(100% - 36px)); margin: 14px auto 0; padding: 9px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.flash-success { background: rgba(25,135,84,.09); border: 1px solid rgba(25,135,84,.25); color: #12633f; }
.auth-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(430px, 100%); background: var(--surface); border: 2px solid #2D679E; border-radius: 11px; padding: 22px; box-shadow: 0 8px 22px rgba(28,76,119,.10); }
.auth-card__title { color: var(--navy-text); font-size: 18px; font-weight: 800; }
.auth-card__subtitle { color: var(--muted); font-size: 12px; margin: 3px 0 18px; }
.auth-gap { margin-top: 13px; }
.auth-submit { width: 100%; margin-top: 18px; }
.compact-message p { margin-bottom: 0; color: var(--muted); }
body.dark-ui .auth-card { background:#20344B; border-color:#5A7C9F; }
body.dark-ui .auth-card__title, body.dark-ui .compact-message p { color:#F2F7FC; }
@media (max-width: 900px) { .summary-grid--two { grid-template-columns: 1fr; } }

/* ================================================================
   AUDITNA LOGIN — visual match to the approved legacy login screen.
   Visual-only adaptation. Authentication/security logic is unchanged.
   ================================================================ */
.auditna-login-body {
    margin: 0;
    min-height: 100vh;
    direction: rtl;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-weight: 600;
    background:
        radial-gradient(circle at top right, rgba(49,95,155,.12), transparent 32%),
        radial-gradient(circle at bottom left, rgba(23,63,111,.10), transparent 34%),
        linear-gradient(135deg, #f4f7fb 0%, #edf3f9 50%, #f8fafc 100%);
}
.auditna-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
}
.auditna-login-container {
    width: 100%;
    max-width: 430px;
}
.auditna-login-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #aebfd1;
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(15,23,42,.12), 0 3px 8px rgba(15,23,42,.05);
}
.auditna-login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #173f6f, #315f9b, #173f6f);
}
.auditna-login-header {
    padding: 23px 32px 14px;
    text-align: center;
}
.auditna-login-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #315f9b, #173f6f);
    border: 1px solid #12345b;
    box-shadow: 0 6px 15px rgba(23,63,111,.20);
    font-size: 24px;
    font-weight: 800;
}
.auditna-login-system {
    margin-bottom: 2px;
    color: #315f9b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
}
.auditna-login-header h1 {
    margin: 0;
    color: #172b45;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 800;
}
.auditna-login-content {
    padding: 4px 32px 27px;
}
.auditna-login-field {
    margin-bottom: 12px;
}
.auditna-login-field > label {
    display: block;
    margin-bottom: 5px;
    color: #263b54;
    font-size: 12px;
    font-weight: 700;
}
.auditna-login-input-wrap {
    position: relative;
}
.auditna-login-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #526b86;
    font-size: 14px;
    pointer-events: none;
}
.auditna-login-input {
    width: 100%;
    min-height: 44px;
    padding: 8px 41px 8px 12px;
    color: #1f3045;
    background: #fff;
    border: 1px solid #aebfd1;
    border-radius: 10px;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.auditna-login-input:hover { border-color: #7f9dbd; }
.auditna-login-input:focus {
    border-color: #315f9b;
    box-shadow: 0 0 0 .18rem rgba(49,95,155,.11);
}
.auditna-login-input::placeholder { color: #8998aa; font-weight: 500; }
.auditna-login-input-wrap--password .auditna-login-input { padding-left: 42px; }
.auditna-password-toggle {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #526b86;
    font-size: 13px;
    cursor: pointer;
}
.auditna-password-toggle:hover,
.auditna-password-toggle:focus { color: #315f9b; outline: none; background: #f0f5fa; }
.auditna-login-submit {
    width: 100%;
    min-height: 45px;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #0f3159;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #315f9b, #173f6f);
    box-shadow: 0 6px 14px rgba(23,63,111,.18);
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.auditna-login-submit:hover {
    background: linear-gradient(135deg, #29578f, #12345b);
    box-shadow: 0 8px 18px rgba(23,63,111,.23);
    transform: translateY(-1px);
}
.auditna-login-submit:active { transform: translateY(0); }
.auditna-login-validation:empty,
.auditna-login-field-error:empty { display: none; }
.auditna-login-validation {
    margin-bottom: 13px;
    padding: 8px 11px;
    border: 1px solid #e4a8ac;
    border-radius: 9px;
    background: #fff3f4;
    color: #9f2430;
    font-size: 11px;
    font-weight: 700;
}
.auditna-login-validation ul { margin: 0; padding-inline-start: 18px; }
.auditna-login-field-error {
    display: block;
    margin-top: 4px;
    color: #b42318;
    font-size: 10.5px;
    font-weight: 700;
}
.auditna-login-language {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 10;
    min-width: 45px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #9bb0c7;
    border-radius: 8px;
    background: rgba(255,255,255,.88);
    color: #173f6f;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.auditna-login-language:hover { background: #fff; border-color: #6f8fae; }
html[dir="ltr"] .auditna-login-body { direction: ltr; }
html[dir="ltr"] .auditna-login-input { padding: 8px 12px 8px 41px; }
html[dir="ltr"] .auditna-login-input-icon { right: auto; left: 14px; }
html[dir="ltr"] .auditna-login-input-wrap--password .auditna-login-input { padding-right: 42px; }
html[dir="ltr"] .auditna-password-toggle { left: auto; right: 9px; }
html[dir="ltr"] .auditna-login-language { left: auto; right: 16px; }
@media (max-width: 575.98px) {
    .auditna-login-page { padding: 12px; }
    .auditna-login-header { padding: 20px 22px 12px; }
    .auditna-login-content { padding: 3px 22px 22px; }
    .auditna-login-icon { width: 51px; height: 51px; font-size: 22px; }
    .auditna-login-header h1 { font-size: 19px; }
    .auditna-login-language { top: 10px; left: 10px; }
    html[dir="ltr"] .auditna-login-language { left: auto; right: 10px; }
}

/* V1.3 - read-only workspace values use the same quiet field language as inputs. */
.info-value {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid var(--border, #d8e1ed);
    border-radius: 8px;
    background: #fff;
    color: var(--text, #1f2937);
    font-size: 13px;
}

/* Employee screen: uses the approved V5-CALM system without altering the global visual baseline. */
.employees-actions-col { width: 230px; }
.employee-form-panel { margin-top: 6px; }
.employee-form-header { background: #EEF4FB; border-bottom: 1px solid #2D679E; }
.employee-form-header h2 { display: inline-flex; align-items: center; gap: 8px; }
.section-icon { width: 31px; height: 31px; display: inline-grid; place-items: center; border-radius: 8px; background: #245F97; color: #fff; border: 1px solid #173F69; font-size: 14px; }
.employee-form-body { padding-top: 8px; }
.employee-form-body > .validation-summary { margin: 0 22px 4px; }
.employee-form-grid { padding-top: 12px; }
.employee-actions-panel { margin-top: 18px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.employee-form-actions { display: flex; align-items: center; gap: 8px; }
.employee-form-note { color: #667E99; font-size: 11.5px; font-weight: 600; }
.flash-error { background: rgba(201,76,76,.09); border: 1px solid rgba(201,76,76,.25); color: #9b3434; }
.actions-inline form { margin: 0; display: inline-flex; }

@media (max-width: 700px) {
    .employee-actions-panel { align-items: stretch; flex-direction: column; }
    .employee-form-actions { width: 100%; }
    .employee-form-actions .btn { flex: 1; }
}

.summary-grid--spaced { margin-top: 8px; }


/* V1.2 approved management actions + global back-button placement. */
.auditna-action-strip {
    width: 330px;
    min-width: 330px;
    justify-content: center;
    gap: 8px;
}
.action-icon-btn {
    width: 48px;
    min-width: 48px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #173F69;
    border-radius: 9px;
    background: #245F97;
    color: #fff;
    box-shadow: 0 2px 5px rgba(28,70,111,.18);
    cursor: pointer;
    text-decoration: none;
}
.action-icon-btn:hover { background: #1F5589; }
.action-icon-btn svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.action-icon-btn--danger {
    background: #C94C4C;
    border-color: #A93636;
}
.action-icon-btn--danger:hover { background: #B64040; }
.account-status-pill {
    min-width: 82px;
    min-height: 32px;
    justify-content: center;
    background: #EAF4FD;
    color: #174F82;
    border: 0;
    font-size: 12px;
    box-shadow: none;
}

/* Back stays at the physical far-left in both RTL/LTR and is intentionally wider. */
.back-button {
    min-width: 150px;
    padding-inline: 24px;
    margin-right: auto;
    margin-left: 0;
}
.page-header > .back-button { align-self: flex-start; }
.panel-footer-actions .back-button {
    margin-right: auto;
    margin-left: 0;
}

@media (max-width: 700px) {
    .auditna-action-strip { width: 290px; min-width: 290px; gap: 6px; }
    .action-icon-btn { width: 42px; min-width: 42px; height: 38px; min-height: 38px; }
    .back-button { min-width: 125px; }
}


/* ==================================================================
   AUDITNA GLOBAL UI STANDARD V1.4
   Approved global rules: quiet unified top bar, bold data/forms,
   compact actions, one back-button position, and custom confirmations.
   ================================================================== */

/* One unified dark header across the whole application. */
.app-header--unified {
    min-height: 66px;
    height: auto;
    padding: 7px 12px;
    display: grid;
    grid-template-columns: minmax(245px, auto) minmax(320px, 1fr) minmax(315px, auto);
    align-items: center;
    gap: 14px;
    background: #15385F;
}
.app-header__brand--stacked { justify-self: start; flex-direction: row; }
.brand-copy { min-width: 0; line-height: 1.2; }
.brand-name--en { font-size: 15px; font-weight: 800; color: #fff; direction: ltr; text-align: right; }
.brand-subtitle { margin-top: 3px; color: #C9D9EA; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.app-header--unified .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; font-size: 15px; }

.main-nav--header {
    min-height: 0;
    height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    overflow-x: auto;
    justify-content: center;
    gap: 3px;
}
.main-nav--header .main-nav__item {
    min-width: 0;
    flex: 0 0 auto;
    height: 38px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    box-shadow: none;
    background: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.main-nav--header .main-nav__item:hover,
.main-nav--header .main-nav__item.active { background: rgba(255,255,255,.08); }
.main-nav--header .nav-icon { font-size: 14px; min-width: 14px; }

.app-header__actions--account { justify-self: end; gap: 6px; direction: ltr; }
/* Always the last (far-left in RTL) column, even when the navigation bar is not rendered. */
.app-header--unified > .app-header__actions--account { grid-column: -2 / -1; }
.header-user-card {
    margin-left: 5px;
    height: 44px;
    min-width: 185px;
    max-width: 245px;
    padding: 5px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #58789A;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #fff;
    direction: rtl;
}
.header-user-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #fff;
    color: #15385F;
    font-size: 9px;
}
.header-user-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.header-user-copy small { color: #BFD2E6; font-size: 8.5px; font-weight: 700; }
.header-user-copy strong { margin-top: 3px; max-width: 185px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 800; direction: ltr; }
.app-header--unified .header-tool { height: 42px; min-width: 40px; padding: 0 9px; border-width: 1px; font-size: 11px; }
.app-header--unified .header-logout { min-width: 112px; border-color: #765871; background: rgba(96,37,54,.30); font-size: 11px; }
.app-header--unified .header-language { min-width: 54px; }

/* Approved bold content inside tables and input controls. */
.data-table tbody td,
.field input,
.field select,
.filter-field select,
.search-box input,
.info-value {
    font-weight: 700;
}
.data-table tbody td { color: #26445F; }
.field input::placeholder,
.search-box input::placeholder { font-weight: 700; }

/* Slightly smaller global action controls. */
.actions-inline { gap: 5px; }
.actions-inline .btn-small {
    min-height: 27px;
    padding: 3px 7px;
    font-size: 10.5px;
    border-radius: 7px;
}
.auditna-action-strip { width: 275px; min-width: 275px; gap: 6px; }
.action-icon-btn {
    width: 39px;
    min-width: 39px;
    height: 35px;
    min-height: 35px;
    border-radius: 8px;
}
.action-icon-btn svg { width: 17px; height: 17px; }
.account-status-pill { min-width: 74px; min-height: 29px; font-size: 11px; }

/* Unified page-header action group and physical far-left Back button. */
.page-header { position: relative; align-items: center; }
.page-header__actions { display: flex; align-items: center; gap: 8px; margin-right: auto; margin-left: 0; }
.page-header .back-button,
.page-header__actions .back-button {
    min-width: 160px;
    margin-right: auto;
    margin-left: 0;
    order: 99;
}
html[dir="ltr"] .page-header .back-button,
html[dir="ltr"] .page-header__actions .back-button {
    margin-left: 0;
    margin-right: auto;
}
.panel-footer-actions .back-button { display: none; }

/* Custom confirmation dialog — used for sign-out, delete, stop, and other sensitive actions. */
.auditna-confirm[hidden] { display: none !important; }
.auditna-confirm {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 18px;
}
.auditna-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,34,55,.34);
    backdrop-filter: blur(1px);
}
.auditna-confirm__dialog {
    position: relative;
    width: min(490px, calc(100vw - 30px));
    padding: 30px 30px 26px;
    border: 1px solid #E3E8EE;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(17,43,70,.20);
    text-align: center;
    color: #1D2A39;
}
.auditna-confirm__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #FFF0F2;
    color: #D13D49;
    font-size: 29px;
    font-weight: 700;
}
.auditna-confirm__dialog h2 { margin: 0; font-size: 18px; font-weight: 800; color: #17263A; }
.auditna-confirm__dialog p { margin: 10px auto 22px; max-width: 390px; color: #6C7B90; font-size: 12.5px; font-weight: 600; }
.auditna-confirm__actions { display: flex; justify-content: center; gap: 14px; }
.auditna-confirm__actions .btn { min-width: 118px; min-height: 40px; }
.auditna-confirm__accept.confirm-warning { background: #E69B19; border-color: #CA830C; color: #fff; }
body.auditna-modal-open { overflow: hidden; }
body.dark-ui .auditna-confirm__dialog { background: #20344B; border-color: #5A7C9F; }
body.dark-ui .auditna-confirm__dialog h2 { color: #F5F8FC; }
body.dark-ui .auditna-confirm__dialog p { color: #CBD8E7; }

@media (max-width: 1100px) {
    .app-header--unified { grid-template-columns: auto 1fr auto; gap: 8px; }
    .brand-subtitle { display: none; }
    .brand-name--en { font-size: 13px; }
    .main-nav--header .main-nav__item { padding-inline: 8px; font-size: 11px; }
    .header-user-card { min-width: 150px; }
}
@media (max-width: 800px) {
    .app-header--unified { display: flex; flex-wrap: wrap; min-height: 0; }
    .app-header__brand--stacked { order: 1; }
    .app-header__actions--account { order: 2; margin-inline-start: auto; }
    .main-nav--header { order: 3; flex: 1 0 100%; justify-content: flex-start; padding-top: 5px; }
    .header-user-card { display: none; }
    .page-header__actions { flex-wrap: wrap; justify-content: flex-end; }
    .page-header .back-button, .page-header__actions .back-button { min-width: 130px; }
}

/* V1.4.1 - approved account controls order (left -> right): logout, language, theme, user. */
.app-header__actions--account { direction: ltr; }
.app-header__actions--account .header-form { order: 1; }
.app-header__actions--account .header-language { order: 2; }
.app-header__actions--account #themeToggle { order: 3; }
.app-header__actions--account .header-user-card { order: 4; margin-left: 10px; }


/* V1.5.2 - Audit firm dashboard summary cards in one desktop row. */
.dashboard-summary-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
@media (max-width: 1200px) {
    .dashboard-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .dashboard-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .dashboard-summary-grid { grid-template-columns: 1fr; }
}


/* V1.6 - Email settings. Uses the approved Auditna calm UI language. */
.email-settings-panel { overflow: hidden; }
.email-settings-panel__header { border-bottom: 1px solid var(--line); }
.email-settings-grid { padding-top: 18px; }
.field-help { display:block; margin-top:5px; color:var(--muted); font-size:11px; font-weight:600; line-height:1.55; }
.field-help--success { color:#26734f; }
.email-password-wrap { display:flex; align-items:stretch; gap:6px; direction:ltr; }
.email-password-wrap input { flex:1; direction:rtl; }
html[dir="ltr"] .email-password-wrap input { direction:ltr; }
.email-password-toggle {
    width:42px; min-width:42px; border:1px solid #7FA5CB; border-radius:8px; background:#F7FBFF;
    color:#245F97; cursor:pointer; font-size:16px; font-weight:800;
}
.email-password-toggle:hover { background:#EDF5FC; }
.email-provider-note {
    margin:0 22px 15px; padding:12px 14px; border:1px solid #A9C2DC; border-radius:9px;
    background:#F4F8FC; color:#324B65; display:flex; flex-direction:column; gap:4px; font-size:11.5px;
}
.email-provider-note strong { color:var(--navy-text); font-size:12px; }
.email-settings-actions { padding-bottom:0; justify-content:flex-end; }
.email-settings-test-form { display:flex; justify-content:flex-end; padding:8px 20px 18px; }
.email-settings-actions .btn, .email-settings-test-form .btn { min-width:150px; }
.email-security-note {
    width:min(1540px, calc(100% - 36px)); margin:14px auto 0; padding:12px 15px; border:1px solid #A9C2DC;
    border-radius:9px; background:#EDF5FC; color:#324B65; display:flex; flex-direction:column; gap:4px;
    font-size:11.5px; font-weight:600;
}
.email-security-note strong { color:var(--navy-text); font-size:12px; }
body.dark-ui .email-provider-note, body.dark-ui .email-security-note { background:#1A3046; border-color:#5A7C9F; color:#D7E3EF; }
body.dark-ui .email-provider-note strong, body.dark-ui .email-security-note strong { color:#F3F7FB; }
body.dark-ui .email-password-toggle { background:#172B40; border-color:#5A7C9F; color:#DCEAF7; }
body.dark-ui .field-help--success { color:#8ED0AC; }
@media (max-width:800px) {
    .email-settings-actions, .email-settings-test-form { justify-content:stretch; }
    .email-settings-actions .btn, .email-settings-test-form .btn { width:100%; }
}

/* V1.6.3 - Manager management: wider name column and compact grouped actions. */
.managers-table .manager-name-col {
    min-width: 220px;
    width: 28%;
}
.managers-table .managers-actions-col {
    width: 360px;
    min-width: 360px;
}
.managers-table .table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: nowrap;
}
.managers-table .table-actions form {
    margin: 0;
}
.manager-password-actions {
    margin-top: 12px;
}
.manager-password-actions .panel-note {
    margin: 0 0 10px;
}
@media (max-width: 900px) {
    .managers-table .manager-name-col {
        min-width: 190px;
    }
}


/* V1.6.4 - approved manager screens + reusable icon-action pattern. */
.managers-table .managers-actions-col {
    width: 230px;
    min-width: 230px;
}
.icon-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.icon-actions form { display: inline-flex; margin: 0; }
.action-icon-btn--edit { background:#2F6EA6; border-color:#245985; }
.action-icon-btn--mail { background:#245F97; border-color:#173F69; }
.action-icon-btn--warning { background:#C98220; border-color:#A56512; }
.action-icon-btn--warning:hover { background:#B47318; }
.action-icon-btn--success { background:#2F7D67; border-color:#24614F; }
.action-icon-btn--success:hover { background:#286B59; }
.action-icon-btn--danger { background:#C94C4C; border-color:#A93636; }
.action-icon-btn:focus-visible { outline: 3px solid rgba(36,95,151,.24); outline-offset: 2px; }

.manager-edit-panel { overflow: hidden; }
.manager-edit-heading { padding: 12px 18px; background:#EEF4FB; border-bottom:1px solid #A9C2DC; }
.manager-edit-heading h2 { margin:0 0 3px; font-size:15px; color:#173F69; }
.manager-edit-heading .panel-note { margin:0; }
.manager-edit-form { padding-top:16px; }
.manager-edit-actions { padding-top:4px; }
.manager-password-action-card {
    margin-top:14px;
    padding:16px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    border-color:#9FBEDB;
    background:#F6FAFE;
}
.manager-password-action-copy { display:flex; align-items:center; gap:12px; min-width:0; }
.manager-password-action-copy h2 { margin:0 0 4px; font-size:15px; color:#173F69; }
.manager-password-action-copy .panel-note { margin:0; max-width:760px; }
.manager-password-action-icon {
    width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center;
    border-radius:10px; background:#245F97; color:#fff; border:1px solid #173F69;
}
.manager-password-action-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.manager-password-action-form { margin:0; flex:0 0 auto; }
.manager-password-send-btn { min-width:210px; }

/* Password setup opened from an external email link. */
.manager-password-card { width:min(520px, calc(100% - 28px)); }
.manager-password-form { display:flex; flex-direction:column; gap:13px; margin-top:18px; }
.manager-password-field { width:100%; }
.password-input-wrap { position:relative; display:flex; align-items:center; }
.password-input-wrap input { width:100%; min-height:42px; padding-left:44px; }
.password-eye-btn {
    position:absolute; left:5px; right:auto; width:34px; height:32px; padding:0;
    display:grid; place-items:center; border:1px solid #2D679E; border-radius:7px;
    background:#F7FBFF; color:#245F97; cursor:pointer;
}
.password-eye-btn:hover { background:#EAF3FC; }
.password-eye-btn svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.password-eye-btn.is-visible { background:#E4EFFA; }
.manager-password-save { display:flex; justify-content:center; padding-top:4px; }
.manager-password-save .btn { min-width:190px; }

@media (max-width: 760px) {
    .manager-password-action-card { align-items:stretch; flex-direction:column; }
    .manager-password-action-form, .manager-password-send-btn { width:100%; }
    .managers-table .managers-actions-col { min-width:190px; width:190px; }
}


/* PART 2 - General Manager approved top navigation and Settings dropdown. */
.nav-dropdown {
    position: relative;
    flex: 0 0 auto;
}
.main-nav--header .nav-dropdown__toggle {
    min-width: 0;
    cursor: pointer;
    font-family: inherit;
}
.nav-dropdown__chevron {
    margin-inline-start: 2px;
    font-size: 11px;
    transition: transform .16s ease;
}
.nav-dropdown.is-open .nav-dropdown__chevron { transform: rotate(180deg); }
.nav-dropdown__menu {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 7px);
    inset-inline-end: 0;
    width: 320px;
    padding: 7px;
    border: 1px solid #BFD0E2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(20, 48, 80, .18);
    white-space: normal;
}
.nav-dropdown__menu[hidden] { display: none !important; }
.nav-dropdown__item {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 8px 11px;
    border-radius: 7px;
    color: #173A60;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
}
.nav-dropdown__item:hover,
.nav-dropdown__item:focus-visible {
    background: #F1F6FB;
    outline: none;
}
body.dark-ui .nav-dropdown__menu {
    background: #20344B;
    border-color: #58789A;
}
body.dark-ui .nav-dropdown__item { color: #F4F8FC; }
body.dark-ui .nav-dropdown__item:hover,
body.dark-ui .nav-dropdown__item:focus-visible { background: #29435F; }
@media (max-width: 800px) {
    .nav-dropdown__menu {
        position: fixed;
        inset-inline: 12px;
        top: auto;
        width: auto;
        max-height: min(60vh, 360px);
        overflow-y: auto;
    }
}


/* PART 2 V2 - General Manager dashboard, settings hub, companies and employees. */
.gm-home-hero { min-height:132px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px 30px; border:1px solid #173F69; border-radius:12px; background:linear-gradient(100deg,#2F6EAA,#1E4F7D); color:#fff; box-shadow:0 8px 20px rgba(21,57,92,.10); }
.gm-home-identity { display:flex; align-items:center; gap:15px; }
.gm-home-shield { width:48px; height:48px; display:grid; place-items:center; border:2px solid rgba(255,255,255,.55); border-radius:10px; font-size:24px; font-weight:800; }
.gm-home-hero h1 { margin:0 0 8px; font-size:20px; color:#fff; }
.gm-firm-line { font-size:12px; font-weight:700; color:#EAF3FB; }
.gm-divider { margin-inline:9px; opacity:.7; }
.gm-current-user { min-width:220px; padding:10px 14px; border:1px solid rgba(255,255,255,.45); border-radius:10px; background:rgba(255,255,255,.09); display:flex; flex-direction:column; gap:2px; text-align:start; }
.gm-current-user small { font-size:10px; color:#E6F0FA; font-weight:700; }
.gm-current-user strong { font-size:13px; color:#fff; }
.gm-current-user span { font-size:11px; color:#D8E7F5; font-weight:700; }
.gm-home-cards { margin-top:14px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.gm-home-card { min-height:245px; padding:18px; border:1px solid #2D679E; border-radius:11px; background:#fff; box-shadow:0 6px 18px rgba(24,65,104,.08); display:flex; flex-direction:column; }
.gm-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.gm-card-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:10px; background:#245F97; border:1px solid #173F69; color:#fff; font-size:22px; }
.gm-card-count { min-width:105px; padding:8px 12px; border:1px solid #80A6CB; border-radius:9px; background:#EEF5FC; text-align:center; }
.gm-card-count small { display:block; font-size:10px; font-weight:700; color:#264D73; }
.gm-card-count strong { display:block; margin-top:3px; font-size:19px; color:#173F69; }
.gm-card-copy { margin-top:18px; }
.gm-card-copy h2 { margin:0 0 5px; font-size:15px; color:#173F69; }
.gm-card-copy p { margin:0; font-size:11.5px; color:#6A7A8D; font-weight:600; }
.gm-card-action { margin-top:auto; width:100%; justify-content:center; }
.gm-welcome-panel { margin-top:18px; min-height:180px; display:flex; align-items:center; justify-content:center; gap:20px; border-top:1px solid #D6E1ED; background:#F3F7FB; }
.gm-welcome-mark { width:70px; height:70px; display:grid; place-items:center; border-radius:18px; border:2px solid #B7CEE4; color:#2E75B6; font-size:34px; }
.gm-welcome-text { font-size:42px; font-weight:800; color:#173F69; }
.gm-welcome-text span { color:#7EA7CF; }.gm-welcome-text b { color:#2E75B6; }
.settings-hub-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.settings-hub-card { min-height:120px; padding:18px; display:flex; align-items:center; gap:14px; border:1px solid #2D679E; border-radius:10px; background:#fff; color:#173F69; text-decoration:none; box-shadow:0 4px 14px rgba(24,65,104,.06); }
.settings-hub-card:hover { background:#F3F8FD; }
.settings-hub-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:9px; background:#245F97; color:#fff; font-size:20px; flex:0 0 44px; }
.settings-hub-card strong { font-size:12px; line-height:1.7; }
.module-hero { min-height:82px; padding:14px 18px; display:flex; align-items:center; justify-content:space-between; gap:18px; border:1px solid #173F69; border-radius:11px; background:linear-gradient(100deg,#2E6DA8,#1E4F7D); color:#fff; }
.module-hero__title { display:flex; align-items:center; gap:12px; }
.module-hero__icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.55); border-radius:9px; font-size:20px; }
.module-hero h1 { margin:0; font-size:19px; color:#fff; }.module-hero p { margin:3px 0 0; font-size:10.5px; color:#E6F0FA; font-weight:700; }
.module-hero__actions { display:flex; align-items:center; gap:8px; }
.btn-outline-light { min-height:38px; display:inline-flex; align-items:center; gap:5px; padding:0 14px; border:2px solid rgba(255,255,255,.85); border-radius:8px; background:transparent; color:#fff; font-size:11.5px; font-weight:800; text-decoration:none; }
.btn-outline-light:hover { background:rgba(255,255,255,.12); }
.module-stats { display:grid; gap:14px; margin:16px 0 20px; }.module-stats--two{grid-template-columns:repeat(2,minmax(0,1fr));}.module-stats--three{grid-template-columns:repeat(3,minmax(0,1fr));}.module-stats--four{grid-template-columns:repeat(4,minmax(0,1fr));}
.module-stat { min-height:105px; padding:17px 20px; display:flex; align-items:center; gap:14px; border:1px solid #2D679E; border-radius:10px; background:#fff; box-shadow:0 4px 14px rgba(24,65,104,.07); }
.module-stat__icon { width:48px; height:48px; display:grid; place-items:center; border-radius:10px; background:#245F97; color:#fff; border:1px solid #173F69; font-size:20px; }.module-stat small{display:block;font-size:11px;font-weight:700;color:#274D72}.module-stat strong{display:block;margin-top:4px;font-size:21px;color:#173F69}
.module-table-panel { overflow:hidden; border:1px solid #2D679E; border-radius:10px; background:#fff; }.module-table-toolbar{min-height:70px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#EAF3FC;border-bottom:1px solid #B9CDE1}.module-table-title{display:flex;align-items:center;gap:8px;color:#173F69;font-size:13px}.module-search{display:flex;align-items:stretch;direction:ltr}.module-search input{width:260px;min-height:38px;padding:0 12px;border:1px solid #89ADD0;border-radius:8px 0 0 8px;font-family:inherit;font-size:11.5px;direction:rtl}.icon-search-btn{width:40px;border:1px solid #89ADD0;border-left:0;border-radius:0 8px 8px 0;background:#fff;color:#245F97;cursor:pointer;font-size:17px}.module-data-table th{background:#1E527F;color:#fff}.module-data-table td{font-weight:700}.company-name-cell{min-width:260px}.employee-name-cell{min-width:220px}.employee-name-cell strong,.employee-name-cell small{display:block}.employee-name-cell small{margin-top:2px;color:#7A8795;font-size:10px;font-weight:600}
body.dark-ui .gm-home-card,body.dark-ui .settings-hub-card,body.dark-ui .module-stat,body.dark-ui .module-table-panel{background:#20344B;border-color:#5A7C9F}.body.dark-ui .gm-card-count{background:#1A3046}.dark-ui .gm-card-copy h2,.dark-ui .module-stat strong,.dark-ui .settings-hub-card{color:#F3F7FB}.dark-ui .gm-card-copy p,.dark-ui .module-stat small{color:#C8D6E4}.dark-ui .module-table-toolbar{background:#1A3046;border-color:#5A7C9F}
@media(max-width:1200px){.gm-home-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.module-stats--four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.gm-home-hero{align-items:stretch;flex-direction:column}.gm-current-user{min-width:0}.settings-hub-grid,.module-stats--two,.module-stats--three{grid-template-columns:1fr}.module-table-toolbar{align-items:stretch;flex-direction:column}.module-search input{width:100%}.module-search{width:100%}.module-hero{align-items:stretch;flex-direction:column}.module-hero__actions{justify-content:flex-start}.gm-welcome-text{font-size:30px}}
@media(max-width:620px){.gm-home-cards,.module-stats--four{grid-template-columns:1fr}.gm-welcome-panel{min-height:140px}.gm-welcome-text{font-size:24px}.gm-welcome-mark{width:54px;height:54px}.module-hero__actions{flex-wrap:wrap}.btn-outline-light{flex:1;justify-content:center}}


/* PART2 V2.2 - Companies Index visual baseline (approved Auditna style) */
.companies-index-hero{margin-bottom:14px}
.companies-index-stats{margin-bottom:14px}
.companies-index-panel{box-shadow:0 8px 20px rgba(21,63,105,.06)}
.companies-index-toolbar{min-height:72px}
.companies-index-toolbar .module-table-title__icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#215b90;color:#fff;font-size:17px;box-shadow:0 2px 5px rgba(23,63,105,.14)}
.companies-index-table .row-number-col{width:56px;text-align:center}
.companies-index-table .company-name-heading{min-width:320px}
.companies-index-table .company-name-cell{display:flex;align-items:center;gap:9px;min-width:320px}
.company-name-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:7px;background:#215b90;color:#fff;flex:0 0 auto;font-size:14px}
.status-badge{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:3px 10px;border-radius:999px;font-size:10.5px;font-weight:800;white-space:nowrap}
.status-badge--active{border:1px solid #75c69a;background:#ebf8f1;color:#17683d}
body.dark-ui .status-badge--active{border-color:#4e9f73;background:#183e2d;color:#d9f7e6}
body.dark-ui .companies-index-toolbar .module-table-title__icon,body.dark-ui .company-name-icon{background:#2f6ea7}
@media(max-width:850px){.companies-index-table .company-name-heading,.companies-index-table .company-name-cell{min-width:230px}}


/* PART2 V2.3 - Companies index: old-screen table structure within approved Auditna design */
.companies-index-hero{
    margin-top:16px;
    margin-bottom:14px;
}
.companies-index-hero::before{
    content:"";
    position:absolute;
}
.companies-index-table--legacy-layout{
    width:100%;
    table-layout:fixed;
}
.companies-index-table--legacy-layout th,
.companies-index-table--legacy-layout td{
    vertical-align:middle;
    white-space:nowrap;
}
.companies-index-table--legacy-layout thead th{
    height:46px;
    padding:8px 10px;
    text-align:center;
}
.companies-index-table--legacy-layout tbody td{
    height:58px;
    padding:8px 10px;
    text-align:center;
}
.companies-index-table--legacy-layout .row-number-col{width:44px;color:#8796A8}
.companies-index-table--legacy-layout .company-code-col{width:132px}
.companies-index-table--legacy-layout .company-name-heading{width:auto;min-width:290px;text-align:right;padding-inline-start:18px}
.companies-index-table--legacy-layout .company-name-cell{min-width:290px;display:flex;align-items:center;justify-content:flex-start;gap:10px;text-align:right;padding-inline-start:18px}
.companies-index-table--legacy-layout .company-type-col{width:170px}
.companies-index-table--legacy-layout .company-tax-col{width:170px}
.companies-index-table--legacy-layout .company-status-col{width:125px}
.companies-index-table--legacy-layout .company-actions-col{width:190px}
.company-code-pill{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:112px;height:36px;padding:0 11px;border:1px solid #9DB9D3;border-radius:8px;background:#F3F8FD;color:#173F69;font-weight:800;direction:ltr}
.company-code-hash{color:#567B9F;font-size:12px}
.company-unavailable{color:#9AA8B6;font-weight:700}
.company-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:7px;direction:ltr}
.action-icon-btn--disabled{cursor:default;opacity:.72;pointer-events:none}
.action-icon-btn--warning{background:#A97908;border-color:#805B05;color:#fff}
.action-icon-btn--danger{background:#B43636;border-color:#8E2929;color:#fff}
body.dark-ui .company-code-pill{background:#1B3147;border-color:#587A9D;color:#EEF5FC}
body.dark-ui .company-unavailable{color:#90A2B5}
@media(max-width:1100px){
  .companies-table-wrap{overflow-x:auto}
  .companies-index-table--legacy-layout{min-width:1120px}
}

/* PART2 V2.4 - Companies Index strict RTL table direction */
html[dir="rtl"] .companies-table-wrap{
    direction:rtl;
}
html[dir="rtl"] .companies-index-table--legacy-layout{
    direction:rtl;
}
html[dir="rtl"] .companies-index-table--legacy-layout thead,
html[dir="rtl"] .companies-index-table--legacy-layout tbody,
html[dir="rtl"] .companies-index-table--legacy-layout tr{
    direction:rtl;
}
html[dir="rtl"] .companies-index-table--legacy-layout th,
html[dir="rtl"] .companies-index-table--legacy-layout td{
    direction:rtl;
}
html[dir="rtl"] .companies-index-table--legacy-layout .company-name-heading,
html[dir="rtl"] .companies-index-table--legacy-layout .company-name-cell{
    text-align:right;
}
html[dir="rtl"] .companies-index-table--legacy-layout .company-row-actions{
    direction:ltr;
}

/* PART2 V2.6 - Client company create screen + General Manager hero spacing. */
.gm-home-hero{margin-top:16px}
.company-create-hero{margin-top:16px;margin-bottom:14px}
.company-create-validation{width:min(1500px,calc(100% - 28px));margin:0 auto 12px;padding:10px 14px;border:1px solid #D88989;border-radius:9px;background:#FFF2F2}
.company-create-form{width:min(1500px,calc(100% - 28px));margin:0 auto 24px}
.company-form-section{margin-bottom:14px;overflow:hidden;border:1px solid #2D679E;border-radius:10px;background:#fff;box-shadow:0 4px 14px rgba(24,65,104,.05)}
.company-form-section__header{min-height:50px;padding:10px 16px;display:flex;align-items:center;gap:9px;border-bottom:1px solid #B9CDE1;background:#EAF3FC;color:#173F69}
.company-form-section__header h2{margin:0;font-size:13px;font-weight:800}
.company-form-section__icon{width:32px;height:32px;display:grid;place-items:center;border-radius:7px;background:#215B90;color:#fff;font-size:14px}
.company-form-section__body{padding:16px}
.company-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}
.company-form-grid--basic{grid-template-columns:minmax(250px,.7fr) minmax(360px,1.3fr)}
.company-field-name-en{grid-column:2}
.company-field-type{grid-column:1}.company-field-tax{grid-column:2}
.company-create-form .field label{font-size:11.5px;color:#213F5D}
.company-create-form .field input,.company-create-form .field select,.company-create-form .field textarea{width:100%;border:1px solid #9DB9D9;border-radius:8px;background:#fff;color:#20364C;font-family:inherit;font-weight:700;outline:none}
.company-create-form .field input,.company-create-form .field select{height:38px;padding:7px 10px}
.company-create-form .field textarea{min-height:82px;padding:9px 11px;resize:vertical}
.company-create-form .field input:focus,.company-create-form .field select:focus,.company-create-form .field textarea:focus{border-color:#245F97;box-shadow:0 0 0 3px rgba(36,95,151,.10)}
.company-input-with-icon{display:flex;align-items:stretch;direction:rtl}
.company-input-with-icon .company-field-icon{width:38px;flex:0 0 38px;display:grid;place-items:center;background:#245F97;color:#fff;border:1px solid #173F69;border-radius:0 8px 8px 0;font-size:11px;font-weight:800}
.company-input-with-icon input{border-radius:8px 0 0 8px!important;border-inline-start:0!important}
.company-input-with-icon input[dir="ltr"]{text-align:left}
.required-mark{color:#C94C4C}.company-create-form .field-help{font-size:10px}
.company-status-card{min-height:78px;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid #9CB9D6;border-radius:9px;background:#F8FBFE}
.company-status-copy{display:flex;align-items:center;gap:12px}.company-status-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:8px;background:#245F97;color:#fff;font-weight:800}
.company-status-copy strong{display:block;font-size:11.5px;color:#173F69}.company-status-copy p{margin:3px 0 0;font-size:10.5px;color:#65778B;font-weight:600}
.company-switch{display:flex;align-items:center;gap:9px;cursor:pointer;white-space:nowrap}.company-switch input{position:absolute;opacity:0;pointer-events:none}.company-switch__track{width:42px;height:23px;padding:3px;border-radius:999px;background:#97A8B8;transition:.2s}.company-switch__track span{display:block;width:17px;height:17px;border-radius:50%;background:#fff;transition:.2s}.company-switch input:checked + .company-switch__track{background:#2874B4}.company-switch input:checked + .company-switch__track span{transform:translateX(-19px)}.company-switch b{font-size:11px;color:#173F69}
.company-form-actions-card{min-height:62px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #2D679E;border-radius:10px;background:#F8FBFE}
.company-form-actions-card p{margin:0;color:#66798C;font-size:10.5px;font-weight:600}.company-form-actions{display:flex;align-items:center;gap:8px}
.company-name-en{display:block;margin-top:2px;color:#75879A;font-size:9.5px;font-weight:600;direction:ltr;text-align:right}
.status-badge--stopped{border:1px solid #D3A44D;background:#FFF6DF;color:#895E08}
body.dark-ui .company-form-section{background:#20344B;border-color:#5A7C9F}body.dark-ui .company-form-section__header{background:#1A3046;border-color:#5A7C9F;color:#F3F7FB}body.dark-ui .company-create-form .field label,body.dark-ui .company-status-copy strong,body.dark-ui .company-switch b{color:#EEF5FC}body.dark-ui .company-create-form .field input,body.dark-ui .company-create-form .field select,body.dark-ui .company-create-form .field textarea{background:#172B40;color:#F2F7FC;border-color:#587A9D}body.dark-ui .company-status-card,body.dark-ui .company-form-actions-card{background:#1A3046;border-color:#587A9D}
@media(max-width:850px){.company-form-grid,.company-form-grid--basic{grid-template-columns:1fr}.company-field-name-en,.company-field-type,.company-field-tax{grid-column:auto}.company-status-card,.company-form-actions-card{align-items:stretch;flex-direction:column}.company-form-actions{justify-content:flex-start}}


/* PART2 V2.7 - Company create alignment + company row actions */
@media(min-width:851px){
  .company-form-grid--basic{
    grid-template-columns:repeat(6,minmax(0,1fr));
  }
  .company-form-grid--basic .company-field-code{grid-column:1 / span 2}
  .company-form-grid--basic .company-field-name-ar{grid-column:3 / span 4}
  .company-form-grid--basic .company-field-name-en{grid-column:1 / span 2}
  .company-form-grid--basic .company-field-type{grid-column:3 / span 2}
  .company-form-grid--basic .company-field-tax{grid-column:5 / span 2}
}
.action-icon-btn--success{background:#2E8B57;border-color:#226B43;color:#fff}
body.dark-ui .action-icon-btn--success{background:#367E59;border-color:#58A97E}


/* PART2 V2.8 - Company automatic code + approved basic-row proportions */
@media(min-width:851px){
  .company-form-grid--basic{
    grid-template-columns:repeat(12,minmax(0,1fr));
  }
  .company-form-grid--basic .company-field-code{grid-column:1 / span 3}
  .company-form-grid--basic .company-field-name-ar{grid-column:4 / span 9}
  .company-form-grid--basic .company-field-name-en{grid-column:1 / span 6}
  .company-form-grid--basic .company-field-type{grid-column:7 / span 3}
  .company-form-grid--basic .company-field-tax{grid-column:10 / span 3}
}


/* PART2 V2.8.1 - Center company actions inside actions column */
.companies-index-table--legacy-layout .company-actions-col{
  text-align:center;
}
.companies-index-table--legacy-layout td.company-actions-col{
  vertical-align:middle;
}
.companies-index-table--legacy-layout .company-row-actions{
  width:100%;
  justify-content:center;
}


/* PART2 V2.9 - Employees index approved Auditna layout */
.employees-index-hero{
  margin-top:16px;
  margin-bottom:16px;
}
.employees-index-stats{
  margin-bottom:18px;
}
.employees-active-stat .employees-stopped-count{
  display:block;
  margin-top:4px;
  color:#6B7D8F;
  font-size:10px;
  font-weight:700;
}
.employees-index-panel{
  overflow:hidden;
}
.employees-index-toolbar{
  min-height:58px;
}
.employees-index-search{
  min-width:280px;
}
.employees-index-table{
  width:100%;
  table-layout:fixed;
}
.employees-index-table th,
.employees-index-table td{
  vertical-align:middle;
}
.employees-index-table .employee-user-col{
  width:31%;
  text-align:right;
}
.employees-index-table .employee-name-col{
  width:23%;
  text-align:center;
}
.employees-index-table .employee-role-col{
  width:17%;
  text-align:center;
}
.employees-index-table .employee-status-col{
  width:12%;
  text-align:center;
}
.employees-index-table .employee-actions-col{
  width:17%;
  text-align:center;
}
.employee-user-card{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.employee-user-card > div{
  min-width:0;
}
.employee-user-card strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.employee-user-card small{
  display:block;
  margin-top:2px;
  color:#6A7B8D;
  font-size:10px;
}
.employee-avatar{
  flex:0 0 38px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#215B90;
  border:1px solid #173F69;
  color:#fff;
  font-weight:800;
  font-size:16px;
}
.employee-role-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  background:#EDF4FB;
  color:#173F69;
  font-weight:800;
  font-size:11px;
}
.employee-row-actions{
  width:100%;
  justify-content:center;
  gap:7px;
}
.employee-row-actions form{
  display:inline-flex;
  margin:0;
}
html[dir="rtl"] .employees-index-table,
html[dir="rtl"] .employees-index-table thead,
html[dir="rtl"] .employees-index-table tbody,
html[dir="rtl"] .employees-index-table tr,
html[dir="rtl"] .employees-index-table th,
html[dir="rtl"] .employees-index-table td{
  direction:rtl;
}
html[dir="ltr"] .employees-index-table .employee-user-col{
  text-align:left;
}
body.dark-ui .employees-active-stat .employees-stopped-count,
body.dark-ui .employee-user-card small{
  color:#AFC0D1;
}
body.dark-ui .employee-role-badge{
  background:#1B3147;
  color:#EEF5FC;
}
@media(max-width:1100px){
  .employees-table-wrap{
    overflow-x:auto;
  }
  .employees-index-table{
    min-width:980px;
  }
}
@media(max-width:850px){
  .employees-index-search{
    min-width:0;
    width:100%;
  }
}


/* PART2 V2.10 - employee create/edit password eye controls */
.employee-password-wrap input{padding-left:44px;}
.employee-form-grid .password-eye-btn{left:5px;right:auto;}


/* PART2 V2.11 - Employee status toggle + approved header action sizing */
.employee-index-hero-actions{
  direction:rtl;
}
.employee-index-hero-actions .btn{
  width:132px;
  min-width:132px;
  justify-content:center;
}
@media(max-width:620px){
  .employee-index-hero-actions{
    width:100%;
  }
  .employee-index-hero-actions .btn{
    flex:1 1 0;
    width:auto;
    min-width:0;
  }
}


/* PART2 V2.12 - compact settings cards + employee/company assignments */
.settings-hub-grid--compact{
  width:min(1180px,calc(100% - 56px));
  margin-inline:auto;
}
.assignment-hero{margin-top:16px;margin-bottom:16px}
.assignment-hero-actions .btn{min-width:178px;justify-content:center}
.assignment-user-panel,.assignment-select-panel{
  width:min(1500px,calc(100% - 28px));
  margin:0 auto 18px;
  overflow:hidden;
  border:1px solid #2D679E;
  border-radius:10px;
  background:#fff;
  box-shadow:0 4px 14px rgba(24,65,104,.05);
}
.assignment-section-header{
  min-height:54px;padding:10px 16px;display:flex;align-items:center;gap:9px;
  background:#EAF3FC;border-bottom:1px solid #B9CDE1;color:#173F69;
}
.assignment-section-icon{
  width:32px;height:32px;display:grid;place-items:center;border-radius:7px;background:#215B90;color:#fff;font-size:14px;
}
.assignment-user-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:16px}
.assignment-info-card{
  min-height:74px;padding:12px 14px;display:flex;align-items:center;gap:12px;
  border:1px solid #2D679E;border-radius:9px;background:#F8FBFE;
}
.assignment-info-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border-radius:8px;background:#215B90;color:#fff}
.assignment-info-card small{display:block;margin-bottom:4px;color:#596D81;font-size:10px;font-weight:700}
.assignment-info-card strong{display:block;overflow-wrap:anywhere;color:#123F6A;font-size:12px}
.assignment-stats{width:min(1500px,calc(100% - 28px));margin:0 auto 18px}
.assignment-stat-note{display:block;margin-top:3px;color:#6A7B8D;font-size:9.5px;font-weight:600}
.assignment-companies-panel{width:min(1500px,calc(100% - 28px));margin:0 auto 24px}
.assignment-companies-toolbar{align-items:center}
.assignment-companies-toolbar .module-table-title{align-items:flex-start}
.assignment-companies-toolbar .module-table-title div{display:flex;flex-direction:column;gap:2px}
.assignment-companies-toolbar .module-table-title small{color:#60758A;font-size:9.5px;font-weight:600}
.assignment-add-company-btn{min-width:130px;justify-content:center}
.assignment-table{width:100%;table-layout:fixed}
.assignment-table th,.assignment-table td{vertical-align:middle;text-align:center}
.assignment-table th:nth-child(1){width:14%}.assignment-table th:nth-child(2){width:38%}.assignment-table th:nth-child(3){width:18%}.assignment-table th:nth-child(4){width:14%}.assignment-table th:nth-child(5){width:16%}
.assignment-actions-col{text-align:center!important}.assignment-row-actions{width:100%;justify-content:center}.assignment-row-actions form{display:inline-flex;margin:0}
.assignment-create-form{width:100%;margin:0 auto 24px}
.assignment-select-panel{max-width:1400px}
.assignment-select-body{padding:18px}
.assignment-company-field{padding:14px;border:1px solid #9DB9D3;border-radius:9px;background:#F8FBFE}
.assignment-company-field select{width:100%}
.assignment-form-note{margin:14px 0 12px;padding:10px 12px;border:1px solid #C9D8E7;border-radius:8px;background:#F5F9FD;color:#5E7286;font-size:10.5px;font-weight:600}
.assignment-form-actions{display:flex;gap:8px;justify-content:flex-start}.assignment-form-actions .btn{min-width:120px;justify-content:center}
body.dark-ui .assignment-user-panel,body.dark-ui .assignment-select-panel{background:#20344B;border-color:#5A7C9F}
body.dark-ui .assignment-section-header{background:#1A3046;border-color:#5A7C9F;color:#F3F7FB}
body.dark-ui .assignment-info-card,body.dark-ui .assignment-company-field{background:#1A3046;border-color:#587A9D}
body.dark-ui .assignment-info-card small,body.dark-ui .assignment-stat-note,body.dark-ui .assignment-companies-toolbar .module-table-title small{color:#AFC0D1}
body.dark-ui .assignment-info-card strong{color:#EEF5FC}
@media(max-width:900px){
  .settings-hub-grid--compact{width:min(100% - 28px,760px)}
  .assignment-user-cards{grid-template-columns:1fr}
  .assignment-table{min-width:900px}
}
@media(max-width:620px){
  .settings-hub-grid--compact{width:calc(100% - 20px)}
  .assignment-hero-actions .btn{width:100%;min-width:0}
  .assignment-form-actions{flex-direction:column}.assignment-form-actions .btn{width:100%}
}


/* PART2 V2.13 - Global approved content inset for all application screens */
@media(max-width:620px){
  .page-shell{padding-inline:8px;}
}


/* PART2 V2.14 - General Manager scrollbar cleanup + 2-column Settings cards */
html:has(.gm-home-hide-scrollbar),
body:has(.gm-home-hide-scrollbar){
  scrollbar-width:none;
  -ms-overflow-style:none;
}
html:has(.gm-home-hide-scrollbar)::-webkit-scrollbar,
body:has(.gm-home-hide-scrollbar)::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none;
}
.settings-hub-grid--compact{
  width:min(1180px,calc(100% - 56px));
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-inline:auto;
}
.settings-hub-grid--compact .settings-hub-card{
  min-height:150px;
  padding:24px;
}
.settings-hub-grid--compact .settings-hub-icon{
  width:52px;
  height:52px;
  flex-basis:52px;
  font-size:22px;
}
.settings-hub-grid--compact .settings-hub-card strong{
  font-size:13px;
}
@media(max-width:850px){
  .settings-hub-grid--compact{
    grid-template-columns:1fr;
    width:min(100% - 28px,760px);
  }
}
@media(max-width:620px){
  .settings-hub-grid--compact{
    width:calc(100% - 20px);
  }
}


/* PART2 V2.15 - Fiscal year definition screens + email action alignment */
.email-settings-actions--split{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.email-settings-actions--split .email-save-btn{order:1;}
.email-settings-actions--split .email-test-btn{order:2; margin-inline-start:auto;}
.email-settings-test-form--hidden{display:none;}
html[dir="rtl"] .email-settings-actions--split{direction:rtl;}
html[dir="ltr"] .email-settings-actions--split{direction:ltr;}

.fiscal-years-hero,.fiscal-year-create-hero{margin-top:16px;margin-bottom:16px;}
.fiscal-years-hero p,.fiscal-year-create-hero p{margin:3px 0 0;color:rgba(255,255,255,.85);font-size:11px;font-weight:700;}
.fiscal-years-hero-actions .btn{min-width:150px;justify-content:center;}
.fiscal-years-stats{margin-bottom:18px;}
.fiscal-years-table th,.fiscal-years-table td{text-align:center;vertical-align:middle;}
.fiscal-years-table .actions-col{width:110px;}
.fiscal-years-empty{height:270px!important;text-align:center!important;}
.fiscal-years-empty__icon{width:58px;height:58px;margin:0 auto 10px;display:grid;place-items:center;border-radius:16px;background:#EAF3FC;border:1px solid #C6D9EA;color:#2D679E;font-size:25px;}
.fiscal-years-empty strong{display:block;color:#173F69;font-size:14px;margin-bottom:4px;}
.fiscal-years-empty small{display:block;color:#708195;font-size:10px;margin-bottom:14px;}
.fiscal-year-create-form{width:min(1560px,calc(100% - 28px));margin:0 auto 24px;}
.fiscal-year-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px;}
.fiscal-year-switch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.fiscal-year-switch-card{min-height:86px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #2D679E;border-radius:10px;background:#F8FBFE;cursor:pointer;}
.fiscal-year-switch-card strong{display:block;color:#173F69;font-size:12px;margin-bottom:5px;}
.fiscal-year-switch-card small{display:block;color:#6A7B8D;font-size:10px;font-weight:600;}
.auditna-switch-input{appearance:none;-webkit-appearance:none;width:36px;height:20px;flex:0 0 36px;border-radius:999px;border:1px solid #93A8BC;background:#DCE5ED;position:relative;cursor:pointer;transition:.15s ease;}
.auditna-switch-input:before{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.15s ease;}
.auditna-switch-input:checked{background:#2B6CB0;border-color:#245A92;}
.auditna-switch-input:checked:before{left:18px;}
html[dir="rtl"] .auditna-switch-input:before{left:auto;right:2px;}
html[dir="rtl"] .auditna-switch-input:checked:before{left:auto;right:18px;}
.fiscal-year-actions-card{margin-top:2px;}
.fiscal-year-back-btn{min-width:170px;justify-content:center;}
body.dark-ui .fiscal-year-switch-card{background:#1A3046;border-color:#587A9D;}
body.dark-ui .fiscal-year-switch-card strong{color:#EEF5FC;}
body.dark-ui .fiscal-year-switch-card small{color:#AFC0D1;}
@media(max-width:850px){
  .fiscal-year-form-grid,.fiscal-year-switch-grid{grid-template-columns:1fr;}
  .email-settings-actions--split{align-items:stretch;flex-direction:column;}
  .email-settings-actions--split .btn{width:100%;}
  .email-settings-actions--split .email-test-btn{margin-inline-start:0;}
}


/* PART2 V2.16 - Three Settings cards + fiscal-year auto-fill */
@media(min-width:851px){
  .settings-hub-grid--compact{
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:min(1240px,calc(100% - 56px));
  }
}

/* PART2 V2.17 - Email settings action buttons alignment */
.email-settings-actions--split{
  padding:14px 18px 16px;
  align-items:center;
}
.email-settings-actions--split .btn{
  width:188px;
  min-width:188px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding-inline:18px;
  font-weight:800;
}
.email-settings-actions--split .email-save-btn{
  margin-inline-end:0;
}
.email-settings-actions--split .email-test-btn{
  margin-inline-start:auto;
}
@media(max-width:700px){
  .email-settings-actions--split{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .email-settings-actions--split .btn{
    width:100%;
    min-width:0;
  }
  .email-settings-actions--split .email-test-btn{
    margin-inline-start:0;
  }
}


/* PART2 V2.18 - Fiscal year actions + reliable year auto-fill */
.fiscal-years-table .fiscal-year-actions-col{min-width:220px;width:220px;text-align:center!important;}
.fiscal-year-row-actions{width:100%;display:flex;align-items:center;justify-content:center;gap:7px;direction:ltr;}
.fiscal-year-row-actions form{display:inline-flex;margin:0;}
.fiscal-current-btn{background:#215B90;border-color:#173F69;color:#fff;}
.fiscal-current-btn.action-icon-btn--disabled{background:#7C8FA3;border-color:#6D8094;color:#fff;opacity:.72;}


/* PART2 V2.20 - Fiscal year / audit work-file lifecycle */
.audit-files-manage-hero{margin-top:16px;margin-bottom:16px}
.audit-files-manage-table th,.audit-files-manage-table td{vertical-align:middle}
.audit-files-manage-table .actions-col{text-align:center;width:120px}
.audit-file-manage-actions{width:100%;justify-content:center}


/* PART2 V2.21 - General Manager Controls */
.gm-permissions-hero{margin-top:16px;margin-bottom:14px}
.gm-permissions-tabs{width:min(1450px,calc(100% - 56px));margin:0 auto 14px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.gm-permissions-tabs a{min-height:42px;display:flex;align-items:center;justify-content:center;border:1px solid #2D679E;border-radius:8px;background:#F3F8FD;color:#173F69;font-weight:800;text-decoration:none}
.gm-permissions-tabs a:hover{background:#E5F0FA}
.gm-permissions-section{width:min(1450px,calc(100% - 56px));margin:0 auto 16px}
.gm-permissions-table .actions-col{width:150px;text-align:center!important}
.gm-permissions-actions{width:100%;justify-content:center;gap:7px}
.gm-permissions-actions form{display:inline-flex;margin:0}
.gm-row-sub{display:block;margin-top:2px;color:#6A7B8D;font-size:10px;font-weight:700}
body.dark-ui .gm-permissions-tabs a{background:#1A3046;color:#EEF5FC;border-color:#587A9D}
body.dark-ui .gm-row-sub{color:#AFC0D1}
@media(max-width:850px){.gm-permissions-tabs{grid-template-columns:repeat(2,minmax(0,1fr));width:calc(100% - 28px)}.gm-permissions-section{width:calc(100% - 28px)}}
@media(max-width:520px){.gm-permissions-tabs{grid-template-columns:1fr;width:calc(100% - 20px)}.gm-permissions-section{width:calc(100% - 20px)}}

/* V2.21 settings hub: four options, two cards per row on wide screens. */
@media(min-width:851px){
  .settings-hub-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr));width:min(1180px,calc(100% - 56px));}
}


/* PART2 V2.22 - General Manager permissions sections collapsed by default */
.gm-permissions-collapsible{
  overflow:hidden;
}
.gm-permissions-collapsible > summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
}
.gm-permissions-collapsible > summary::-webkit-details-marker{
  display:none;
}
.gm-permissions-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.gm-permissions-summary:hover{
  background:rgba(33,91,144,.05);
}
.gm-permissions-chevron{
  flex:0 0 auto;
  font-size:18px;
  font-weight:800;
  transition:transform .18s ease;
}
.gm-permissions-collapsible[open] .gm-permissions-chevron{
  transform:rotate(180deg);
}
.gm-permissions-content{
  border-top:1px solid rgba(45,103,158,.18);
}
body.dark-ui .gm-permissions-summary:hover{
  background:rgba(255,255,255,.04);
}
/* Two-factor sign-in page (same card as the login page) */
.auditna-login-hint{margin:0 0 14px;font-size:12px;font-weight:700;line-height:1.8;text-align:center;color:#3c5670}
.auditna-login-code{letter-spacing:3px;text-align:center}
.auditna-login-back{display:block;margin-top:14px;text-align:center;font-size:12px;font-weight:800;color:#245F97;text-decoration:none}
.auditna-login-back:hover{text-decoration:underline}

.gm-employees-count{color:#000}

/* AUDITNA-1006az - forgot password */
.auditna-login-forgot { margin: -4px 0 12px; text-align: left; }
html[dir="ltr"] .auditna-login-forgot { text-align: right; }
.auditna-login-forgot a { color: #315f9b; font-size: 11px; font-weight: 800; text-decoration: none; }
.auditna-login-forgot a:hover, .auditna-login-forgot a:focus { text-decoration: underline; }
.auditna-login-notice { margin-bottom: 13px; padding: 8px 11px; border: 1px solid #9fd3b4; border-radius: 9px; background: #effaf3; color: #17663a; font-size: 11px; font-weight: 700; }
.auth-notice { margin: 0 0 14px; padding: 9px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; }
.auth-notice--success { border: 1px solid #9fd3b4; background: #effaf3; color: #17663a; }
.auth-notice--error { border: 1px solid #e4a8ac; background: #fff3f4; color: #9f2430; }
.auth-card__links { margin-top: 14px; text-align: center; font-size: 12px; font-weight: 700; }
.auth-card__links a { color: #315f9b; }
body.dark-ui .auth-card__links a { color: #9CC6EE; }


/* Settings → Responsible auditors (V2.47.39) */
.responsible-note { width: min(1540px, calc(100% - 36px)); margin: 14px auto 0; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(49,95,155,.25); background: rgba(49,95,155,.07); color: #24497a; font-size: 12px; font-weight: 700; }
body.dark-ui .responsible-note { color: #9CC6EE; background: rgba(156,198,238,.08); border-color: rgba(156,198,238,.25); }
.responsible-assign-form { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.responsible-assign-form select { flex: 1 1 auto; min-width: 0; min-height: 30px; padding: 2px 8px; }
.responsible-assign-form .btn { flex: 0 0 auto; white-space: nowrap; }
.responsible-table th, .responsible-table td { padding-top: 4px; padding-bottom: 4px; }
.responsible-table th:nth-child(1) { width: 9%; }
.responsible-table th:nth-child(2) { width: 27%; }
.responsible-table th:nth-child(3) { width: 22%; }
.responsible-table th:nth-child(4) { width: 10%; }
.responsible-table th:nth-child(5) { width: 32%; }
.responsible-role { color: #6b7a90; font-weight: 600; }
.employee-form-row3 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 900px) { .employee-form-row3 { grid-template-columns: 1fr; } }
.employee-form-grid .field input:disabled { background: #EEF2F6; color: #8A97A6; cursor: not-allowed; }
body.dark-ui .employee-form-grid .field input:disabled { background: #22364C; color: #7F93A8; }
.employee-form-grid input[type="tel"] { direction: ltr; text-align: right; }
/* Companies list: compact rows */
.companies-index-table--legacy-layout tbody td, .companies-index-table td { height: 40px; padding-top: 3px; padding-bottom: 3px; }
.companies-index-table .company-code-pill { height: 28px; }
.companies-index-table .company-name-icon { width: 24px; height: 24px; font-size: 12px; }
.companies-index-table .status-badge { min-height: 24px; padding-top: 1px; padding-bottom: 1px; }
.companies-index-table .action-icon-btn { width: 34px; min-width: 34px; height: 30px; min-height: 30px; }
/* Employees list: phone column + compact rows */
.employees-index-table .employee-user-col { width: 28%; }
.employees-index-table .employee-name-col { width: 21%; }
.employees-index-table .employee-phone-col { width: 14%; text-align: center; }
.employees-index-table .employee-role-col { width: 12%; }
.employees-index-table .employee-status-col { width: 9%; }
.employees-index-table .employee-actions-col { width: 16%; }
.employees-index-table tbody td { height: 40px; padding-top: 3px; padding-bottom: 3px; }
.employees-index-table .employee-avatar { flex-basis: 28px; width: 28px; height: 28px; font-size: 13px; }
.employees-index-table .employee-role-badge { min-height: 24px; padding: 2px 8px; }
.employees-index-table .status-badge { min-height: 24px; padding-top: 1px; padding-bottom: 1px; }
.employees-index-table .action-icon-btn { width: 34px; min-width: 34px; height: 30px; min-height: 30px; }
/* Working paper forms help: placeholders spread across the full width */
.pft-help .pft-placeholders li { flex: 1 1 auto; justify-content: center; }
.pft-help .pft-note { width: 100%; }
/* Create audit file: company search in the section header (far left) */
.audit-form-section__header .audit-header-search { margin: 0; margin-inline-start: auto; flex: 0 1 340px; }
.audit-form-section__header .audit-header-search input { min-height: 36px; }
/* Error / access-denied status card */
.status-page { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 24px 16px; }
.status-card { width: min(560px, 100%); overflow: hidden; border: 1px solid #2D679E; border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(24,65,104,.12); text-align: center; }
.status-card__band { height: 6px; background: linear-gradient(90deg, #173F69, #2D679E); }
.status-card--warning .status-card__band { background: linear-gradient(90deg, #805B05, #C9970E); }
.status-card--danger .status-card__band { background: linear-gradient(90deg, #8E2929, #C94C4C); }
.status-card__body { padding: 28px 28px 22px; }
.status-card__icon { width: 64px; height: 64px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 16px; border: 1px solid #C6D9EA; background: #EAF3FC; color: #215B90; font-size: 28px; font-weight: 800; }
.status-card--warning .status-card__icon { border-color: #E8D29A; background: #FFF7E1; color: #805B05; }
.status-card--danger .status-card__icon { border-color: #EDBABA; background: #FFF1F1; color: #9B3434; }
.status-card__code { display: inline-block; margin-bottom: 8px; padding: 2px 12px; border-radius: 999px; background: #EDF4FB; color: #36536E; font-size: 11px; font-weight: 800; direction: ltr; }
.status-card h1 { margin: 0 0 8px; color: #173F69; font-size: 20px; font-weight: 800; }
.status-card p { max-width: 440px; margin: 0 auto; color: #5E7186; font-size: 13px; font-weight: 600; line-height: 1.9; }
.status-card__actions { display: flex; justify-content: center; gap: 10px; padding: 14px 20px; border-top: 1px solid #DCE7F2; background: #F5F9FD; }
body.dark-ui .status-card { background: #20344B; border-color: #5A7C9F; }
body.dark-ui .status-card h1 { color: #F3F7FB; }
body.dark-ui .status-card p { color: #C3D2E1; }
body.dark-ui .status-card__code { background: #1B3147; color: #C3D2E1; }
body.dark-ui .status-card__actions { background: #1A3046; border-color: #587A9D; }
/* Responsible auditors: toolbar actions, filters and live summary */
.responsible-toolbar-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.responsible-filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 14px; padding: 10px 16px; border-bottom: 1px solid #B9CDE1; background: #F7FAFD; }
.responsible-filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.responsible-filter-field label { color: #173F69; font-size: 11px; font-weight: 800; }
.responsible-filter-field input, .responsible-filter-field select { min-height: 34px; padding: 4px 10px; border: 1px solid #94B4D2; border-radius: 8px; background: #fff; font-family: inherit; font-weight: 700; }
.responsible-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; font-size: 12px; font-weight: 700; color: #173F69; }
.responsible-summary__total { padding: 4px 10px; border-radius: 999px; background: #1E527F; color: #fff; }
.responsible-summary__total strong { color: #fff; }
.responsible-summary__chip { padding: 4px 10px; border: 1px solid #C6D9EA; border-radius: 999px; background: #EDF4FB; }
.responsible-summary__chip.is-selected { border-color: #1E527F; }
body.dark-ui .responsible-filter-bar { background: #1A3046; border-color: #587A9D; }
body.dark-ui .responsible-filter-field label, body.dark-ui .responsible-summary { color: #EEF5FC; }
body.dark-ui .responsible-filter-field input, body.dark-ui .responsible-filter-field select { background: #172B40; color: #F2F7FC; border-color: #587A9D; }
body.dark-ui .responsible-summary__chip { background: #1B3147; border-color: #587A9D; }
