:root {
    --font-stack: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --page-max-width: 1320px;
    --content-gutter: clamp(14px, 2vw, 24px);
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 14px;
    --space-4: 18px;
    --space-5: 24px;
    --space-6: 30px;
    --radius-xs: 10px;
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --line-height: 1.52;
    --font-size-xxs: 10px;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 19px;
    --control-height: 42px;
    --control-ring-offset: 3px;
    --transition: 0.22s ease;
    --shadow-card-soft: var(--shadow-card, 0 8px 30px rgba(15, 23, 42, .05));
    --shadow-card-soft-hover: 0 16px 44px rgba(15, 23, 42, .11);
    --shadow-soft: var(--shadow-soft, 0 12px 42px rgba(15, 23, 42, .08));
    --surface-strong: var(--surface-hover, #f1f5f9);
    --surface-subtle: var(--surface-muted, #f8fafc);
    --surface-card: var(--card-bg, #ffffff);
    --control-disabled-opacity: 0.5;
    
    --page-bg: #eef3f8;
    --card-bg: #ffffff;
    --surface-muted: #f8fafc;
    --surface-hover: #f1f5f9;
    --surface-overlay: color-mix(in oklab, var(--text-color) 20%, transparent);
    --surface-elevated: #ffffff;
    --surface-pressed: #e2e8f0;
    --surface-0: #ffffff;

    --border-color: #dbe3ee;
    --border-color-strong: #c6d4e6;

    --text-color: #0f172a;
    --text-soft: #334155;
    --text-muted: #475569;
    --text-subtle: #64748b;
    --text-color-inverse: #ffffff;
    --heading-color: var(--text-color);
    --text-main: var(--text-color);
    --surface-panel: var(--card-bg);
    --surface-card-muted: color-mix(in oklab, var(--surface-muted) 76%, var(--card-bg));
    --surface-card-hover: color-mix(in oklab, var(--surface-hover) 72%, var(--card-bg));
    --surface-accent-soft: color-mix(in oklab, var(--accent-color, #2563eb) 14%, transparent);
    --surface-warning-soft: color-mix(in oklab, var(--warning, #f59e0b) 14%, transparent);
    --surface-danger-soft: color-mix(in oklab, var(--danger, #ef4444) 14%, transparent);
    --surface-success-soft: color-mix(in oklab, var(--success, #10b981) 14%, transparent);
    --component-shadow: var(--shadow-soft);
    --component-border: var(--border-color);
    --state-warning: var(--warning, #f59e0b);
    --state-danger: var(--danger, #ef4444);
    --state-success: var(--success, #10b981);
    --danger-soft: color-mix(in oklab, var(--danger, #ef4444) 12%, transparent);
    --danger-soft-hover: color-mix(in oklab, var(--danger, #ef4444) 18%, transparent);
    --danger-border: color-mix(in oklab, var(--danger, #ef4444) 32%, transparent);
    --font-weight-page-title: 700;
    --font-weight-card-title: 600;
    --font-weight-body: 400;
    --font-weight-subtle: 500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-stack);
    background: var(--page-bg, #eef3f8);
    color: var(--text-color, #0f172a);
    overflow-x: hidden;
    line-height: var(--line-height);
    font-size: 14px;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app-content {
    color: var(--text-color, #0f172a);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color, #0f172a);
    line-height: 1.22;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: var(--font-weight-page-title, 700);
}

h2 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-card-title, 600);
}

h3 {
    font-size: 1.05rem;
    font-weight: var(--font-weight-card-title, 600);
}

p {
    margin: 0;
    color: var(--text-color, #0f172a);
    font-size: 14px;
    font-weight: var(--font-weight-body, 400);
}

small {
    color: var(--text-subtle, #64748b);
    font-weight: 500;
    font-size: var(--font-size-xxs);
}

strong {
    font-weight: 600;
}

label {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--text-soft, #475569);
    font-size: 12px;
    font-weight: 500;
}

:focus-visible {
    outline: none;
    outline-offset: var(--control-ring-offset);
    box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, .2));
}

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

button {
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 10px);
    min-height: var(--control-height, 42px);
    padding: 0 14px;
    background: var(--surface-muted, #f8fafc);
    color: var(--text-color, #0f172a);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
    letter-spacing: 0.005em;
    font-weight: var(--font-weight-subtle, 500);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover, 0 16px 38px rgba(37, 99, 235, .16));
}

button:active {
    transform: translateY(0);
}

button:disabled {
    cursor: not-allowed;
    opacity: var(--control-disabled-opacity);
}

[disabled].button,
button[disabled],
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: var(--control-disabled-opacity);
}

input,
select,
textarea {
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: var(--radius-sm, 10px);
    min-height: var(--control-height, 42px);
    background: var(--surface-muted, #f8fafc);
    color: var(--text-color, #0f172a);
    padding: 0 12px;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-subtle, #64748b);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    border-color: color-mix(in oklab, var(--accent-color, #2563eb) 55%, transparent);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, .2));
    border-color: transparent;
}

a {
    color: var(--accent-color, #2563eb);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: var(--radius-md, 14px);
    overflow: hidden;
    color: var(--text-color, #0f172a);
}

table th,
table td {
    text-align: left;
    padding: 10px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color, #dbe3ee);
    color: inherit;
}

table th {
    background: var(--surface-muted, #f8fafc);
    color: var(--text-soft, #475569);
    font-weight: 600;
    font-size: 13px;
}

table tr:last-child th,
table tr:last-child td {
    border-bottom: 0;
}

.page-title {
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    font-weight: var(--font-weight-page-title, 700);
    color: var(--heading-color, #0f172a);
    letter-spacing: 0;
    margin: 0;
}

.card-title,
.panel-title,
.section-title {
    font-weight: var(--font-weight-card-title, 600);
    font-size: 1.02rem;
    letter-spacing: 0;
}

.helper-text,
.meta-text,
.text-muted,
small.helper {
    color: var(--text-subtle, #94a3b8);
    font-size: 12px;
    font-weight: var(--font-weight-subtle, 500);
}

.badge,
.status-pill,
.platform-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-pill, 999px);
    min-height: 22px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-pill {
    font-size: 11px;
    font-weight: 500;
    min-height: 24px;
    padding: 0 10px;
}

.empty-state,
.error-state,
.page-empty-state {
    min-height: 120px;
    display: grid;
    place-items: center;
    gap: 10px;
    text-align: center;
    border-radius: var(--radius-md, 14px);
    padding: 18px 20px;
    color: var(--text-muted, #64748b);
    background: linear-gradient(145deg, color-mix(in oklab, var(--surface-muted, #f8fafc) 86%, transparent), color-mix(in oklab, var(--card-bg, #ffffff) 96%, transparent));
    border: 1px dashed color-mix(in oklab, var(--border-color, #dbe3ee) 76%, transparent);
    box-shadow: var(--shadow-card-soft);
}

.emp-empty,
.emp-empty-state,
table .emp-empty {
    min-height: 78px;
    color: var(--text-muted, #64748b);
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: var(--radius-md, 14px);
    padding: 14px;
}

table .emp-empty {
    border-radius: 0;
    border: 0;
    padding: 14px 10px;
}

.emp-empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 6px;
}

.error-state {
    color: var(--danger, #ef4444);
}

.page-card,
.panel,
.section-card,
.ui-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: var(--radius-lg, 18px);
    padding: var(--space-5, 24px);
    box-shadow: var(--shadow-card-soft);
    color: var(--text-color, #0f172a);
}

.page-card,
.panel,
.section-card {
    background: linear-gradient(180deg, color-mix(in oklab, var(--card-bg, #ffffff) 92%, transparent), color-mix(in oklab, var(--surface-muted, #f8fafc) 45%, transparent));
}

.loading-skeleton,
.skeleton,
.dashboard-skeleton {
    border-radius: var(--radius-pill, 999px);
    min-height: 14px;
    background: linear-gradient(90deg, var(--surface-muted, #f8fafc), var(--border-color, #dbe3ee), var(--surface-muted, #f8fafc));
    background-size: 200% 100%;
    animation: appSkeletonShimmer 1.2s linear infinite;
}

@keyframes appSkeletonShimmer {
    to {
        background-position: -200% 0;
    }
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border-radius: var(--radius-md, 14px);
    border: 1px solid var(--border-color, #dbe3ee);
    background: var(--card-bg, #ffffff);
    box-shadow: var(--shadow-card-soft);
}

.table-wrap > table {
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
}

.page-actions,
.toolbar-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.swal2-popup {
    background: var(--card-bg, #ffffff) !important;
    color: var(--text-color, #0f172a) !important;
    border: 1px solid var(--border-color, #dbe3ee) !important;
    border-radius: var(--radius-lg, 18px) !important;
    box-shadow: var(--shadow-card-soft) !important;
}

.swal2-title {
    color: var(--text-color, #0f172a) !important;
    font-family: var(--font-stack) !important;
    font-weight: 600 !important;
}

.swal2-content,
.swal2-html-container {
    color: var(--text-soft, #475569) !important;
    font-family: var(--font-stack) !important;
}

.swal2-confirm,
.swal2-cancel,
.swal2-deny {
    border-radius: var(--radius-sm, 10px) !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    border: 0 !important;
}

.swal2-confirm {
    background: var(--accent-color, #2563eb) !important;
}

.swal2-confirm.zentrack-swal-danger {
    background: var(--danger, #ef4444) !important;
    color: #ffffff !important;
}

.swal2-cancel,
.swal2-deny {
    background: var(--surface-muted, #f8fafc) !important;
    color: var(--text-color, #0f172a) !important;
}

.ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-sm, 10px);
    border: 1px solid transparent;
    min-height: var(--control-height, 42px);
    padding: 0 16px;
    cursor: pointer;
    font-weight: var(--font-weight-subtle, 500);
    transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
}

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

.ui-button.is-primary {
    border-color: transparent;
    background: var(--accent-color, #2563eb);
    color: var(--text-color-inverse, #ffffff);
}

.ui-button.is-primary:hover {
    box-shadow: var(--shadow-card-soft-hover);
}

.ui-button.is-subtle {
    background: var(--surface-muted, #f8fafc);
    color: var(--text-color, #0f172a);
}

.ui-button.is-ghost {
    background: transparent;
    border-color: var(--border-color, #dbe3ee);
    color: var(--text-soft, #334155);
}

.ui-input,
select.ui-input,
input.ui-input,
textarea.ui-input {
    width: 100%;
    min-height: var(--control-height, 42px);
    border-radius: var(--radius-sm, 12px);
    border: 1px solid var(--border-color, #dbe3ee);
    background: var(--surface-muted, #f8fafc);
    color: var(--text-color, #0f172a);
    padding: 0 12px;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control,
.form-select,
input[type="search"],
input[type="date"],
input[type="datetime-local"],
select.ui-input,
select.form-select {
    border-radius: var(--radius-sm, 12px);
    border: 1px solid var(--border-color, #dbe3ee);
    min-height: var(--control-height, 42px);
    background: var(--surface-muted, #f8fafc);
    color: var(--text-color, #0f172a);
    font: inherit;
}

.form-control:hover,
.form-select:hover,
input[type="search"]:hover,
input[type="date"]:hover,
input[type="datetime-local"]:hover,
select.form-select:hover {
    background: var(--surface-elevated, #ffffff);
}

.form-control:focus,
.form-select:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
select.form-select:focus {
    border-color: rgba(37, 99, 235, .55);
    box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, .2));
    outline: none;
}

.ui-input:hover,
select.ui-input:hover,
input.ui-input:hover,
textarea.ui-input:hover {
    background: var(--surface-elevated, #ffffff);
}

.ui-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill, 999px);
    min-height: 20px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.015em;
    border: 1px solid var(--border-color, #dbe3ee);
    background: var(--surface-muted, #f8fafc);
    color: var(--text-soft, #334155);
}

.ui-hero {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.ui-hero-title {
    margin: 0;
    color: var(--text-color, #0f172a);
    font-size: clamp(1.55rem, 2vw, 2rem);
}

.ui-hero-subtitle {
    margin: 0;
    color: var(--text-subtle, #64748b);
    max-width: 880px;
    line-height: 1.45;
    font-weight: 400;
}

.ui-section {
    display: grid;
    gap: 12px;
}

.ui-section-title {
    margin: 0;
}

.ui-kv-grid {
    display: grid;
    gap: var(--space-2, 10px);
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ui-kv {
    display: grid;
    gap: 2px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: var(--radius-md, 14px);
    background: var(--surface-muted, #f8fafc);
}

.ui-kv dt {
    color: var(--text-subtle, #64748b);
    font-size: 12px;
    font-weight: 500;
}

.ui-kv dd {
    margin: 0;
    color: var(--text-color, #0f172a);
    font-weight: 600;
    font-size: 1.05rem;
}

.ui-loading-spark {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, var(--surface-muted, #f8fafc), var(--border-color, #dbe3ee), var(--surface-muted, #f8fafc));
    background-size: 200% 100%;
    animation: appSkeletonShimmer 1.2s linear infinite;
}

.ui-empty {
    min-height: 110px;
    border-radius: var(--radius-md, 14px);
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    place-items: center;
    text-align: center;
    color: var(--text-muted, #64748b);
    background: var(--surface-muted, #f8fafc);
    border: 1px dashed var(--border-color, #dbe3ee);
}

.ui-empty i {
    color: var(--accent-color, #2563eb);
    font-size: 22px;
}

.form-grid,
.page-actions,
.toolbar,
.form-stack,
.field-grid {
    display: grid;
    gap: 10px;
}

.btn-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrap table tbody tr {
    transition: background var(--transition);
}

.table-wrap table tbody tr:hover {
    background: var(--surface-hover, #f1f5f9);
}

/* Premium global design token refresh (applies without changing page logic) */
:root {
    --content-gutter: clamp(14px, 2vw, 24px);
    --content-gutter-mobile: clamp(12px, 2vw, 16px);
    --line-height: 1.48;
    --font-size-xl: 1.45rem;
    --font-weight-light: 400;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --surface-panel: var(--card-bg);
    --surface-card-border: var(--card-border, var(--border-color, #dbe3ee));
    --text-helper: var(--text-muted);
    --shadow-card-soft-hover: var(--shadow-hover);
    --interactive-min-height: 42px;
    --field-radius: var(--radius-sm);
    --control-bg: var(--surface-muted);
    --control-bg-hover: var(--surface-elevated);
    --control-bg-disabled: var(--surface-pressed);
    --ui-chip-bg: var(--surface-muted);
    --ui-chip-text: var(--text-soft);
}

body {
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-regular, 400);
    line-height: var(--line-height, 1.48);
}

h1 {
    line-height: 1.18;
    font-weight: var(--font-weight-page-title, 700);
}

p {
    color: var(--text-color);
    font-weight: var(--font-weight-body, 400);
}

small {
    color: var(--text-subtle);
    font-weight: var(--font-weight-medium, 500);
    font-size: var(--font-size-xs, 12px);
}

label {
    margin-bottom: 5px;
    color: var(--text-soft);
}

button {
    min-height: var(--interactive-min-height, 42px);
    border-color: var(--border-color);
    background: var(--surface-muted);
    color: var(--text-color);
    font-weight: var(--font-weight-medium, 500);
}

button:hover {
    box-shadow: var(--shadow-card-soft-hover);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, .2));
}

input,
select,
textarea {
    min-height: var(--interactive-min-height, 42px);
    border-color: var(--border-color);
    border-radius: var(--field-radius, 12px);
    background: var(--control-bg, var(--surface-muted));
}

input:hover,
select:hover,
textarea:hover {
    background: var(--control-bg-hover, var(--surface-elevated));
}

input:focus,
select:focus,
textarea:focus {
    border-color: color-mix(in oklab, var(--accent-color, #2563eb) 45%, transparent);
}

.page-card,
.panel,
.section-card,
.ui-card {
    border-color: var(--surface-card-border, var(--border-color));
    border-radius: var(--radius-lg, 18px);
    box-shadow: var(--shadow-card-soft);
}

.empty-state,
.error-state,
.page-empty-state,
.ui-empty {
    border-style: dashed;
    background: color-mix(in oklab, var(--surface-subtle, #f8fafc) 95%, transparent);
    border-radius: var(--radius-md, 14px);
    padding: 16px 18px;
    gap: 8px;
}

.empty-state i,
.ui-empty i {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in oklab, var(--accent-color, #2563eb) 14%, transparent);
    color: var(--accent-color, #2563eb);
    opacity: 0.9;
}

.empty-state strong {
    display: block;
    color: var(--text-color);
    font-size: 0.98rem;
}

.ui-badge,
.badge,
.status-pill,
.platform-status-pill {
    font-weight: var(--font-weight-medium, 500);
    background: var(--ui-chip-bg);
    color: var(--ui-chip-text, var(--text-soft));
}

.ui-button.is-primary {
    background: var(--accent-color, #2563eb);
    border-color: transparent;
}

.ui-button.is-subtle {
    background: var(--surface-muted);
}

.ui-button.is-secondary {
    border: 1px solid var(--border-color);
    background: var(--surface-elevated);
    color: var(--text-soft);
}

.ui-button.is-danger {
    border: 1px solid var(--danger-border, color-mix(in oklab, var(--danger, #ef4444) 35%, transparent));
    background: var(--danger-soft, color-mix(in oklab, var(--danger, #ef4444) 14%, transparent));
    color: var(--danger, #ef4444);
}

.ui-action-danger,
.ms-icon-btn.danger,
.emp-icon-btn.danger,
.pm-icon-btn.danger,
.pm-icon-btn.is-danger,
.company-upload-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--danger-border, color-mix(in oklab, var(--danger, #ef4444) 32%, transparent));
    border-radius: var(--radius-sm, 12px);
    background: var(--danger-soft, color-mix(in oklab, var(--danger, #ef4444) 12%, transparent));
    color: var(--danger, #ef4444);
    line-height: 1;
}

.ui-action-danger:hover,
.ms-icon-btn.danger:hover,
.emp-icon-btn.danger:hover,
.pm-icon-btn.danger:hover,
.pm-icon-btn.is-danger:hover,
.company-upload-delete:hover {
    background: var(--danger-soft-hover, color-mix(in oklab, var(--danger, #ef4444) 18%, transparent));
    border-color: color-mix(in oklab, var(--danger, #ef4444) 46%, transparent);
    color: var(--danger, #ef4444);
}

.ui-action-danger i,
.ms-icon-btn.danger i,
.emp-icon-btn.danger i,
.pm-icon-btn.danger i,
.pm-icon-btn.is-danger i,
.company-upload-delete i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-width: 16px;
    height: 16px;
    color: var(--danger, #ef4444);
    font-size: 15px;
    line-height: 1;
}

.ui-action-danger .fa-trash,
.ui-action-danger .fa-trash-alt,
.ms-icon-btn.danger .fa-trash,
.ms-icon-btn.danger .fa-trash-alt,
.emp-icon-btn.danger .fa-trash,
.emp-icon-btn.danger .fa-trash-alt,
.pm-icon-btn.danger .fa-trash,
.pm-icon-btn.danger .fa-trash-alt,
.pm-icon-btn.is-danger .fa-trash,
.pm-icon-btn.is-danger .fa-trash-alt,
.company-upload-delete .fa-trash,
.company-upload-delete .fa-trash-alt {
    display: inline-block;
    width: 16px;
    min-width: 16px;
    height: 16px;
    overflow: hidden;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 1;
    background-color: var(--danger, #ef4444);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%206h18'/%3E%3Cpath%20d='M8%206V4h8v2'/%3E%3Cpath%20d='M6%206l1%2015h10l1-15'/%3E%3Cpath%20d='M10%2011v6'/%3E%3Cpath%20d='M14%2011v6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%206h18'/%3E%3Cpath%20d='M8%206V4h8v2'/%3E%3Cpath%20d='M6%206l1%2015h10l1-15'/%3E%3Cpath%20d='M10%2011v6'/%3E%3Cpath%20d='M14%2011v6'/%3E%3C/svg%3E");
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 16px 16px;
    mask-size: 16px 16px;
    text-indent: -9999px;
}

.ui-action-danger .fa-trash::before,
.ui-action-danger .fa-trash-alt::before,
.ms-icon-btn.danger .fa-trash::before,
.ms-icon-btn.danger .fa-trash-alt::before,
.emp-icon-btn.danger .fa-trash::before,
.emp-icon-btn.danger .fa-trash-alt::before,
.pm-icon-btn.danger .fa-trash::before,
.pm-icon-btn.danger .fa-trash-alt::before,
.pm-icon-btn.is-danger .fa-trash::before,
.pm-icon-btn.is-danger .fa-trash-alt::before,
.company-upload-delete .fa-trash::before,
.company-upload-delete .fa-trash-alt::before {
    content: "" !important;
    display: none !important;
}

.delete-fallback {
    display: none;
}
    opacity: 1;
}

.form-control,
select.form-select,
input.ui-input,
select.ui-input,
textarea.ui-input,
input.form-control,
input.ui-input,
textarea.ui-input,
input.form-stack,
textarea.form-stack,
.ui-input,
.kpi-tools select,
.kpi-search input {
    border-radius: var(--field-radius, 12px);
}

select {
    appearance: none;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    background-position: calc(100% - 12px) center;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    padding-right: 30px;
}

.table-wrap {
    border-radius: var(--radius-md, 14px);
    border: 1px solid var(--border-color);
}

table {
    border-radius: var(--radius-md, 14px);
    background: var(--card-bg);
    color: var(--text-color);
}

table th,
table td {
    vertical-align: middle;
    border-bottom-color: color-mix(in oklab, var(--border-color) 80%, transparent);
}

table tr:hover td {
    background: color-mix(in oklab, var(--surface-hover) 80%, transparent);
}

dialog {
    border-radius: var(--radius-lg, 18px);
    border: 1px solid var(--border-color);
}

.loading-skeleton,
.skeleton,
.dashboard-skeleton,
.ui-loading-spark {
    border-radius: 999px;
}

@media (max-width: 900px) {
    #app-content {
        padding: var(--content-gutter-mobile, 12px);
    }

    .page-card,
    .panel,
    .section-card,
    .ui-card {
        padding: 18px;
    }
}

@media (max-width: 680px) {
    .ui-kv-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.32rem;
    }
}

/* Employee self-service premium empty states */
.ess-page,
.my-payslips-page,
.employee-advances-page {
    display: grid;
    gap: 18px;
}

.ess-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 15%, color-mix(in oklab, var(--accent-color, #2563eb) 16%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in oklab, var(--card-bg, #ffffff) 96%, transparent), color-mix(in oklab, var(--surface-muted, #f8fafc) 76%, transparent));
    box-shadow: var(--shadow-card-soft, 0 12px 42px rgba(15, 23, 42, .08));
}

.ess-hero h1 {
    margin: 2px 0 8px;
    font-size: clamp(1.85rem, 3vw, 2.55rem);
}

.ess-hero p:not(.ess-eyebrow) {
    max-width: 780px;
    color: var(--text-muted, #64748b);
    font-size: 15px;
}

.ess-eyebrow {
    margin: 0;
    color: color-mix(in oklab, var(--accent-color, #2563eb) 82%, var(--text-color, #0f172a));
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ess-hero-icon,
.ess-empty-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .24);
}

.ess-hero-actions,
.ess-help-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ess-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    font-weight: 800;
}

.ess-btn-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.ess-btn-secondary {
    border-color: var(--border-color, #dbe3ee);
    background: color-mix(in oklab, var(--surface-muted, #f8fafc) 92%, transparent);
    color: var(--text-soft, #334155);
}

.ess-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ess-summary-card {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 18px;
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 20px;
    background: linear-gradient(180deg, var(--card-bg, #fff), color-mix(in oklab, var(--surface-muted, #f8fafc) 80%, transparent));
    box-shadow: var(--shadow-card-soft, 0 12px 42px rgba(15, 23, 42, .08));
}

.ess-summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--ess-accent, #2563eb);
}

.ess-summary-card.primary { --ess-accent: #2563eb; }
.ess-summary-card.success { --ess-accent: #10b981; }
.ess-summary-card.danger { --ess-accent: #fb7185; }
.ess-summary-card.warning { --ess-accent: #f59e0b; }
.ess-summary-card.accent { --ess-accent: #06b6d4; }

.ess-summary-card span {
    color: var(--text-subtle, #64748b);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ess-summary-card strong {
    color: var(--text-color, #0f172a);
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.05;
}

.ess-summary-card small {
    color: var(--text-muted, #64748b);
    font-size: 12px;
}

.ess-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ess-panel,
.ess-empty-state {
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 22px;
    background: var(--card-bg, #fff);
    box-shadow: var(--shadow-card-soft, 0 12px 42px rgba(15, 23, 42, .08));
}

.ess-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.ess-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ess-panel-head h2 {
    margin-top: 3px;
}

.ess-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid color-mix(in oklab, var(--accent-color, #2563eb) 24%, var(--border-color, #dbe3ee));
    border-radius: 999px;
    background: color-mix(in oklab, var(--accent-color, #2563eb) 10%, transparent);
    color: color-mix(in oklab, var(--accent-color, #2563eb) 76%, var(--text-color, #0f172a));
    font-size: 11px;
    font-weight: 800;
}

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

.ess-component-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 14px;
    background: var(--surface-muted, #f8fafc);
}

.ess-component-list span {
    color: var(--text-soft, #334155);
    font-weight: 700;
}

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

.ess-category-grid article {
    display: grid;
    gap: 8px;
    min-height: 128px;
    padding: 16px;
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 18px;
    background: linear-gradient(180deg, var(--surface-muted, #f8fafc), color-mix(in oklab, var(--card-bg, #fff) 92%, transparent));
}

.ess-category-grid i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--accent-color, #2563eb);
    background: color-mix(in oklab, var(--accent-color, #2563eb) 12%, transparent);
}

.ess-category-grid span {
    color: var(--text-muted, #64748b);
    font-size: 13px;
}

.ess-empty-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(260px, auto);
    gap: 16px;
    align-items: center;
    padding: 20px;
}

.ess-empty-state h2 {
    margin: 0 0 5px;
    font-size: 1.18rem;
}

.ess-empty-state p {
    color: var(--text-muted, #64748b);
}

.ess-help-list {
    justify-content: flex-start;
}

.ess-help-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--accent-color, #2563eb) 8%, transparent);
    color: var(--text-soft, #334155);
    font-size: 12px;
    font-weight: 700;
}

.ess-help-list i {
    color: #38bdf8;
}

body[data-theme="dark"] .ess-hero,
body.dark .ess-hero {
    background:
        radial-gradient(circle at 12% 15%, rgba(56, 189, 248, .16), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .82));
}

body[data-theme="dark"] .ess-panel,
body[data-theme="dark"] .ess-empty-state,
body.dark .ess-panel,
body.dark .ess-empty-state {
    background: color-mix(in oklab, var(--card-bg, #111827) 94%, transparent);
}

body[data-theme="dark"] .ess-summary-card,
body[data-theme="dark"] .ess-category-grid article,
body[data-theme="dark"] .ess-component-list > div,
body.dark .ess-summary-card,
body.dark .ess-category-grid article,
body.dark .ess-component-list > div {
    background: linear-gradient(180deg, color-mix(in oklab, var(--card-bg, #111827) 94%, transparent), color-mix(in oklab, #0f172a 72%, transparent));
}

@media (max-width: 1180px) {
    .ess-summary-grid,
    .ess-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ess-hero,
    .ess-empty-state {
        grid-template-columns: 1fr;
    }

    .ess-hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .ess-summary-grid,
    .ess-category-grid,
    .ess-two-column {
        grid-template-columns: 1fr;
    }
}

.zt-loading-host {
    position: relative;
    min-height: 220px;
}

.zt-page-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 1200;
    padding: clamp(12px, 2vw, 20px);
    border-radius: 18px;
    background: color-mix(in oklab, var(--page-bg, #f8fafc) 88%, transparent);
    backdrop-filter: blur(2px);
}

.zt-page-skeleton {
    display: grid;
    gap: 16px;
}

.zt-skel-hero,
.zt-skel-card {
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 18px;
    background: var(--card-bg, #ffffff);
    box-shadow: var(--shadow-card-soft, 0 12px 42px rgba(15, 23, 42, .08));
}

.zt-skel-hero {
    display: grid;
    gap: 10px;
    min-height: 110px;
    align-content: center;
    padding: 20px;
}

.zt-skel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.zt-skel-card {
    display: grid;
    gap: 12px;
    min-height: 120px;
    padding: 18px;
}

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

.zt-skel-line,
.zt-skel-icon,
.zt-skel-field,
.zt-skel-cell,
.zt-skel-row span {
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, .18), rgba(148, 163, 184, .38), rgba(148, 163, 184, .18));
    background-size: 220% 100%;
    animation: ztSkeletonPulse 1.1s linear infinite;
}

.zt-skel-line {
    width: 48%;
    height: 14px;
}

.zt-skel-line.wide {
    width: 68%;
    height: 22px;
}

.zt-skel-line.short {
    width: 34%;
}

.zt-skel-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.zt-skel-field {
    height: 42px;
    border-radius: 12px;
}

.zt-skel-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 44px;
}

.zt-skel-row span,
.zt-skel-cell {
    height: 14px;
}

.zt-table-skeleton-row td {
    height: 54px;
    padding: 12px 14px;
}

.zt-spinner {
    width: 1em;
    height: 1em;
    display: inline-block;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: ztSpin .72s linear infinite;
}

.zt-inline-loading,
.zt-button-busy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.zt-button-busy {
    cursor: wait !important;
    opacity: .78;
}

.zt-state {
    display: grid;
    gap: 10px;
    place-items: center;
    min-height: 220px;
    padding: 24px;
    text-align: center;
    border: 1px dashed var(--border-color, #dbe3ee);
    border-radius: 18px;
    background: color-mix(in oklab, var(--card-bg, #ffffff) 86%, transparent);
}

.zt-state-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in oklab, var(--accent-color, #2563eb) 12%, transparent);
    color: var(--accent-color, #2563eb);
}

.zt-state strong {
    color: var(--text-color, #0f172a);
    font-size: 1.05rem;
}

.zt-state p {
    max-width: 520px;
    color: var(--text-muted, #64748b);
}

.zt-state-error .zt-state-icon {
    background: rgba(239, 68, 68, .12);
    color: #ef4444;
}

.zt-retry-btn {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border-color, #dbe3ee);
    border-radius: 12px;
    background: var(--accent-color, #2563eb);
    color: #ffffff;
    font-weight: 800;
}

@keyframes ztSpin {
    to { transform: rotate(360deg); }
}

@keyframes ztSkeletonPulse {
    to { background-position: -220% 0; }
}

body[data-theme="dark"] .zt-page-loading-overlay,
body.dark .zt-page-loading-overlay {
    background: color-mix(in oklab, var(--page-bg, #0f172a) 88%, transparent);
}

body[data-theme="dark"] .zt-skel-hero,
body[data-theme="dark"] .zt-skel-card,
body[data-theme="dark"] .zt-state,
body.dark .zt-skel-hero,
body.dark .zt-skel-card,
body.dark .zt-state {
    background: color-mix(in oklab, var(--card-bg, #111827) 94%, transparent);
}

@media (max-width: 900px) {
    .zt-skel-grid,
    .zt-skel-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .zt-skel-grid,
    .zt-skel-form,
    .zt-skel-row {
        grid-template-columns: 1fr;
    }
}
