/**
 * Alfameli ePortal UI — Workforce Stitch tokens + Fluent mica surfaces
 * Source: alfameli-workforce (Stitch export)
 */
:root {
    --am-primary: #0078d4;
    --am-primary-dark: #005faa;
    --am-primary-soft: rgba(0, 120, 212, 0.12);
    --am-primary-fixed: #d3e3ff;
    --am-secondary: #0061a3;
    --am-secondary-container: #5badff;
    --am-success: #107c10;
    --am-warning: #bc5b00;
    --am-danger: #ba1a1a;
    --am-text: #1b1f26;
    --am-muted: #4a5160;
    --am-outline: #6b7280;
    --am-border: #e2e5ee;
    --am-border-strong: #d0d5e0;
    --am-bg: #eef1f8;
    --am-surface: #ffffff;
    --am-card: #ffffff;
    --am-glass-surface: #ffffff;
    --am-glass-surface-strong: #ffffff;
    --am-glass-border: #e2e5ee;
    --am-glass-border-soft: rgba(226, 229, 238, 0.9);
    --am-glass-blur: 0px;
    --am-glass-shadow: none;
    /* Clean light sidebar */
    --am-sidebar-bg: #f5f7fb;
    --am-sidebar-bg-top: #f5f7fb;
    --am-sidebar-bg-bottom: #f5f7fb;
    --am-sidebar-border: #e6e9f0;
    --am-sidebar-text: #3d4450;
    --am-sidebar-text-hover: #1b1f26;
    --am-sidebar-title: #6b7280;
    --am-sidebar-hover: rgba(0, 120, 212, 0.06);
    --am-sidebar-active-bg: rgba(0, 120, 212, 0.12);
    --am-sidebar-glow-top: transparent;
    --am-sidebar-glow-bottom: transparent;
    --am-sidebar-blend-top: transparent;
    --am-sidebar-blend-mid: transparent;
    --am-sidebar-blend-bottom: transparent;
    --am-sidebar-active-icon-bg: transparent;
    --am-sidebar-active-icon-border: transparent;
    --am-sidebar-user-tint: #eef1f8;
    --am-sidebar-brand-wash: transparent;
    --am-font-sans: 'Hanken Grotesk', 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --am-radius-xl: 12px;
    --am-radius: 12px;
    --am-radius-md: 8px;
    --am-radius-sm: 4px;
    --am-radius-xs: 2px;
    --am-radius-pill: 999px;
    --am-btn-radius: 4px;
    --am-shadow: none;
    --am-shadow-md: 0 1px 2px rgba(16, 20, 26, 0.04);
    --am-shadow-lg: 0 2px 8px rgba(16, 20, 26, 0.06);
    --am-font-base: 14px;
    --am-font-sm: 13px;
    --am-font-xs: 11px;
    --am-font-lg: 16px;
    --am-font-xl: 20px;
    --am-font-title: 1.375rem;
    --am-header-h: 72px;
    --am-content-gutter: 20px;
    --am-sidebar-w: 240px;
    --am-sidebar-collapsed-w: 64px;
    --am-tracking-tight: -0.015em;
    --am-tracking-normal: 0;
    --am-focus-ring: 0 0 0 1px #ffffff, 0 0 0 3px rgba(0, 120, 212, 0.45);
    --am-control-h: 32px;
    --am-toolbar-control-h: 34px;
    --am-form-control-h: 38px;
    --am-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5160' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    --am-search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5160' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
    --am-surface-secondary: #f3f5fa;
    --am-surface-tertiary: #ebedf5;
}

body {
    background-color: var(--am-bg, #f1f3fc);
    background-image: none;
    color: var(--am-text);
    font-family: var(--am-font-sans);
    font-size: var(--am-font-base);
    line-height: 1.5;
    letter-spacing: var(--am-tracking-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Stitch Fluent utilities */
.fluent-card,
.mica-card {
    background-color: var(--am-glass-surface);
    backdrop-filter: blur(var(--am-glass-blur));
    -webkit-backdrop-filter: blur(var(--am-glass-blur));
    border: 1px solid var(--am-border);
    box-shadow: var(--am-shadow);
}
.fluent-layer-3 {
    background-color: var(--am-glass-surface-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--am-border);
    box-shadow: var(--am-shadow-md);
}
.fluent-btn-primary {
    background: linear-gradient(180deg, #0078d4 0%, #005faa 100%);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    color: #fff;
}
.fluent-btn-primary:hover {
    background: linear-gradient(180deg, #0086ea 0%, #006ebc 100%);
    color: #fff;
}
.fluent-input {
    border: 1px solid var(--am-border-strong);
    border-bottom: 2px solid var(--am-primary);
}
.fluent-input:focus {
    outline: none;
    border-color: var(--am-border-strong);
    border-bottom: 2px solid var(--am-primary-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

h1, h2, h3, h4, h5, h6,
.page-title,
.am-dash-head__title,
.am-page-toolbar__main .page-title {
    font-family: var(--am-font-sans);
    letter-spacing: var(--am-tracking-tight);
}

button, input, select, textarea, .btn, .form-control {
    font-family: var(--am-font-sans);
}

.page-wrapper {
    background: var(--am-bg);
    display: flex;
    flex-direction: column;
    min-height: 0 !important; /* kill legacy app.js viewport stretch */
    height: auto !important;
    padding-top: 0 !important;
}

.content.container-fluid,
.page-wrapper > .content {
    padding: var(--am-content-gutter) var(--am-content-gutter) 16px !important;
}

.am-content-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.am-page-header-slot {
    flex-shrink: 0;
    margin-bottom: 0;
    padding-top: 0;
}

.am-page-header-slot:empty {
    display: none;
    margin: 0;
}

.am-content-body {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.am-content-body.am-page-fill {
    flex: 1 1 auto;
    min-height: 0;
}

.am-content-body.am-page-fill > *:last-child {
    flex: 1 1 auto;
    min-height: 0;
}

.am-content-body > .am-stat-grid + .am-card,
.am-content-body > .am-strip + .am-card,
.am-content-body > .am-card.am-fill-card,
.am-content-body > .am-card.am-card-flush:last-child {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.am-content-body > .row {
    flex: 1;
    min-height: 0;
}

.am-content-body > .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.am-content-body > .row > [class*="col-"] > .am-card:last-child {
    flex: 1;
}

.am-content-row,
.am-content-col {
    flex: 1;
    min-height: 0;
}

.am-fill-card .am-card-body,
.am-content-body > .am-card:last-child .am-card-body.padded {
    flex: 1;
}

.page-header {
    margin-bottom: 10px !important;
    padding-bottom: 0 !important;
}

.page-header .page-title,
.am-page-toolbar__main .page-title {
    font-size: var(--am-font-title);
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.25;
}

.am-page-subtitle {
    display: none;
}

/* Compact page toolbar — title + meta + action on one row */
.am-page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 0 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.am-page-toolbar__main {
    min-width: 0;
}

.am-page-toolbar__main .page-title {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
}

.am-page-toolbar__meta {
    font-size: var(--am-font-sm);
    color: var(--am-muted);
}

.am-page-toolbar__meta a {
    color: var(--am-primary);
}

.am-page-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.am-card.am-card-flush {
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--am-border);
}

.am-card.am-card-flush > .am-server-table-toolbar:first-child,
.am-card.am-card-flush > .am-server-table-toolbar-wrap:first-child,
.am-card.am-card-flush > .am-dt-toolbar:first-child,
.am-card.am-card-flush > .dataTables_wrapper .row:first-child {
    border-top-left-radius: var(--am-radius);
    border-top-right-radius: var(--am-radius);
}

.am-card.am-card-flush > .am-server-table-footer:last-child,
.am-card.am-card-flush > .am-dt-footer:last-child,
.am-card.am-card-flush > .dataTables_wrapper .row:last-child {
    border-bottom-left-radius: var(--am-radius);
    border-bottom-right-radius: var(--am-radius);
}

.am-card.am-card-flush > .am-card-body {
    padding: 0;
}

.am-card.am-card-flush > .am-card-body.padded,
.am-card.am-card-flush > .am-card-body.am-employee-show,
.am-card.am-card-flush > .am-card-body.am-employee-form-wrap {
    padding: 24px 28px;
}

@media (max-width: 767px) {
    .am-card.am-card-flush > .am-card-body.padded,
    .am-card.am-card-flush > .am-card-body.am-employee-show,
    .am-card.am-card-flush > .am-card-body.am-employee-form-wrap {
        padding: 20px 16px;
    }
}

.am-card.am-card-flush .dataTables_wrapper {
    padding: 0;
}

.am-card.am-card-flush .dataTables_wrapper .row:first-child,
.am-card.am-card-flush .dataTables_wrapper .row:last-child {
    margin: 0;
}

/* Timesheet create / entry flow */
.am-content-body:has(.am-ts-workspace) {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.am-content-body:has(.am-ts-workspace) > .am-ts-workspace {
    flex: 1 1 auto;
    min-height: 0;
}

.am-ts-workspace {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: calc(100vh - var(--am-header-h, 60px) - 48px);
}

.am-ts-workspace.is-fullscreen,
.am-ts-workspace:fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10060;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
    background: var(--am-bg, #eef2f7);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.am-ts-fullscreen-active {
    overflow: hidden;
}

.am-ts-fullscreen-btn {
    white-space: nowrap;
}

.am-ts-workspace.is-fullscreen > .am-ts-toolbar,
.am-ts-workspace:fullscreen > .am-ts-toolbar {
    flex-shrink: 0;
}

.am-ts-workspace.is-fullscreen > .am-ts-shell,
.am-ts-workspace:fullscreen > .am-ts-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 8px;
}

.am-ts-workspace.is-fullscreen .am-ts-form,
.am-ts-workspace:fullscreen .am-ts-form {
    flex: none;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.am-ts-workspace.is-fullscreen .am-ts-weeks,
.am-ts-workspace:fullscreen .am-ts-weeks {
    flex: none;
    min-height: auto;
    overflow: visible;
}

.am-ts-workspace.is-fullscreen .am-ts-grid-wrap,
.am-ts-workspace:fullscreen .am-ts-grid-wrap {
    max-height: none;
    overflow: visible;
}

.am-ts-workspace.is-fullscreen .am-ts-savebar,
.am-ts-workspace:fullscreen .am-ts-savebar {
    position: static;
    bottom: auto;
    flex-shrink: 0;
    margin-top: 4px;
    margin-bottom: 4px;
}

.am-ts-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 4px;
    flex: 1 1 auto;
    min-height: 0;
}

.am-ts-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.am-ts-weeks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.am-ts-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
}

.am-ts-toolbar__left,
.am-ts-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.am-ts-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--am-muted);
    font-size: var(--am-font-sm);
    text-decoration: none !important;
}

.am-ts-back:hover {
    color: var(--am-primary);
}

.am-ts-period {
    font-size: var(--am-font-sm);
    font-weight: 700;
    color: var(--am-text);
}

.am-ts-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--am-border);
    background: #f8fafc;
    font-size: var(--am-font-sm);
    color: #475569;
}

.am-ts-grand-total {
    background: var(--am-primary-soft);
    border-color: #bfdbfe;
    color: var(--am-primary-dark);
}

.am-ts-grand-total strong {
    font-size: var(--am-font-base);
}

.am-ts-filters {
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    overflow: hidden;
}

.am-ts-filters__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: var(--am-font-sm);
    font-weight: 600;
    color: var(--am-text);
    list-style: none;
    user-select: none;
}

.am-ts-filters__toggle::-webkit-details-marker {
    display: none;
}

.am-ts-filters__toggle i {
    color: var(--am-muted);
    transition: transform 0.15s ease;
}

.am-ts-filters[open] .am-ts-filters__toggle i {
    transform: rotate(180deg);
}

.am-ts-filters__body {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--am-border);
}

.am-ts-filters__grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr);
    gap: 12px 20px;
    align-items: start;
}

.am-ts-filters__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.am-ts-filters__block {
    min-width: 0;
}

.am-ts-filters__title {
    font-size: var(--am-font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--am-muted);
    margin: 0 0 6px;
}

.am-ts-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.am-ts-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--am-border);
    border-radius: 999px;
    background: #fff;
    font-size: var(--am-font-sm);
    color: var(--am-text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.am-ts-location-pill input {
    margin: 0;
}

.am-ts-location-pill.is-off {
    opacity: 0.45;
    text-decoration: line-through;
}

.am-ts-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.am-ts-filters__block--legend .am-ts-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 5px;
}

.am-ts-legend__label {
    font-size: var(--am-font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--am-muted);
    margin-right: 4px;
}

.am-ts-legend span:not(.am-ts-legend__label),
.am-ts-filters__block--legend .am-ts-legend span {
    font-size: 10px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid var(--am-border);
    border-radius: 999px;
    padding: 2px 7px;
    white-space: nowrap;
}

.am-ts-week {
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    overflow: hidden;
}

.am-ts-week__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #fafbfc, #fff);
    border-bottom: 1px solid var(--am-border);
}

.am-ts-week__head h4 {
    margin: 0;
    font-size: var(--am-font-sm);
    font-weight: 700;
}

.am-ts-week__hint {
    font-size: var(--am-font-xs);
    color: var(--am-muted);
}

.am-ts-week__head-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.am-ts-week__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.am-ts-week-action {
    padding: 0 6px !important;
    font-size: var(--am-font-sm);
    text-decoration: none !important;
}

.am-ts-week-action--muted {
    color: var(--am-muted) !important;
}

.am-ts-quickfill {
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.am-ts-quickfill__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.am-ts-quickfill__title {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--am-muted);
    white-space: nowrap;
}

.am-ts-quickfill__row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.am-ts-quickfill__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-size: var(--am-font-xs);
    color: var(--am-muted);
}

.am-ts-quickfill__field .form-control {
    width: 88px;
    text-align: center;
}

.am-ts-quickfill__hint {
    margin: 0;
    font-size: 10px;
    color: var(--am-muted);
    text-align: right;
}

.am-ts-approved-leaves {
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
}

.am-ts-approved-leaves__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.am-ts-approved-leaves__title {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1d4ed8;
    white-space: nowrap;
}

.am-ts-approved-leaves__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.am-ts-approved-leaves__pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 10px;
    color: #1e3a8a;
}

.am-ts-approved-leaves__pill strong {
    font-size: 11px;
    letter-spacing: 0.04em;
}

.am-ts-approved-leaves__hint {
    margin: 0;
    font-size: 10px;
    color: var(--am-muted);
    text-align: right;
}

.am-ts-mobile-gate {
    display: none;
}

.am-ts-mobile-gate__card {
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 24px;
    text-align: center;
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
}

.am-ts-mobile-gate__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--am-primary-soft);
    color: var(--am-primary-dark);
    font-size: 22px;
}

.am-ts-mobile-gate__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--am-text);
}

.am-ts-mobile-gate__text {
    margin: 0 0 16px;
    font-size: var(--am-font-sm);
    color: var(--am-muted);
    line-height: 1.5;
}

.am-ts-mobile-gate__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.am-ts-day--approved-leave {
    background: #eff6ff !important;
}

.am-ts-approved-leave-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.am-ts-col--approved-leave {
    background: #f8fbff !important;
}

.am-ts-cell--approved-leave {
    background: #eff6ff;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #93c5fd;
}

.am-ts-cell--approved-leave-auto .am-ts-leave-toggle {
    background: #dbeafe;
    color: #1d4ed8;
}

.am-ts-cell--approved-leave .remarks-select {
    border-color: #93c5fd;
    background: #fff;
}

.am-ts-full-leave-label {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1d4ed8;
}

.am-ts-grid .date-column.am-ts-full-leave {
    background: #eff6ff !important;
}

.am-ts-grid thead th.am-ts-full-leave {
    background: #dbeafe !important;
}

.am-ts-cell--full-leave {
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    background: #eff6ff;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #93c5fd;
    cursor: not-allowed;
}

.am-ts-cell__locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.am-ts-full-leave-code {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.am-ts-full-leave-note {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--am-muted);
}

.am-ts-location-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    max-width: 140px;
    white-space: normal !important;
}

.am-ts-location-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

.am-ts-row-fill {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--am-primary);
    cursor: pointer;
}

.am-ts-row-fill:hover {
    text-decoration: underline;
}

.am-ts-cell__leave .remarks-select {
    display: none;
}

.am-ts-cell__leave.is-open .remarks-select,
.am-ts-cell__leave.has-value .remarks-select {
    display: block;
}

.am-ts-leave-toggle {
    border: 0;
    background: #f8fafc;
    color: var(--am-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 2px 8px;
    width: 100%;
    cursor: pointer;
}

.am-ts-cell__leave.has-value .am-ts-leave-toggle {
    background: #fef3c7;
    color: #92400e;
}

.am-ts-cell__leave.is-open .am-ts-leave-toggle {
    display: none;
}

.am-ts-cell {
    min-width: 96px;
}

.am-ts-grid-wrap {
    overflow: auto;
    max-height: min(58vh, 620px);
}

.am-ts-grid {
    width: max-content;
    max-width: 100%;
    margin: 0;
    font-size: var(--am-font-sm);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.am-ts-grid .date-column:not(.am-ts-outside):not(.am-ts-empty) {
    width: 1%;
    white-space: nowrap;
}

.am-ts-grid .date-column.am-ts-empty {
    display: none;
}

.am-ts-grid .date-column.am-ts-outside {
    width: 1%;
    white-space: nowrap;
    background: #f8fafc !important;
    opacity: 0.72;
}

.am-ts-grid thead th.am-ts-outside {
    color: var(--am-outline);
}

.am-ts-outside-label {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--am-outline);
}

.am-ts-cell--outside {
    min-height: 54px;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.am-ts-outside-dash {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1;
}

.am-ts-grid th.am-ts-outside.am-ts-weekend,
.am-ts-grid td.am-ts-outside.am-ts-weekend {
    background: #f1f5f9 !important;
}

.am-ts-grid thead th {
    background: #f8fafc;
    color: #475569;
    font-size: var(--am-font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 6px 4px !important;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    border-color: var(--am-border) !important;
    position: sticky;
    top: 0;
    z-index: 3;
}

.am-ts-grid thead th.am-ts-sticky-col {
    left: 0;
    z-index: 5;
    text-align: left;
    padding-left: 10px !important;
}

.am-ts-dow {
    display: block;
    font-size: 10px;
    line-height: 1.1;
    color: var(--am-muted);
}

.am-ts-dom {
    display: block;
    font-size: var(--am-font-xs);
    font-weight: 700;
    color: var(--am-text);
}

.am-ts-grid tbody td {
    padding: 4px !important;
    vertical-align: middle;
    border-color: #eef2f7 !important;
}

.am-ts-grid tbody td.am-ts-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    font-weight: 600;
    font-size: var(--am-font-sm);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #fafbfc;
    box-shadow: 1px 0 0 #eef2f7;
}

.am-ts-grid th.am-ts-weekend,
.am-ts-grid td.am-ts-weekend {
    background: #fffbeb !important;
}

.am-ts-grid th.am-ts-holiday,
.am-ts-grid td.am-ts-holiday {
    background: #ecfdf5 !important;
}

.am-ts-grid tbody td.am-ts-sticky-col.am-ts-weekend {
    background: #fef3c7 !important;
}

.am-ts-grid tbody td.am-ts-sticky-col.am-ts-holiday {
    background: #d1fae5 !important;
}

.am-ts-holiday-badge,
.am-ts-holidays__pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #d1fae5;
    color: #047857;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.am-ts-holidays__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.am-ts-holidays__pill strong {
    color: #065f46;
}

.am-ts-cell__locked--holiday {
    align-items: center;
    text-align: center;
}

.am-ts-holiday-hint {
    margin-bottom: 4px;
    padding: 2px 4px;
    border-radius: var(--am-radius-xs, 2px);
    background: rgba(16, 185, 129, 0.12);
    text-align: center;
    line-height: 1.2;
}

.am-ts-holiday-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #047857;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-ts-holiday-note {
    display: block;
    font-size: 10px;
    color: #059669;
}

.am-ts-grid .total-hours,
.am-ts-total-col {
    font-weight: 700;
    text-align: center;
    background: #f8fbff;
    min-width: 58px;
    font-size: var(--am-font-sm);
    color: var(--am-primary-dark);
}

.am-ts-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 108px;
}

.am-ts-cell__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.am-ts-cell .form-control {
    min-height: 28px;
    height: 28px;
    padding: 2px 6px;
    font-size: var(--am-font-sm);
    border-radius: 6px;
    border-color: #dbeafe;
    text-align: center;
}

.am-ts-cell .remarks-select {
    min-height: 26px;
    height: 26px;
    padding: 0 4px;
    font-size: var(--am-font-xs);
    background: #fff;
}

.am-ts-cell .form-control:focus {
    border-color: var(--am-primary);
    box-shadow: 0 0 0 2px var(--am-primary-soft);
}

.am-ts-cell--filled {
    background: #f0fdf4;
    border-radius: 6px;
    padding: 2px;
}

.am-ts-cell--filled .form-control {
    border-color: #86efac;
    background: #fff;
}

.am-ts-savebar {
    position: sticky;
    bottom: 8px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
}

.am-ts-savebar__hint {
    font-size: var(--am-font-sm);
    color: var(--am-muted);
}

.am-ts-savebar__hint i {
    color: var(--am-primary);
    margin-right: 4px;
}

#amTsSaveBtn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

#amTsSaveBtn.is-loading i {
    margin-right: 0.35rem;
}

@media (max-width: 767px) {
    .am-ts-mobile-gate {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh - var(--am-header-h, 60px) - 48px);
        padding: 20px 16px;
    }

    .am-ts-workspace {
        display: none !important;
    }

    .am-content-body:has(.am-ts-workspace) {
        min-height: calc(100vh - var(--am-header-h, 60px) - 48px);
    }
}

@media (max-width: 991px) {
    .am-ts-filters__grid {
        grid-template-columns: 1fr;
    }

    .am-ts-quickfill__head,
    .am-ts-approved-leaves__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .am-ts-quickfill__hint,
    .am-ts-approved-leaves__hint {
        text-align: left;
    }

    .am-ts-grid-wrap {
        max-height: none;
    }

    .am-ts-toolbar__left,
    .am-ts-toolbar__right {
        width: 100%;
    }
}

.am-modal-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.am-modal-step {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--am-border);
    font-size: 11px;
    color: var(--am-muted);
}

.am-modal-step strong {
    display: block;
    font-size: 12px;
    color: var(--am-text);
}

/* Page header */
.page-header {
    margin-bottom: 16px !important;
    padding-bottom: 0 !important;
}

.page-header .page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--am-text);
    margin-bottom: 4px;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: var(--am-outline);
}

.am-page-subtitle {
    color: var(--am-muted);
    font-size: 12.5px;
    margin-top: 2px;
}

/* Cards & panels */
.am-card,
.card.am-panel {
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    margin-bottom: 8px;
    overflow: hidden;
}

.am-card .am-card-header,
.card.am-panel .am-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--am-border);
    background: var(--am-surface-secondary);
    border-radius: var(--am-radius) var(--am-radius) 0 0;
}

.am-card .am-card-header h5,
.am-card .am-card-header .am-card-title {
    margin: 0;
    font-size: var(--am-font-sm);
    font-weight: 700;
    color: var(--am-text);
}

.am-card .am-card-header .am-card-meta {
    font-size: var(--am-font-xs);
    color: var(--am-muted);
}

.am-card .am-card-body,
.card.am-panel > .card-body.compact {
    padding: 0;
}

.am-card .am-card-body.padded,
.am-card-footer {
    padding: 16px 20px;
}

.am-card-footer {
    border-top: 1px solid var(--am-border);
    background: var(--am-surface-secondary);
    border-radius: 0 0 var(--am-radius) var(--am-radius);
}

/* Dashboard stats */
.am-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.am-stat-card {
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    padding: 12px 14px 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.am-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--am-shadow-md);
}

.am-stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--am-primary);
    border-radius: var(--am-radius) 0 0 var(--am-radius);
}

.am-stat-card.am-stat-success::before { background: var(--am-success); }
.am-stat-card.am-stat-warning::before { background: var(--am-warning); }

.am-stat-card .am-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
}

.am-stat-card .am-stat-label {
    font-size: var(--am-font-sm);
    font-weight: 700;
    color: var(--am-text);
}

.am-stat-card .am-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--am-primary-soft);
    color: var(--am-primary);
    font-size: 13px;
}

.am-stat-card .am-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
}

.am-stat-card .am-stat-item h4 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--am-text);
}

.am-stat-card .am-stat-item p {
    margin: 0;
    font-size: var(--am-font-xs);
    color: var(--am-muted);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.am-stat-card .am-stat-link {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--am-primary) !important;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1;
    text-decoration: none !important;
}

.am-stat-card .am-stat-link:hover {
    opacity: 1;
    color: var(--am-primary-dark) !important;
}

/* Tables — fit viewport, truncate long cells */
.table-responsive.am-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.am-table-wrap .custom-table,
.am-table-wrap .am-server-table,
.custom-table.am-server-table,
.table.custom-table.am-server-table {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
    margin-bottom: 0 !important;
    font-size: 13px;
}

.custom-table,
.table.custom-table {
    margin-bottom: 0 !important;
    font-size: 13px;
}

.custom-table thead th,
.am-server-table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: var(--am-font-xs) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--am-border) !important;
    padding: 8px 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-table tbody td,
.am-server-table tbody td {
    padding: 10px 12px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f5f9 !important;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0;
    position: relative;
}

.custom-table tbody tr:hover,
.am-server-table tbody tr:hover {
    background: #f8fafc !important;
}

/* Keep action menus usable — dedicated actions column */
.am-table-wrap col.am-col-actions,
.am-server-table col.am-col-actions {
    width: 64px;
}

.am-table-wrap col.am-col-employee {
    width: 26%;
}

.am-table-wrap col.am-col-email {
    width: 22%;
}

.am-table-wrap col.am-col-project,
.am-table-wrap col.am-col-designation,
.am-table-wrap col.am-col-company {
    width: 16%;
}

.am-table-wrap th.am-col-actions-head,
.am-table-wrap td.am-col-actions-cell,
.am-table-wrap td.text-end,
.am-table-wrap td.text-right,
.am-server-table th.am-col-actions-head,
.am-server-table td.am-col-actions-cell,
.am-server-table td.text-end,
.am-server-table td.text-right,
.custom-table th.am-col-actions-head,
.custom-table td.am-col-actions-cell,
.custom-table td.text-end,
.custom-table td.text-right {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    max-width: none !important;
    width: 64px !important;
    min-width: 64px !important;
    padding-right: 12px !important;
    text-align: right !important;
    vertical-align: middle !important;
}

.am-table-wrap td.am-col-actions-cell .dropdown-action,
.am-server-table td.am-col-actions-cell .dropdown-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    margin: 0;
}

.am-table-wrap td.am-col-actions-cell .action-icon,
.am-server-table td.am-col-actions-cell .action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.am-table-wrap .table-avatar,
.custom-table .table-avatar,
.am-server-table .table-avatar {
    display: flex !important;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.25;
}

.am-table-wrap .table-avatar .avatar,
.custom-table .table-avatar .avatar,
.am-table-wrap .table-avatar .table-avatar__photo,
.custom-table .table-avatar .table-avatar__photo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none !important;
}

.am-table-wrap .table-avatar .avatar img,
.custom-table .table-avatar .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.am-table-wrap .table-avatar .table-avatar__photo .am-avatar,
.custom-table .table-avatar .table-avatar__photo .am-avatar {
    width: 36px;
    height: 36px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Don't let row/link text color paint over white initials. */
.am-table-wrap .table-avatar .am-avatar__initials,
.custom-table .table-avatar .am-avatar__initials,
.am-server-table .table-avatar .am-avatar__initials,
.table-avatar__photo .am-avatar__initials {
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.am-table-wrap .table-avatar > a:not(.avatar):not(.table-avatar__photo),
.custom-table .table-avatar > a:not(.avatar):not(.table-avatar__photo),
.am-server-table .table-avatar > a:not(.avatar):not(.table-avatar__photo),
.am-table-wrap .table-avatar .am-employee-cell__name,
.custom-table .table-avatar .am-employee-cell__name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
    text-decoration: none !important;
}

.am-table-wrap .table-avatar .am-employee-cell__name:hover,
.custom-table .table-avatar .am-employee-cell__name:hover {
    color: var(--am-primary-dark, #0077cc);
}

.custom-table .table-avatar h2 {
    font-size: 13px !important;
    margin: 0 !important;
}

.custom-table .table-avatar a {
    color: #0f172a;
    font-weight: 600;
}

.am-employee-cell__meta {
    color: var(--am-muted);
    font-size: 12.5px;
}

.am-cell-ellipsis {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Status badges */
.am-badge,
.badge.am-status {
    font-size: var(--am-font-xs);
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.am-badge-pending { background: #fef3c7; color: #92400e; }
.am-badge-created { background: #e0e7ff; color: #3730a3; }
.am-badge-approved { background: #dcfce7; color: #166534; }
.am-badge-rejected { background: #fee2e2; color: #991b1b; }
.am-badge-submitted { background: #dbeafe; color: #1e40af; }

.am-badge-email-sent { background: #dcfce7; color: #166534; }
.am-badge-email-failed { background: #fee2e2; color: #991b1b; }
.am-badge-email-unknown { background: #f3f4f6; color: #4b5563; }

/* Action buttons — compact toolbar */
.am-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.am-actions .btn,
.am-actions form {
    margin: 0 !important;
}

.am-actions .btn {
    width: 30px;
    height: 30px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--am-radius) !important;
    font-size: 12px;
    line-height: 1;
    box-shadow: none !important;
    border: none !important;
}

.am-actions .btn-outline-primary.copy-approval-link {
    color: var(--am-primary);
    background: var(--am-primary-soft);
    border: none !important;
}

.am-actions .btn-outline-primary.copy-approval-link:hover {
    background: var(--am-primary);
    color: #fff;
    border: none !important;
}

/* Toolbar / strip blocks */
.am-strip {
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    padding: 8px 12px;
    margin-bottom: 8px;
}

.am-strip .strip-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.am-strip-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
}

.am-strip .strip-item {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--am-border);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    margin: 0 !important;
}

.am-strip .strip-item-expired {
    opacity: 0.85;
    background: #f8fafc;
}

.am-strip .strip-item-empty {
    border-radius: 8px;
    border-style: dashed;
    padding: 8px 10px;
}

.am-strip .strip-info-title {
    color: var(--am-muted);
    font-weight: 600;
}

.am-strip .strip-info {
    color: var(--am-text);
    font-weight: 700;
}

/* Buttons */
.btn.add-btn,
.btn-primary {
    border-radius: var(--am-btn-radius) !important;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px !important;
    box-shadow: none !important;
    border: none !important;
}

.btn.add-btn {
    background: var(--am-primary) !important;
}

/* Alerts */
.alert {
    border-radius: var(--am-radius-sm);
    border: none;
    font-size: 13px;
    padding: 10px 14px;
    box-shadow: var(--am-shadow);
}

/* Modals */
.custom-modal .modal-content,
.modal-content {
    border: none;
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-md);
}

.custom-modal .modal-header,
.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--am-border);
    background: #fafbfc;
}

.custom-modal .modal-body,
.modal-body {
    padding: 18px;
}

.custom-modal .modal-title,
.modal-title {
    font-size: 16px;
    font-weight: 700;
}

/* Auth pages — Fluent Design 2 */
.am-auth-html,
.am-auth-html body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.am-auth-page {
    --am-auth-blue: #0078d4;
    --am-auth-blue-dark: #106ebe;
    --am-auth-navy: #0b1a2e;
    font-family: var(--am-font-sans);
}

.account-page {
    background: var(--am-bg);
}

body.account-page.am-auth-page {
    background: var(--am-bg) !important;
    min-height: 100vh;
    height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.am-auth-shell {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.am-auth-hero {
    position: relative;
    flex: 1.05;
    display: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 12% 18%, rgba(0, 120, 212, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 88% 82%, rgba(0, 120, 212, 0.18) 0%, transparent 50%),
        linear-gradient(160deg, #0b1a2e 0%, #102a4a 48%, #0f243f 100%);
}

@media (min-width: 992px) {
    .am-auth-hero {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100%;
        align-self: stretch;
    }
}

.am-auth-hero__acrylic {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25));
}

.am-auth-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.am-auth-hero__glow--blue {
    width: 320px;
    height: 320px;
    top: 8%;
    left: -48px;
    background: rgba(0, 120, 212, 0.4);
}

.am-auth-hero__glow--soft {
    width: 240px;
    height: 240px;
    right: 6%;
    bottom: 12%;
    background: rgba(255, 255, 255, 0.08);
}

.am-auth-hero__content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    padding: 48px 56px;
    color: #f3f2f1;
}

.am-auth-hero__logo {
    display: block;
    width: min(100%, 300px);
    height: auto;
    margin-bottom: 22px;
    background: transparent;
}

.am-auth-hero__icon-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
}

.am-auth-hero__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.am-auth-hero__chip iconify-icon.am-icon {
    width: 22px !important;
    height: 22px !important;
}

.am-auth-hero__chip--blue { background: linear-gradient(145deg, #2b88d8, #0078d4); }
.am-auth-hero__chip--green { background: linear-gradient(145deg, #13a10e, #107c10); }
.am-auth-hero__chip--orange { background: linear-gradient(145deg, #f7630c, #ca5010); }
.am-auth-hero__chip--purple { background: linear-gradient(145deg, #9a7bce, #744da9); }
.am-auth-hero__chip--teal { background: linear-gradient(145deg, #00b7c3, #038387); }

.am-auth-hero__eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ecbf5;
}

.am-auth-hero__title {
    margin: 0 0 14px;
    font-size: clamp(1.7rem, 2.5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: var(--am-tracking-tight);
    color: #fff;
}

.am-auth-hero__text {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(243, 242, 241, 0.78);
}

.am-auth-hero__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.am-auth-hero__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(243, 242, 241, 0.92);
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.am-auth-hero__features li span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.am-auth-hero__features strong {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
}

.am-auth-hero__features small {
    font-size: 12px;
    color: rgba(243, 242, 241, 0.68);
}

.am-auth-hero__feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.am-auth-hero__feature-icon--blue { background: linear-gradient(145deg, #2b88d8, #0078d4); }
.am-auth-hero__feature-icon--green { background: linear-gradient(145deg, #13a10e, #107c10); }
.am-auth-hero__feature-icon--purple { background: linear-gradient(145deg, #9a7bce, #744da9); }

.am-auth-hero__feature-icon iconify-icon.am-icon {
    width: 18px !important;
    height: 18px !important;
}

.am-auth-main {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 45% at 100% 0%, rgba(0, 120, 212, 0.08), transparent 55%),
        radial-gradient(ellipse 50% 35% at 0% 100%, rgba(0, 120, 212, 0.05), transparent 50%),
        linear-gradient(180deg, #fafafa 0%, #f3f2f1 100%);
}

.am-auth-card-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 28px 20px 16px;
    overflow-y: auto;
}

.am-auth-card__brand {
    text-align: center;
    margin-bottom: 18px;
}

.am-auth-card__brand img {
    width: min(100%, 220px);
    height: auto;
    background: transparent;
}

.am-auth-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.am-auth-card__titles {
    min-width: 0;
    flex: 1 1 auto;
}

.am-auth-card__head .account-title {
    margin-bottom: 4px;
}

.am-auth-card__head .account-subtitle {
    margin-bottom: 0;
}

.am-locale-select {
    margin: 0;
    flex: 0 0 auto;
}

.am-locale-select__control {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    min-width: 3.25rem;
    max-width: 4.25rem;
    padding: 5px 22px 5px 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E")
        no-repeat right 8px center / 9px,
        #fff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-transform: lowercase;
}

.am-locale-select__control:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.18);
}

.am-locale-select--auth {
    margin-top: 2px;
}

.am-auth-footer {
    flex-shrink: 0;
    margin: 0;
    padding: 8px 16px 14px;
    text-align: center;
    font-size: 12px;
    color: var(--am-muted);
}

/* Beat legacy style.css .account-box { width: 480px } — card was stretching full pane. */
body.am-auth-page .am-auth-card-wrap > .account-box.am-auth-card,
body.am-auth-page .account-box.am-auth-card--fluent {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    border-radius: var(--am-radius-xl);
    background: var(--am-glass-surface-strong) !important;
    backdrop-filter: blur(var(--am-glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--am-glass-blur)) saturate(120%);
    box-shadow: var(--am-glass-shadow) !important;
    border: 1px solid var(--am-glass-border-soft) !important;
}

.account-page .account-box:not(.am-auth-card) {
    border-radius: var(--am-radius-xl);
    background: var(--am-glass-surface-strong) !important;
    box-shadow: var(--am-glass-shadow) !important;
    border: 1px solid var(--am-glass-border-soft) !important;
}

.am-auth-page .account-wrapper {
    padding: 32px 28px 28px;
}

.account-page .account-wrapper {
    padding: 28px 24px 24px;
}

.account-page .account-title,
.am-auth-page .account-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: var(--am-tracking-tight);
    color: var(--am-text);
    text-align: left;
}

.account-page .account-subtitle,
.am-auth-page .account-subtitle {
    color: var(--am-muted);
    font-size: 13px;
    margin-bottom: 22px;
    text-align: left;
    line-height: 1.45;
}

.account-page .form-control,
.am-auth-page .form-control {
    min-height: 40px;
    border-radius: var(--am-radius-sm);
    border-color: var(--am-border-strong);
    font-size: 14px;
    background: #fff;
    color: var(--am-text);
}

.account-page .form-control:focus,
.am-auth-page .form-control:focus {
    border-color: var(--am-auth-blue);
    box-shadow: var(--am-focus-ring);
}

.account-page .account-btn,
.am-auth-page .account-btn {
    width: 100%;
    min-height: 40px;
    border-radius: var(--am-radius-sm) !important;
    font-weight: 600;
    letter-spacing: 0;
    font-size: 14px !important;
    background: var(--am-auth-blue) !important;
    border: 0 !important;
    box-shadow: none;
    color: #fff !important;
}

.account-page .account-btn:hover,
.account-page .account-btn:focus,
.am-auth-page .account-btn:hover,
.am-auth-page .account-btn:focus {
    background: var(--am-auth-blue-dark) !important;
    opacity: 1;
}

.am-auth-page .alert-danger {
    border: 0;
    border-radius: var(--am-radius-sm);
    background: #fde7e9;
    color: var(--am-danger);
    font-size: 13px;
}

.am-auth-sso {
    margin-bottom: 4px;
}

.am-ms-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--am-radius-sm) !important;
    border: 1px solid #d0d5dd !important;
    background: #fff !important;
    color: #1b1b1b !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    box-shadow: none !important;
}

.am-ms-login-btn:hover,
.am-ms-login-btn:focus {
    background: #f5f7fa !important;
    border-color: #b8c0cc !important;
    color: #1b1b1b !important;
    text-decoration: none !important;
}

.am-ms-login-btn__icon {
    display: inline-flex;
    line-height: 0;
}

.am-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 4px;
    color: var(--am-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.am-auth-divider::before,
.am-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e7ec;
}

.am-auth-page .am-auth-form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-text);
}

.am-auth-page .am-auth-form a.text-muted.small {
    color: var(--am-muted) !important;
}

.am-auth-page .am-auth-form a.text-muted.small:hover {
    color: var(--am-auth-blue) !important;
}

.am-auth-message__text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--am-muted);
    text-align: center;
}

.am-auth-links {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--am-border, #e5e7eb);
    text-align: center;
}

.am-auth-link-btn {
    border: 0;
    background: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--am-auth-blue, #0078d4);
    cursor: pointer;
}

a.am-auth-link-btn--anchor {
    text-decoration: none;
}

.am-auth-links__sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.am-auth-link-btn:hover {
    color: var(--am-auth-blue-dark, #106ebe);
    text-decoration: underline;
}

.am-auth-page .account-content {
    padding: 0;
}

.am-auth-page .account-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--am-border, #e5e7eb);
    text-align: center;
    font-size: 13px;
    color: var(--am-muted);
}

.am-auth-page .account-footer a {
    color: var(--am-auth-blue, #0078d4);
    font-weight: 600;
}

.am-auth-page .alert-success {
    margin-bottom: 16px;
    font-size: 13px;
}

.am-password-field {
    position: relative;
}

.am-password-field .form-control {
    padding-right: 44px;
}

.am-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--am-outline);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.am-password-toggle:hover,
.am-password-toggle:focus {
    color: var(--am-auth-blue, #0078d4);
    background: rgba(0, 120, 212, 0.08);
    outline: none;
}

.am-password-toggle__hide {
    display: none;
}

.am-password-toggle.is-visible .am-password-toggle__show {
    display: none;
}

.am-password-toggle.is-visible .am-password-toggle__hide {
    display: inline-block;
}

.account-page .apply-btn {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px !important;
}

@media (max-width: 991px) {
    .am-auth-card-wrap {
        align-items: flex-start;
        padding-top: 24px;
    }

    .am-auth-card__brand {
        margin: 0 0 20px;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }
}

/* Standalone / public approval */
.am-standalone-page {
    min-height: 100vh;
    background: var(--am-bg);
    padding: 24px 0 40px;
}

.am-standalone-header {
    background: #fff;
    border-bottom: 1px solid var(--am-border);
    box-shadow: var(--am-shadow);
    padding: 12px 0;
    margin-bottom: 20px;
}

.am-standalone-header .brand img {
    max-height: 42px;
}

.am-approval-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.am-approval-card {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    overflow: hidden;
}

.am-approval-card .am-approval-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--am-border);
    background: linear-gradient(180deg, #fafbfc, #fff);
}

.am-approval-card .am-approval-head h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.am-approval-card .am-approval-body {
    padding: 16px 18px 18px;
}

.am-approval-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.am-approval-meta .badge {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
}

.am-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

.am-form-grid .form-control {
    min-height: 40px;
    border-radius: 8px;
    font-size: 13px;
}

.am-form-grid .am-form-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.am-form-grid .am-form-actions .btn {
    flex: 1;
    font-weight: 600;
    border-radius: 8px;
}

.am-empty-note {
    text-align: center;
    padding: 28px 16px;
    color: var(--am-muted);
    font-size: 13px;
}

.am-thankyou {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.am-thankyou-box {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 14px;
    box-shadow: var(--am-shadow-md);
    padding: 36px 28px;
    max-width: 560px;
}

.am-thankyou-box .icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

/* Dropdown actions menu polish */
.am-table-wrap .dropdown-action {
    position: relative;
}

.dropdown-action {
    position: relative;
}

.dropdown-action .dropdown-menu {
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm, 6px);
    box-shadow: var(--am-shadow-md);
    padding: 4px !important;
    min-width: 0 !important;
    width: max-content !important;
    max-width: min(220px, calc(100vw - 32px));
    z-index: 1080;
}

.am-card .dropdown-action .dropdown-menu,
.am-table-wrap .dropdown-action .dropdown-menu {
    position: absolute;
}

.dropdown-action .dropdown-item {
    border-radius: var(--am-radius-xs, 4px);
    font-size: 12.5px;
    padding: 6px 10px !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
    justify-content: flex-start;
    text-align: left;
}

.dropdown-action .dropdown-item:hover {
    background: transparent;
    color: var(--am-primary-dark);
}

.dropdown-action form {
    margin: 0;
}

.dropdown-action button.dropdown-item {
    width: 100%;
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: left;
}

.dropdown-action .action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--am-radius);
    border: none;
    color: var(--am-muted);
}

body > .dropdown-menu.am-dropdown-portal,
.dropdown-menu.am-dropdown-portal {
    display: block !important;
    position: fixed !important;
    float: none !important;
    margin: 0 !important;
    padding: 4px !important;
    min-width: 0 !important;
    max-width: min(200px, calc(100vw - 16px)) !important;
    width: max-content !important;
    z-index: 1080 !important;
    border-radius: var(--am-radius-sm, 6px) !important;
    font-size: 12.5px !important;
}

body > .dropdown-menu.am-dropdown-portal form,
.dropdown-menu.am-dropdown-portal form {
    margin: 0 !important;
    padding: 0 !important;
}

body > .dropdown-menu.am-dropdown-portal button.dropdown-item,
.dropdown-menu.am-dropdown-portal button.dropdown-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

body > .dropdown-menu.am-dropdown-portal .dropdown-item,
.dropdown-menu.am-dropdown-portal .dropdown-item,
.dropdown-action .dropdown-menu .dropdown-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    white-space: nowrap !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
    height: auto !important;
    width: auto !important;
    font-size: 12.5px !important;
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    white-space: nowrap;
}

/* Kill legacy style.css green flash (#23c038) — no bg on hover/focus/active. */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active,
.dropdown-menu.am-dropdown-portal .dropdown-item:hover,
.dropdown-menu.am-dropdown-portal .dropdown-item:focus,
.dropdown-menu.am-dropdown-portal .dropdown-item:active,
.dropdown-menu.am-dropdown-portal .dropdown-item.active {
    background-color: transparent !important;
    background-image: none !important;
    color: inherit !important;
    outline: none;
}

.dropdown-menu .dropdown-item iconify-icon.am-icon,
.dropdown-menu.am-dropdown-portal .dropdown-item iconify-icon.am-icon,
body > .dropdown-menu.am-dropdown-portal .dropdown-item iconify-icon.am-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    font-size: 14px !important;
    flex-shrink: 0;
    color: inherit;
    display: inline-flex !important;
    overflow: hidden;
    margin: 0 !important;
}

.dropdown-menu .dropdown-item .m-r-5,
.dropdown-menu.am-dropdown-portal .dropdown-item .m-r-5 {
    margin-right: 0 !important; /* flex gap handles spacing */
}

.dropdown-menu .dropdown-item .fa,
.dropdown-menu.am-dropdown-portal .dropdown-item .fa {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* DataTables compact */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 12px;
}

.am-dt-toolbar,
.am-dt-footer,
.am-card.am-card-flush .dataTables_wrapper .row:first-child,
.am-card.am-card-flush .dataTables_wrapper .row:last-child {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 !important;
    padding: 10px 16px !important;
}

.am-dt-toolbar,
.am-card.am-card-flush .dataTables_wrapper .row:first-child {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--am-border);
}

.am-dt-footer,
.am-card.am-card-flush .dataTables_wrapper .row:last-child {
    background: #fafbfc;
    border-top: 1px solid var(--am-border);
}

.am-dt-toolbar__left,
.am-dt-toolbar__right,
.am-dt-footer__left,
.am-dt-footer__right,
.am-card.am-card-flush .dataTables_wrapper .row:first-child > [class*="col-"],
.am-card.am-card-flush .dataTables_wrapper .row:last-child > [class*="col-"] {
    flex: 0 1 auto;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
}

.am-dt-toolbar__right,
.am-card.am-card-flush .dataTables_wrapper .row:first-child > [class*="col-"]:last-child {
    margin-left: auto !important;
}

.am-dt-footer__right,
.am-card.am-card-flush .dataTables_wrapper .row:last-child > [class*="col-"]:last-child {
    margin-left: auto !important;
    text-align: right;
}

.am-dt-footer__left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.am-dt-footer__rows {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
    white-space: nowrap;
}

.am-dt-footer__rows-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
}

.am-dt-footer__count {
    font-size: 12px;
    color: var(--am-muted);
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: var(--am-radius-sm);
    border: 1px solid var(--am-border);
    padding: 4px 28px 4px 10px;
    min-height: 34px;
    min-width: 72px;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-text);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    appearance: none;
}

.am-dt-search,
.dataTables_wrapper .dataTables_filter {
    position: relative;
}

.am-dt-search::before,
.am-card.am-card-flush .dataTables_wrapper .dataTables_filter::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--am-search-icon) center / contain no-repeat;
    pointer-events: none;
    z-index: 1;
}

.am-dt-search .dataTables_filter {
    float: none;
    margin: 0;
    text-align: right;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--am-radius-sm);
    border: 1px solid var(--am-border);
    padding: 6px 12px 6px 34px;
    min-height: 34px;
    min-width: 240px;
    font-size: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.am-dt-toolbar .dataTables_filter input,
.am-dt-search .dataTables_filter input {
    min-height: 34px !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--am-primary);
    box-shadow: 0 0 0 3px var(--am-primary-soft);
    outline: none;
}

.dataTables_wrapper .dataTables_info {
    padding: 0 !important;
    color: var(--am-muted);
    font-weight: 500;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
    gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .page-link {
    min-width: 32px;
    text-align: center;
    border-radius: var(--am-radius-xs) !important;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
}

@media (max-width: 991px) {
    .am-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575px) {
    .am-form-grid {
        grid-template-columns: 1fr;
    }

    .am-stat-card .am-stat-row {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

/* Header & sidebar polish */
.header {
    box-shadow: none;
    border-bottom: 1px solid var(--am-border);
}

.sidebar {
    box-shadow: none;
    width: var(--am-sidebar-w) !important;
    top: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    bottom: 0;
    background: var(--am-sidebar-bg) !important;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--am-sidebar-border);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.sidebar::before {
    display: none;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.am-sidebar-brand {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 16px;
    border-bottom: 1px solid var(--am-sidebar-border);
    background: transparent;
    flex-shrink: 0;
}

.am-sidebar-brand__link {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    text-decoration: none !important;
}

.am-sidebar-brand__full {
    display: block;
    max-height: 36px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.am-sidebar-brand__mark {
    display: none;
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar.collapsed .am-sidebar-brand {
    justify-content: center;
    padding: 0 8px;
}

.sidebar.collapsed .am-sidebar-brand__link {
    justify-content: center;
    width: auto;
}

.sidebar.collapsed .am-sidebar-brand__full {
    display: none;
}

.sidebar.collapsed .am-sidebar-brand__mark {
    display: block;
    width: 28px;
    height: 28px;
}

.sidebar.collapsed .sidebar-menu {
    padding: 8px 0 !important;
}

.sidebar.collapsed .sidebar-menu > ul > li {
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu > ul > li > a {
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100%;
    height: 40px;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.sidebar.collapsed .sidebar-menu ul li.active > a {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid var(--am-sidebar-border) !important;
}

.sidebar.collapsed .sidebar-menu ul li.active > a .am-nav-icon,
.sidebar.collapsed .sidebar-menu ul li a:hover .am-nav-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sidebar.collapsed .am-nav-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
}

.sidebar.collapsed .am-sidebar-support {
    padding: 8px 0;
}

.sidebar.collapsed .am-sidebar-support > a {
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    padding: 0 !important;
    border-radius: var(--am-radius-sm);
}

.sidebar.collapsed .am-sidebar-support .am-nav-icon--support {
    width: 24px;
    height: 24px;
}

.sidebar > .slimScrollDiv,
.sidebar > .sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar > .slimScrollDiv > .sidebar-inner,
.sidebar > .sidebar-inner {
    height: auto;
    max-height: none;
}

.sidebar > .sidebar-inner::-webkit-scrollbar,
.sidebar > .slimScrollDiv::-webkit-scrollbar {
    width: 6px;
}

.sidebar > .sidebar-inner::-webkit-scrollbar-thumb,
.sidebar > .slimScrollDiv::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.sidebar .sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: block;
}

.sidebar-menu {
    padding: 8px 8px 12px !important;
}

.sidebar-menu ul li.menu-title,
.sidebar-menu li.menu-title {
    padding: 12px 10px 4px !important;
    margin-top: 0 !important;
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--am-sidebar-title) !important;
}

.sidebar-menu li a,
.sidebar-menu > ul > li > a,
.sidebar-menu ul li a {
    font-size: 14px !important;
    line-height: 20px !important;
}

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px !important;
    margin: 2px 0 !important;
    border-radius: 8px !important;
    color: var(--am-sidebar-text) !important;
    transform: none !important;
    border-left: none !important;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-menu ul li a > span:not(.am-nav-icon):not(.menu-arrow) {
    margin-left: 0 !important;
}

.sidebar-menu ul li.active > a i,
.sidebar-menu ul li.active > a .am-nav-icon i {
    color: inherit !important;
}

.sidebar-menu ul li a:hover {
    background: var(--am-sidebar-hover) !important;
    color: var(--am-sidebar-text-hover) !important;
    transform: none !important;
}

.sidebar-menu ul li.active > a {
    background: #ffffff !important;
    color: var(--am-primary-dark) !important;
    font-weight: 600;
    border-left: none !important;
    border-radius: 8px !important;
    box-shadow: none;
    border: 1px solid var(--am-sidebar-border);
    position: relative;
}

.sidebar-menu ul li.active > a::before {
    display: none;
}

.sidebar-menu ul li.active > a .am-nav-icon,
.sidebar-menu ul li a:hover .am-nav-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit;
}

.am-nav-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 0;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    background: transparent !important;
    border: none !important;
    color: inherit;
    line-height: 0;
    box-sizing: border-box;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: color 0.1s ease;
}

.sidebar .am-nav-icon iconify-icon.am-icon {
    width: 24px !important;
    height: 24px !important;
}

.am-nav-icon i,
.am-nav-icon svg {
    display: block !important;
    font-size: 24px !important;
    line-height: 1 !important;
    width: 1em;
    height: 1em;
    text-align: center;
}

.sidebar-menu ul li a:hover .am-nav-icon {
    color: inherit;
}

/* Nested module submenus — caret + soft nest rail; only children get selected box */
.sidebar-menu > ul > li.submenu > a {
    position: relative;
    padding-right: 36px !important;
}

/* Parent is a folder, not the selected page — never paint the active box on it */
.sidebar-menu > ul > li.submenu > a,
.sidebar-menu > ul > li.submenu.active > a,
.sidebar-menu > ul > li.submenu > a.active {
    background: transparent !important;
    font-weight: 500 !important;
    color: var(--am-sidebar-text) !important;
}

.sidebar-menu > ul > li.submenu > a:hover,
.sidebar-menu > ul > li.submenu.active > a:hover,
.sidebar-menu > ul > li.submenu > a.active:hover {
    background: var(--am-sidebar-hover) !important;
    color: var(--am-sidebar-text-hover) !important;
}

/* CSS caret (project ships FA4 — FA6 glyphs were rendering as empty squares) */
.sidebar-menu .menu-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: 0;
    padding: 0;
    border: none;
    border-right: 1.5px solid var(--am-outline);
    border-bottom: 1.5px solid var(--am-outline);
    background: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent;
    transform: translateY(-70%) rotate(-45deg); /* ▶ */
    transition: transform 0.15s ease;
}

.sidebar-menu .menu-arrow:before {
    content: none !important;
    display: none !important;
}

.sidebar-menu li a.subdrop .menu-arrow {
    transform: translateY(-30%) rotate(45deg); /* ▼ */
}

.sidebar-menu ul ul {
    display: none;
    position: relative;
    padding: 0;
    margin: 0;
}

/* Per-item rail: vertical stops at mid of last child — no overshoot */
.sidebar-menu ul ul > li {
    position: relative;
}

.sidebar-menu ul ul > li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(192, 199, 212, 0.55);
    pointer-events: none;
}

.sidebar-menu ul ul > li:first-child::before {
    top: 50%;
}

.sidebar-menu ul ul > li:last-child::before {
    bottom: 50%;
}

.sidebar-menu ul ul > li:only-child::before {
    display: none;
}

.sidebar-menu ul ul a,
.sidebar-menu ul ul li > a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative;
    min-height: 0;
    padding: 6px 8px 6px 36px !important;
    margin: 1px 0 !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    font-weight: 500;
    color: var(--am-sidebar-text) !important;
    text-decoration: none !important;
    background: transparent !important;
}

.sidebar-menu ul ul a::before,
.sidebar-menu ul ul li > a::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 10px;
    height: 1px;
    background: rgba(192, 199, 212, 0.55);
    transform: translateY(-50%);
    pointer-events: none;
}

.sidebar-menu ul ul a:hover,
.sidebar-menu ul ul li > a:hover {
    background: var(--am-sidebar-hover) !important;
    color: var(--am-sidebar-text-hover) !important;
    text-decoration: none !important;
}

.sidebar-menu ul ul a.active,
.sidebar-menu ul ul li.active > a {
    background: linear-gradient(90deg, var(--am-sidebar-active-bg, rgba(0, 120, 212, 0.18)), transparent) !important;
    color: var(--am-primary-dark) !important;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 0 !important;
}

.sidebar-menu ul ul a.active::before,
.sidebar-menu ul ul li.active > a::before {
    background: rgba(0, 120, 212, 0.45);
}

.sidebar.collapsed .sidebar-menu > ul > li.submenu > ul,
.sidebar.collapsed .sidebar-menu .menu-arrow {
    display: none !important;
}

.sidebar.collapsed .sidebar-menu > ul > li.submenu > a {
    padding-right: 0 !important;
    justify-content: center !important;
}

/* Override legacy SmartHR sidebar rules that break FA6 icon tiles */
.sidebar .sidebar-menu > ul > li > a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    justify-content: flex-start !important;
}

.sidebar .sidebar-menu > ul > li > a > span.am-nav-icon {
    margin-left: 0 !important;
}

.sidebar .sidebar-menu > ul > li > a > span:not(.am-nav-icon) {
    margin-left: 0 !important;
}

.sidebar-menu ul li a .am-nav-icon i,
.sidebar-menu ul li a i.fa-solid {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

.sidebar-menu ul li a i {
    width: auto !important;
    margin-right: 0 !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

.am-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    margin-top: auto;
    margin-bottom: 0;
    border-top: 1px solid var(--am-sidebar-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), var(--am-sidebar-user-tint));
    flex-shrink: 0;
}

.am-sidebar-user__avatar,
.am-sidebar-user .am-avatar {
    flex-shrink: 0;
}

.am-sidebar-user__info {
    min-width: 0;
}

.am-sidebar-user__info strong {
    display: block;
    font-size: 13px;
    color: var(--am-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-sidebar-user__info span {
    display: block;
    font-size: 11px;
    color: var(--am-outline);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header .header-left {
    display: none !important;
}

.sidebar.collapsed {
    width: var(--am-sidebar-collapsed-w) !important;
}

.header .header-left {
    width: var(--am-sidebar-w);
}

.sidebar.collapsed ~ .page-wrapper,
.sidebar.collapsed + .page-wrapper {
    margin-left: var(--am-sidebar-collapsed-w) !important;
}

.sidebar:not(.collapsed) ~ .page-wrapper,
.sidebar:not(.collapsed) + .page-wrapper {
    margin-left: var(--am-sidebar-w) !important;
}

.sidebar-menu ul li a {
    font-size: var(--am-font-sm);
    padding: 6px 8px !important;
}

.sidebar-menu ul li.active > a {
    color: var(--am-primary-dark) !important;
}

.sidebar-menu ul li a:hover,
.sidebar-menu ul li:not(.active) > a:hover {
    color: var(--am-sidebar-text-hover) !important;
}

/* Expanded folder row (Leaves, Claims…) stays dark ink on light mica */
.sidebar-menu > ul > li.submenu.active > a,
.sidebar-menu > ul > li.submenu > a.subdrop,
.sidebar-menu > ul > li.submenu > a.active {
    color: var(--am-sidebar-text-hover) !important;
    background: var(--am-sidebar-hover) !important;
}

body:has(.sidebar.collapsed) .header .header-left {
    width: var(--am-sidebar-collapsed-w);
}

.sidebar-menu li.menu-title,
.sidebar-menu ul li.menu-title {
    font-size: var(--am-font-xs);
}

.page-wrapper > .content {
    min-height: 0;
}

/* Tighter datatable on list pages */
.custom-table + .dataTables_wrapper,
.am-card-flush .dataTables_wrapper {
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length select {
    min-height: 30px;
    padding: 2px 8px;
}

.account-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--am-muted);
}

.account-footer a {
    color: var(--am-primary);
    font-weight: 600;
}

.am-inline-alert {
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}

/* Public job listings */
.job-wrapper .content.container {
    max-width: 1100px;
}

.job-list {
    display: block;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    margin-bottom: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.job-list:hover {
    transform: translateY(-1px);
    box-shadow: var(--am-shadow-md);
    text-decoration: none;
}

.job-list .job-list-det {
    padding: 14px 16px 10px;
}

.job-list .job-list-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--am-text);
}

.job-list .job-department {
    font-size: 13px;
    color: var(--am-muted);
}

.job-list .job-list-footer {
    background: #fafbfc;
    border-top: 1px solid var(--am-border);
    padding: 8px 16px;
}

.job-list .job-list-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12px;
    color: var(--am-muted);
}

/* Unified brand palette — accent partial overrides header/sidebar */
.btn-primary,
.btn.add-btn,
.account-page .apply-btn,
.add-approver-btn,
.submit-btn,
.continue-btn {
    background: var(--am-primary) !important;
    color: #fff !important;
    border: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn.add-btn:hover,
.btn.add-btn:focus,
.add-approver-btn:hover,
.submit-btn:hover,
.continue-btn:hover,
.account-page .apply-btn:hover {
    background: var(--am-primary-dark) !important;
    color: #fff !important;
    border: none !important;
}

.btn-outline-primary {
    color: var(--am-primary) !important;
    background: var(--am-primary-soft) !important;
    border: none !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff !important;
    background: var(--am-primary) !important;
    border: none !important;
}

.cancel-btn {
    background: #64748b !important;
    color: #fff !important;
    border: none !important;
}

.cancel-btn:hover {
    background: #475569 !important;
    color: #fff !important;
    border: none !important;
}

.bg-primary,
.badge-primary {
    background-color: var(--am-primary) !important;
}

.text-primary {
    color: var(--am-primary) !important;
}

.am-stat-card.am-stat-info::before,
.am-stat-card.am-stat-success::before {
    background: var(--am-primary);
}

.am-stat-card.am-stat-info .am-stat-icon {
    background: var(--am-primary-soft);
    color: var(--am-primary);
}

/* Dashboard layout */
.am-dash-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

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

.am-quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--am-border);
    border-radius: 8px;
    background: #fafbfc;
    color: var(--am-text);
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.am-quick-action:hover {
    border-color: #bfdbfe;
    background: var(--am-primary-soft);
    color: var(--am-primary-dark);
    transform: translateY(-1px);
}

.am-quick-action__icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--am-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--am-primary);
}

.am-tip-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.am-tip-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #475569;
}

.am-tip-list li:last-child {
    border-bottom: none;
}

.am-tip-list li i {
    color: var(--am-primary);
    margin-top: 2px;
}

.am-recent-title {
    font-size: var(--am-font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--am-muted);
    margin-bottom: 6px;
}

/* Base recent-item styles live with the glassmorphism block below. */

.am-form-compact {
    max-width: 520px;
}

.am-form-compact .form-control {
    min-height: 42px;
    border-radius: 8px;
}

/* Profile page */
.profile-name h2 {
    font-size: var(--am-font-lg);
    font-weight: 600;
}

.profile-name p {
    font-size: var(--am-font-sm);
}

.field-label {
    font-size: var(--am-font-xs);
}

.field-value {
    font-size: var(--am-font-base);
}

.approval-section h4 {
    font-size: var(--am-font-sm);
}

.profile-field,
.approval-section {
    border-left-color: var(--am-primary) !important;
}

.approver-number {
    background-color: var(--am-primary) !important;
    color: #fff !important;
}

/* Theme picker — legacy swatches (profile uses .am-theme-card grid) */
.am-theme-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.am-theme-option {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.am-theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
    padding: 10px 8px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.am-theme-swatch__color {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.am-theme-swatch__label {
    font-size: 11px;
    color: var(--am-muted);
    font-weight: 600;
}

.am-theme-option:hover .am-theme-swatch {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.am-theme-option.active .am-theme-swatch {
    border-color: var(--am-primary);
    background: linear-gradient(180deg, var(--am-primary-soft) 0%, #fff 70%);
    box-shadow: inset 0 0 0 1px var(--am-primary), 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Approver editor — Fluent-scale radii (outer 4px, nested 2px) */
.am-approver-panel {
    background: #f8fafc;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    padding: 18px;
}

.am-approver-row {
    display: grid;
    grid-template-columns: 24px 32px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-xs);
}

.am-approver-row .drag-handle-item {
    color: var(--am-outline);
    cursor: move;
}

.am-approver-row .approver-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.am-approver-empty {
    text-align: center;
    padding: 24px 12px;
    border: 1px dashed var(--am-border);
    border-radius: var(--am-radius-xs);
    color: var(--am-muted);
    font-size: 13px;
}

/* Standard modals */
.custom-modal .modal-content,
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.custom-modal .modal-header,
.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--am-border);
    background: #fafbfc;
}

.custom-modal .modal-body,
.modal-body {
    padding: 18px;
}

.custom-modal .modal-footer,
.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--am-border);
    background: #fafbfc;
}

.custom-modal .form-header h3,
.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.custom-modal .form-header p {
    color: var(--am-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.am-detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 14px;
    font-size: 13px;
}

.am-detail-grid dt {
    margin: 0;
    color: var(--am-muted);
    font-weight: 600;
}

.am-detail-grid dd {
    margin: 0;
    color: var(--am-text);
}

/* Pagination — match accent theme */
.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination > .active > span,
.page-item.active .page-link,
.dataTables_wrapper .page-item.active .page-link {
    background-color: var(--am-primary) !important;
    border-color: var(--am-primary) !important;
    color: #fff !important;
}

.pagination > li > a,
.pagination > li > span,
.page-link,
.dataTables_wrapper .page-link {
    color: var(--am-primary) !important;
}

.page-link:hover,
.dataTables_wrapper .page-link:hover {
    color: var(--am-primary-dark) !important;
    background: var(--am-primary-soft) !important;
    border-color: #bfdbfe !important;
}

.dataTables_wrapper .pagination .paginate_button.current,
.dataTables_wrapper .pagination .paginate_button.current:hover {
    background: var(--am-primary) !important;
    border-color: var(--am-primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .pagination .paginate_button {
    color: var(--am-primary) !important;
}

/* Impersonation floating widget — Fluent acrylic card */
.am-impersonation-widget {
    position: fixed;
    top: 72px;
    right: 16px;
    left: auto;
    z-index: 10050;
    width: min(360px, calc(100vw - 24px));
    border-radius: var(--am-radius);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(var(--am-glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--am-glass-blur)) saturate(1.2);
    color: var(--am-text);
    border: 1px solid var(--am-border);
    box-shadow: var(--am-shadow-lg);
    overflow: hidden;
    touch-action: none;
}

.am-impersonation-widget::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--am-warning);
    border-radius: var(--am-radius) 0 0 var(--am-radius);
}

.am-impersonation-widget.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.am-impersonation-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 10px 16px;
    cursor: grab;
    background: var(--am-surface-secondary);
    border-bottom: 1px solid var(--am-border);
}

.am-impersonation-widget__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--am-text);
}

.am-impersonation-widget__header-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.am-impersonation-widget__icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: var(--am-radius-sm);
    background: transparent;
    color: var(--am-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.am-impersonation-widget__icon-btn:hover {
    background: var(--am-surface-tertiary);
    color: var(--am-text);
    border-color: var(--am-border);
}

.am-impersonation-widget__icon-btn:focus-visible {
    outline: none;
    box-shadow: var(--am-focus-ring);
}

.am-impersonation-widget__body {
    padding: 12px 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-impersonation-widget__user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.am-impersonation-widget__user strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--am-text);
}

.am-impersonation-widget__role-form {
    margin: 0;
}

.am-impersonation-widget__label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--am-muted);
}

.am-impersonation-widget__role-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-impersonation-widget__role-row select {
    flex: 1;
    min-width: 0;
    min-height: var(--am-control-h);
    font-size: 12px;
    background: #fff;
    border-color: var(--am-border-strong) !important;
}

.am-impersonation-widget__role-row .btn {
    flex-shrink: 0;
    min-height: var(--am-control-h);
    font-size: 12px;
    font-weight: 600;
    background: var(--am-surface-secondary) !important;
    color: var(--am-text) !important;
    border: 1px solid var(--am-border-strong) !important;
}

.am-impersonation-widget__role-row .btn:hover {
    background: var(--am-surface-tertiary) !important;
}

.am-impersonation-widget__hint {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--am-muted);
}

.am-impersonation-widget__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--am-border);
}

.am-impersonation-widget__origin {
    font-size: 11px;
    color: var(--am-muted);
}

.am-impersonation-widget__footer .btn {
    min-height: var(--am-control-h);
    font-size: 12px;
    font-weight: 600;
    background: var(--am-primary) !important;
    color: #fff !important;
    border: none !important;
}

.am-impersonation-widget__footer .btn:hover {
    background: var(--am-primary-dark) !important;
}

.am-impersonation-widget .text-muted {
    color: var(--am-muted) !important;
}

.am-impersonation-widget.is-collapsed .am-impersonation-widget__header {
    border-bottom: none;
}

.am-impersonation-chip {
    position: fixed;
    top: calc(var(--am-header-h, 60px) + 8px);
    right: 16px;
    z-index: 10050;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    min-height: var(--am-control-h);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-pill);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--am-text);
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--am-shadow-md);
    cursor: pointer;
    transition: background 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}

.am-impersonation-chip::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--am-warning);
    flex-shrink: 0;
}

.am-impersonation-chip:hover {
    background: #fff;
    border-color: var(--am-border-strong);
    box-shadow: var(--am-shadow-lg);
}

.am-impersonation-chip__expand {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
    margin-left: 2px;
    border-left: 1px solid var(--am-border);
    font-size: 11px;
    color: var(--am-muted);
}

.am-sidebar-support {
    margin-top: auto;
    padding: 0 10px 8px;
    flex-shrink: 0;
}

.am-sidebar-support a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--am-radius-sm);
    font-size: 12px;
    color: var(--am-sidebar-text) !important;
    text-decoration: none !important;
    border: none;
    background: transparent;
    transition: background 0.1s ease, color 0.1s ease;
}

.am-sidebar-support a:hover {
    color: var(--am-sidebar-text-hover) !important;
    background: var(--am-sidebar-hover);
}

.am-sidebar-support .am-nav-icon--support {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 0;
    background: transparent !important;
    border: none !important;
}

.am-sidebar-support a i {
    width: 18px;
    text-align: center;
}

@media (max-width: 991px) {
    .am-stat-grid {
        grid-template-columns: 1fr;
    }

    .am-dash-grid {
        grid-template-columns: 1fr;
    }
}

/* Global compact density */
.page-header.row.align-items-center {
    padding: 7px 12px;
    background: var(--am-card);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    margin: 0 0 8px !important;
}

.page-header .breadcrumb {
    margin-bottom: 0;
    padding: 0;
    font-size: var(--am-font-sm);
    line-height: 1.3;
}

.page-header .page-title {
    font-size: var(--am-font-title);
    margin-bottom: 0;
}

.am-page-toolbar--settings {
    margin-bottom: 0;
}

.am-page-toolbar--settings .page-title {
    margin: 0 0 2px;
}

.am-page-toolbar--settings .breadcrumb,
.am-page-toolbar--settings .am-page-toolbar__meta {
    margin-bottom: 0;
    padding: 0;
    font-size: var(--am-font-sm);
    background: transparent;
}

.am-page-toolbar__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
}

.am-page-toolbar__entitlements {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.am-leave-entitlements {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.am-entitlement-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid var(--am-border);
    border-radius: 999px;
    background: #fff;
    font-size: var(--am-font-xs);
    color: var(--am-text);
}

.am-entitlement-pill.is-expired {
    opacity: 0.85;
    background: #f8fafc;
}

.am-entitlement-pill__type {
    font-weight: 700;
}

.am-page-toolbar--leaves .am-page-toolbar__main {
    flex: 1;
    min-width: 0;
}

.am-content-body--settings > *:last-child,
.am-content-body--settings > .row {
    flex: 0 1 auto;
}

.am-quick-links-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.am-quick-links-inline .btn {
    padding: 5px 12px;
    font-size: var(--am-font-sm);
    line-height: 1.35;
}

.am-card.am-card-compact-header .am-card-header {
    padding: 6px 12px;
}

.am-card.am-card-compact-header .am-card-header .am-card-meta {
    font-size: 11px;
}

.am-recent-grid .col-lg-4 {
    margin-bottom: 0 !important;
}

.am-recent-grid .col-lg-4 + .col-lg-4 {
    border-left: none;
    padding-left: 0 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 11.5px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    height: auto;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    margin-left: 0;
    margin-right: 0;
}

/* Mira-inspired dashboard & panels */
.am-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
    padding: 2px 0 16px;
}

.am-dash-head__main {
    flex: 1;
    min-width: 0;
}

.am-dash-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.am-dash-head__title {
    margin: 0 0 4px;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--am-text);
    line-height: 1.15;
    letter-spacing: var(--am-tracking-tight);
}

.am-dash-head__sub {
    margin: 0;
    font-size: var(--am-font-sm);
    color: var(--am-muted);
    line-height: 1.45;
}

.am-dash-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--am-radius-sm);
    background: #fff;
    border: 1px solid var(--am-border);
    font-size: 12px;
    font-weight: 500;
    color: var(--am-text);
    box-shadow: none;
    white-space: nowrap;
    min-height: var(--am-control-h, 32px);
}

.am-dash-period {
    position: relative;
    display: inline-flex;
    margin: 0;
}

.am-dash-period__pill {
    pointer-events: none;
    gap: 8px;
    padding: 4px 10px;
    min-height: var(--am-control-h, 32px);
}

.am-dash-period__pill iconify-icon.am-icon {
    color: var(--am-primary);
    width: 16px;
    height: 16px;
}

.am-dash-period__range {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-text);
    white-space: nowrap;
}

.am-dash-period__chevron {
    width: 7px;
    height: 7px;
    margin-left: 0;
    border-right: 1.5px solid var(--am-muted);
    border-bottom: 1.5px solid var(--am-muted);
    transform: rotate(45deg) translateY(-1px);
    flex-shrink: 0;
}

.am-dash-period__select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.am-dash-period:hover .am-dash-period__pill,
.am-dash-period:focus-within .am-dash-period__pill {
    border-color: var(--am-primary);
    box-shadow: 0 0 0 3px var(--am-primary-soft);
}

.am-dash-head__actions .btn {
    white-space: nowrap;
}

.am-kpi-grid {
    display: grid;
    grid-template-columns: repeat(var(--am-kpi-count, 4), minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.am-kpi-card {
    display: block;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    padding: 20px 20px 18px;
    box-shadow: var(--am-shadow);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.am-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--am-shadow-md);
}

.am-kpi-card--static {
    cursor: default;
}

.am-kpi-card--static:hover {
    transform: none;
}

.am-kpi-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.am-kpi-card__label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.am-kpi-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.am-kpi-card__icon i {
    line-height: 1;
}

.am-kpi-card__icon--blue { background: #eff6ff; color: #2563eb; }
.am-kpi-card__icon--green { background: #ecfdf5; color: #059669; }
.am-kpi-card__icon--orange { background: #fff7ed; color: #ea580c; }
.am-kpi-card__icon--purple { background: #f5f3ff; color: #7c3aed; }

.am-kpi-card__value {
    font-size: 2.125rem;
    font-weight: 700;
    color: var(--am-text);
    line-height: 1;
    margin-bottom: 12px;
    letter-spacing: var(--am-tracking-tight);
}

.am-kpi-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.am-kpi-card__detail {
    font-size: 12px;
    color: var(--am-outline);
}

.am-kpi-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #2563eb;
}

.am-kpi-badge--green { background: #ecfdf5; color: #059669; }
.am-kpi-badge--orange { background: #fff7ed; color: #ea580c; }
.am-kpi-badge--purple { background: #f5f3ff; color: #7c3aed; }

.am-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
    gap: 12px;
    align-items: stretch;
}

.am-dash-grid > .am-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.am-dash-grid > .am-panel > .am-panel__body {
    flex: 1 1 auto;
    min-height: 0;
}

.am-panel {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    overflow: hidden;
}

.am-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--am-border);
}

.am-panel__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.am-panel__sub {
    display: block;
    font-size: 12px;
    color: var(--am-outline);
    margin-top: 2px;
}

.am-panel__body {
    padding: 14px 16px;
}

.am-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: stretch;
}

.am-recent-grid {
    display: grid;
    grid-template-columns: repeat(var(--am-recent-cols, 3), minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    margin: 0;
}

.am-recent-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
}

.am-recent-section:first-child {
    padding-left: 0;
}

.am-recent-section:last-child {
    padding-right: 0;
}

.am-recent-section + .am-recent-section {
    border-left: 1px solid var(--am-border);
}

.am-recent-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
}

.am-recent-empty {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.45;
    color: var(--am-muted);
    background: var(--am-surface-secondary);
    border: 1px dashed var(--am-border);
    border-radius: var(--am-radius-sm);
}

.am-quick-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    background: var(--am-surface-secondary);
    text-decoration: none !important;
    color: var(--am-text);
    transition: background 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.am-quick-tile:hover {
    background: var(--am-primary-soft);
    border-color: var(--am-border-strong);
    color: var(--am-primary-dark);
}

.am-quick-tile__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--am-radius-sm);
    background: #fff;
    border: 1px solid var(--am-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--am-primary);
    transition: border-color 0.1s ease, background 0.1s ease;
}

.am-quick-tile__icon iconify-icon.am-icon {
    width: 18px;
    height: 18px;
}

.am-quick-tile:hover .am-quick-tile__icon {
    transform: translateY(-1px);
    border-color: var(--am-primary);
    background: #fff;
}

.am-quick-tile__icon i {
    line-height: 1;
}

.am-quick-tile__label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.am-dash-head--compact {
    padding: 6px 0 14px;
}

.am-dash-head--compact .am-dash-head__title {
    font-size: 1.5rem;
}

.am-dash-head__sub a {
    color: var(--am-primary);
}

.am-card,
.am-panel {
    border-radius: var(--am-radius);
}

@media (max-width: 1199px) {
    .am-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .am-dash-grid {
        grid-template-columns: 1fr;
    }

    .am-recent-grid {
        grid-template-columns: 1fr;
    }

    .am-recent-section {
        padding-left: 0;
        padding-right: 0;
    }

    .am-recent-section + .am-recent-section {
        border-left: none;
        border-top: 1px solid var(--am-border);
        padding-top: 14px;
        margin-top: 10px;
    }
}

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

    .am-dash-head__title {
        font-size: 1.4rem;
    }
}

/* Global design polish — typography, radius, controls */
.am-card,
.card.am-panel,
.am-panel,
.am-kpi-card,
.am-page-toolbar,
.page-header.row.align-items-center {
    border-color: var(--am-border);
    box-shadow: var(--am-shadow);
}

.btn,
.btn-sm,
.btn-lg,
.add-btn,
.submit-btn,
.continue-btn,
.cancel-btn {
    border-radius: var(--am-btn-radius) !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 600;
    letter-spacing: var(--am-tracking-normal);
    transition: background 0.15s ease, transform 0.12s ease;
}

.btn {
    padding: 0.45rem 0.95rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: var(--am-font-sm);
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-dark,
.btn-light {
    border: none !important;
}

.btn-outline-primary,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-dark,
.btn-outline-light {
    border: none !important;
}

.btn-outline-secondary {
    background: #fff !important;
    color: var(--am-text, #0f172a) !important;
    border: 1px solid var(--am-border-strong, #d2d0ce) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: var(--am-surface-secondary, #f3f2f1) !important;
    color: var(--am-text, #0f172a) !important;
    border-color: var(--am-border-strong, #d2d0ce) !important;
}

.btn:hover,
.add-btn:hover {
    transform: none;
}

.btn:focus-visible,
.add-btn:focus-visible {
    box-shadow: var(--am-focus-ring) !important;
}

.form-control,
.custom-select,
select.form-control,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: var(--am-radius-sm) !important;
    border-color: var(--am-border) !important;
    min-height: 38px;
    font-size: var(--am-font-sm);
    color: var(--am-text);
    box-shadow: none !important;
}

.form-control:focus,
.custom-select:focus,
select.form-control:focus {
    border-color: var(--am-primary) !important;
    box-shadow: var(--am-focus-ring) !important;
}

/* Flatpickr (.datetimepick) sets readonly — must not look disabled */
.form-control.datetimepick,
.form-control.datetimepick[readonly],
.form-control.flatpickr-input,
.form-control.flatpickr-input[readonly],
.am-expense-items-table .form-control.datetimepick {
    background-color: #fff !important;
    cursor: pointer;
    opacity: 1;
}

.form-control.datetimepick:disabled,
.form-control.flatpickr-input:disabled {
    background-color: var(--am-surface-secondary) !important;
    cursor: not-allowed;
}

.dropdown-menu {
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm, 6px);
    box-shadow: var(--am-shadow-md);
    padding: 4px;
    min-width: 0;
}

.dropdown-item {
    border-radius: var(--am-radius-xs);
    font-size: var(--am-font-sm);
    padding: 6px 10px;
    line-height: 1.25;
}

.modal-content,
.custom-modal .modal-content {
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom-color: var(--am-border);
    padding: 14px 18px;
}

.modal-body {
    padding: 16px 18px;
}

.modal-footer {
    border-top-color: var(--am-border);
    padding: 12px 18px;
}

.custom-table thead th {
    font-size: 10px !important;
    letter-spacing: 0.06em;
}

.am-card.am-card-flush .custom-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--am-border);
}

.am-card.am-card-flush .custom-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.65);
}

.am-badge,
.badge.am-status {
    border-radius: var(--am-radius-pill);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.sidebar-menu ul li a {
    border-radius: 0 !important;
    font-weight: 500;
}

.am-sidebar-user__avatar {
    border-radius: 10px;
}

#sidebar-toggle {
    border-radius: var(--am-radius-sm);
}

.am-quick-tile {
    border-radius: var(--am-radius-md);
}

.am-quick-tile__icon {
    border-radius: var(--am-radius-sm);
}

.am-entitlement-pill,
.am-kpi-badge,
.am-dash-pill {
    border-radius: var(--am-radius-sm);
}

.am-dash-period .am-dash-pill {
    border-radius: var(--am-radius-sm);
}

.am-ts-week,
.am-ts-toolbar,
.am-ts-filters,
.am-ts-savebar {
    border-radius: var(--am-radius);
}

.am-ts-cell .form-control,
.am-ts-cell .remarks-select {
    border-radius: var(--am-radius-xs);
}

.btn > i:first-child:not(:last-child),
.btn > .fa-solid:first-child:not(:last-child),
.am-dash-pill > i:first-child:not(:last-child),
.am-dash-pill > .fa-solid:first-child:not(:last-child) {
    margin-right: 0.4rem;
}

.btn i + span,
.btn .fa-solid + span,
.dropdown-item i + span {
    margin-left: 0.35rem;
}

.btn-sm i,
.btn-sm .fa-solid {
    font-size: 12px;
}

.user-menu,
.user-menu.nav {
    margin-top: 0 !important;
    float: none !important;
}

.user-menu.nav > li > a {
    color: #374151 !important;
    line-height: normal !important;
    height: auto !important;
    padding: 0 8px !important;
}

.user-menu.nav > li > a:hover,
.user-menu.nav > li > a:focus {
    background: transparent !important;
    color: #111827 !important;
}

@media (max-width: 991px) {
    .am-dash-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .am-dash-head__actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}

.am-panel__title,
.am-card .am-card-header .am-card-title {
    letter-spacing: var(--am-tracking-tight);
}

.am-content-body {
    gap: 14px;
}

.am-kpi-grid,
.am-dash-grid {
    gap: 18px;
}

/* Surfaces — flat cards, soft hairline borders, no heavy glass/shadow */
.header {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--am-border) !important;
    box-shadow: none !important;
}

.sidebar {
    background: var(--am-sidebar-bg) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: 1px solid var(--am-sidebar-border) !important;
    box-shadow: none !important;
}

.am-sidebar-brand {
    background: transparent;
    border-bottom-color: var(--am-sidebar-border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.am-sidebar-user {
    background: var(--am-sidebar-user-tint);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--am-sidebar-border);
}

.am-card,
.card.am-panel,
.am-panel,
.am-kpi-card,
.am-stat-card,
.page-header.row.align-items-center,
.am-profile-card,
.am-ts-toolbar,
.am-ts-filters,
.am-ts-week,
.am-ts-savebar {
    background: var(--am-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--am-border);
    box-shadow: none;
}

.am-card .am-card-header,
.card.am-panel .am-card-header,
.am-panel__head {
    background: var(--am-surface-secondary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: var(--am-border);
}

.am-card-footer,
.am-dt-toolbar,
.am-card.am-card-flush .dataTables_wrapper .row:first-child {
    background: var(--am-surface-secondary) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.am-dt-footer,
.am-card.am-card-flush .dataTables_wrapper .row:last-child {
    background: rgba(255, 255, 255, 0.38) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.am-dash-pill {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--am-glass-border-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.am-quick-tile {
    background: rgba(255, 255, 255, 0.46);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.am-quick-tile:hover {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(255, 255, 255, 0.8);
}

.am-quick-tile__icon {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.am-kpi-card__icon--blue { background: rgba(239, 246, 255, 0.85); backdrop-filter: blur(8px); }
.am-kpi-card__icon--green { background: rgba(236, 253, 245, 0.85); backdrop-filter: blur(8px); }
.am-kpi-card__icon--orange { background: rgba(255, 247, 237, 0.85); backdrop-filter: blur(8px); }
.am-kpi-card__icon--purple { background: rgba(245, 243, 255, 0.85); backdrop-filter: blur(8px); }

.am-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--am-border);
    border-radius: 0;
    font-size: 13px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.am-recent-item__main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.am-recent-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--am-text);
}

.am-recent-item__meta {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    color: var(--am-muted);
}

.am-recent-item .am-badge,
.am-recent-item .am-status {
    flex-shrink: 0;
    align-self: center;
}

.am-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.am-recent-item:first-child {
    padding-top: 2px;
}

.am-header-avatar,
.am-sidebar-user__avatar {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(15, 23, 42, 0.12);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .header,
    .sidebar,
    .am-card,
    .am-kpi-card,
    .am-panel {
        background: #fff;
    }

    .sidebar {
        background: var(--am-sidebar-bg) !important;
    }
}

/* Settings pages */
.am-settings-card {
    overflow: hidden;
}

.am-settings-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--am-border);
}

.am-settings-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--am-text);
}

.am-settings-card__hint {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--am-muted);
}

.am-settings-card__body {
    padding: 28px 32px;
}

.am-settings-section + .am-settings-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--am-border);
}

.am-settings-section__title {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--am-muted);
}

.am-settings-grid {
    display: grid;
    gap: 14px 16px;
}

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

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

.am-settings-form .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.am-settings-form .form-control,
.am-settings-form .form-check-label {
    font-size: 13px;
}

.am-settings-form .form-control {
    min-height: 40px;
    border-radius: var(--am-radius);
}

.am-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--am-border);
}

.am-settings-actions .btn {
    min-width: 132px;
    font-weight: 600;
    border-radius: var(--am-btn-radius);
}

/* Roles & permissions */
.am-roles-layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.am-roles-panel {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.am-roles-panel > .am-card-body {
    overflow: visible;
}

.am-roles-sidebar .btn-block {
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.am-roles-menu {
    margin-top: 12px;
    border: 1px solid var(--am-glass-border-soft);
    border-radius: var(--am-radius-md);
    overflow: hidden;
    background: var(--am-glass-surface);
    backdrop-filter: blur(var(--am-glass-blur));
    -webkit-backdrop-filter: blur(var(--am-glass-blur));
    box-shadow: var(--am-glass-shadow);
}

.am-roles-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px;
}

.am-roles-menu li + li {
    margin-top: 2px;
}

.am-roles-menu li a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px !important;
    border-radius: 10px !important;
    border-left: none !important;
    color: var(--am-muted) !important;
    font-size: var(--am-font-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.am-roles-menu .am-role-nav__main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.am-roles-menu .am-role-nav__icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f5f9;
    color: var(--am-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.am-roles-menu .role-name {
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-roles-menu li a:hover {
    background: rgba(255, 255, 255, 0.72) !important;
    color: var(--am-text) !important;
    border-left: none !important;
}

.am-roles-menu li a:hover .am-role-nav__icon {
    background: #e2e8f0;
    color: #475569;
}

.am-roles-menu li.active > a {
    background: var(--am-primary-soft) !important;
    color: var(--am-primary-dark) !important;
    border-left: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.am-roles-menu li.active > a .am-role-nav__icon {
    background: var(--am-primary);
    color: #fff;
    box-shadow: 0 8px 22px -8px var(--am-primary), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.am-roles-menu .role-action {
    display: none;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.am-roles-menu li a:hover .role-action,
.am-roles-menu li.active .role-action {
    display: inline-flex;
}

.am-roles-menu .action-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--am-border);
    color: var(--am-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.am-roles-menu li.active .action-circle,
.am-roles-menu li a:hover .action-circle {
    background: #fff;
    border-color: #cbd5e1;
    color: #475569;
}

.am-roles-menu .action-circle:hover {
    color: var(--am-primary);
    border-color: rgba(0, 158, 251, 0.25);
    background: #fff;
}

.am-roles-menu .delete-btn:hover {
    color: #dc2626;
    border-color: #fecaca;
}

.am-roles-panel__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--am-text);
}

.am-roles-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    position: relative;
    z-index: 30;
    overflow: visible;
}

.am-roles-panel__hint {
    margin: 0;
    font-size: 12px;
    color: var(--am-muted);
    max-width: 560px;
}

.am-roles-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 31;
    overflow: visible;
}

.am-roles-action-btn {
    min-height: 34px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.am-roles-savebar__status {
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 5px 10px;
    white-space: nowrap;
}

.am-module-add .am-roles-action-btn {
    min-width: 118px;
}

.am-module-add .dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    z-index: 1090;
    margin: 0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.am-module-add__menu {
    min-width: 260px;
    max-width: 320px;
    max-height: 360px;
    overflow-y: auto;
    padding-bottom: 8px;
}

.am-module-add__menu .dropdown-item small {
    font-size: 11px;
}

.am-roles-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px dashed var(--am-glass-border-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.45);
}

.am-roles-toolbar__label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
}

.am-roles-toolbar__select,
.am-roles-select {
    min-height: 34px;
    font-size: 12px;
    border-radius: 8px;
}

.am-roles-toolbar__select {
    width: auto;
    min-width: 110px;
    max-width: 140px;
    padding: 4px 28px 4px 10px;
}

.am-roles-empty {
    text-align: center;
    padding: 36px 20px;
    border: 1px dashed var(--am-glass-border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.35);
    position: relative;
    z-index: 1;
}

.am-roles-empty__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--am-primary-soft);
    color: var(--am-primary-dark);
}

.am-roles-empty h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.am-roles-empty p {
    margin: 0 auto 14px;
    max-width: 420px;
    color: var(--am-muted);
    font-size: 13px;
}

.am-col-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.am-col-head span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.am-col-head select,
.am-col-bulk select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    font-size: 12px;
    min-height: 34px;
    padding: 4px 22px 4px 8px;
    border-radius: 8px;
}

.am-roles-matrix-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.am-roles-matrix {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

.am-roles-matrix .am-col-module {
    width: 22%;
}

.am-roles-matrix .am-col-bulk {
    width: 7%;
}

.am-roles-matrix .am-col-perm {
    width: 10%;
}

.am-roles-matrix .am-col-remove {
    width: 4%;
}

.am-col-bulk,
.am-col-remove {
    width: auto;
}

.am-module-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.am-module-cell strong {
    font-size: 12px;
    color: var(--am-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-module-cell__meta {
    display: none;
    font-size: 10px;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-remove-module-btn {
    font-size: 18px;
    line-height: 1;
    padding: 0 4px !important;
    min-width: 0;
}

.am-perm-na {
    color: #cbd5e1;
    font-weight: 600;
}

.am-roles-matrix .btn-link.text-danger {
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.am-roles-matrix .btn-link.text-danger:hover {
    text-decoration: underline;
}

.am-roles-panel .table {
    margin-bottom: 0;
}

.am-roles-panel .custom-table thead th {
    padding: 8px 6px !important;
    vertical-align: middle !important;
    white-space: normal;
}

.am-roles-panel .custom-table tbody td {
    padding: 6px 6px !important;
}

.am-roles-panel .custom-table thead th:first-child,
.am-roles-panel .custom-table tbody td:first-child {
    padding-left: 10px !important;
}

.am-roles-panel .custom-table thead th:last-child,
.am-roles-panel .custom-table tbody td:last-child {
    padding-right: 8px !important;
}

.am-roles-panel .permission-level {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-size: 12px;
    border-radius: 8px;
    min-height: 34px;
    padding: 4px 22px 4px 8px;
}

.am-roles-panel .permission-level.is-dirty {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
    background: #fffbeb;
}

@media (max-width: 991px) {
    .am-settings-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .am-roles-layout {
        grid-template-columns: 1fr;
    }

    .am-roles-matrix {
        min-width: 640px;
    }
}

@media (max-width: 767px) {
    .am-settings-grid--2,
    .am-settings-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* Employee entity pages */
.am-entity-card {
    overflow: hidden;
}

.am-entity-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 24px;
    border-bottom: 1px solid var(--am-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
}

.am-entity-card__intro {
    min-width: 0;
}

.am-entity-card__title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--am-text);
}

.am-entity-card__meta {
    margin: 0;
    font-size: var(--am-font-sm);
    color: var(--am-muted);
}

.am-entity-card__meta a {
    color: var(--am-primary);
}

.am-entity-card__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.am-entity-card__search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-entity-card__search .form-control {
    min-width: 240px;
    min-height: 38px;
    border-radius: 10px;
}

.am-entity-card .am-card-body {
    padding: 0;
}

.am-entity-card__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--am-border);
    background: #fbfcfe;
}

.am-employee-cell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none !important;
    min-width: 0;
    max-width: 100%;
}

.am-employee-cell:hover strong,
.am-employee-cell:hover .am-employee-cell__name {
    color: var(--am-primary);
}

.am-employee-cell__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    background: #e2e8f0;
}

.am-employee-cell__name {
    min-width: 0;
}

.am-employee-cell span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.am-employee-cell small {
    color: var(--am-muted);
    font-size: 11px;
}

.am-table-actions {
    display: inline-flex;
    gap: 6px;
}

.am-employee-show {
    padding: 0;
}

.am-employee-show__hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--am-border);
}

.am-employee-show__avatar {
    width: 88px !important;
    height: 88px !important;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    flex-shrink: 0;
    font-size: 28px;
}

.am-employee-show__name {
    margin: 0 0 4px;
    font-size: 1.4rem;
    font-weight: 700;
}

.am-employee-show__subtitle,
.am-employee-show__email {
    margin: 0;
    color: var(--am-muted);
}

.am-employee-show__section + .am-employee-show__section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--am-border);
}

.am-employee-show__section h4 {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--am-muted);
}

.am-employee-show__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 28px;
}

.am-employee-show__grid span {
    display: block;
    font-size: 11px;
    color: var(--am-muted);
    margin-bottom: 6px;
}

.am-employee-show__grid strong {
    font-size: 14px;
    color: var(--am-text);
    font-weight: 600;
}

.am-employee-show__tags,
.am-approver-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.am-tag,
.am-approver-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--am-radius-sm);
    background: #eef2ff;
    color: #334155;
    font-size: 12px;
    max-width: 100%;
}

.am-approver-item__stage {
    font-weight: 700;
    color: #1e293b;
}

.am-approver-item__identity {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.am-approver-item__name {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.am-approver-item__email {
    word-break: break-all;
    font-size: 11px;
    color: var(--am-muted);
}

.am-approver-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.am-approver-selected__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.am-approver-selected__name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    word-break: break-word;
}

.am-approver-selected__email {
    font-size: 12px;
    color: var(--am-muted);
    word-break: break-all;
}

.am-approver-selected__change {
    flex-shrink: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--am-primary, #009efb);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.am-approver-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.am-approver-input .form-control {
    max-width: 320px;
}

.am-approver-picker {
    position: relative;
    flex: 1;
    min-width: 0;
}

.am-approver-suggest {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--am-border, #e5e7eb);
    border-radius: var(--am-radius-sm);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.am-approver-suggest__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
}

.am-approver-suggest__item:hover,
.am-approver-suggest__item:focus {
    background: #f8fafc;
}

.am-approver-suggest__name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.am-approver-suggest__email {
    font-size: 12px;
    color: var(--am-muted);
}

.am-approver-suggest__empty {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--am-muted);
}

.am-employee-form-wrap {
    padding: 28px 32px;
}

.am-employee-form {
    width: 100%;
}

.am-employee-form .am-settings-section + .am-settings-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--am-border);
}

.am-employee-form .am-settings-section__title {
    margin-bottom: 16px;
}

.am-employee-form .am-settings-grid {
    gap: 20px 24px;
}

.am-employee-form .form-group {
    margin-bottom: 0;
}

.am-employee-form .am-settings-actions {
    margin-top: 32px;
    padding-top: 24px;
}

/* Timesheet report */
.am-report-card {
    max-width: 920px;
}

.am-report-form__intro {
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    background: #f8fafc;
    color: var(--am-muted);
    font-size: 13px;
    line-height: 1.5;
}

.am-report-options {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.am-report-option {
    padding: 16px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    background: #fbfcfe;
}

.am-report-option__hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--am-muted);
    line-height: 1.45;
}

.am-report-option .form-check {
    margin: 0;
}

.am-report-option .form-check-label {
    font-weight: 600;
    color: var(--am-text);
}

.am-report-range-summary {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--am-radius);
    background: var(--am-primary-soft);
    color: var(--am-primary-dark);
    font-size: 12px;
    font-weight: 600;
}

.am-report-form .select2-container--default .select2-selection--single,
.am-report-form .select2-container--default .select2-selection--multiple {
    min-height: 40px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
}

.am-report-form .select2-container--default .select2-selection--multiple {
    padding: 4px 8px;
}

.am-report-form .select2-container--default .select2-selection--multiple .select2-selection__choice {
    border-radius: var(--am-radius);
    border-color: rgba(148, 163, 184, 0.35);
    background: #fff;
    font-size: 12px;
}

.am-report-form .select2-container--default.select2-container--focus .select2-selection--multiple,
.am-report-form .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--am-primary);
    box-shadow: 0 0 0 3px var(--am-primary-soft);
}

.am-branding-intro {
    margin: 0 0 18px;
    color: var(--am-muted);
    font-size: 13px;
    line-height: 1.5;
}

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

.am-branding-card {
    padding: 16px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    background: #fbfcfe;
}

.am-branding-card--wide {
    grid-column: 1 / -1;
}

.am-branding-card__label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--am-text);
}

.am-branding-card__hint {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--am-muted);
    line-height: 1.45;
}

.am-branding-card__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px dashed var(--am-border);
    border-radius: var(--am-radius);
    background: #fff;
}

.am-branding-card__preview--dark {
    background: linear-gradient(180deg, #1a2232 0%, #141b26 100%);
}

.am-branding-card__preview--wide img {
    max-height: 56px;
    max-width: 100%;
    object-fit: contain;
}

.am-branding-card__preview--dark img,
.am-branding-card__preview--mark img {
    max-height: 52px;
    max-width: 100%;
    object-fit: contain;
}

.am-branding-card__preview--mark {
    width: 88px;
    min-height: 88px;
    padding: 10px;
    background: linear-gradient(180deg, #1a2232 0%, #141b26 100%);
}

.am-branding-mark-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.am-branding-cropper__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.am-branding-cropper__stage {
    min-height: 220px;
    max-height: 320px;
    overflow: hidden;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    background: #eef2f7;
}

.am-branding-cropper__stage img {
    display: block;
    max-width: 100%;
}

.am-branding-cropper__stage:not(.is-ready) img {
    opacity: 0.35;
}

@media (max-width: 991px) {
    .am-branding-grid {
        grid-template-columns: 1fr;
    }

    .am-branding-mark-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .am-settings-card__body {
        padding: 20px 16px;
    }

    .am-settings-card__header {
        padding: 18px 16px;
    }

    .am-report-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .am-employee-show__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .am-entity-card__head {
        padding: 16px;
    }

    .am-entity-card__tools {
        width: 100%;
        margin-left: 0;
    }

    .am-entity-card__search {
        width: 100%;
    }

    .am-entity-card__search .form-control {
        min-width: 0;
        flex: 1;
    }

    .am-employee-show__grid {
        grid-template-columns: 1fr;
    }

    .am-approver-input {
        flex-direction: column;
        align-items: stretch;
    }

    .am-approver-input .form-control {
        max-width: none;
    }
}

/* List page header — nav moved to top bar; legacy rules kept for old markup */
.am-list-page-title {
    display: none;
}

.am-list-page-card {
    display: none;
}

.am-list-page-card__row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 36px;
}

.am-list-page-card__crumbs {
    flex-shrink: 0;
}

.am-list-page-card__crumbs .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: var(--am-font-sm);
    line-height: 1.3;
    white-space: nowrap;
}

.am-list-page-card__search {
    flex: 1;
    min-width: 180px;
    max-width: 360px;
}

.am-list-page-card__search .input-group {
    flex-wrap: nowrap;
}

.am-list-page-card__search .input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    min-height: 36px;
}

.am-list-page-card__search .input-group-append .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    min-height: 36px;
    box-shadow: none !important;
}

.am-list-page-card__search .input-group-append .btn:focus,
.am-list-page-card__search .input-group-append .btn:hover {
    box-shadow: none !important;
}

.am-list-page-card__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.am-server-table-toolbar .am-server-table-search {
    border-radius: var(--am-radius-sm);
    border: 1px solid var(--am-border);
    padding: 0 12px 0 34px;
    min-height: var(--am-toolbar-control-h);
    height: var(--am-toolbar-control-h);
    min-width: 200px;
    font-size: 12px;
    background: #fff;
    box-shadow: none !important;
}

.am-server-table-toolbar .am-server-table-search:focus {
    border-color: var(--am-primary);
    box-shadow: var(--am-focus-ring) !important;
    outline: none;
}

.am-server-table-footer .pagination {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .am-list-page-card__row {
        flex-wrap: wrap;
    }

    .am-list-page-card__search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
        margin-left: 0;
    }

    .am-list-page-card__actions {
        margin-left: auto;
    }
}

/* User avatars */
.am-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 8px rgba(15, 23, 42, 0.12);
}

.am-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.am-avatar__initials {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
}

.am-avatar--sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 11px;
}

.am-avatar--sidebar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 13px;
}

.am-avatar--md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 14px;
}

.am-avatar--lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 18px;
}

.am-avatar--xl {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 20px;
}

.am-header-avatar.am-avatar {
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.1);
}

/* Native dialog — replaces Bootstrap+jQuery modals for new flows */
.am-dialog {
    border: 0;
    padding: 0;
    border-radius: var(--am-radius-sm, 4px);
    box-shadow: var(--am-shadow-lg, 0 12px 40px rgba(15, 23, 42, 0.18));
    max-width: min(520px, calc(100vw - 32px));
    width: 100%;
    color: inherit;
}

.am-dialog--wide {
    max-width: min(760px, calc(100vw - 32px));
}

.am-audit-log {
    overflow: auto;
    max-height: min(60vh, 480px);
}

.am-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.am-audit-table th,
.am-audit-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--am-border, #e5e7eb);
    text-align: left;
    vertical-align: top;
}

.am-audit-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--am-muted);
    background: #f8fafc;
    position: sticky;
    top: 0;
}

.am-audit-when {
    white-space: nowrap;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.am-audit-actor {
    min-width: 140px;
}

.am-audit-muted {
    display: inline-block;
    color: var(--am-muted);
    font-size: 12px;
}

.am-audit-remarks {
    color: #475569;
    word-break: break-word;
}

.am-audit-empty {
    padding: 18px;
    text-align: center;
    color: var(--am-muted);
    font-size: 13px;
    border: 1px dashed var(--am-border, #e5e7eb);
    border-radius: var(--am-radius-sm, 4px);
}

.am-audit-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--am-radius-xs, 2px);
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.am-audit-badge--ok {
    background: #eaf5e4;
    color: #3f7a28;
}

.am-audit-badge--bad {
    background: #fef2f2;
    color: #b91c1c;
}

.am-audit-badge--info {
    background: #eff6ff;
    color: #1d4ed8;
}

.am-audit-inline {
    display: grid;
    gap: 12px;
}

.am-audit-inline__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.am-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.am-dialog__sheet {
    margin: 0;
    background: #fff;
}

.am-dialog__head,
.am-dialog__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--am-border, #e5e7eb);
}

.am-dialog__foot {
    justify-content: flex-end;
    border-bottom: 0;
    border-top: 1px solid var(--am-border, #e5e7eb);
}

.am-dialog__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.am-dialog__close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--am-muted);
    cursor: pointer;
    padding: 0 4px;
}

.am-dialog__body {
    padding: 16px;
    font-size: 14px;
}

.am-dialog__foot .btn + .btn {
    margin-left: 0;
}

/* Info status strip — semantic blue, never decorative accent (avoids Markisa-on-azure) */
.am-awaiting-approval {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: var(--am-radius-sm);
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
}

.am-awaiting-approval__body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.am-awaiting-approval__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--am-radius-sm);
    background: #dbeafe;
    color: #1d4ed8;
    flex-shrink: 0;
}

.am-awaiting-approval__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.am-awaiting-approval__text strong {
    font-size: 14px;
    color: #0f172a;
}

.am-awaiting-approval__text span {
    font-size: 12px;
    color: var(--am-muted);
}

.am-awaiting-approval__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.am-awaiting-approval__cta {
    background: #1d4ed8 !important;
    border: 1px solid #1d4ed8 !important;
    color: #fff !important;
    border-radius: var(--am-radius-sm) !important;
    box-shadow: none !important;
}

.am-awaiting-approval__cta:hover,
.am-awaiting-approval__cta:focus {
    background: #1e40af !important;
    border-color: #1e40af !important;
    color: #fff !important;
}

.am-awaiting-approval__cta--secondary {
    background: #fff !important;
    border: 1px solid #93c5fd !important;
    color: #1e40af !important;
}

.am-awaiting-approval__cta--secondary:hover,
.am-awaiting-approval__cta--secondary:focus {
    background: #eff6ff !important;
    border-color: #60a5fa !important;
    color: #1e3a8a !important;
}

/* Dashboard — natural height, no viewport stretch / empty scroll */
body.am-dashboard-page .am-dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
}

body.am-dashboard-page .am-content-body {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
}

body.am-dashboard-page .am-dash-grid {
    align-items: stretch; /* both cards match the taller column */
}

body.am-dashboard-page .am-dash-grid > .am-panel {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    height: 100%;
}

body.am-dashboard-page .am-dash-grid > .am-panel > .am-panel__head {
    flex-shrink: 0;
    padding: 14px 16px;
}

body.am-dashboard-page .am-dash-grid > .am-panel > .am-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 16px;
}

body.am-dashboard-page .am-dash-grid > .am-panel:first-child .am-recent-panel__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Keep quick actions compact; card still matches height via grid stretch. */
body.am-dashboard-page .am-dash-grid > .am-panel > .am-quick-grid {
    flex: 0 0 auto;
}

body.am-dashboard-page .am-recent-grid {
    display: grid;
    grid-template-columns: repeat(var(--am-recent-cols, 3), minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    flex: 1 1 auto;
    margin: 0;
    min-height: 0;
}

body.am-dashboard-page .am-recent-grid > [class*="col-"] {
    display: block;
    padding-left: 0;
    padding-right: 0;
    max-width: none;
    flex: none;
}

body.am-dashboard-page .am-recent-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

body.am-dashboard-page .am-recent-title {
    margin: 0 0 8px;
}

body.am-dashboard-page .am-quick-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.am-dashboard-page .am-quick-tile {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-height: 44px;
}

body.am-dashboard-page .am-quick-tile__label {
    text-align: left;
}

/* Only reserve space when the impersonation widget is actually on the page. */
body.am-dashboard-page:has(.am-impersonation-widget):not(.am-impersonation-widget-hidden) .am-dashboard-shell {
    padding-bottom: 72px;
}

body.am-dashboard-page:has(.am-impersonation-widget:not(.is-collapsed)):not(.am-impersonation-widget-hidden) .am-dashboard-shell {
    padding-bottom: 240px;
}

body.am-dashboard-page .am-impersonation-widget.is-docked {
    position: fixed;
    top: auto;
    bottom: 16px;
    right: 20px;
    width: auto;
    max-width: none;
    z-index: 10040;
}

body.am-dashboard-page .am-impersonation-widget.is-docked .am-impersonation-widget__header {
    cursor: default;
}

.sidebar:not(.collapsed) ~ .am-impersonation-widget.is-docked,
.sidebar:not(.collapsed) + .am-impersonation-widget.is-docked {
    left: calc(var(--am-sidebar-w, 240px) + 20px);
}

.sidebar.collapsed ~ .am-impersonation-widget.is-docked,
.sidebar.collapsed + .am-impersonation-widget.is-docked {
    left: calc(var(--am-sidebar-collapsed-w, 64px) + 20px);
}

body.am-dashboard-page .am-impersonation-widget.is-docked.is-collapsed {
    width: auto;
}

body.am-dashboard-page .am-impersonation-chip.is-docked {
    position: fixed;
    top: auto;
    bottom: 16px;
    right: 20px;
}

@media (max-width: 1199px) {
    body.am-dashboard-page .am-recent-grid {
        grid-template-columns: 1fr;
    }
}

/* Job Embed admin page */
.am-embed-card__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--am-text);
}

.am-embed-card__text {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--am-muted);
}

.am-embed-card__steps {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 13px;
    line-height: 1.55;
    color: var(--am-muted);
}

.am-embed-card__steps li + li {
    margin-top: 4px;
}

.am-embed-form__fields {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) auto;
    gap: 12px 14px;
    align-items: start;
}

.am-embed-form__field {
    margin-bottom: 0 !important;
}

.am-embed-form__field label,
.am-embed-form__action-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.am-embed-form__field .form-control,
.am-embed-form__action .btn {
    box-sizing: border-box;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 36px;
    font-size: 13px;
}

.am-embed-form__action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
}

.am-embed-form__action-label {
    visibility: hidden;
    user-select: none;
}

.am-embed-form__action .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
    padding-left: 16px;
    padding-right: 16px;
}

.am-embed-site-key {
    font-size: 11px;
    word-break: break-all;
}

.am-embed-snippet-cell {
    min-width: 240px;
    max-width: 360px;
}

.am-embed-snippet {
    font-size: 11px;
    line-height: 1.4;
    min-height: 0;
    resize: vertical;
}

.am-embed-sites-table.table-striped tbody tr:nth-child(odd) > td,
.am-embed-sites-table.table-striped tbody tr:nth-child(odd) > th {
    background-color: var(--am-surface-secondary, #f3f2f1) !important;
}

.am-embed-sites-table.table-striped tbody tr:nth-child(even) > td,
.am-embed-sites-table.table-striped tbody tr:nth-child(even) > th {
    background-color: #fff !important;
}

/* Empty state is an odd row — keep it white, not zebra gray. */
.am-embed-sites-table.table-striped tbody tr:has(td.am-embed-empty) > td {
    background-color: #fff !important;
}

.am-embed-sites-table td.am-embed-empty {
    padding: 20px 16px !important;
    text-align: center;
    color: var(--am-muted);
    font-size: 13px;
    background-color: #fff !important;
}

@media (max-width: 991px) {
    .am-embed-form__fields {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .am-embed-form__action .btn {
        width: 100%;
    }
}

/* Toast notifications */
#toast-container {
    top: calc(var(--am-header-h, 60px) + 14px);
    right: 16px;
    z-index: 10050;
}

#toast-container > div {
    position: relative;
    width: min(360px, calc(100vw - 32px));
    padding: 14px 40px 16px 16px;
    margin-bottom: 10px;
    opacity: 1;
    border-radius: var(--am-radius);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background-image: none !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    color: #0f172a;
    font-family: var(--am-font-sans);
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
}

#toast-container > div:hover {
    box-shadow:
        0 14px 34px rgba(15, 23, 42, 0.11),
        0 1px 2px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

#toast-container > .toast-success {
    border-color: rgba(16, 185, 129, 0.22);
}

#toast-container > .toast-info {
    border-color: rgba(59, 130, 246, 0.22);
}

#toast-container > .toast-warning {
    border-color: rgba(245, 158, 11, 0.28);
}

#toast-container > .toast-error {
    border-color: rgba(239, 68, 68, 0.24);
}

#toast-container .toast-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
    color: #0f172a;
}

#toast-container .toast-message {
    font-weight: 500;
    color: #475569;
}

#toast-container .toast-message a,
#toast-container .toast-message label {
    color: var(--am-primary-dark, #0077cc);
}

#toast-container .toast-close-button {
    position: absolute;
    top: 10px;
    right: 12px;
    float: none;
    color: var(--am-outline);
    text-shadow: none;
    opacity: 1;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus {
    color: #334155;
    opacity: 1;
}

#toast-container .toast-progress {
    height: 2px;
    opacity: 0.55;
    bottom: 0;
    left: 0;
    right: 0;
}

#toast-container > .toast-success .toast-progress {
    background: #10b981 !important;
}

#toast-container > .toast-info .toast-progress {
    background: #3b82f6 !important;
}

#toast-container > .toast-warning .toast-progress {
    background: #f59e0b !important;
}

#toast-container > .toast-error .toast-progress {
    background: #ef4444 !important;
}

.toastify.am-toast {
    padding: 13px 16px;
    border-radius: var(--am-radius);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    font-family: var(--am-font-sans);
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: rgba(255, 255, 255, 0.94) !important;
}

.toastify.am-toast .toast-close {
    color: var(--am-outline);
    opacity: 1;
}

/* Unified surface radius — cards, tables, panels */
.am-stat-card,
.am-list-page-card,
.am-roles-panel,
.am-roles-sidebar,
.am-panel,
.am-panel__head,
.am-ts-shell,
.am-ts-week,
.am-ts-toolbar,
.am-ts-filters,
.am-ts-savebar,
.am-quick-tile,
.am-dash-pill,
.am-entitlement-pill,
.am-server-table-toolbar,
.am-server-table-footer,
.am-dt-toolbar,
.am-dt-footer,
.dropdown-menu,
.modal-content,
.custom-modal .modal-content,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.am-roles-panel .permission-level {
    border-radius: var(--am-radius) !important;
}

.am-card .am-card-header,
.card.am-panel .am-card-header,
.am-card-footer,
.am-dt-toolbar,
.am-dt-footer,
.am-server-table-toolbar,
.am-server-table-footer {
    border-radius: 0 !important;
}

.am-list-page-card {
    overflow: visible;
}

.am-card .am-card-header,
.card.am-panel .am-card-header {
    border-radius: 0 !important;
}

.am-card-footer {
    border-radius: 0 !important;
}

.custom-table,
.table.custom-table,
.custom-table thead th,
.custom-table tbody td {
    border-radius: 0 !important;
}

/* Header notifications */
.am-notifications-nav {
    position: relative;
}

.am-notifications-toggle {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    padding: 0 !important;
    color: #475569 !important;
}

.am-notifications-toggle:hover,
.am-notifications-toggle:focus {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.am-notifications-toggle__icon {
    font-size: 18px;
    line-height: 1;
}

.am-notifications-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.am-notifications-menu {
    width: min(380px, calc(100vw - 24px));
    padding: 0;
    border: 1px solid var(--am-border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--am-shadow-lg, 0 16px 40px rgba(15, 23, 42, 0.12));
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.am-notifications-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--am-border, #e5e7eb);
    background: #f8fafc;
}

.am-notifications-menu__head strong {
    font-size: 14px;
    color: #0f172a;
}

.am-notifications-menu__body {
    max-height: 360px;
    overflow-y: auto;
    background: #ffffff;
}

.am-notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none !important;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.am-notification-item:last-child {
    border-bottom: none;
}

.am-notification-item:hover {
    background: #f8fafc;
}

.am-notification-item.is-unread {
    background: #eff6ff;
}

.am-notification-item__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #dbeafe;
    color: var(--am-primary, #009efb);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.am-notification-item__content {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.am-notification-item__content strong {
    font-size: 13px;
    color: #0f172a;
}

.am-notification-item__content span {
    font-size: 12px;
    color: var(--am-muted);
    line-height: 1.4;
}

.am-notification-item__content small {
    font-size: 11px;
    color: var(--am-outline);
}

.am-notifications-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--am-muted);
}

/* Modal polish — fix legacy style.css block buttons & centered headers */
.custom-modal .modal-header,
.modal.custom-modal .modal-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--am-border);
    background: #fff;
}

.custom-modal .modal-title,
.modal.custom-modal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.custom-modal .modal-header .close,
.modal.custom-modal .modal-header .close {
    position: static;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    background: #f1f5f9;
    border: none;
    border-radius: var(--am-radius-xs);
    color: var(--am-muted);
    font-size: 1.25rem;
    line-height: 1;
    opacity: 1;
    text-shadow: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.custom-modal .modal-header .close:hover,
.modal.custom-modal .modal-header .close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.custom-modal .modal-body,
.modal.custom-modal .modal-body {
    padding: 20px;
}

.custom-modal .modal-footer,
.custom-modal .am-modal-actions,
.modal.custom-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--am-border);
    background: #fafbfc;
}

.custom-modal .modal-footer .btn,
.custom-modal .am-modal-actions .btn,
.custom-modal .submit-section .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 96px;
    margin: 0 !important;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--am-radius) !important;
}

.custom-modal .submit-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--am-border);
}

.custom-modal .submit-btn {
    min-width: auto !important;
    font-size: 0.875rem !important;
    border-radius: var(--am-radius) !important;
}

.custom-modal .cancel-btn,
.custom-modal .continue-btn {
    display: inline-flex !important;
    width: auto !important;
    font-size: 0.875rem !important;
    border-radius: var(--am-radius) !important;
    padding: 0.5rem 1rem !important;
}

.am-confirm-modal .modal-dialog {
    max-width: 440px;
}

.am-confirm-modal__lead {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
}

.am-confirm-modal__note {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--am-muted);
    line-height: 1.5;
}

.custom-modal .btn-light {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.custom-modal .btn-light:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Keep modals above app chrome with solid surfaces */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.custom-modal .modal-content,
.modal.custom-modal .modal-content {
    background: #fff !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.custom-modal .modal-header,
.modal.custom-modal .modal-header {
    background: #fff !important;
}

.custom-modal .modal-footer,
.custom-modal .am-modal-actions,
.modal.custom-modal .modal-footer {
    background: #fafbfc !important;
}

/* Fluent Design — app shell (header, sidebar, navigation) */
body {
    padding-top: var(--am-header-h, 72px) !important;
}

.main-wrapper {
    padding-top: 0;
}

.am-fluent-header.header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--am-header-h, 72px);
    min-height: var(--am-header-h, 72px);
    position: fixed !important;
    top: 0;
    left: var(--am-sidebar-w, 240px);
    right: 0;
    z-index: 1000;
    width: auto;
    padding: 12px 20px 12px 16px;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid var(--am-border) !important;
    box-shadow: var(--am-shadow) !important;
    transition: left 0.2s ease;
}

.am-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    padding: 2px 0;
}

.am-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
    padding: 2px 0;
}

.am-header-page-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    max-width: min(640px, 52vw);
    padding: 4px 0;
}

.am-header-page-nav__title {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--am-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-header-page-nav__crumbs {
    min-width: 0;
}

.am-header-page-nav__crumb-line {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-header-page-nav__crumb-line a {
    color: var(--am-muted);
    text-decoration: none;
}

.am-header-page-nav__crumb-line a:hover {
    color: var(--am-primary);
    text-decoration: none;
}

.am-header-page-nav__sep {
    margin: 0 4px;
    color: #a19f9d;
}

.am-header-page-nav__crumbs--legacy .am-dash-head__sub,
.am-header-page-nav__crumbs--legacy p {
    margin: 0;
    font-size: 11px;
    line-height: 1.25;
    color: var(--am-muted);
}

.am-header-page-nav__crumbs--legacy a {
    color: var(--am-muted);
}

.am-header-actions,
.am-view-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.am-view-card-actions {
    justify-content: flex-end;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--am-border);
}

.am-page-action-btn,
.am-header-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    min-height: 32px;
    min-width: 0;
    width: auto;
    padding: 0 12px !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--am-btn-radius);
    box-shadow: none !important;
}

.am-header-actions .btn-primary,
.am-header-actions .btn-danger,
.am-header-actions .btn-secondary,
.am-view-card-actions .btn-primary,
.am-view-card-actions .btn-danger,
.am-view-card-actions .btn-secondary {
    padding: 0 12px !important;
}

.am-page-action-btn iconify-icon.am-icon,
.am-header-action-btn iconify-icon.am-icon {
    width: 16px;
    height: 16px;
}

.am-list-page-search {
    margin-bottom: 8px;
}

.am-list-page-search .input-group {
    max-width: 360px;
}

.am-page-header-slot .am-page-toolbar,
.am-page-header-slot .am-dash-head,
.am-page-header-slot > h3.page-title,
.am-page-header-slot > .page-title,
.am-page-header-slot .row:has(.page-title) {
    display: none !important;
}

@media (max-width: 991.98px) {
    .am-header-page-nav {
        max-width: min(220px, 38vw);
    }
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1001;
    transition: width 0.2s ease;
}

.sidebar:not(.collapsed) ~ .page-wrapper,
.sidebar:not(.collapsed) + .page-wrapper {
    margin-left: var(--am-sidebar-w, 240px);
}

.sidebar.collapsed ~ .page-wrapper,
.sidebar.collapsed + .page-wrapper {
    margin-left: var(--am-sidebar-collapsed-w, 64px);
}

.sidebar:not(.collapsed) ~ .header,
.sidebar:not(.collapsed) + .header,
body:not(:has(.sidebar.collapsed)) .am-fluent-header.header {
    left: var(--am-sidebar-w, 240px);
}

.sidebar.collapsed ~ .header,
.sidebar.collapsed + .header,
body:has(.sidebar.collapsed) .am-fluent-header.header {
    left: var(--am-sidebar-collapsed-w, 64px);
}

.sidebar.collapsed {
    width: var(--am-sidebar-collapsed-w) !important;
}

.sidebar.collapsed .sidebar-menu > ul > li > a > span:not(.am-nav-icon),
.sidebar.collapsed .am-sidebar-support > a > span:not(.am-nav-icon),
.sidebar.collapsed .menu-title,
.sidebar.collapsed .am-sidebar-user__info {
    display: none !important;
}

.sidebar.collapsed .am-sidebar-user {
    justify-content: center;
    padding: 10px 8px 12px;
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar.collapsed .am-sidebar-user__avatar {
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-inner {
    overflow-x: hidden;
}

.page-wrapper {
    transition: margin-left 0.2s ease;
}

.am-fluent-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 0 0 8px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--am-radius-sm);
    background: transparent;
    color: var(--am-text);
    cursor: pointer;
    transition: background 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.am-fluent-icon-btn:hover,
.am-fluent-icon-btn:focus-visible {
    background: var(--am-surface-secondary);
    border-color: var(--am-border);
    outline: none;
}

.am-fluent-icon-btn iconify-icon.am-icon {
    width: 20px;
    height: 20px;
}

#sidebar-toggle.am-fluent-icon-btn {
    margin-left: 12px;
}

.am-fluent-user-menu {
    display: flex !important;
    align-items: center;
    height: var(--am-header-h, 72px);
    margin-left: auto !important;
    margin-right: 8px !important;
    flex-shrink: 0;
    float: none !important;
    gap: 4px;
}

.am-fluent-user-menu .nav-item {
    display: flex;
    align-items: center;
    height: var(--am-header-h, 72px);
}

.user-menu.nav > li > a.am-fluent-user-link,
.am-fluent-user-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    height: 34px !important;
    padding: 2px 4px 2px 2px !important;
    border-radius: 999px;
    color: var(--am-text) !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1 !important;
    border: 1px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
}

/* Legacy theme draws a second caret via ::after — hide it */
.header .has-arrow .am-fluent-user-link.dropdown-toggle::after,
.header .main-drop .am-fluent-user-link.dropdown-toggle::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    margin: 0 !important;
}

.am-fluent-user-link:hover,
.am-fluent-user-link:focus,
.am-fluent-user-link[aria-expanded="true"] {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: var(--am-border, #e5e7eb);
    color: var(--am-text) !important;
}

.am-fluent-user-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.01em;
    margin: 0;
    padding: 0 2px 0 0;
}

.am-fluent-user-chevron {
    width: 12px !important;
    height: 12px !important;
    margin: 0 2px 0 0 !important;
    color: var(--am-muted);
    opacity: 0.8;
    flex-shrink: 0;
}

.am-fluent-dropdown {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: 0;
    min-width: 280px;
    overflow: hidden;
    margin-top: 8px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
    z-index: 1100;
}

.am-fluent-dropdown.am-account-dropdown {
    padding: 0;
    background: #ffffff !important;
}

.am-account-menu {
    background: #ffffff;
}

.am-account-menu__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--am-border, #eef2f7);
}

.am-account-menu__avatar {
    flex-shrink: 0;
}

.am-account-menu__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.am-account-menu__name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--am-text, #0f172a);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-account-menu__email,
.am-account-menu__role {
    font-size: 12px;
    color: var(--am-muted, #64748b);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-account-menu__role {
    font-weight: 500;
}

.am-account-menu__section,
.am-account-menu__footer {
    padding: 6px;
    background: #ffffff;
}

.am-account-menu__footer {
    border-top: 1px solid var(--am-border, #eef2f7);
    background: #f8fafc;
}

.am-account-menu__footer form {
    margin: 0;
}

.am-fluent-dropdown .dropdown-item.am-account-menu__item,
.am-account-menu__item.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--am-text, #0f172a);
    font-size: 13px;
    text-align: left;
    padding: 9px 10px;
    cursor: pointer;
}

.am-account-menu__item:hover,
.am-account-menu__item:focus {
    background: var(--am-primary-soft, #eff6ff) !important;
    color: var(--am-primary-dark, #1d4ed8) !important;
}

.am-account-menu__item--danger:hover,
.am-account-menu__item--danger:focus {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.am-account-menu__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}

.am-account-menu__item:hover .am-account-menu__icon,
.am-account-menu__item:focus .am-account-menu__icon {
    background: #fff;
    color: var(--am-primary, #2563eb);
}

.am-account-menu__item--danger:hover .am-account-menu__icon,
.am-account-menu__item--danger:focus .am-account-menu__icon {
    background: #fff;
    color: #b91c1c;
}

.am-account-menu__icon iconify-icon.am-icon {
    width: 18px;
    height: 18px;
}

.am-account-menu__copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    padding-top: 1px;
}

.am-account-menu__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.am-account-menu__hint {
    font-size: 11.5px;
    color: var(--am-muted, #64748b);
    line-height: 1.3;
}

.am-account-menu__item:hover .am-account-menu__hint,
.am-account-menu__item:focus .am-account-menu__hint {
    color: inherit;
    opacity: 0.8;
}

.am-fluent-dropdown .dropdown-item iconify-icon.am-icon {
    width: 16px;
    height: 16px;
    color: var(--am-muted);
}

/* Fluent sidebar navigation */
.sidebar {
    background: #1f1f1f !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}

.sidebar::before {
    display: none;
}

.am-sidebar-brand {
    height: var(--am-header-h, 60px);
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.am-sidebar-user {
    background: rgba(0, 0, 0, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.am-sidebar-support > a {
    border-radius: var(--am-radius-sm);
}

.btn > iconify-icon.am-icon:first-child:not(:last-child),
.am-dash-pill > iconify-icon.am-icon:first-child:not(:last-child) {
    margin-right: 0.35rem;
}

.btn iconify-icon.am-icon + span,
.dropdown-item iconify-icon.am-icon + span {
    margin-left: 0;
}

@media (max-width: 991px) {
    .am-fluent-header.header {
        left: 0 !important;
    }
}

.am-dt-toolbar__filter {
    margin-left: 12px;
}

.am-dt-toolbar__left label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.am-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    white-space: nowrap;
}

.am-sort-link:hover {
    color: var(--am-primary);
    text-decoration: none;
}

.am-sort-link.is-active {
    color: var(--am-primary);
    font-weight: 600;
}

.am-sort-link__icons {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    line-height: 0.65;
    font-size: 9px;
    opacity: 0.45;
}

.am-sort-link__icon {
    display: block;
}

.am-sort-link.is-active.is-asc .am-sort-link__icon--asc,
.am-sort-link.is-active.is-desc .am-sort-link__icon--desc {
    opacity: 1;
    color: var(--am-primary);
}

.am-server-table thead th {
    vertical-align: middle;
    white-space: nowrap;
}

/* Unified native select — toolbar, roles matrix, compact controls */
.am-native-select,
.am-server-table-toolbar select,
.am-dt-toolbar select,
.am-dt-toolbar__left label select,
.am-dt-toolbar__filter select,
.am-roles-toolbar select,
.am-roles-toolbar__select,
.am-col-head select,
.am-col-bulk select,
.am-roles-matrix select.form-control-sm,
.am-roles-matrix select.am-roles-select,
.am-roles-matrix select.permission-level,
.dataTables_wrapper .dataTables_length select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    min-height: var(--am-toolbar-control-h) !important;
    height: var(--am-toolbar-control-h) !important;
    padding: 0 28px 0 10px;
    border: 1px solid var(--am-border) !important;
    border-radius: var(--am-radius-sm) !important;
    background-color: #fff;
    background-image: var(--am-select-chevron);
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-family: var(--am-font-sans);
    font-size: 12px;
    font-weight: 600;
    line-height: calc(var(--am-toolbar-control-h) - 2px);
    color: var(--am-text);
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.am-native-select:focus,
.am-server-table-toolbar select:focus,
.am-dt-toolbar select:focus,
.am-roles-toolbar select:focus,
.am-col-head select:focus,
.am-col-bulk select:focus,
.am-roles-matrix select:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--am-primary);
    box-shadow: var(--am-focus-ring);
    outline: none;
}

.am-dt-toolbar__left label,
.am-dt-toolbar__filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
    white-space: nowrap;
}

.am-roles-toolbar {
    align-items: center;
}

.am-roles-toolbar__select,
.am-roles-toolbar select.form-control {
    min-height: var(--am-toolbar-control-h) !important;
    height: var(--am-toolbar-control-h) !important;
    max-width: 140px;
}

.am-col-head select,
.am-col-bulk select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 22px;
    background-position: right 6px center;
}

/* Select2 — match Fluent form controls */
.select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: var(--am-form-control-h);
    border: 1px solid var(--am-border) !important;
    border-radius: var(--am-radius-sm) !important;
    background: #fff;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container--default .select2-selection--single {
    height: var(--am-form-control-h);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    padding-right: 32px;
    line-height: calc(var(--am-form-control-h) - 2px);
    color: var(--am-text);
    font-size: var(--am-font-sm);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--am-muted);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 4px;
    width: 24px;
    height: calc(var(--am-form-control-h) - 2px);
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--am-muted) transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--am-muted) transparent;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--am-primary) !important;
    box-shadow: var(--am-focus-ring) !important;
}

.select2-container--default .select2-selection--multiple {
    padding: 4px 8px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-xs);
    background: var(--am-surface-secondary);
    color: var(--am-text);
    font-size: 12px;
    padding: 2px 8px;
}

.select2-dropdown {
    border: 1px solid var(--am-border) !important;
    border-radius: var(--am-radius-sm) !important;
    box-shadow: var(--am-shadow-md) !important;
    overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--am-primary) !important;
    color: #fff !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--am-border) !important;
    border-radius: var(--am-radius-xs) !important;
    min-height: 32px;
    padding: 4px 10px;
    font-size: var(--am-font-sm);
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--am-primary) !important;
    box-shadow: var(--am-focus-ring);
    outline: none;
}

.am-employee-form-wrap .form-group .select2-container,
.am-settings-grid .form-group .select2-container {
    display: block;
}

.am-workflow-scope-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.am-workflow-scope-tabs--toolbar {
    margin-bottom: 0;
    gap: 6px;
    flex-shrink: 0;
}

.am-server-table-toolbar-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.am-server-table-toolbar-wrap .am-dt-toolbar__left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.am-dt-toolbar__filters {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.am-dt-toolbar__control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
    white-space: nowrap;
}

.am-dt-toolbar__control--select-only {
    gap: 0;
}

.am-native-select--compact {
    width: auto;
    max-width: none;
    min-width: 0;
    flex: 0 0 auto;
    field-sizing: content;
}

.am-native-select--rows {
    width: 3.75rem;
    min-width: 3.75rem;
    padding-right: 24px;
    text-align: center;
}

.am-native-select--status {
    min-width: 6.5rem;
    max-width: 9.5rem;
}

.am-native-select--scope {
    width: auto;
    min-width: 8.5rem;
    max-width: 12rem;
    field-sizing: content;
}

.am-server-table-toolbar-wrap .am-dt-search {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
}

.am-server-table-toolbar-wrap .am-dt-search::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--am-search-icon) center / contain no-repeat;
    pointer-events: none;
    z-index: 1;
}

.am-server-table-toolbar-wrap .am-server-table-search,
.am-server-table-toolbar .am-server-table-search {
    box-sizing: border-box;
    width: min(280px, 42vw);
    min-width: 200px;
    min-height: var(--am-toolbar-control-h);
    height: var(--am-toolbar-control-h);
    padding: 0 12px 0 34px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    background: #fff;
    font-family: var(--am-font-sans);
    font-size: 12px;
    font-weight: 500;
    line-height: calc(var(--am-toolbar-control-h) - 2px);
    color: var(--am-text);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.am-server-table-toolbar-wrap .am-server-table-search::placeholder,
.am-server-table-toolbar .am-server-table-search::placeholder {
    color: var(--am-muted);
    opacity: 1;
}

.am-server-table-toolbar-wrap .am-server-table-search:focus,
.am-server-table-toolbar .am-server-table-search:focus {
    border-color: var(--am-primary);
    box-shadow: var(--am-focus-ring);
    outline: none;
}

.am-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: nowrap;
}

.am-row-actions__btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.am-row-actions__btn iconify-icon.am-icon {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.am-server-table th.text-end,
.am-server-table th.text-right,
.custom-table th.text-end,
.custom-table th.text-right,
.am-server-table td.text-end,
.am-server-table td.text-right,
.custom-table td.text-end,
.custom-table td.text-right {
    text-align: right !important;
    white-space: nowrap;
    vertical-align: middle;
}

.am-server-table td.text-end .dropdown-action,
.am-server-table td.text-right .dropdown-action,
.custom-table td.text-end .dropdown-action,
.custom-table td.text-right .dropdown-action,
.am-table-wrap td.text-end .dropdown-action,
.am-table-wrap td.text-right .dropdown-action {
    display: inline-flex;
    justify-content: flex-end;
    float: none;
    margin-left: auto;
}

.am-table-wrap .dropdown-action {
    position: relative;
}

.am-table-wrap .dropdown-action .dropdown-menu {
    min-width: 0;
    width: max-content;
    max-width: min(240px, calc(100vw - 32px));
}

.am-table-wrap .dropdown-action .dropdown-item {
    white-space: nowrap;
}

.am-workflow-scope-tabs__item {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-pill);
    background: #fff;
    color: var(--am-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.am-workflow-scope-tabs--toolbar .am-workflow-scope-tabs__item {
    min-height: 30px;
    padding: 0 12px;
    font-size: 11.5px;
}

.am-workflow-scope-tabs__item:hover {
    border-color: var(--am-primary);
    color: var(--am-primary);
}

.am-workflow-scope-tabs__item.is-active {
    background: var(--am-primary-soft);
    border-color: var(--am-primary);
    color: var(--am-primary-dark);
}

/* Legacy class kept for safety */
.am-org-settings-tabs {
    display: none;
}

/* Dynamics-style organization pivot */
.am-org-pivot {
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid var(--am-border, #e5e7eb);
    border-radius: 4px;
    box-shadow: none;
}

.am-org-pivot__track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    padding: 0 8px;
    scrollbar-width: thin;
}

.am-org-pivot__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #605e5c;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none;
    transition: color 0.12s ease, background 0.12s ease;
}

.am-org-pivot__item::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}

.am-org-pivot__item:hover {
    color: var(--am-primary, #2563eb);
    background: rgba(0, 0, 0, 0.03);
}

.am-org-pivot__item.is-active {
    color: var(--am-primary, #2563eb);
    background: transparent;
}

.am-org-pivot__item.is-active::after {
    background: var(--am-primary, #2563eb);
}

.am-org-pivot__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: inherit;
    opacity: 0.9;
}

.am-org-pivot__icon iconify-icon.am-icon {
    width: 18px;
    height: 18px;
}

.am-org-pivot__label {
    display: inline-block;
}

/* Settings-area sidebar polish */
.sidebar-menu ul li.am-settings-home {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu ul li.am-settings-home > a {
    color: #fff !important;
    font-weight: 600;
}

.sidebar-menu ul li.menu-title {
    margin-top: 10px !important;
}

.sidebar-menu ul li.menu-title + li > a {
    margin-top: 2px !important;
}

.am-content-body:has(.am-org-pivot) > .am-card,
.am-content-body--settings:has(.am-org-pivot) > .am-card {
    border-radius: 4px;
}

.am-holiday-section {
    margin-bottom: 28px;
}

.am-holiday-section__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
}

.am-holiday-section__hint {
    margin: -4px 0 14px;
    font-size: 13px;
}

.am-holiday-import-bar {
    align-items: end;
}

.am-holiday-import-actions .btn {
    width: 100%;
}

.am-holiday-import-status {
    margin-top: 10px;
    font-size: 13px;
}

.am-holiday-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.am-holiday-list-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.am-holiday-list-table__check {
    width: 72px;
}

.am-holiday-list-table__actions {
    width: 110px;
}

.am-holiday-list-empty {
    margin: 12px 0 0;
    font-size: 13px;
}

.am-holiday-list-table .form-control-sm {
    min-height: 34px;
}

.am-fluent-dropdown .dropdown-header {
    padding: 6px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--am-muted);
}

/* Receipt preview + lightbox */
.am-receipt-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.am-receipt-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.am-receipt-preview__open {
    position: relative;
    display: block;
    width: 100%;
    max-width: 280px;
    padding: 0;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: var(--am-shadow);
}

.am-receipt-preview__open:hover .am-receipt-preview__overlay {
    opacity: 1;
}

.am-receipt-preview__thumb {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    background: var(--am-surface-secondary);
}

.am-receipt-preview__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
    padding: 20px;
    color: var(--am-muted);
    background: var(--am-surface-secondary);
    font-size: 13px;
    font-weight: 600;
}

.am-receipt-preview__placeholder iconify-icon.am-icon {
    width: 32px;
    height: 32px;
}

.am-receipt-preview__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.am-receipt-preview__overlay iconify-icon.am-icon {
    width: 22px;
    height: 22px;
}

.am-receipt-preview__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.am-receipt-preview__filename {
    font-size: 12px;
    color: var(--am-muted);
}

.am-receipt-preview__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-primary);
    text-decoration: none !important;
}

.am-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.am-lightbox[hidden] {
    display: none !important;
}

body.am-lightbox-open {
    overflow: hidden;
}

.am-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.am-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-lg);
    overflow: hidden;
}

.am-lightbox__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--am-radius-sm);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.am-lightbox__body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    max-height: calc(100vh - 96px);
    background: #1f1f1f;
}

.am-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    object-fit: contain;
}

.am-lightbox__pdf {
    width: 100%;
    height: calc(100vh - 120px);
    border: 0;
    background: #fff;
}

.am-lightbox__fallback {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 24px;
}

/* Styled file upload */
.am-file-upload {
    position: relative;
}

.am-file-upload__input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.am-file-upload__label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    border: 1px dashed var(--am-border-strong);
    border-radius: var(--am-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.am-file-upload__label:hover {
    border-color: var(--am-primary);
    background: var(--am-primary-soft);
}

.am-file-upload__cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-primary);
    white-space: nowrap;
}

.am-file-upload__name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--am-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-form-hint {
    font-size: 12px;
    color: var(--am-muted);
}

/* Flat icon buttons (claim item rows, etc.) */
.am-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--am-border);
    border-radius: var(--am-btn-radius);
    background: #fff;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.am-btn-icon.is-slot-hidden {
    visibility: hidden;
    pointer-events: none;
}

.am-btn-icon:disabled {
    cursor: default;
}

.am-btn-icon iconify-icon.am-icon {
    width: 16px;
    height: 16px;
}

.am-btn-icon--primary {
    color: var(--am-primary);
    border-color: rgba(0, 120, 212, 0.25);
    background: rgba(0, 120, 212, 0.06);
}

.am-btn-icon--primary:hover {
    background: rgba(0, 120, 212, 0.12);
    border-color: var(--am-primary);
}

.am-btn-icon--danger {
    color: var(--am-danger);
    border-color: rgba(209, 52, 56, 0.22);
    background: rgba(209, 52, 56, 0.06);
}

.am-btn-icon--danger:hover {
    background: rgba(209, 52, 56, 0.12);
    border-color: var(--am-danger);
}

.am-expense-items-table {
    table-layout: fixed;
    width: 100%;
}

.am-expense-items-table__actions-col {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding: 6px 4px !important;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.am-expense-items-table__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.am-expense-items-table td.am-expense-items-table__actions-col {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding: 6px 4px !important;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.am-claim-items-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.am-claim-items-section__head .am-settings-section__title {
    margin-bottom: 0;
}

.am-expense-add-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-btn-radius);
    background: #fff;
    color: var(--am-primary);
    font-size: 13px;
    font-weight: 600;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.am-expense-add-row-btn:hover {
    border-color: var(--am-primary);
    background: var(--am-primary-soft);
}

.am-expense-add-row-btn iconify-icon.am-icon {
    width: 16px;
    height: 16px;
}

.am-expense-items-table .form-control {
    min-height: 34px;
    padding: 6px 10px;
}

.am-employee-form .btn,
.am-settings-actions .btn,
.am-expense-items-table .btn {
    box-shadow: none !important;
}

.am-settings-actions .btn-primary {
    background: var(--am-primary) !important;
}

.am-settings-actions .btn-secondary {
    background: var(--am-surface-secondary) !important;
    color: var(--am-text) !important;
}

/* Flat buttons app-wide — overrides legacy theme + accent partial */
.btn,
.btn-sm,
.btn-lg,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.add-btn,
.submit-btn,
.continue-btn,
.cancel-btn,
.am-page-action-btn,
.am-header-action-btn,
.am-btn-icon,
.am-settings-actions .btn,
.am-employee-form .btn,
.am-expense-items-table .btn,
.custom-modal .submit-btn,
.custom-modal .continue-btn,
.custom-modal .cancel-btn,
.am-dash-head__actions .btn,
.am-ts-savebar .btn,
.am-ts-toolbar .btn {
    box-shadow: none !important;
    border-radius: var(--am-btn-radius) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.add-btn:hover,
.add-btn:focus,
.submit-btn:hover,
.continue-btn:hover,
.cancel-btn:hover {
    box-shadow: none !important;
}

/* Claim form layout */
.am-claim-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 32px;
    align-items: start;
    width: 100%;
}

.am-claim-details .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.am-claim-details label {
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.am-claim-details__type .form-control {
    width: 100%;
    max-width: none;
    min-height: var(--am-form-control-h, 38px);
}

.am-claim-details__receipt {
    min-width: 0;
}

.am-claim-details .am-receipt-field {
    gap: 10px;
}

.am-claim-details .am-receipt-preview {
    max-width: none;
}

.am-claim-details .am-receipt-preview__open {
    max-width: 320px;
}

.am-claim-details .am-file-upload__label {
    max-width: none;
    width: 100%;
    min-height: var(--am-form-control-h, 38px);
    box-sizing: border-box;
}

@media (max-width: 767.98px) {
    .am-claim-details {
        grid-template-columns: 1fr;
    }

    .am-claim-details .am-receipt-preview,
    .am-claim-details .am-file-upload__label {
        max-width: none;
    }
}

.am-employee-form .am-expense-items-table {
    margin-bottom: 0;
}

.am-employee-form .am-expense-items-table td,
.am-employee-form .am-expense-items-table th {
    vertical-align: middle;
}

/* Leave request / edit form */
.am-leave-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: none;
}

.am-leave-form__primary {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: end;
    width: 100%;
}

.am-leave-form__type,
.am-leave-form__range,
.am-leave-form__reason {
    width: 100%;
    min-width: 0;
}

.am-leave-form .form-group {
    margin-bottom: 0;
}

.am-leave-form__days {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    background: var(--am-surface-secondary);
}

.am-leave-form__reason .form-control {
    width: 100%;
}

.am-day-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.am-leave-form__type .form-control,
.am-leave-form__range .form-control,
.am-leave-form__range .flatpickr-input[readonly] {
    width: 100%;
    max-width: none;
    cursor: pointer;
    background-color: #fff !important;
}

.am-leave-form__days-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.am-leave-form__days-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--am-muted);
}

.am-day-type-row {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-btn-radius);
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.am-day-type-row--excluded {
    background: var(--am-surface-secondary);
}

.am-day-type-row--excluded .am-day-type-row__label {
    color: var(--am-muted);
    text-decoration: line-through;
}

.am-day-type-row__status {
    font-size: 13px;
    color: var(--am-muted);
}

.am-leave-form__days-summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-primary);
}

.am-leave-form__days-summary.is-warning {
    color: var(--am-danger);
}

.am-day-type-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-btn-radius);
    background: #fff;
    color: var(--am-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.am-day-type-toggle-btn:hover {
    border-color: var(--am-primary);
    color: var(--am-primary);
    background: var(--am-primary-soft);
}

.am-day-type-toggle-btn--exclude:hover {
    border-color: var(--am-danger);
    color: var(--am-danger);
    background: rgba(209, 52, 56, 0.08);
}

.am-day-type-row__date {
    min-width: 0;
}

.am-day-type-row__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--am-text);
    line-height: 1.3;
}

.am-day-type-segment {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.am-day-type-segment__option {
    position: relative;
    margin: 0;
    cursor: pointer;
    min-width: 0;
}

.am-day-type-segment__option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.am-day-type-segment__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--am-border);
    border-radius: var(--am-btn-radius);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--am-muted);
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.am-day-type-segment__option:hover .am-day-type-segment__label {
    border-color: var(--am-primary);
    color: var(--am-primary);
}

.am-day-type-segment__option input:checked + .am-day-type-segment__label {
    background: var(--am-primary);
    border-color: var(--am-primary);
    color: #fff;
}

.am-day-type-segment__option input:focus-visible + .am-day-type-segment__label {
    box-shadow: var(--am-focus-ring);
}

@media (max-width: 767.98px) {
    .am-leave-form__primary {
        grid-template-columns: 1fr;
    }

    .am-day-type-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .am-day-type-toggle-btn {
        width: 100%;
    }

    .am-day-type-segment {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .am-day-type-segment__option {
        width: 100%;
    }
}

/* Approval flow — Twilio Studio-style canvas */
.am-studio {
    display: grid;
    gap: 0;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    background: var(--am-card, #fff);
    box-shadow: var(--am-shadow);
    overflow: hidden;
    min-height: 640px;
}
.am-studio__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--am-border);
    background: rgba(255, 255, 255, 0.92);
}
.am-studio__title {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}
.am-studio__canvas {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 28px 20px 40px;
    min-height: 520px;
    background-color: #f3f2f1;
    background-image:
        radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
    background-size: 18px 18px;
    overflow: auto;
}
.am-studio__empty {
    padding: 0 16px 14px;
    text-align: center;
}
.am-studio__segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 420px);
}
.am-studio__connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 2px;
    height: 36px;
    position: relative;
}
.am-studio__connector-line {
    flex: 1;
    width: 2px;
    background: linear-gradient(180deg, #605e5c, var(--am-primary));
}
.am-studio__connector-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--am-primary);
    box-shadow: 0 0 0 3px var(--am-primary-soft);
    margin-top: -1px;
}
.am-studio__node {
    width: min(100%, 420px);
    border-radius: var(--am-radius);
    border: 1px solid var(--am-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--am-shadow-md, var(--am-shadow));
    padding: 14px 16px;
}
.am-studio__node--trigger {
    border-color: color-mix(in srgb, var(--am-primary) 35%, var(--am-border));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--am-primary) 10%, #fff), #fff 70%);
}
.am-studio__node--widget {
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.am-studio__node--widget:focus-within {
    border-color: color-mix(in srgb, var(--am-primary) 45%, var(--am-border));
    box-shadow: var(--am-shadow-md), 0 0 0 1px color-mix(in srgb, var(--am-primary) 25%, transparent);
}
.am-studio__node-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.am-studio__node-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--am-primary-dark, #106ebe);
    background: var(--am-primary-soft);
    border-radius: var(--am-radius-sm);
    padding: 3px 8px;
}
.am-studio__node--trigger .am-studio__node-kicker {
    color: #fff;
    background: var(--am-primary);
}
.am-studio__node-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-top: 4px;
}
.am-studio__node-sub {
    font-size: 12px;
    color: var(--am-muted);
    margin-top: 2px;
}
.am-studio__fields {
    display: grid;
    gap: 10px;
}
.am-studio__fields label {
    display: grid;
    gap: 5px;
    margin: 0;
}
.am-studio__config {
    margin-top: 10px;
}
@media (max-width: 991.98px) {
    .am-studio {
        min-height: 480px;
    }
}

/* Multi-receipt claim grid */
.am-receipt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.am-receipt-grid__item {
    display: grid;
    gap: 8px;
}
.am-receipt-grid__remove {
    margin: 0;
    font-size: 12px;
    color: var(--am-danger, #d13438);
}

/* Language picker */
.am-lang-picker__help { margin: 0 0 10px; font-size: 13px; }
.am-lang-picker__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.am-lang-picker__form { margin: 0; }
.am-lang-picker__btn {
  border: 1px solid color-mix(in srgb, var(--am-primary, #005faa) 25%, #d0d0d0);
  background: #fff;
  color: #1b1b1b;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.am-lang-picker__btn.is-active {
  background: var(--am-primary, #005faa);
  border-color: var(--am-primary, #005faa);
  color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--am-primary, #005faa) 30%, transparent);
}
.am-lang-picker--compact .am-lang-picker__btn { padding: 4px 10px; font-size: 12px; }
.am-header-right .am-lang-picker { margin-right: 8px; align-self: center; }
.am-account-menu .am-lang-picker { padding: 0 12px 10px; }
