:root {
    color-scheme: light;
    --ink-950: #101828;
    --ink-900: #172033;
    --ink-800: #263248;
    --ink-700: #36445d;
    --ink-600: #526077;
    --ink-500: #718096;
    --ink-400: #98a2b3;
    --ink-300: #c9d1dc;
    --ink-200: #dfe4eb;
    --ink-100: #edf0f5;
    --ink-50: #f6f7fa;
    --white: #ffffff;
    --primary-900: #172a67;
    --primary-800: #203574;
    --primary-700: #294486;
    --primary-600: #3657a4;
    --primary-500: #4c6dc3;
    --primary-100: #e9edfb;
    --primary-50: #f3f5fd;
    --teal-700: #0e7567;
    --teal-600: #118878;
    --teal-100: #d9f2ed;
    --teal-50: #edfaf7;
    --success-700: #1c6a48;
    --success-100: #dff2e8;
    --success-50: #eff9f3;
    --warning-800: #8a4e0e;
    --warning-700: #a45b0a;
    --warning-100: #fbe8c7;
    --warning-50: #fff8eb;
    --danger-700: #ad343e;
    --danger-100: #f9dfe1;
    --danger-50: #fff2f3;
    --radius-sm: 7px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-sm: 0 4px 14px rgba(27, 39, 71, 0.07);
    --shadow-md: 0 14px 34px rgba(26, 39, 73, 0.11);
    --border: 1px solid var(--ink-200);
    --font: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
    --font-ar: Tahoma, "Segoe UI", Arial, sans-serif;
    --header-height: 70px;
    --watermark-height: 28px;
    --sidebar-width: 274px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--ink-50);
    font-family: var(--font);
    scroll-behavior: smooth;
}

html[dir="rtl"] {
    font-family: var(--font-ar);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink-900);
    background-color: var(--ink-50);
    background-image: linear-gradient(rgba(64, 84, 128, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 84, 128, 0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    font-size: 14px;
    line-height: 1.5;
}

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

button,
select {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

button,
input,
select,
textarea {
    outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(54, 87, 164, 0.28);
    outline-offset: 2px;
}

button {
    border: 0;
}

h1,
h2,
h3,
p {
    margin-block: 0;
}

h1,
h2,
h3,
strong {
    letter-spacing: -0.012em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] strong {
    letter-spacing: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.skip-link {
    position: fixed;
    inset-block-start: 8px;
    inset-inline-start: 12px;
    z-index: 1000;
    padding: 10px 14px;
    color: var(--white);
    background: var(--primary-800);
    border-radius: var(--radius-sm);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.demo-watermark {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--watermark-height);
    padding-inline: 12px;
    color: #e7edf9;
    background: var(--primary-900);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.035em;
}

html[dir="rtl"] .demo-watermark {
    letter-spacing: 0;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5ed9bd;
    box-shadow: 0 0 0 3px rgba(94, 217, 189, 0.14);
}

.global-header {
    position: sticky;
    inset-block-start: var(--watermark-height);
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding-inline: clamp(16px, 3vw, 42px);
    background: rgba(255, 255, 255, 0.97);
    border-block-end: var(--border);
    box-shadow: var(--shadow-xs);
}

.brand-button {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    color: var(--ink-900);
    background: transparent;
    text-align: start;
}

.brand-mark {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 39px;
    height: 39px;
    overflow: hidden;
    color: var(--white);
    background: var(--primary-800);
    border-radius: 9px;
    box-shadow: 0 5px 13px rgba(32, 53, 116, 0.22);
}

.brand-mark span {
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
}

.brand-mark span:last-child {
    color: var(--primary-900);
    background: #76d2c0;
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    font-size: 15px;
}

.brand-copy small {
    color: var(--ink-500);
    font-size: 11px;
}

.header-actions,
.filter-group,
.page-heading-actions,
.detail-badges,
.method-list,
.approval-actions,
.modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-button,
.context-switcher select {
    min-height: 40px;
    color: var(--ink-700);
    background: var(--white);
    border: var(--border);
    border-radius: 8px;
}

.control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 12px;
    font-weight: 650;
}

.control-button:hover,
.context-switcher select:hover {
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.control-button .icon {
    width: 17px;
    height: 17px;
}

.language-code {
    display: grid;
    place-items: center;
    width: 26px;
    height: 22px;
    color: var(--white);
    background: var(--primary-700);
    border-radius: 5px;
    font-size: 10px;
    letter-spacing: 0.04em;
}

.context-switcher select {
    min-width: 138px;
    padding-inline: 12px 34px;
}

#demo-main {
    min-height: calc(100vh - var(--header-height) - var(--watermark-height));
}

.entry-screen {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
    padding-block: clamp(42px, 7vw, 90px) 54px;
}

.entry-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.45fr);
    min-height: 320px;
    overflow: hidden;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.entry-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 6vw, 76px);
}

.eyebrow {
    display: block;
    margin-block-end: 10px;
    color: var(--teal-700);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

html[dir="rtl"] .eyebrow {
    letter-spacing: 0;
}

.entry-copy h1 {
    max-width: 820px;
    color: var(--ink-950);
    font-size: clamp(34px, 5.2vw, 64px);
    line-height: 1.04;
}

.entry-lead {
    max-width: 720px;
    margin-block-start: 20px;
    color: var(--ink-600);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.65;
}

.entry-safety {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    margin-block-start: 26px;
    padding: 10px 13px;
    color: var(--success-700);
    background: var(--success-50);
    border: 1px solid #c9e8d7;
    border-radius: 8px;
    font-weight: 650;
}

.entry-safety .icon {
    width: 18px;
    height: 18px;
}

.entry-signal {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    padding: 28px;
    color: var(--white);
    background: var(--primary-800);
    border-inline-start: 7px solid #66ccb7;
}

.entry-signal::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px);
    background-size: 26px 26px;
}

.signal-label,
.entry-signal strong,
.signal-lines {
    position: relative;
    z-index: 1;
}

.signal-label {
    display: grid;
    place-items: center;
    align-self: flex-end;
    width: 54px;
    height: 54px;
    color: var(--primary-900);
    background: #75d1bf;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 850;
}

.signal-lines {
    display: grid;
    gap: 9px;
    align-self: stretch;
}

.signal-lines i {
    display: block;
    height: 4px;
    background: rgba(255, 255, 255, 0.28);
}

.signal-lines i:nth-child(2) { width: 78%; }
.signal-lines i:nth-child(3) { width: 46%; }
.signal-lines i:nth-child(4) { width: 68%; }

.entry-signal strong {
    font-size: 46px;
    font-weight: 350;
}

.entry-contexts {
    margin-block-start: 46px;
}

.entry-context-title {
    margin-block-end: 18px;
    color: var(--ink-800);
    font-size: 18px;
}

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

.entry-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 24px;
    overflow: hidden;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.entry-card::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 4px;
    background: var(--primary-600);
}

.entry-company::before { background: var(--teal-600); }
.entry-employee::before { background: #7862ad; }

.entry-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.entry-number {
    color: var(--ink-400);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.1em;
}

.entry-icon {
    display: grid;
    place-items: center;
    width: 47px;
    height: 47px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 9px;
}

.entry-company .entry-icon {
    color: var(--teal-700);
    background: var(--teal-50);
}

.entry-employee .entry-icon {
    color: #674d9d;
    background: #f3effb;
}

.entry-card-copy {
    flex: 1;
    padding-block: 34px 26px;
}

.entry-card h2 {
    font-size: 22px;
    line-height: 1.2;
}

.entry-card p {
    margin-block-start: 12px;
    color: var(--ink-600);
    line-height: 1.65;
}

.prototype-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-block-start: 22px;
    padding: 15px 17px;
    color: var(--warning-800);
    background: var(--warning-50);
    border: 1px solid var(--warning-100);
    border-radius: var(--radius-sm);
}

.prototype-disclaimer .icon {
    margin-block-start: 1px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    color: var(--ink-700);
    background: var(--white);
    border: var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 720;
    line-height: 1.2;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover:not(:disabled) {
    border-color: var(--primary-500);
    color: var(--primary-700);
}

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

.button .icon {
    width: 17px;
    height: 17px;
}

.button.primary,
.button.entry-button,
.button.employee-primary {
    color: var(--white);
    background: var(--primary-700);
    border-color: var(--primary-700);
    box-shadow: 0 5px 12px rgba(41, 68, 134, 0.16);
}

.button.primary:hover:not(:disabled),
.button.entry-button:hover:not(:disabled),
.button.employee-primary:hover:not(:disabled) {
    color: var(--white);
    background: var(--primary-800);
    border-color: var(--primary-800);
}

.button.entry-button {
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
}

.button.secondary {
    background: var(--white);
}

.button.text-button {
    min-height: 34px;
    padding: 5px 7px;
    color: var(--primary-700);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.button.icon-button {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 50%;
}

.button.table-action {
    min-height: 34px;
    padding: 6px 10px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-color: var(--primary-100);
    white-space: nowrap;
}

.button.danger,
.button.danger-ghost {
    color: var(--danger-700);
    border-color: var(--danger-100);
}

.button.danger {
    color: var(--white);
    background: var(--danger-700);
}

.button.danger-ghost {
    background: var(--danger-50);
}

.workspace-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - var(--header-height) - var(--watermark-height));
}

.workspace-sidebar {
    position: sticky;
    inset-block-start: calc(var(--header-height) + var(--watermark-height));
    display: flex;
    flex-direction: column;
    align-self: start;
    height: calc(100vh - var(--header-height) - var(--watermark-height));
    padding: 22px 16px 18px;
    color: #dce3f4;
    background: var(--primary-900);
    border-inline-end: 1px solid rgba(255,255,255,.08);
}

.company-shell .workspace-sidebar {
    background: #18243d;
}

.workspace-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 52px;
    padding-inline: 7px;
}

.workspace-logo,
.mini-brand {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    color: var(--primary-900);
    background: #72cfbc;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 850;
}

.company-logo,
.company-shell .workspace-logo {
    color: var(--white);
    background: #3764bb;
}

.workspace-identity div,
.employee-brand div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.workspace-identity strong {
    overflow: hidden;
    color: var(--white);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-identity span:not(.workspace-logo) {
    color: #aebbd6;
    font-size: 10px;
}

.workspace-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-block-start: 30px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding-inline: 12px;
    color: #b9c4dc;
    background: transparent;
    border-radius: 8px;
    text-align: start;
    font-weight: 650;
}

.nav-item:hover {
    color: var(--white);
    background: rgba(255,255,255,.07);
}

.nav-item.active {
    color: var(--white);
    background: rgba(112, 207, 188, 0.14);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    inset-block: 9px;
    inset-inline-start: 0;
    width: 3px;
    background: #70cfbc;
    border-radius: 3px;
}

.nav-item .icon {
    width: 18px;
    height: 18px;
}

.sidebar-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-block-start: auto;
    padding: 12px;
    color: #aebbd6;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;
    font-size: 10px;
}

.sidebar-note .icon {
    width: 16px;
    height: 16px;
    color: #70cfbc;
}

.workspace-main {
    min-width: 0;
}

.workspace-content {
    width: min(1500px, 100%);
    margin-inline: auto;
    padding: clamp(22px, 3vw, 42px);
}

.page-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-height: 60px;
}

.page-heading h1 {
    color: var(--ink-950);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.18;
}

.page-heading p {
    margin-block-start: 6px;
    color: var(--ink-600);
    font-size: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 25px;
    padding: 4px 8px;
    color: var(--ink-700);
    background: var(--ink-100);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge.success,
.badge.active,
.badge.approved,
.badge.present {
    color: var(--success-700);
    background: var(--success-100);
}

.badge.warning,
.badge.trial,
.badge.grace,
.badge.pending,
.badge.late,
.badge.notice {
    color: var(--warning-800);
    background: var(--warning-100);
}

.badge.suspended,
.badge.danger,
.badge.rejected,
.badge.absent,
.badge.inactive {
    color: var(--danger-700);
    background: var(--danger-100);
}

.badge.teal,
.badge.onLeave {
    color: var(--teal-700);
    background: var(--teal-100);
}

.badge.indigo {
    color: var(--primary-700);
    background: var(--primary-100);
}

.badge.neutral,
.badge.biometric,
.badge.web,
.badge.mobile,
.badge.import,
.badge.manual,
.badge.notScheduled {
    color: var(--ink-700);
    background: var(--ink-100);
}

.metric-grid {
    display: grid;
    gap: 12px;
}

.platform-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hr-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.payroll-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 118px;
    padding: 17px;
    overflow: hidden;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.metric-card::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    background: var(--ink-300);
}

.metric-card.primary::before,
.metric-card.indigo::before { background: var(--primary-600); }
.metric-card.success::before { background: var(--success-700); }
.metric-card.teal::before { background: var(--teal-600); }
.metric-card.warning::before { background: #cf7a18; }
.metric-card.danger::before { background: var(--danger-700); }

.metric-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 8px;
}

.metric-card.success .metric-icon { color: var(--success-700); background: var(--success-50); }
.metric-card.teal .metric-icon { color: var(--teal-700); background: var(--teal-50); }
.metric-card.warning .metric-icon { color: var(--warning-800); background: var(--warning-50); }
.metric-card.danger .metric-icon { color: var(--danger-700); background: var(--danger-50); }

.metric-icon .icon {
    width: 18px;
    height: 18px;
}

.metric-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.metric-label {
    color: var(--ink-600);
    font-size: 11px;
    font-weight: 650;
}

.metric-content strong {
    margin-block-start: 7px;
    overflow: hidden;
    color: var(--ink-950);
    font-size: clamp(19px, 2vw, 26px);
    line-height: 1.05;
    text-overflow: ellipsis;
}

.metric-content small {
    margin-block-start: 8px;
    overflow: hidden;
    color: var(--ink-500);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel {
    min-width: 0;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 57px;
    padding: 15px 18px;
    border-block-end: var(--border);
}

.panel-header h2 {
    color: var(--ink-800);
    font-size: 15px;
}

.panel-body {
    padding: 18px;
}

.content-grid,
.detail-grid,
.profile-grid {
    display: grid;
    gap: 16px;
}

.content-grid.two-one {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
}

.content-grid.equal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-compact-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 62px;
    padding: 9px 4px;
    color: var(--ink-800);
    background: transparent;
    border-block-end: var(--border);
    text-align: start;
}

.company-compact-row:last-child {
    border-block-end: 0;
}

.company-compact-row:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.company-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--company-accent, var(--primary-700));
    background: color-mix(in srgb, var(--company-accent, var(--primary-700)) 11%, white);
    border: 1px solid color-mix(in srgb, var(--company-accent, var(--primary-700)) 20%, white);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 850;
}

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .company-avatar { background: var(--primary-50); }
}

.compact-main,
.table-person > div,
.event-row > div,
.activity-row > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.compact-main strong,
.compact-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-main small,
.activity-row small,
.event-row small,
.table-person small {
    color: var(--ink-500);
    font-size: 10px;
}

.utilization-panel .panel-body,
.distribution-panel .panel-body {
    display: grid;
    gap: 17px;
}

.utilization-row,
.usage-block {
    display: grid;
    gap: 7px;
}

.utilization-label,
.usage-block > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.utilization-label span {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.utilization-label strong,
.usage-block strong {
    font-size: 11px;
}

.progress-track,
.mini-progress {
    height: 7px;
    overflow: hidden;
    background: var(--ink-100);
    border-radius: 10px;
}

.progress-track span,
.mini-progress span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    background: var(--primary-600);
    border-radius: inherit;
}

.mini-progress {
    height: 4px;
}

.utilization-row small {
    color: var(--ink-500);
    font-size: 9px;
}

.activity-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.activity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
    background: var(--ink-50);
    border: var(--border);
    border-radius: 8px;
}

.activity-icon,
.event-icon,
.callout-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 8px;
}

.activity-icon .icon,
.event-icon .icon,
.callout-icon .icon {
    width: 17px;
    height: 17px;
}

.activity-row strong {
    font-size: 11px;
}

.activity-row time {
    color: var(--ink-500);
    font-size: 9px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
}

.search-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 38vw);
    min-height: 40px;
    padding-inline: 11px;
    color: var(--ink-500);
    background: var(--ink-50);
    border: var(--border);
    border-radius: 7px;
}

.search-control.wide {
    width: min(410px, 42vw);
}

.search-control:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(54, 87, 164, 0.1);
}

.search-control .icon {
    width: 17px;
    height: 17px;
}

.search-control input {
    width: 100%;
    min-width: 0;
    padding: 0;
    color: var(--ink-900);
    background: transparent;
    border: 0;
}

.select-control,
.field select,
.field input,
.field textarea,
.role-preview select {
    min-height: 40px;
    padding: 8px 11px;
    color: var(--ink-800);
    background: var(--white);
    border: var(--border);
    border-radius: 7px;
}

.field textarea {
    min-height: 80px;
    resize: vertical;
}

.result-count {
    color: var(--ink-600);
    font-size: 11px;
    white-space: nowrap;
}

.table-panel {
    min-width: 0;
    overflow: hidden;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink-700);
    font-size: 11px;
    text-align: start;
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-block-end: var(--border);
    text-align: start;
    vertical-align: middle;
}

.data-table th {
    color: var(--ink-500);
    background: var(--ink-50);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

html[dir="rtl"] .data-table th {
    letter-spacing: 0;
}

.data-table tbody tr:hover {
    background: var(--primary-50);
}

.data-table tbody tr:last-child td {
    border-block-end: 0;
}

.company-table {
    min-width: 1090px;
}

.employee-table {
    min-width: 1120px;
}

.attendance-table {
    min-width: 990px;
}

.payroll-table {
    min-width: 870px;
}

.table-person {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 150px;
}

.table-person strong {
    color: var(--ink-900);
    font-size: 11px;
}

.module-stack,
.evidence-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.module-stack span {
    padding: 3px 5px;
    color: var(--ink-600);
    background: var(--ink-100);
    border-radius: 4px;
    font-size: 8px;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 240px;
    padding: 32px;
    color: var(--ink-500);
    text-align: center;
}

.empty-state .icon {
    width: 34px;
    height: 34px;
    color: var(--ink-400);
}

.company-detail-hero,
.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--white);
    border: var(--border);
    border-inline-start: 5px solid var(--company-accent, var(--primary-600));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.company-detail-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    color: var(--white);
    background: var(--company-accent, var(--primary-600));
    border-radius: 13px;
    font-size: 20px;
    font-weight: 850;
}

.company-detail-copy,
.profile-identity {
    flex: 1;
    min-width: 0;
}

.company-detail-copy .eyebrow,
.profile-identity .eyebrow {
    margin-block-end: 4px;
}

.company-detail-copy h2,
.profile-identity h2 {
    margin-block-end: 8px;
    font-size: clamp(22px, 3vw, 30px);
}

.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-two {
    grid-column: span 2;
}

.detail-card .panel-body,
.profile-card .panel-body,
.employee-detail-list {
    display: grid;
    gap: 0;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 43px;
    padding-block: 9px;
    border-block-end: var(--border);
}

.info-row:last-child {
    border-block-end: 0;
}

.info-row > span:first-child {
    color: var(--ink-500);
    font-size: 11px;
}

.info-row strong {
    color: var(--ink-800);
    font-size: 11px;
    text-align: end;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 47px;
    padding: 10px;
    color: var(--success-700);
    background: var(--success-50);
    border: 1px solid #d4ebde;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.module-card .icon {
    width: 16px;
    height: 16px;
}

.check-list {
    display: grid;
    gap: 11px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink-700);
    font-size: 12px;
}

.check-list .icon {
    width: 17px;
    height: 17px;
    color: var(--success-700);
}

.role-preview {
    display: grid;
    gap: 8px;
    margin-block-start: 22px;
    padding: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px;
}

.role-preview > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.role-preview span {
    color: var(--white);
    font-size: 10px;
    font-weight: 750;
}

.role-preview small {
    color: #93a3c2;
    font-size: 8px;
}

.role-preview select {
    width: 100%;
    min-height: 36px;
    color: var(--white);
    background-color: rgba(7, 17, 35, .38);
    border-color: rgba(255,255,255,.16);
    font-size: 10px;
}

.role-preview select option {
    color: var(--ink-900);
    background: var(--white);
}

.role-scope {
    color: #76d2c0 !important;
    font-size: 9px !important;
}

.distribution-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.distribution-row > div:first-child,
.distribution-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.distribution-row > div:first-child {
    min-width: 145px;
    color: var(--ink-700);
    font-size: 11px;
}

.department-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--primary-600);
}

.dept-sales { background: #7362ad; }
.dept-operations { background: #3764bb; }
.dept-engineering { background: #138b78; }
.dept-finance { background: #d88927; }
.dept-humanResources { background: #d05a72; }
.dept-customerExperience { background: #5b7f92; }

.distribution-value {
    flex: 1;
    justify-content: flex-end;
}

.distribution-value .mini-progress {
    width: min(180px, 50%);
}

.distribution-value strong {
    min-width: 24px;
    text-align: end;
    font-size: 11px;
}

.panel-kicker {
    margin-block-end: 12px;
    color: var(--ink-500);
    font-size: 10px;
}

.trend-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: 12px;
    height: 190px;
    padding-block-start: 12px;
    border-block-end: var(--border);
}

.trend-column {
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 7px;
    height: 100%;
    text-align: center;
}

.trend-column > span {
    width: 68%;
    height: var(--bar);
    margin-inline: auto;
    background: var(--primary-500);
    border-radius: 4px 4px 0 0;
}

.trend-column:last-child > span {
    background: var(--teal-600);
}

.trend-column small {
    color: var(--ink-500);
    font-size: 9px;
}

.event-list {
    display: grid;
    gap: 2px;
}

.event-row {
    display: grid;
    grid-template-columns: 50px auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 65px;
    border-block-end: var(--border);
}

.event-row:last-child {
    border-block-end: 0;
}

.event-row time {
    display: grid;
    place-items: center;
    min-height: 44px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 7px;
}

.event-row time strong {
    font-size: 16px;
    line-height: 1;
}

.event-row time span {
    font-size: 8px;
    text-transform: uppercase;
}

.event-row > div strong {
    font-size: 11px;
}

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

.button.quick-action {
    justify-content: flex-start;
    min-height: 54px;
    padding: 11px;
    color: var(--ink-700);
    background: var(--ink-50);
}

.button.quick-action .icon {
    color: var(--primary-600);
}

.employee-card-list {
    display: none;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    color: var(--primary-700);
    background: var(--primary-100);
    border: 1px solid #d9e0f6;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 820;
}

.avatar.large { width: 44px; height: 44px; font-size: 12px; }
.avatar.xlarge { width: 82px; height: 82px; border-radius: 14px; font-size: 20px; }

.profile-hero {
    border-inline-start-color: var(--primary-600);
}

.profile-identity p {
    margin-block-end: 9px;
    color: var(--ink-600);
}

.profile-callout {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    padding: 12px;
    color: var(--warning-800);
    background: var(--warning-50);
    border: 1px solid var(--warning-100);
    border-radius: 8px;
}

.profile-callout .icon {
    width: 18px;
    height: 18px;
}

.profile-callout div {
    display: flex;
    flex-direction: column;
}

.profile-callout strong {
    font-size: 10px;
}

.profile-callout span {
    font-size: 9px;
}

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

.profile-card.span-two {
    grid-column: span 2;
}

.sensitive-card {
    border-color: #eadbbd;
}

.sensitive-row {
    position: relative;
}

.sensitive-row::before {
    content: '';
    position: absolute;
    inset-inline-start: -18px;
    inset-block: 8px;
    width: 3px;
    background: var(--warning-700);
}

.masked-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--warning-800);
    font-size: 10px;
    font-weight: 700;
}

.masked-value .icon {
    width: 14px;
    height: 14px;
}

.document-list {
    display: grid;
    gap: 10px;
}

.document-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px;
    background: var(--ink-50);
    border-radius: 7px;
}

.document-row > .icon {
    color: var(--primary-600);
}

.document-row > div {
    display: flex;
    flex-direction: column;
}

.document-row strong { font-size: 10px; }
.document-row span { color: var(--ink-500); font-size: 8px; }

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

.timeline-list li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.timeline-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    inset-block-start: 13px;
    inset-block-end: -15px;
    inset-inline-start: 5px;
    width: 1px;
    background: var(--ink-200);
}

.timeline-marker {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    margin-block-start: 3px;
    background: var(--teal-600);
    border: 3px solid var(--teal-100);
    border-radius: 50%;
}

.timeline-list div {
    display: flex;
    flex-direction: column;
}

.timeline-list strong { font-size: 10px; }
.timeline-list time { color: var(--ink-500); font-size: 9px; }

.status-note {
    display: block;
    margin-block-start: 4px;
    color: var(--warning-800);
    font-size: 8px;
}

.muted-text {
    color: var(--ink-500);
    font-size: 9px;
}

.correction-callout,
.payroll-disclaimer,
.privacy-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: var(--border);
    border-inline-start: 4px solid var(--warning-700);
    border-radius: var(--radius-sm);
}

.correction-callout > div {
    flex: 1;
}

.correction-callout strong {
    font-size: 12px;
}

.correction-callout p {
    margin-block-start: 3px;
    color: var(--ink-600);
    font-size: 10px;
}

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

.approval-card {
    background: var(--white);
    border: var(--border);
    border-block-start: 3px solid var(--warning-700);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.approval-card.approved { border-block-start-color: var(--success-700); }
.approval-card.rejected { border-block-start-color: var(--danger-700); }

.approval-header,
.approval-actions,
.decision-reason {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
}

.approval-header {
    border-block-end: var(--border);
}

.approval-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    padding: 8px 15px;
}

.approval-timeline {
    padding: 13px 15px;
    background: var(--ink-50);
    border-block: var(--border);
}

.timeline-title {
    display: block;
    margin-block-end: 10px;
    color: var(--ink-500);
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
}

.approval-timeline ol {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.approval-timeline li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-500);
    font-size: 9px;
}

.approval-timeline li:not(:last-child)::after {
    content: '';
    position: absolute;
    inset-inline-start: 20px;
    inset-inline-end: 0;
    inset-block-start: 9px;
    height: 1px;
    background: var(--ink-200);
}

.step-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: var(--ink-500);
    background: var(--ink-100);
    border-radius: 50%;
}

.approval-timeline li.done .step-dot {
    color: var(--white);
    background: var(--success-700);
}

.step-dot .icon {
    width: 11px;
    height: 11px;
}

.approval-actions {
    justify-content: flex-end;
}

.decision-reason {
    align-items: flex-start;
    justify-content: flex-start;
    color: var(--danger-700);
    background: var(--danger-50);
    font-size: 10px;
}

.approvals-empty {
    min-height: 140px;
    color: var(--success-700);
    background: var(--success-50);
    border: 1px solid #d4ebde;
    border-radius: var(--radius);
}

.payroll-disclaimer {
    color: var(--warning-800);
    background: var(--warning-50);
    border-color: var(--warning-100);
}

.payroll-disclaimer .icon {
    width: 18px;
    height: 18px;
}

.payroll-disclaimer strong {
    font-size: 11px;
}

.workflow-panel .panel-body {
    display: flex;
    align-items: center;
    gap: 22px;
}

.workflow-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    flex: 1;
}

.workflow-stepper li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.workflow-stepper li:not(:last-child)::after {
    content: '';
    position: absolute;
    z-index: 0;
    inset-inline-start: 31px;
    inset-inline-end: 0;
    inset-block-start: 15px;
    height: 2px;
    background: var(--ink-200);
}

.workflow-stepper li.complete:not(:last-child)::after {
    background: var(--success-700);
}

.workflow-number {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    color: var(--ink-500);
    background: var(--white);
    border: 2px solid var(--ink-200);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
}

.workflow-stepper .current .workflow-number {
    color: var(--white);
    background: var(--primary-700);
    border-color: var(--primary-700);
}

.workflow-stepper .complete .workflow-number {
    color: var(--white);
    background: var(--success-700);
    border-color: var(--success-700);
}

.workflow-number .icon {
    width: 14px;
    height: 14px;
}

.workflow-stepper li > div {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding-inline-end: 8px;
    background: var(--white);
}

.workflow-stepper strong { font-size: 10px; }
.workflow-stepper small { color: var(--ink-500); font-size: 8px; }
.net-cell { color: var(--success-700); font-weight: 800; }

.support-session-banner {
    position: sticky;
    inset-block-start: calc(var(--header-height) + var(--watermark-height));
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 57px;
    padding: 9px clamp(20px, 3vw, 42px);
    color: #f3f6fd;
    background: #553675;
    box-shadow: var(--shadow-sm);
}

.support-session-copy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-session-copy > div {
    display: flex;
    flex-direction: column;
}

.support-session-copy strong { font-size: 11px; }
.support-session-copy span { color: #d8c9e6; font-size: 9px; }

.button.support-exit {
    min-height: 34px;
    color: var(--white);
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
}

.modal-root:empty {
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(13, 20, 35, 0.62);
}

.modal-dialog {
    width: min(560px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    background: var(--white);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 72px rgba(10, 18, 38, .28);
}

.modal-small { width: min(480px, 100%); }
.modal-payslip { width: min(620px, 100%); }

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    border-block-end: var(--border);
}

.modal-header .eyebrow {
    margin-block-end: 4px;
}

.modal-header h2 {
    font-size: 20px;
}

.modal-content {
    display: grid;
    gap: 17px;
    padding: 22px;
}

.modal-footer {
    justify-content: flex-end;
    padding: 16px 22px;
    background: var(--ink-50);
    border-block-start: var(--border);
}

.modal-lead {
    color: var(--ink-600);
    font-size: 12px;
}

.selected-company,
.selected-employee {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: 8px;
}

.selected-company > div,
.selected-employee > div {
    display: flex;
    flex-direction: column;
}

.selected-company span,
.selected-employee span {
    color: var(--ink-500);
    font-size: 9px;
}

.selected-company strong,
.selected-employee strong {
    font-size: 12px;
}

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

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 6px;
    color: var(--ink-700);
}

.field > span {
    font-size: 10px;
    font-weight: 750;
}

.field select,
.field input,
.field textarea {
    width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(54, 87, 164, .1);
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--ink-700);
    font-size: 11px;
}

.check-field input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--primary-700);
}

.form-error {
    min-height: 18px;
    color: var(--danger-700);
    font-size: 10px;
    font-weight: 700;
}

.payslip-sheet {
    display: grid;
    gap: 18px;
}

.payslip-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-block-end: 16px;
    border-block-end: 2px solid var(--primary-700);
}

.payslip-brand > div {
    display: flex;
    flex-direction: column;
}

.payslip-brand span:not(.workspace-logo) {
    color: var(--ink-500);
    font-size: 10px;
}

.payslip-employee {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.payslip-employee > div {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: var(--ink-50);
    border-radius: 7px;
}

.payslip-employee span { color: var(--ink-500); font-size: 9px; }
.payslip-employee strong { margin-block-start: 3px; font-size: 11px; }

.payslip-lines {
    padding: 6px 16px;
    border: var(--border);
    border-radius: 8px;
}

.payslip-total {
    margin-inline: -16px;
    padding-inline: 16px;
    color: var(--success-700);
    background: var(--success-50);
    border-block-end: 0;
}

.payslip-total strong {
    color: var(--success-700);
    font-size: 16px;
}

.payslip-notice {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    color: var(--warning-800);
    background: var(--warning-50);
    border-radius: 7px;
    font-size: 10px;
}

.toast-region {
    position: fixed;
    inset-block-end: 22px;
    inset-inline-end: 22px;
    z-index: 300;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(360px, calc(100vw - 30px));
    min-height: 48px;
    padding: 12px 15px;
    color: var(--white);
    background: var(--success-700);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px;
    box-shadow: var(--shadow-md);
    font-size: 11px;
    font-weight: 700;
}

.toast.warning {
    background: var(--warning-800);
}

.toast .icon {
    width: 18px;
    height: 18px;
}

.noscript-message {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 30px;
    color: var(--white);
    background: var(--primary-900);
    text-align: center;
}

/* Employee self-service */
.context-employee {
    background: #eef1f7;
}

.employee-stage {
    min-height: calc(100vh - var(--header-height) - var(--watermark-height));
    padding: 34px 24px 50px;
}

.employee-presentation-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    width: min(960px, 100%);
    margin-inline: auto;
    margin-block-end: 20px;
}

.employee-presentation-header .eyebrow {
    margin-block-end: 3px;
}

.employee-presentation-header h2 {
    font-size: 27px;
}

.employee-presentation-header p {
    margin-block-start: 4px;
    color: var(--ink-600);
}

.employee-device {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(430px, 100%);
    height: 760px;
    max-height: calc(100vh - 178px);
    margin-inline: auto;
    overflow: hidden;
    background: #f8f9fc;
    border: 9px solid #172033;
    border-radius: 36px;
    box-shadow: 0 32px 70px rgba(23, 32, 51, .22);
}

.employee-device.expanded {
    width: min(940px, 100%);
    border-radius: 18px;
}

.device-speaker {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-start: 50%;
    z-index: 4;
    width: 70px;
    height: 5px;
    background: #3a465a;
    border-radius: 10px;
    transform: translateX(-50%);
}

html[dir="rtl"] .device-speaker {
    transform: translateX(50%);
}

.employee-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 22px 18px 10px;
    background: var(--white);
    border-block-end: var(--border);
}

.employee-brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.mini-brand {
    width: 34px;
    height: 34px;
    color: var(--white);
    background: var(--primary-700);
    border-radius: 8px;
    font-size: 10px;
}

.employee-brand strong { font-size: 11px; }
.employee-brand small { color: var(--ink-500); font-size: 8px; }

.employee-alert {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--ink-700);
    background: var(--ink-50);
    border-radius: 50%;
}

.employee-alert .icon { width: 18px; height: 18px; }

.notification-dot {
    position: absolute;
    inset-block-start: 6px;
    inset-inline-end: 6px;
    width: 7px;
    height: 7px;
    background: var(--danger-700);
    border: 2px solid var(--white);
    border-radius: 50%;
}

.employee-screen {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.employee-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 19px 17px 24px;
}

.employee-welcome .eyebrow {
    margin-block-end: 5px;
    font-size: 8px;
}

.employee-welcome h1 {
    font-size: 24px;
}

.employee-welcome p,
.employee-page-heading p {
    margin-block-start: 4px;
    color: var(--ink-600);
    font-size: 11px;
}

.checkin-card {
    display: grid;
    gap: 15px;
    padding: 17px;
    color: var(--white);
    background: var(--primary-800);
    border-inline-start: 5px solid #70cfbc;
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(32, 53, 116, .18);
}

.checkin-card.checked-in {
    background: var(--success-700);
    border-inline-start-color: #92ddbc;
}

.checkin-copy {
    display: flex;
    flex-direction: column;
}

.checkin-copy span { color: #cdd7ef; font-size: 9px; }
.checkin-copy strong { margin-block-start: 4px; font-size: 19px; }
.checkin-copy small { margin-block-start: 4px; color: #cdd7ef; font-size: 9px; }

.checkin-card .employee-primary {
    color: var(--primary-900);
    background: var(--white);
    border-color: var(--white);
    box-shadow: none;
}

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

.employee-mini-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 112px;
    padding: 13px;
    background: var(--white);
    border: var(--border);
    border-radius: 10px;
}

.employee-mini-card.span-two {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    grid-column: span 2;
    min-height: 82px;
}

.mini-card-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    margin-block-end: 13px;
    color: var(--teal-700);
    background: var(--teal-50);
    border-radius: 8px;
}

.employee-mini-card.span-two .mini-card-icon {
    margin-block-end: 0;
}

.mini-card-icon.indigo { color: #674d9d; background: #f3effb; }
.mini-card-icon.blue { color: var(--primary-700); background: var(--primary-50); }
.mini-card-icon .icon { width: 17px; height: 17px; }

.employee-mini-card strong { font-size: 17px; }
.employee-mini-card small { margin-block-start: 2px; color: var(--ink-500); font-size: 9px; }
.employee-mini-card.span-two div { display: flex; flex-direction: column; }

.employee-section h2 {
    margin-block-end: 10px;
    font-size: 13px;
}

.announcement-list,
.recent-days,
.my-request-list,
.payslip-card-list {
    display: grid;
    gap: 8px;
}

.announcement-list article {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 57px;
    padding: 10px;
    background: var(--white);
    border: var(--border);
    border-radius: 8px;
}

.announcement-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 7px;
}

.announcement-icon .icon { width: 16px; height: 16px; }
.announcement-list article > div { display: flex; flex-direction: column; }
.announcement-list strong { font-size: 10px; }
.announcement-list small { color: var(--ink-500); font-size: 8px; }

.holiday-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    color: var(--white);
    background: #513f75;
    border-radius: 10px;
}

.holiday-card > div {
    display: flex;
    flex-direction: column;
}

.holiday-card span:not(.holiday-date) { color: #d9d0e8; font-size: 8px; }
.holiday-card strong { margin-block: 3px; font-size: 12px; }
.holiday-card small { color: #d9d0e8; font-size: 8px; }
.holiday-date { font-size: 35px; font-weight: 800; }

.employee-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 67px;
    padding: 7px 6px 9px;
    background: var(--white);
    border-block-start: var(--border);
}

.employee-bottom-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--ink-400);
    background: transparent;
    border-radius: 7px;
    font-size: 7px;
    font-weight: 700;
}

.employee-bottom-nav button.active {
    color: var(--primary-700);
    background: var(--primary-50);
}

.employee-bottom-nav button.active::before {
    content: '';
    position: absolute;
    inset-block-start: -7px;
    width: 28px;
    height: 3px;
    background: var(--primary-700);
    border-radius: 0 0 3px 3px;
}

.employee-bottom-nav .icon { width: 18px; height: 18px; }

.employee-stage-notice {
    width: min(780px, 100%);
    margin: 18px auto 0;
    color: var(--ink-500);
    font-size: 9px;
    text-align: center;
}

.employee-page-heading h1 {
    font-size: 21px;
}

.employee-status-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--white);
    border: var(--border);
    border-radius: 10px;
}

.attendance-pulse {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--warning-800);
    background: var(--warning-100);
    border-radius: 50%;
}

.attendance-pulse.active {
    color: var(--success-700);
    background: var(--success-100);
}

.attendance-pulse .icon { width: 19px; height: 19px; }
.employee-status-panel > div { display: flex; flex-direction: column; }
.employee-status-panel span:not(.attendance-pulse) { color: var(--ink-500); font-size: 8px; }
.employee-status-panel strong { margin-block: 3px; font-size: 13px; }
.employee-status-panel small { color: var(--ink-500); font-size: 8px; }

.employee-action-card {
    display: grid;
    place-items: center;
    gap: 13px;
    padding: 24px 17px 18px;
    background: var(--white);
    border: var(--border);
    border-radius: 12px;
    text-align: center;
}

.action-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    color: var(--primary-700);
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: 50%;
}

.action-visual::before,
.action-visual::after {
    content: '';
    position: absolute;
    inset: -7px;
    border: 1px solid var(--primary-100);
    border-radius: 50%;
}

.action-visual::after {
    inset: -14px;
    opacity: .5;
}

.action-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-copy span { color: var(--ink-500); font-size: 8px; }
.action-copy strong { margin-block: 3px; font-size: 12px; }
.action-copy p { max-width: 280px; color: var(--ink-500); font-size: 9px; }
.employee-action-card .employee-primary { width: 100%; }
.simulation-status { min-height: 18px; color: var(--teal-700); font-size: 10px; font-weight: 700; }

.privacy-note {
    align-items: flex-start;
    padding: 11px;
    color: var(--ink-600);
    background: var(--ink-50);
    border-inline-start-color: var(--primary-600);
    font-size: 9px;
}

.privacy-note .icon { width: 16px; height: 16px; color: var(--primary-700); }

.recent-days > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 43px;
    padding: 9px 11px;
    background: var(--white);
    border: var(--border);
    border-radius: 7px;
}

.recent-days time { color: var(--ink-600); font-size: 9px; }
.recent-days strong { font-size: 10px; }

.employee-form {
    display: grid;
    gap: 13px;
    padding: 15px;
    background: var(--white);
    border: var(--border);
    border-radius: 10px;
}

.leave-preview {
    padding: 3px 11px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: 7px;
}

.leave-preview .info-row {
    min-height: 36px;
}

.leave-preview .negative {
    color: var(--danger-700);
}

.my-request-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px;
    background: var(--white);
    border: var(--border);
    border-radius: 8px;
}

.my-request-list article > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.my-request-list article > div:last-child { align-items: flex-end; }
.my-request-list strong { font-size: 10px; }
.my-request-list span:not(.badge) { color: var(--ink-500); font-size: 8px; }
.my-request-list small { margin-block-start: 4px; color: var(--ink-500); font-size: 8px; }

.employee-payslip-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 12px;
    background: var(--white);
    border: var(--border);
    border-radius: 9px;
}

.payslip-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 8px;
}

.payslip-icon .icon { width: 18px; height: 18px; }
.employee-payslip-card > div { display: flex; flex-direction: column; }
.employee-payslip-card strong { font-size: 10px; }
.employee-payslip-card span { color: var(--ink-500); font-size: 9px; }

.employee-profile-card {
    display: grid;
    justify-items: center;
    padding: 22px;
    background: var(--white);
    border: var(--border);
    border-radius: 11px;
    text-align: center;
}

.employee-profile-card h2 { margin-block-start: 11px; font-size: 18px; }
.employee-profile-card p { margin-block: 3px 9px; color: var(--ink-500); font-size: 10px; }

.employee-detail-list {
    padding: 4px 13px;
    background: var(--white);
    border: var(--border);
    border-radius: 10px;
}

html[dir="rtl"] .entry-button .icon,
html[dir="rtl"] [data-action="open-company"] .icon,
html[dir="rtl"] [data-action="open-employee-profile"] .icon,
html[dir="rtl"] [data-action="platform-nav"] .icon,
html[dir="rtl"] [data-action="company-nav"] .icon,
html[dir="rtl"] .company-compact-row > .icon,
html[dir="rtl"] .text-button .icon {
    transform: scaleX(-1);
}

@media (max-width: 1260px) {
    .platform-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .attendance-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .payroll-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    :root { --sidebar-width: 224px; }
    .global-header { padding-inline: 18px; }
    .reset-button span:last-child { display: none; }
    .workspace-content { padding: 24px; }
    .hr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid.two-one { grid-template-columns: 1fr; }
    .approval-list { grid-template-columns: 1fr; }
    .workflow-panel .panel-body { align-items: stretch; flex-direction: column; }
    .workflow-stepper { width: 100%; }
    .employee-filters { align-items: flex-start; flex-direction: column; }
    .employee-filters .filter-group { width: 100%; flex-wrap: wrap; }
    .employee-filters .search-control { width: 100%; }
}

@media (max-width: 860px) {
    :root { --header-height: 64px; }
    .brand-copy small { display: none; }
    .global-header { gap: 10px; }
    .header-actions { gap: 7px; }
    .context-switcher select { min-width: 110px; }
    .language-toggle span:last-child { display: none; }
    .entry-screen { width: min(100% - 28px, 720px); padding-block-start: 28px; }
    .entry-hero { grid-template-columns: 1fr; }
    .entry-copy { padding: 36px 28px; }
    .entry-copy h1 { font-size: clamp(34px, 8vw, 48px); }
    .entry-signal { display: none; }
    .entry-grid { grid-template-columns: 1fr; }
    .entry-card { min-height: 240px; }

    .workspace-shell { display: block; }
    .workspace-sidebar {
        position: sticky;
        inset-block-start: calc(var(--header-height) + var(--watermark-height));
        z-index: 55;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        width: 100%;
        height: auto;
        padding: 9px 12px;
        border-inline-end: 0;
        border-block-end: 1px solid rgba(255,255,255,.1);
    }
    .workspace-identity { min-height: 40px; padding: 0; }
    .workspace-logo { width: 36px; height: 36px; }
    .workspace-identity > div { display: none; }
    .workspace-nav {
        display: flex;
        flex-direction: row;
        gap: 4px;
        min-width: 0;
        margin: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .workspace-nav::-webkit-scrollbar { display: none; }
    .nav-item { flex: 0 0 auto; min-height: 38px; padding-inline: 10px; font-size: 10px; }
    .nav-item.active::before { inset-block: auto 0; inset-inline: 10px; width: auto; height: 2px; }
    .role-preview { grid-column: 1 / -1; grid-template-columns: auto minmax(150px, 1fr) auto; align-items: center; margin: 0; padding: 7px 9px; }
    .role-preview > div { display: none; }
    .role-preview select { min-height: 32px; }
    .sidebar-note { display: none; }
    .support-session-banner { inset-block-start: calc(var(--header-height) + var(--watermark-height) + 105px); }
    .workspace-content { padding: 20px 16px 34px; }
    .platform-metrics, .attendance-metrics, .payroll-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid, .content-grid.equal { grid-template-columns: 1fr; }
    .span-two, .profile-card.span-two { grid-column: auto; }
    .profile-grid { grid-template-columns: 1fr; }
    .company-detail-hero, .profile-hero { align-items: flex-start; flex-wrap: wrap; }
    .company-detail-hero > .button { width: 100%; }
    .profile-callout { max-width: none; width: 100%; }
    .filter-bar { align-items: flex-start; flex-direction: column; }
    .filter-group { width: 100%; flex-wrap: wrap; }
    .search-control, .search-control.wide { width: 100%; }
    .result-count { align-self: flex-end; }
    .employee-table { display: none; }
    .directory-panel .table-scroll { display: none; }
    .employee-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
    .employee-card { display: grid; gap: 12px; padding: 14px; border: var(--border); border-radius: 9px; }
    .employee-card-header { display: flex; align-items: center; gap: 10px; }
    .employee-card-header > div { display: flex; flex-direction: column; min-width: 0; }
    .employee-card-header strong { font-size: 12px; }
    .employee-card-header span, .employee-card-header small { color: var(--ink-500); font-size: 9px; }
    .employee-card-meta { padding: 0 8px; background: var(--ink-50); border-radius: 7px; }
    .employee-card-meta .info-row { min-height: 34px; }
    .employee-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

    .employee-stage { padding: 0; }
    .employee-presentation-header, .employee-stage-notice { display: none; }
    .employee-device,
    .employee-device.expanded {
        width: 100%;
        height: calc(100vh - var(--header-height) - var(--watermark-height));
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .device-speaker { display: none; }
    .employee-topbar { min-height: 62px; padding: 11px 16px; }
    .employee-device.expanded .employee-screen { max-width: none; }
}

@media (max-width: 640px) {
    :root { --watermark-height: 27px; --header-height: 60px; }
    body { font-size: 13px; }
    .demo-watermark { font-size: 9px; }
    .global-header { padding-inline: 12px; }
    .brand-mark { width: 34px; height: 34px; }
    .brand-copy strong { font-size: 12px; }
    .context-switcher select { width: 96px; min-width: 0; min-height: 37px; padding-inline: 8px; font-size: 10px; }
    .control-button { min-height: 37px; padding-inline: 9px; }
    .reset-button { width: 37px; padding: 0; }
    .language-toggle { width: 42px; padding: 0; }
    .language-code { width: 26px; }
    .page-heading { flex-direction: column; min-height: 0; }
    .page-heading-actions { width: 100%; flex-wrap: wrap; }
    .page-heading-actions .badge { max-width: 100%; height: auto; white-space: normal; line-height: 1.4; }
    .page-heading-actions .button { flex: 1; }
    .page-heading h1 { font-size: 24px; }
    .workspace-sidebar { grid-template-columns: minmax(0, 1fr); }
    .workspace-identity { display: none; }
    .role-preview { grid-template-columns: minmax(0, 1fr) auto; }
    .support-session-banner { inset-block-start: calc(var(--header-height) + var(--watermark-height) + 102px); align-items: flex-start; flex-direction: column; }
    .support-session-banner .button { width: 100%; }
    .workspace-content { padding: 17px 12px 30px; }
    .metric-grid,
    .platform-metrics,
    .hr-metrics,
    .attendance-metrics,
    .approval-metrics,
    .payroll-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card { min-height: 108px; padding: 13px; gap: 9px; }
    .metric-icon { width: 31px; height: 31px; }
    .metric-content strong { font-size: 19px; }
    .metric-content small { white-space: normal; }
    .content-grid.equal { grid-template-columns: 1fr; }
    .activity-list { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-group { display: grid; grid-template-columns: 1fr; }
    .select-control, .filter-group > .button { width: 100%; }
    .employee-card-list { grid-template-columns: 1fr; }
    .profile-hero { text-align: start; }
    .avatar.xlarge { width: 68px; height: 68px; }
    .approval-summary { grid-template-columns: 1fr; }
    .approval-timeline ol { grid-template-columns: 1fr; gap: 9px; }
    .approval-timeline li:not(:last-child)::after { inset-inline-start: 9px; inset-inline-end: auto; inset-block-start: 18px; inset-block-end: -10px; width: 1px; height: auto; }
    .workflow-stepper { grid-template-columns: 1fr; gap: 10px; }
    .workflow-stepper li:not(:last-child)::after { inset-inline-start: 15px; inset-inline-end: auto; inset-block-start: 30px; inset-block-end: -11px; width: 2px; height: auto; }
    .workflow-stepper li > div { padding-inline-end: 0; }
    .workflow-panel .button { width: 100%; }
    .form-grid, .form-grid.two { grid-template-columns: 1fr; }
    .form-grid .span-two { grid-column: auto; }
    .modal-overlay { padding: 10px; }
    .modal-dialog { max-height: calc(100vh - 20px); border-radius: 11px; }
    .modal-header, .modal-content { padding: 17px; }
    .modal-footer { padding: 13px 17px; }
    .modal-footer .button { flex: 1; }
    .payslip-employee { grid-template-columns: 1fr; }
    .toast-region { inset-inline: 12px; inset-block-end: 12px; }
    .toast { max-width: none; }
    .entry-screen { width: calc(100% - 22px); padding-block-start: 20px; }
    .entry-copy { padding: 28px 20px; }
    .entry-copy h1 { font-size: 33px; }
    .entry-lead { font-size: 15px; }
    .entry-card { min-height: 230px; padding: 20px; }
    .entry-contexts { margin-block-start: 30px; }
}

@media (max-width: 390px) {
    .brand-copy { display: none; }
    .header-actions { flex: 1; justify-content: flex-end; }
    .metric-card { flex-direction: column; }
    .metric-content strong { font-size: 18px; }
    .employee-page { padding-inline: 14px; }
    .employee-bottom-nav span { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .demo-watermark,
    .global-header,
    .workspace-sidebar,
    .employee-bottom-nav,
    .button,
    .toast-region {
        display: none !important;
    }
    .workspace-shell { display: block; }
    .workspace-content { padding: 0; }
    body { background: var(--white); }
}
