:root {
    --layout-bg: #f8f9fb;
    --layout-surface: #ffffff;
    --layout-surface-muted: #f3f5f8;
    --layout-border: rgba(15, 23, 42, 0.08);
    --layout-text: #0f172a;
    --layout-text-soft: #64748b;
    --layout-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --layout-shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
    --layout-radius: 12px;
    --layout-gap: 24px;
    --layout-gap-sm: 16px;
    --layout-gap-lg: 32px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 88px;
    --sidebar-accent: #16a34a;
    --sidebar-accent-soft: rgba(22, 163, 74, 0.12);
    --sidebar-accent-border: rgba(22, 163, 74, 0.18);
}

html[data-theme="dark"] {
    --layout-bg: #0b1220;
    --layout-surface: #101827;
    --layout-surface-muted: #172033;
    --layout-border: rgba(148, 163, 184, 0.2);
    --layout-text: #e5e7eb;
    --layout-text-soft: #94a3b8;
    --layout-shadow-sm: 0 10px 30px rgba(2, 6, 23, 0.28);
    --layout-shadow-md: 0 22px 48px rgba(2, 6, 23, 0.38);
    --sidebar-accent-soft: rgba(34, 197, 94, 0.18);
    --sidebar-accent-border: rgba(34, 197, 94, 0.26);
}

html,
body {
    overflow-x: hidden;
}

body {
    background: var(--layout-bg);
    color: var(--layout-text);
}

.shell-orb {
    display: none;
}

.shell-grid {
    opacity: 0.3;
}

.app-shell,
.content-shell,
.page-shell,
.page-shell-inner,
.topbar-shell,
.topbar-main,
.topbar-main-minimal,
.topbar-tools,
.topbar-search-cluster,
.topbar-action-cluster,
.sidebar,
.sidebar-scroll,
.sidebar-nav,
.dashboard-grid-12,
.dashboard-section-grid,
.dashboard-kpi-grid,
.dashboard-stack,
.dashboard-stack-sm,
.staff-dashboard-layout,
.table-responsive {
    min-width: 0;
}

.app-shell {
    min-height: 100vh;
    background: var(--layout-bg);
}

.content-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--layout-bg);
    transition: margin-left 180ms ease, width 180ms ease;
}

.app-shell-active .content-shell {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

body.sidebar-collapsed.app-shell-active .content-shell {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap-sm);
    width: var(--sidebar-width);
    height: 100vh;
    padding: var(--layout-gap) var(--layout-gap-sm);
    border-right: 1px solid var(--layout-border);
    background: var(--layout-surface);
    box-shadow: var(--layout-shadow-md);
    overflow: hidden;
    transition: width 180ms ease, transform 220ms ease;
}

.sidebar-header,
.sidebar-header-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--layout-gap-sm);
    margin-bottom: 0;
}

.sidebar-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-inline: 4px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--layout-radius);
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.24);
}

.brand-name {
    display: block;
    color: var(--layout-text);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand-role {
    display: block;
    margin-top: 2px;
    color: var(--layout-text-soft);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-nav,
.sidebar-nav-minimal,
.sidebar-footer {
    display: grid;
    gap: 8px;
}

.sidebar-section-label {
    margin: 12px 6px 4px;
    color: var(--layout-text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-nav .nav-link,
.sidebar-footer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--layout-radius);
    border: 1px solid transparent;
    color: #334155;
    background: transparent;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

html[data-theme="dark"] .sidebar-nav .nav-link,
html[data-theme="dark"] .sidebar-footer-link {
    color: #cbd5e1;
}

.sidebar-nav .nav-link::before,
.sidebar-nav .nav-link.active::before,
.sidebar-nav .nav-link.is-expanded::before {
    display: none;
}

.nav-link-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-nav i[data-lucide],
.sidebar-footer-link i[data-lucide] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus-visible,
.sidebar-footer-link:hover,
.sidebar-footer-link:focus-visible {
    color: var(--layout-text);
    background: var(--layout-surface-muted);
    border-color: var(--layout-border);
    transform: translateY(-2px);
    box-shadow: none;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link.is-expanded {
    color: #166534;
    background: var(--sidebar-accent-soft);
    border-color: var(--sidebar-accent-border);
    box-shadow: none;
}

html[data-theme="dark"] .sidebar-nav .nav-link.active,
html[data-theme="dark"] .sidebar-nav .nav-link.is-expanded {
    color: #bbf7d0;
}

.sidebar-nav .nav-link.active .nav-chevron,
.sidebar-nav .nav-link.is-expanded .nav-chevron {
    color: inherit;
}

.sidebar-submenu {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding-left: 16px;
}

.sidebar-submenu .nav-link {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.92rem;
}

.nav-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--sidebar-accent-soft);
    color: #166534;
    font-size: 0.72rem;
    font-weight: 800;
}

.nav-inline-tag {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--layout-surface-muted);
    color: var(--layout-text-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

.sidebar-meta-card {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface-muted);
    box-shadow: none;
}

.sidebar-meta-card strong {
    color: var(--layout-text);
}

.sidebar-meta-label,
.sidebar-meta-card small,
.sidebar-meta-card span:last-child {
    color: var(--layout-text-soft);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 4px;
}

.sidebar-footer-link {
    color: var(--layout-text);
    background: var(--layout-surface);
    border-color: var(--layout-border);
}

.sidebar-footer-link-danger {
    color: #b91c1c;
}

.sidebar-footer-link-danger:hover,
.sidebar-footer-link-danger:focus-visible {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.12);
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding-inline: 12px;
}

body.sidebar-collapsed .sidebar .sidebar-meta-card {
    display: none;
}

body.sidebar-collapsed .sidebar .nav-link,
body.sidebar-collapsed .sidebar .sidebar-footer-link {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar .nav-link-main {
    justify-content: center;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0;
    padding: 0 var(--layout-gap);
    border-bottom: 1px solid var(--layout-border);
    background: color-mix(in srgb, var(--layout-bg) 92%, transparent);
    backdrop-filter: blur(12px);
}

.topbar-shell {
    width: 100%;
    max-width: none;
}

.topbar-main,
.topbar-main-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--layout-gap-sm);
    min-height: 60px;
}

.topbar-main-minimal {
    display: grid;
    grid-template-columns: auto 1fr auto;
}

.topbar-title-group,
.topbar-minimal-brand,
.topbar-minimal-tools,
.topbar-search-cluster,
.topbar-action-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-title-group,
.topbar-minimal-title {
    min-width: 0;
    flex: 1 1 auto;
}

.topbar-title-stack {
    min-width: 0;
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--layout-gap-sm);
    flex: 1 1 auto;
}

.topbar-search-cluster {
    flex: 1 1 340px;
    justify-content: flex-end;
}

.topbar-action-cluster {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 380px);
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface);
    box-shadow: none;
}

.topbar-search input {
    width: 100%;
    min-width: 0;
}

.topbar-calendar-indicator,
.theme-toggle,
.icon-button,
.user-menu-button,
.topbar-toggle,
.sidebar-pin-toggle,
.sidebar-close {
    min-height: 44px;
    border-radius: var(--layout-radius);
    border-color: var(--layout-border);
    background: var(--layout-surface);
    box-shadow: none;
}

.topbar-calendar-indicator {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--layout-radius);
}

.user-menu-button {
    padding: 8px 12px;
}

.user-meta strong,
.user-meta small,
.page-title,
.page-subtitle,
.topbar-context-pill {
    min-width: 0;
}

.topbar-context-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--sidebar-accent-soft);
    color: #166534;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

html[data-theme="dark"] .topbar-context-pill {
    color: #bbf7d0;
}

.page-title {
    margin: 0;
    color: var(--layout-text);
    font-size: clamp(1.25rem, 1.7vw, 1.75rem);
    line-height: 1.2;
}

.page-subtitle {
    margin-top: 8px;
    color: var(--layout-text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.page-shell {
    flex: 1 1 auto;
    width: 100%;
    padding: var(--layout-gap);
    background: var(--layout-bg);
}

.page-shell-inner {
    display: grid;
    gap: var(--layout-gap);
    width: 100%;
    max-width: none;
    margin: 0;
}

.page-shell-inner > .row {
    margin-inline: 0;
    --bs-gutter-x: 24px;
    --bs-gutter-y: 24px;
}

.site-footer {
    padding: 0 var(--layout-gap) var(--layout-gap);
    background: var(--layout-bg);
}

.site-footer-card {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface);
    box-shadow: var(--layout-shadow-sm);
}

.site-footer-content,
.site-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer-text,
.site-footer-meta {
    color: var(--layout-text-soft);
}

.site-footer-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--layout-surface-muted);
    color: var(--layout-text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-card,
.metric-card,
.quick-link-card,
.ui-card,
.ui-chart-card,
.dashboard-panel,
.dashboard-health-card,
.dashboard-module-card,
.dashboard-stat-card,
.dashboard-status-row,
.dashboard-approval-item,
.dashboard-activity-item,
.dashboard-notification-item,
.summary-row,
.notification-item,
.activity-item,
.attendance-note,
.attendance-meta > div,
.roster-day-card,
.staff-dashboard-summary-item,
.staff-roster-entry,
.staff-week-summary-item,
.staff-dashboard-date-block,
.staff-dashboard-time-block,
.staff-dashboard-panel-note {
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface);
    box-shadow: var(--layout-shadow-sm);
}

.app-card .card-body,
.ui-chart-card .card-body,
.dashboard-panel,
.ui-card {
    min-width: 0;
}

.app-card:hover,
.metric-card:hover,
.quick-link-card:hover,
.dashboard-health-card:hover,
.dashboard-module-card:hover,
.dashboard-stat-card:hover,
.dashboard-status-row:hover,
.dashboard-approval-item:hover,
.dashboard-activity-item:hover,
.dashboard-notification-item:hover,
.summary-row:hover,
.notification-item:hover,
.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--layout-shadow-md);
}

.metric-card {
    display: grid;
    gap: 16px;
    min-height: 100%;
    padding: 24px;
}

.metric-card > span,
.dashboard-stat-copy span,
.ui-card-meta,
.ui-card-eyebrow {
    color: var(--layout-text-soft);
}

.metric-card > strong,
.dashboard-stat-copy strong,
.ui-card-title,
.ui-card-value {
    color: var(--layout-text);
}

.dashboard-stat-head,
.dashboard-stat-foot,
.ui-card-head,
.ui-section-head,
.dashboard-section-header,
.dashboard-panel-head,
.staff-dashboard-panel-head,
.staff-dashboard-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.metric-card-icon,
.ui-card-icon,
.dashboard-activity-icon,
.dashboard-notification-icon {
    border-radius: var(--layout-radius);
}

.quick-links,
.summary-stack,
.activity-feed,
.notification-feed,
.dashboard-status-stack,
.dashboard-approval-stack,
.dashboard-activity-feed,
.dashboard-notification-feed,
.dashboard-section-stack,
.analytics-grid,
.staff-dashboard-card-body {
    display: grid;
    gap: var(--layout-gap-sm);
}

.quick-links {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quick-link-card {
    min-height: 120px;
    align-content: start;
    padding: 18px;
    color: var(--layout-text);
}

.summary-row,
.notification-item,
.activity-item {
    padding: 16px;
    color: inherit;
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface);
    -webkit-overflow-scrolling: touch;
}

.table {
    min-width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background: var(--layout-surface-muted);
    border-color: var(--layout-border);
    color: var(--layout-text-soft);
}

.table tbody td {
    border-color: var(--layout-border);
    color: var(--layout-text);
}

.table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--layout-surface-muted) 72%, transparent);
}

.table tbody tr:hover td {
    background: color-mix(in srgb, var(--sidebar-accent-soft) 58%, var(--layout-surface));
}

.dashboard-grid-12,
.dashboard-section-grid,
.staff-dashboard-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--layout-gap);
}

.dashboard-span-12 {
    grid-column: 1 / -1;
}

.dashboard-span-8 {
    grid-column: span 8;
}

.dashboard-span-7 {
    grid-column: span 7;
}

.dashboard-span-6 {
    grid-column: span 6;
}

.dashboard-span-5 {
    grid-column: span 5;
}

.dashboard-span-4 {
    grid-column: span 4;
}

.dashboard-stack {
    display: grid;
    gap: var(--layout-gap);
    align-content: start;
}

.dashboard-stack-sm {
    display: grid;
    gap: var(--layout-gap-sm);
    align-content: start;
}

.dashboard-command-shell,
.dashboard-kpi-grid {
    grid-column: 1 / -1;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--layout-gap);
}

.dashboard-kpi-grid > *,
.dashboard-section-grid > * {
    min-width: 0;
}

.dashboard-command-shell {
    margin: 0;
}

.dashboard-command-card .card-body,
.dashboard-overview-card .card-body {
    display: grid;
    gap: var(--layout-gap);
}

.dashboard-command-top {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
    gap: var(--layout-gap);
    align-items: start;
}

.dashboard-command-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--layout-gap-sm);
    min-width: 0;
}

.dashboard-date-card {
    min-width: 0;
    padding: 16px;
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface);
    box-shadow: none;
}

.dashboard-date-card span,
.dashboard-date-card small,
.dashboard-panel-head small,
.dashboard-health-card small {
    color: var(--layout-text-soft);
}

.dashboard-date-card strong,
.dashboard-panel-head h3,
.dashboard-health-card strong,
.dashboard-module-card strong {
    color: var(--layout-text);
}

.dashboard-command-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--layout-gap-sm);
    align-items: end;
}

.dashboard-command-button-row,
.dashboard-section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-search-shell {
    position: relative;
    width: 100%;
    max-width: none;
}

.dashboard-search-input {
    width: 100%;
    min-width: 0;
}

.dashboard-search-results {
    inset: calc(100% + 8px) 0 auto;
    padding: 8px;
    border-radius: var(--layout-radius);
    border: 1px solid var(--layout-border);
    background: var(--layout-surface);
    box-shadow: var(--layout-shadow-md);
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap-sm);
}

.dashboard-panel {
    padding: 20px;
}

.dashboard-health-grid,
.dashboard-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--layout-gap-sm);
}

.dashboard-health-card,
.dashboard-module-card,
.dashboard-approval-item,
.dashboard-activity-item,
.dashboard-notification-item,
.dashboard-status-row {
    box-shadow: none;
}

.dashboard-health-card,
.dashboard-module-card {
    padding: 16px;
    min-height: 100%;
}

.dashboard-status-row {
    grid-template-columns: minmax(0, 1fr) 120px;
    padding: 16px;
}

.dashboard-status-progress {
    background: color-mix(in srgb, var(--layout-surface-muted) 82%, transparent);
}

.dashboard-report-links .quick-link-card,
.dashboard-quick-links .quick-link-card {
    min-height: 108px;
}

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

.recruitment-widget,
.dashboard-table-card {
    height: 100%;
}

.staff-dashboard-shell,
.staff-dashboard-summary {
    max-width: none;
    margin: 0;
}

.attendance-focus-card-wrap {
    width: 100%;
}

.staff-dashboard-card {
    width: 100%;
}

.staff-dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--layout-gap-sm);
}

.staff-roster-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap-sm);
}

.staff-week-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap-sm);
}

.staff-week-summary-item-wide {
    grid-column: 1 / -1;
}

.staff-dashboard-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--layout-gap-sm);
}

.staff-dashboard-topbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.staff-dashboard-topbar-pills,
.staff-dashboard-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.staff-dashboard-topbar-pills {
    justify-content: center;
    flex-wrap: wrap;
}

.staff-dashboard-topbar-actions {
    justify-content: flex-end;
}

.staff-dashboard-topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(59, 88, 122, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #4c6681;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.staff-dashboard-topbar-pill i[data-lucide] {
    width: 16px;
    height: 16px;
}

.staff-dashboard-topbar-pill:hover,
.staff-dashboard-topbar-pill:focus-visible {
    color: #23425f;
    border-color: rgba(24, 193, 111, 0.2);
    background: #ffffff;
}

.staff-dashboard-user-menu {
    max-width: min(100%, 240px);
    padding-right: 12px;
}

.staff-dashboard-user-menu .user-meta {
    max-width: 120px;
}

.staff-dashboard-legacy-layout {
    align-content: start;
}

.staff-dashboard-quote-card {
    border-left: 3px solid #4ade80;
}

.staff-dashboard-quote-card .card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 28px;
}

.staff-dashboard-quote-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}

.staff-dashboard-quote-text {
    margin: 0;
    color: #3f5f82;
    font-size: clamp(1.35rem, 2.1vw, 2rem);
    font-style: italic;
    font-weight: 700;
    line-height: 1.5;
}

.staff-dashboard-quote-author {
    margin-top: 14px;
    color: #2f4e6f;
    font-size: 1rem;
    font-style: italic;
    font-weight: 800;
}

.staff-dashboard-checkout-strip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--layout-gap);
    padding-top: 20px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.staff-dashboard-checkout-copy {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.staff-dashboard-checkout-title {
    margin: 0;
    color: #355579;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 800;
}

.staff-dashboard-checkout-meta {
    margin: 0;
    color: var(--layout-text-soft);
    font-size: 0.96rem;
    font-weight: 600;
}

.staff-dashboard-checkout-actions {
    min-width: 220px;
    justify-items: end;
    align-content: start;
    gap: 12px;
}

.staff-dashboard-action-button {
    min-width: 180px;
}

.staff-dashboard-restricted-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--layout-border);
    background: rgba(255, 255, 255, 0.92);
    color: var(--layout-text-soft);
    font-weight: 700;
}

.staff-dashboard-roster-card .card-body {
    padding: 18px;
}

.staff-dashboard-roster-card .weekly-roster-board {
    gap: 12px;
}

.staff-dashboard-roster-card .weekly-roster-grid {
    min-width: 1380px;
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #ffffff;
}

.staff-dashboard-roster-card .weekly-roster-segment,
.staff-dashboard-roster-card .weekly-roster-date-cell,
.staff-dashboard-roster-card .weekly-roster-status-cell {
    border-radius: 0;
    border: 0;
    box-shadow: none;
}

.staff-dashboard-roster-card .weekly-roster-segment {
    min-height: 50px;
    padding: 12px 16px;
}

.staff-dashboard-roster-card .weekly-roster-segment strong {
    font-size: 1rem;
}

.staff-dashboard-roster-card .weekly-roster-segment span,
.staff-dashboard-roster-card .weekly-roster-segment small {
    display: none;
}

.staff-dashboard-roster-card .weekly-roster-date-cell {
    min-height: 64px;
    padding: 10px 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: #313640;
}

.staff-dashboard-roster-card .weekly-roster-date-cell strong {
    font-size: 0.98rem;
}

.staff-dashboard-roster-card .weekly-roster-date-cell small {
    display: none;
}

.staff-dashboard-roster-card .weekly-roster-status-cell {
    min-height: 70px;
    padding: 10px 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    border-right: 1px solid rgba(17, 24, 39, 0.06);
}

.staff-dashboard-roster-card .weekly-roster-status-title,
.staff-dashboard-roster-card .weekly-roster-status-detail {
    font-size: 0.78rem;
}

.staff-dashboard-roster-card .weekly-roster-status-title {
    margin-bottom: 4px;
}

.staff-dashboard-summary-card-legacy .card-body,
.staff-dashboard-notice-card .card-body,
.staff-dashboard-calendar-card .card-body {
    padding: 28px;
}

.staff-dashboard-summary-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
}

.staff-dashboard-summary-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.staff-dashboard-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(100, 116, 139, 0.08);
    color: #a0a8b4;
    flex-shrink: 0;
}

.staff-dashboard-summary-copy {
    display: grid;
    gap: 2px;
}

.staff-dashboard-summary-copy strong {
    color: #36577a;
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    font-weight: 800;
    line-height: 1;
}

.staff-dashboard-summary-copy span {
    color: #7d8ea3;
    font-size: 0.95rem;
    font-weight: 500;
}

.staff-dashboard-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.staff-dashboard-notice-list {
    display: grid;
    gap: 14px;
}

.staff-dashboard-notice-entry {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.staff-dashboard-notice-entry.is-unread {
    border-color: rgba(24, 193, 111, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

.staff-dashboard-notice-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.staff-dashboard-notice-top small {
    color: var(--layout-text-soft);
    font-weight: 600;
}

.staff-dashboard-notice-link {
    display: inline-block;
    margin-bottom: 8px;
    color: #36577a;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

.staff-dashboard-notice-link:hover,
.staff-dashboard-notice-link:focus-visible {
    color: #117849;
}

.staff-dashboard-notice-entry p {
    margin: 0;
    color: var(--layout-text-soft);
    line-height: 1.6;
}

.staff-dashboard-empty-state {
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed rgba(17, 24, 39, 0.14);
    color: var(--layout-text-soft);
    background: rgba(255, 255, 255, 0.8);
}

.staff-dashboard-calendar-card .dashboard-calendar-day {
    min-height: 96px;
}

.attendance-meta,
.roster-week-grid {
    display: grid;
    gap: var(--layout-gap-sm);
}

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

.roster-week-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.app-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

@media (max-width: 1399.98px) {
    .dashboard-health-grid,
    .dashboard-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-dashboard-summary-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .dashboard-span-8,
    .dashboard-span-7,
    .dashboard-span-6,
    .dashboard-span-5,
    .dashboard-span-4 {
        grid-column: 1 / -1;
    }

    .dashboard-command-top,
    .dashboard-command-actions,
    .dashboard-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .topbar-search-cluster,
    .topbar-action-cluster {
        flex: 1 1 100%;
    }

    .topbar-tools {
        flex-wrap: wrap;
    }
}

@media (max-width: 991.98px) {
    .app-shell-active .content-shell,
    body.sidebar-collapsed.app-shell-active .content-shell {
        width: 100%;
        margin-left: 0;
    }

    .sidebar {
        width: min(260px, calc(100vw - 32px));
        transform: translateX(-100%);
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-open .app-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .topbar {
        padding-inline: var(--layout-gap-sm);
    }

    .page-shell,
    .site-footer {
        padding-inline: var(--layout-gap-sm);
    }

    .dashboard-grid-12,
    .dashboard-section-grid,
    .staff-dashboard-layout {
        gap: var(--layout-gap-sm);
    }

    .dashboard-stack {
        gap: var(--layout-gap-sm);
    }

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

    .dashboard-command-meta,
    .dashboard-health-grid,
    .dashboard-module-grid,
    .staff-dashboard-summary-grid,
    .staff-roster-grid,
    .staff-week-summary-grid,
    .attendance-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .topbar-main,
    .topbar-main-minimal {
        gap: 12px;
    }

    .topbar-main {
        flex-wrap: wrap;
    }

    .topbar-search-cluster,
    .topbar-action-cluster,
    .topbar-tools {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-search {
        width: 100%;
    }

    .dashboard-status-row {
        grid-template-columns: 1fr;
    }

    .staff-dashboard-topbar {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .staff-dashboard-topbar-left,
    .staff-dashboard-topbar-pills,
    .staff-dashboard-topbar-actions {
        justify-content: center;
    }

    .staff-dashboard-checkout-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-dashboard-checkout-actions {
        min-width: 0;
        justify-items: stretch;
    }

    .staff-dashboard-action-button {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .page-shell {
        padding: var(--layout-gap-sm);
    }

    .topbar-main-minimal {
        grid-template-columns: auto 1fr;
    }

    .staff-dashboard-topbar {
        grid-template-columns: 1fr;
    }

    .topbar-minimal-tools {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .topbar-search-cluster,
    .topbar-action-cluster {
        gap: 10px;
    }

    .dashboard-command-meta,
    .dashboard-health-grid,
    .dashboard-module-grid,
    .staff-dashboard-summary-grid,
    .staff-roster-grid,
    .staff-week-summary-grid,
    .attendance-meta,
    .quick-links,
    .roster-week-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section-header,
    .dashboard-panel-head,
    .staff-dashboard-panel-head,
    .staff-dashboard-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-command-button-row,
    .dashboard-section-actions {
        width: 100%;
        justify-content: stretch;
    }

    .dashboard-command-button-row .btn,
    .dashboard-section-actions .btn {
        width: 100%;
    }

    .staff-dashboard-topbar-pills,
    .staff-dashboard-topbar-actions,
    .staff-dashboard-section-head {
        justify-content: flex-start;
    }

    .staff-dashboard-quote-card .card-body,
    .staff-dashboard-summary-card-legacy .card-body,
    .staff-dashboard-notice-card .card-body,
    .staff-dashboard-calendar-card .card-body {
        padding: 20px;
    }

    .staff-dashboard-summary-list {
        grid-template-columns: 1fr;
    }

    .staff-dashboard-quote-text,
    .staff-dashboard-checkout-title {
        font-size: 1.18rem;
    }

    .site-footer-content,
    .site-footer-meta {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

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

    .topbar {
        padding-inline: 12px;
    }

    .page-shell,
    .site-footer {
        padding-inline: 12px;
    }

    .topbar-action-cluster > .btn,
    .topbar-action-cluster > a.btn,
    .topbar-minimal-tools > .btn,
    .topbar-minimal-tools > a.btn {
        width: 100%;
    }
}

/* Reference-inspired system-wide light UI */
:root {
    --layout-bg: #f6f8f3;
    --layout-surface: #ffffff;
    --layout-surface-muted: #f8faf7;
    --layout-border: rgba(17, 24, 39, 0.08);
    --layout-text: #161c2d;
    --layout-text-soft: #7b8798;
    --layout-shadow-sm: 0 12px 32px rgba(15, 23, 42, 0.05);
    --layout-shadow-md: 0 24px 48px rgba(15, 23, 42, 0.08);
    --layout-radius: 24px;
    --layout-gap: 28px;
    --layout-gap-sm: 18px;
    --layout-gap-lg: 36px;
    --sidebar-width: 292px;
    --sidebar-collapsed-width: 96px;
    --sidebar-accent: #18c16f;
    --sidebar-accent-soft: #effbf4;
    --sidebar-accent-border: rgba(24, 193, 111, 0.22);
    --layout-font-sans: "Plus Jakarta Sans", "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --layout-font-display: "Outfit", "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
}

html {
    font-size: 15.5px;
}

body,
button,
input,
select,
textarea {
    font-family: var(--layout-font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body,
.app-shell,
.content-shell,
.page-shell,
.site-footer,
.auth-page {
    color: var(--layout-text);
    font-weight: 500;
    line-height: 1.62;
    letter-spacing: -0.01em;
    background:
        radial-gradient(circle at top left, rgba(24, 193, 111, 0.08), transparent 22%),
        linear-gradient(180deg, #f8faf6 0%, #f6f8f3 100%);
}

.shell-grid,
.auth-grid {
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(22, 28, 45, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 28, 45, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

.shell-orb,
.auth-orb {
    display: none;
}

.sidebar {
    gap: 20px;
    padding: 28px 22px 22px;
    border-right: 1px solid rgba(17, 24, 39, 0.06);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
}

.sidebar-header,
.sidebar-header-minimal {
    align-items: center;
    min-height: 56px;
}

.brand-link {
    gap: 14px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    border: 1px solid rgba(24, 193, 111, 0.16);
    background: linear-gradient(180deg, #f8fff9 0%, #effbf4 100%);
    color: var(--sidebar-accent);
    box-shadow: none;
    font-family: var(--layout-font-display);
    font-size: 1.55rem;
    font-weight: 800;
}

.brand-name {
    font-family: var(--layout-font-display);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-role {
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--layout-text-soft);
}

.sidebar-nav,
.sidebar-nav-minimal,
.sidebar-footer {
    gap: 10px;
}

.sidebar-section-label {
    margin: 8px 8px 2px;
    font-size: 0.68rem;
    color: #98a2b3;
    letter-spacing: 0.12em;
}

.sidebar-nav .nav-link,
.sidebar-footer-link {
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 20px;
    color: #20293a;
    border-color: transparent;
    font-weight: 700;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus-visible,
.sidebar-footer-link:hover,
.sidebar-footer-link:focus-visible {
    background: #f6f9f5;
    border-color: rgba(17, 24, 39, 0.04);
    color: var(--layout-text);
    transform: none;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link.is-expanded {
    background: linear-gradient(180deg, #19c870 0%, #17b966 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(24, 193, 111, 0.2);
}

.sidebar-nav .nav-link.active .nav-chevron,
.sidebar-nav .nav-link.is-expanded .nav-chevron,
.sidebar-nav .nav-link.active i[data-lucide],
.sidebar-nav .nav-link.is-expanded i[data-lucide] {
    color: inherit;
}

.sidebar-submenu {
    gap: 8px;
    margin-top: 2px;
    margin-left: 10px;
    padding-left: 16px;
    border-left: 1px solid rgba(17, 24, 39, 0.06);
}

.sidebar-submenu .nav-link {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
}

.nav-counter {
    min-width: 26px;
    min-height: 26px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.nav-inline-tag,
.site-footer-chip,
.topbar-context-pill {
    background: #effbf4;
    color: #16945a;
    border: 1px solid rgba(24, 193, 111, 0.12);
}

.sidebar-meta-card {
    gap: 6px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(17, 24, 39, 0.05);
    background: linear-gradient(180deg, #ffffff 0%, #f6faf6 100%);
    box-shadow: none;
}

.sidebar-meta-card strong {
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.sidebar-footer-link {
    background: #ffffff;
    border-color: rgba(17, 24, 39, 0.05);
}

.sidebar-footer-link-danger {
    color: #d14343;
}

.topbar {
    padding: 0 28px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.05);
    background: rgba(248, 250, 246, 0.86);
    backdrop-filter: blur(16px);
}

.topbar-main,
.topbar-main-minimal {
    min-height: 76px;
    gap: 18px;
}

.topbar-search {
    width: min(100%, 460px);
    min-height: 54px;
    padding: 0 18px;
    border-radius: 20px;
    border-color: rgba(17, 24, 39, 0.06);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.topbar-search input::placeholder {
    color: #a0a9b8;
}

.topbar-calendar-indicator,
.icon-button,
.user-menu-button,
.topbar-toggle,
.sidebar-pin-toggle,
.sidebar-close,
.topbar-action {
    min-height: 50px;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.icon-button,
.topbar-toggle,
.sidebar-pin-toggle,
.sidebar-close {
    min-width: 50px;
}

.user-menu-button {
    gap: 12px;
    padding: 10px 14px;
}

.user-avatar,
.user-avatar-fallback,
.employee-list-avatar-fallback,
.metric-card-icon,
.ui-card-icon,
.notification-dropdown-icon {
    background: linear-gradient(180deg, #f7fff9 0%, #effbf4 100%);
    color: var(--sidebar-accent);
}

.icon-button-avatar {
    width: 54px;
    min-width: 54px;
    padding: 4px;
    border-radius: 20px;
    overflow: hidden;
}

.icon-button-avatar .user-avatar,
.icon-button-avatar .user-avatar-image,
.icon-button-avatar .user-avatar-compact {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.user-menu-button .user-avatar {
    flex: 0 0 48px;
}

.user-avatar,
.user-avatar-fallback,
.user-avatar-compact,
.user-avatar-image,
.employee-list-avatar,
.employee-list-avatar-fallback,
.staff-avatar,
.staff-avatar-placeholder,
.profile-photo-preview-card,
.profile-photo-preview-image,
.profile-photo-preview-fallback,
.department-head-avatar,
.document-thumb {
    position: relative;
    overflow: hidden;
}

.user-avatar,
.user-avatar-fallback,
.user-avatar-compact {
    width: 46px;
    height: 46px;
    border-radius: 18px;
}

.user-avatar,
.employee-list-avatar,
.employee-list-avatar-fallback,
.staff-avatar,
.staff-avatar-placeholder,
.profile-photo-preview-card,
.department-head-avatar {
    border: 2px solid rgba(255, 255, 255, 0.94);
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(24, 193, 111, 0.08);
}

.user-avatar,
.employee-list-avatar-fallback,
.staff-avatar-placeholder,
.profile-photo-preview-card,
.department-head-avatar {
    background: linear-gradient(180deg, #f9fff9 0%, #eafaf1 100%);
    color: #14925a;
}

.user-avatar-fallback,
.user-avatar-compact,
.staff-avatar-placeholder,
.profile-photo-preview-fallback,
.department-head-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--layout-font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.user-meta strong,
.employee-list-person-body .fw-semibold {
    font-family: var(--layout-font-display);
    letter-spacing: -0.03em;
}

.employee-list-person {
    align-items: center;
    gap: 1rem;
}

.employee-list-avatar,
.employee-list-avatar-fallback {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 20px;
}

.staff-avatar,
.staff-avatar-placeholder,
.profile-photo-preview-card {
    width: 132px;
    height: 132px;
    border-radius: 34px;
}

.staff-avatar {
    display: block;
    object-fit: cover;
    object-position: center;
}

.staff-avatar-placeholder,
.profile-photo-preview-fallback {
    font-size: 2rem;
}

.department-head-avatar {
    width: 68px;
    height: 68px;
    border-radius: 24px;
    font-size: 1.4rem;
}

.document-thumb {
    border-radius: 24px;
    object-fit: cover;
}

.page-shell {
    padding: 28px;
}

.page-shell-inner {
    gap: 24px;
}

.page-hero-card,
.app-card,
.metric-card,
.quick-link-card,
.filter-panel,
.empty-panel,
.dashboard-command-card,
.dashboard-panel,
.dashboard-date-card,
.dashboard-stat-card,
.dashboard-module-card,
.dashboard-health-card,
.dashboard-status-row,
.dashboard-approval-item,
.dashboard-activity-item,
.dashboard-notification-item,
.summary-row,
.notification-item,
.activity-item,
.ui-card,
.ui-chart-card,
.attendance-note,
.site-footer-card,
.auth-panel-surface {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

.page-hero-card::before,
.dashboard-command-card::before,
.auth-panel-surface::before {
    background: radial-gradient(circle at top right, rgba(24, 193, 111, 0.08), transparent 60%);
}

.page-hero-card:hover,
.app-card:hover,
.metric-card:hover,
.quick-link-card:hover,
.dashboard-health-card:hover,
.dashboard-module-card:hover,
.dashboard-stat-card:hover,
.dashboard-status-row:hover,
.dashboard-approval-item:hover,
.summary-row:hover,
.notification-item:hover,
.activity-item:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 193, 111, 0.14);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.07);
}

.app-card .card-body,
.ui-chart-card .card-body,
.dashboard-panel,
.ui-card,
.auth-panel-surface {
    padding: clamp(1.2rem, 1.6vw, 1.75rem);
}

.page-toolbar,
.ui-section-head,
.dashboard-section-header,
.dashboard-command-top,
.dashboard-command-actions {
    gap: 18px;
}

.page-title,
.section-title,
h1,
h2,
h3,
h4 {
    font-family: var(--layout-font-display);
    color: var(--layout-text);
    font-weight: 700;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.page-subtitle,
.text-muted,
.field-hint,
.site-footer-text,
.site-footer-meta,
.sidebar-meta-label,
.sidebar-meta-card small {
    color: var(--layout-text-soft) !important;
}

.metric-card {
    gap: 14px;
    padding: 28px;
}

.metric-card > strong,
.dashboard-stat-copy strong,
.ui-card-value {
    font-family: var(--layout-font-display);
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.metric-card > span,
.dashboard-stat-copy span,
.ui-card-meta,
.ui-card-eyebrow {
    font-size: 0.84rem;
    color: var(--layout-text-soft);
}

.metric-card-icon,
.ui-card-icon,
.notification-dropdown-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}

.quick-link-card {
    min-height: 148px;
    padding: 22px;
}

.summary-row,
.notification-item,
.activity-item,
.dashboard-status-row,
.dashboard-approval-item,
.dashboard-activity-item,
.dashboard-notification-item,
.dashboard-health-card,
.dashboard-module-card {
    padding: 18px;
}

.btn,
.ui-button {
    font-family: var(--layout-font-sans);
    min-height: 50px;
    padding: 0 20px;
    border-radius: 18px;
    font-weight: 700;
    box-shadow: none;
}

.btn-primary,
.ui-button-primary {
    background: #171a2c;
    border-color: #171a2c;
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(23, 26, 44, 0.14);
}

.btn-primary:hover,
.btn-primary:focus,
.ui-button-primary:hover,
.ui-button-primary:focus {
    background: #101323;
    border-color: #101323;
    color: #ffffff;
}

.btn-outline-primary,
.ui-button-secondary {
    background: #effbf4;
    border-color: rgba(24, 193, 111, 0.18);
    color: #16945a;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.ui-button-secondary:hover,
.ui-button-secondary:focus {
    background: #e5f9ee;
    border-color: rgba(24, 193, 111, 0.24);
    color: #117849;
}

.btn-outline-secondary,
.btn-outline-dark,
.ui-button-ghost {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(17, 24, 39, 0.08);
    color: var(--layout-text);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-dark:hover,
.btn-outline-dark:focus,
.ui-button-ghost:hover,
.ui-button-ghost:focus {
    background: #f5f8f5;
    border-color: rgba(17, 24, 39, 0.1);
    color: var(--layout-text);
}

.form-label {
    margin-bottom: 0.55rem;
    color: #5f6b7d;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-control,
.form-select,
.input-shell,
.profile-photo-preview-card {
    border-radius: 20px;
}

.form-control,
.form-select,
.form-control:focus,
.form-select:focus,
.input-shell {
    min-height: 54px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.96);
    color: var(--layout-text);
    box-shadow: none;
}

.form-control,
.form-select {
    padding: 0.95rem 1rem;
}

textarea.form-control {
    min-height: 148px;
}

.profile-avatar-editor,
.profile-photo-uploader {
    border-radius: 30px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background:
        radial-gradient(circle at top right, rgba(24, 193, 111, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 246, 0.98) 100%);
    box-shadow: none;
}

.profile-avatar-editor {
    padding: 18px 16px;
}

.profile-avatar-frame {
    display: inline-flex;
    justify-content: center;
}

.profile-photo-uploader {
    gap: 18px;
    padding: 22px;
}

.profile-photo-uploader-copy {
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.profile-photo-preview-inline {
    min-width: 168px;
    gap: 10px;
    justify-items: center;
}

.profile-photo-preview-card {
    background: linear-gradient(180deg, #fcfffd 0%, #f1fbf5 100%);
}

.profile-photo-preview-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.profile-photo-preview-fallback {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
}

.profile-photo-remove {
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.98);
    color: var(--layout-text);
}

.profile-photo-remove .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    border-color: rgba(17, 24, 39, 0.14);
}

.profile-photo-uploader input[type="file"].form-control {
    padding: 10px;
    border-style: dashed;
    background: #fbfdfb;
}

.profile-photo-uploader input[type="file"].form-control::file-selector-button {
    margin-right: 12px;
    padding: 0.78rem 1rem;
    border: 0;
    border-radius: 14px;
    background: #171a2c;
    color: #ffffff;
    font-family: var(--layout-font-sans);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.profile-photo-uploader input[type="file"].form-control:hover::file-selector-button,
.profile-photo-uploader input[type="file"].form-control:focus::file-selector-button {
    background: #101323;
}

.form-control::placeholder,
.topbar-search input::placeholder {
    color: #a3acbb;
}

.form-control:focus,
.form-select:focus,
.input-shell:focus-within {
    border-color: rgba(24, 193, 111, 0.26);
    box-shadow: 0 0 0 4px rgba(24, 193, 111, 0.1);
}

.table-responsive {
    border-radius: 28px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: none;
}

.table {
    --bs-table-hover-bg: #f5faf7;
}

.table thead th {
    top: 0;
    font-family: var(--layout-font-sans);
    background: #fafcf9;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    color: #7f8a9a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.table tbody tr:nth-child(even) td {
    background: rgba(17, 24, 39, 0.012);
}

.table tbody tr:hover td {
    background: #f4faf7;
}

.table tbody td {
    padding: 1rem 1rem;
    color: #435065;
    border-color: rgba(17, 24, 39, 0.06);
}

.table tbody td .fw-semibold,
.table tbody td strong {
    color: var(--layout-text);
}

.dropdown-menu,
.notification-dropdown,
.user-menu-dropdown,
.modal-content,
.ui-modal-surface {
    border-radius: 24px;
    border: 1px solid rgba(17, 24, 39, 0.07);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

.dropdown-item {
    border-radius: 16px;
    padding: 0.75rem 0.9rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #f2faf5;
    color: var(--layout-text);
}

.page-link {
    min-width: 44px;
    min-height: 44px;
    border-radius: 16px !important;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #ffffff;
    color: var(--layout-text);
}

.page-item.active .page-link {
    background: #171a2c;
    border-color: #171a2c;
    color: #ffffff;
}

.status-pill,
.status-badge,
.ui-badge,
.table-code-chip {
    font-family: var(--layout-font-sans);
    min-height: 34px;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    font-size: 0.73rem;
    letter-spacing: 0.06em;
}

.app-alert {
    padding: 1rem 1.1rem;
    border-radius: 22px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: none;
}

.messages-stack {
    gap: 14px;
}

.employee-tab-nav,
.nav-pills {
    gap: 10px;
    padding-bottom: 4px;
}

.employee-tab-nav .nav-link,
.nav-pills .nav-link {
    font-family: var(--layout-font-sans);
    min-height: 46px;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: #ffffff;
    color: #405066;
    font-weight: 700;
}

.employee-tab-nav .nav-link.active,
.nav-pills .nav-link.active {
    background: #effbf4;
    border-color: rgba(24, 193, 111, 0.18);
    color: #16945a;
}

.auth-page .site-footer {
    padding-top: 0;
}

.auth-panel {
    width: min(100%, 580px);
}

.auth-panel-surface {
    padding: 30px;
}

.auth-form-head,
.auth-form-grid {
    gap: 20px;
}

.auth-theme-toggle,
.theme-toggle {
    display: none !important;
}

@media (max-width: 991.98px) {
    .topbar {
        padding-inline: 18px;
    }

    .page-shell,
    .site-footer {
        padding-inline: 18px;
    }

    .sidebar {
        width: min(320px, 90vw);
    }

    .profile-photo-uploader-copy {
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .page-shell,
    .site-footer {
        padding-inline: 14px;
    }

    .topbar {
        padding-inline: 14px;
    }

    .app-card .card-body,
    .ui-chart-card .card-body,
    .dashboard-panel,
    .ui-card,
    .auth-panel-surface,
    .metric-card,
    .quick-link-card {
        padding: 18px;
    }

    .profile-photo-uploader-copy {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-photo-preview-inline {
        min-width: 0;
        justify-items: flex-start;
    }
}
