/* ==========================================================================
   Design system — "warm glass": dark, drifting gradient backdrop with
   frosted glass panels, in the same terracotta/cream palette as the Guard
   app. Every page builds on the tokens/utilities below.
   ========================================================================== */

:root {
    --color-bg: #191411;
    --color-bg-2: #140f0d;
    --color-surface: rgba(255, 255, 255, 0.055);
    --color-surface-strong: rgba(255, 255, 255, 0.09);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-strong: rgba(255, 255, 255, 0.18);

    --color-text: #F5F0E8;
    --color-text-muted: rgba(245, 240, 232, 0.62);
    --color-text-faint: rgba(245, 240, 232, 0.4);

    --color-primary: #D97757;
    --color-primary-strong: #C2603F;
    --color-primary-soft: rgba(217, 119, 87, 0.16);
    --color-tertiary: #8B4A2F;

    --color-success: #6B8F71;
    --color-warning: #C98A3E;
    --color-error: #C1666B;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --shadow-card-hover: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(217, 119, 87, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --shadow-glow-primary: 0 6px 22px rgba(217, 119, 87, 0.45);

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Light theme — same warm terracotta/cream family, inverted: cream base, dark-tinted glass
   surfaces instead of white-tinted, deepened primary for AA contrast on a light ground. Applied
   via data-theme="light" on <html> (see the toggle script in App.razor), not prefers-color-
   scheme — this is a user-picked, persisted choice, not an OS-follow. */
:root[data-theme="light"] {
    --color-bg: #FBF6EF;
    --color-bg-2: #F2E7DA;
    --color-surface: rgba(36, 28, 22, 0.04);
    --color-surface-strong: rgba(36, 28, 22, 0.07);
    --color-border: rgba(36, 28, 22, 0.12);
    --color-border-strong: rgba(36, 28, 22, 0.22);

    --color-text: #241C16;
    --color-text-muted: rgba(36, 28, 22, 0.64);
    --color-text-faint: rgba(36, 28, 22, 0.42);

    --color-primary: #C2603F;
    --color-primary-strong: #A84E32;
    --color-primary-soft: rgba(194, 96, 63, 0.14);
    --color-tertiary: #8B4A2F;

    --shadow-card: 0 8px 28px rgba(36, 28, 22, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    --shadow-card-hover: 0 16px 38px rgba(36, 28, 22, 0.14), 0 0 0 1px rgba(194, 96, 63, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    --shadow-glow-primary: 0 6px 18px rgba(194, 96, 63, 0.35);
}

:root[data-theme="light"] .app-backdrop .blob {
    opacity: 0.22;
}

:root[data-theme="light"] .app-backdrop .blob-3 {
    opacity: 0.14;
}

/* The pastel status text colors below are tuned for dark translucent backgrounds — on a light
   page the same translucent tint reads pale, so pastel-on-pale loses contrast. Deepen them here
   rather than trying to make one color work on both grounds. */
:root[data-theme="light"] .alert-success { color: #2F5A38; }
:root[data-theme="light"] .alert-danger { color: #8C3D42; }
:root[data-theme="light"] .badge-success { color: #2F5A38; }
:root[data-theme="light"] .badge-warning { color: #8A5A1E; }
:root[data-theme="light"] .status-icon-warning { color: #8A5A1E; }
:root[data-theme="light"] .badge-error { color: #8C3D42; }
:root[data-theme="light"] .stat-icon-primary { color: var(--color-primary-strong); }
:root[data-theme="light"] .stat-icon-tertiary { color: var(--color-tertiary); }
:root[data-theme="light"] .stat-icon-success { color: #2F5A38; }
:root[data-theme="light"] .stat-icon-error { color: #8C3D42; }
:root[data-theme="light"] .themed-select-panel { background: linear-gradient(180deg, #FFFFFF 0%, #F6EEE4 100%); }
:root[data-theme="light"] .themed-select-option-selected { color: var(--color-primary-strong); }
:root[data-theme="light"] .document-slot-error,
:root[data-theme="light"] .validation-message { color: #8C3D42; }
:root[data-theme="light"] .btn-danger { color: #8C3D42; }

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Manrope", inherit;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--color-text);
}

p {
    margin: 0;
    color: var(--color-text-muted);
}

a {
    color: var(--color-primary);
}

h1:focus {
    outline: none;
}

/* --------------------------------------------------------------------
   Drifting gradient background — fixed behind everything, one <div> per
   blob, purely CSS animated. Gives the glass panels something colorful
   and alive to refract instead of a flat void.
   -------------------------------------------------------------------- */
.app-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(120% 120% at 10% 0%, var(--color-bg) 0%, var(--color-bg-2) 60%);
}

.app-backdrop .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}

.app-backdrop .blob-1 {
    width: 620px;
    height: 620px;
    top: -220px;
    left: -160px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    animation: drift1 26s ease-in-out infinite alternate;
}

.app-backdrop .blob-2 {
    width: 520px;
    height: 520px;
    bottom: -200px;
    right: -140px;
    background: radial-gradient(circle, var(--color-tertiary) 0%, transparent 70%);
    animation: drift2 32s ease-in-out infinite alternate;
}

.app-backdrop .blob-3 {
    width: 420px;
    height: 420px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, #6B4A3A 0%, transparent 70%);
    opacity: 0.35;
    animation: drift3 38s ease-in-out infinite alternate;
}

@keyframes drift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(110px, 90px) scale(1.18); }
}

@keyframes drift2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-90px, -70px) scale(1.12); }
}

@keyframes drift3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 50px) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
    .app-backdrop .blob {
        animation: none;
    }
}

/* --------------------------------------------------------------------
   Glass primitives
   -------------------------------------------------------------------- */
.glass {
    background: var(--color-surface);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.glass-strong {
    background: var(--color-surface-strong);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.glass-hover {
    transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), border-color 0.25s var(--ease-out-expo);
}

.glass-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(217, 119, 87, 0.35);
}

.card {
    padding: 1.5rem;
}

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.3rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    color: #FAF5EF;
    box-shadow: var(--shadow-glow-primary);
}

.btn-primary:not(:disabled):hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(217, 119, 87, 0.55);
}

.btn-ghost {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-ghost:not(:disabled):hover {
    background: var(--color-surface-strong);
    border-color: var(--color-border-strong);
}

.btn-danger {
    background: rgba(193, 102, 107, 0.16);
    color: #E8A5A9;
    border-color: rgba(193, 102, 107, 0.35);
}

.btn-danger:not(:disabled):hover {
    background: rgba(193, 102, 107, 0.28);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* --------------------------------------------------------------------
   Inputs
   -------------------------------------------------------------------- */
.input, select.input, textarea.input {
    width: 100%;
    font-family: inherit;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
    color: var(--color-text-faint);
}

.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* Without color-scheme, Chromium/Firefox render the native date-picker icon and popup
   calendar with the OS's light UI regardless of the input's own dark background/text — this
   tells the browser which palette to draw its own chrome in, so it actually matches. */
input[type="date"], input[type="time"], input[type="datetime-local"] {
    color-scheme: dark;
}

:root[data-theme="light"] input[type="date"],
:root[data-theme="light"] input[type="time"],
:root[data-theme="light"] input[type="datetime-local"] {
    color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    border-radius: 4px;
    transition: opacity 0.15s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    animation: fadeInUp 0.35s var(--ease-out-expo);
}

.alert-success {
    background: rgba(107, 143, 113, 0.14);
    color: #9FC6A6;
    border: 1px solid rgba(107, 143, 113, 0.3);
}

.alert-danger {
    background: rgba(193, 102, 107, 0.14);
    color: #E8A5A9;
    border: 1px solid rgba(193, 102, 107, 0.3);
}

.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------
   Badges / pills
   -------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
}

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

.badge-success { background: rgba(107, 143, 113, 0.18); color: #9FC6A6; }
.badge-warning { background: rgba(201, 138, 62, 0.18); color: #E3B47B; }
.badge-error { background: rgba(193, 102, 107, 0.18); color: #E8A5A9; }
.badge-neutral { background: var(--color-surface-strong); color: var(--color-text-muted); }

/* Icon-only stand-in for a badge — same meaning, a fraction of the width, for a table column
   where several optional flags can stack up next to the primary status. The message that would
   otherwise be the badge's own text lives in its `title` attribute instead, on hover. */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: help;
    flex: none;
    margin-left: 0.4rem;
    vertical-align: middle;
}
.status-icon-warning { background: rgba(201, 138, 62, 0.18); color: #E3B47B; }
.status-icon-neutral { background: var(--color-surface-strong); color: var(--color-text-muted); }

/* --------------------------------------------------------------------
   Page transition
   -------------------------------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-enter {
    animation: fadeInUp 0.5s var(--ease-out-expo);
}

.stagger > * {
    animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.13s; }
.stagger > *:nth-child(4) { animation-delay: 0.18s; }
.stagger > *:nth-child(5) { animation-delay: 0.23s; }
.stagger > *:nth-child(6) { animation-delay: 0.28s; }

/* --------------------------------------------------------------------
   Loading shimmer
   -------------------------------------------------------------------- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* --------------------------------------------------------------------
   Table
   -------------------------------------------------------------------- */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-faint);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--color-text);
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* --------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------- */
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }

.spinner {
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------
   Shared admin page layout — reused across Dashboard/Offices/Devices/
   Employees rather than re-declared per page.
   -------------------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    font-size: 0.9rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
}

.stat-card-alert {
    border-color: rgba(193, 102, 107, 0.4);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-primary { background: var(--color-primary-soft); color: #F0A483; }
.stat-icon-tertiary { background: rgba(139, 74, 47, 0.22); color: #C99678; }
.stat-icon-success { background: rgba(107, 143, 113, 0.18); color: #9FC6A6; }
.stat-icon-error { background: rgba(193, 102, 107, 0.2); color: #E8A5A9; }
.stat-icon-neutral { background: var(--color-surface-strong); color: var(--color-text-faint); }

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-faint);
    margin-top: 0.15rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1rem;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.quick-actions .btn {
    justify-content: flex-start;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.empty-state h3 {
    font-size: 1.1rem;
}

.empty-state p {
    max-width: 380px;
    font-size: 0.88rem;
}

.empty-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-faint);
}

.empty-inline p {
    font-size: 0.85rem;
    max-width: 320px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.toolbar-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.toolbar-search .icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-faint);
    pointer-events: none;
}

.toolbar-search .input {
    padding-left: 2.4rem;
}

.toolbar-filter {
    width: 170px;
    flex-shrink: 0;
}

.table-wrap {
    overflow-x: auto;
}

/* .glass's backdrop-filter creates its own stacking context, so a sibling .glass card that
   comes later in the DOM (e.g. the results table below a filter bar) paints over the whole
   filter card — including its dropdown panel's own z-index, which only wins comparisons inside
   that same stacking context. Raising the filter card itself above the table fixes it. */
.filters-card {
    position: relative;
    z-index: 20;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-grid .filter-search {
    max-width: none;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.row-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.key-reveal-panel {
    max-width: 520px;
}

.enroll-panel {
    max-width: 560px;
}

.file-input {
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

.file-input::file-selector-button {
    background: var(--color-surface-strong);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    margin-right: 0.75rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.file-input::file-selector-button:hover {
    background: var(--color-surface);
}

.photo-preview-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.photo-preview {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    animation: fadeInUp 0.3s var(--ease-out-expo);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-preview-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.photo-preview-processing { background: rgba(255, 255, 255, 0.85); color: #191411; }
.photo-preview-success { background: var(--color-success); color: #10230F; }
.photo-preview-failed { background: var(--color-error); color: #2A0A0A; }

.photo-hint {
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

/* --------------------------------------------------------------------
   Photo slots — one labeled square per capture angle
   -------------------------------------------------------------------- */
.photo-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
    max-width: 340px;
}

.photo-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.photo-slot-dropzone {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--color-border-strong);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text-faint);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.photo-slot-dropzone:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.photo-slot-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Same dashed-border/hover-color language as .photo-slot-dropzone and .document-dropzone, but a
   wide bar rather than a square — for a single generic file (GuardAppReleases.razor's APK
   picker) with no image preview to size around. */
.file-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border: 1.5px dashed var(--color-border-strong);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text-faint);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.file-dropzone:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.file-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-dropzone-text {
    font-size: 0.85rem;
}

.photo-slot-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

.photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(10, 8, 6, 0.75);
    color: #F5F0E8;
    cursor: pointer;
    transition: background 0.15s ease;
}

.photo-remove-btn:hover {
    background: var(--color-error);
}

.photo-slot-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.slot-phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--color-text-faint);
    cursor: pointer;
    transition: color 0.15s ease;
}

.slot-phone-btn:hover {
    color: var(--color-primary);
}

/* --------------------------------------------------------------------
   Phone capture — desktop modal + the mobile-facing capture page
   -------------------------------------------------------------------- */
.phone-capture-panel {
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
}

.phone-capture-qr {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    padding: 10px;
}

.phone-capture-hint {
    font-size: 0.82rem;
}

.phone-capture-url {
    font-size: 0.72rem;
    word-break: break-all;
    font-family: "Cascadia Code", "Consolas", monospace;
}

.phone-capture-waiting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
}

.phone-capture-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    color: var(--color-primary);
}

.capture-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.capture-card {
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    color: var(--color-primary);
}

.capture-card h1 {
    font-size: 1.3rem;
    color: var(--color-text);
}

.capture-card p {
    font-size: 0.9rem;
}

.capture-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.capture-brand .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-tertiary));
    color: #FAF5EF;
    font-size: 0.95rem;
}

.capture-photo-btn {
    position: relative;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 0.9rem 1.25rem;
}

.capture-photo-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.capture-preview {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.capture-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.5rem;
}

.capture-actions .btn {
    flex: 1;
    justify-content: center;
}

/* --------------------------------------------------------------------
   Employee detail page
   -------------------------------------------------------------------- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.15s ease;
}

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

.detail-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.face-enrollment-status {
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.detail-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1.1rem;
    color: var(--color-text);
}

.document-slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.document-slot {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ID-1 card aspect ratio (85.6 x 54mm) so the dropzone/preview roughly matches a CNIC's shape */
.document-dropzone {
    position: relative;
    width: 100%;
    aspect-ratio: 1.586;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--color-border-strong);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text-faint);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.document-dropzone:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.document-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1.586;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.document-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.document-slot-error {
    font-size: 0.72rem;
    color: #E8A5A9;
}

.key-display {
    display: block;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.88rem;
    color: #F0C4A8;
    word-break: break-all;
    margin-bottom: 0.5rem;
    user-select: all;
}

.modal-backdrop-glass {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
    animation: fadeInUp 0.2s ease;
}

.modal-panel {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.75rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 8px;
    display: flex;
    transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* Custom checkbox — the browser default (a plain OS-drawn square) clashes with the warm-glass
   surfaces everywhere else, so this is hand-drawn to match .input's resting state and .btn-primary's
   gradient/glow when checked. Unscoped by design: applies to every checkbox in the app (row-select,
   IsActive toggles, role/office pickers, the Identity "remember me" boxes) for one consistent look. */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border-strong);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--color-primary);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    border-color: transparent;
    box-shadow: var(--shadow-glow-primary);
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #FAF5EF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.day-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-toggle {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.day-toggle:hover {
    border-color: var(--color-border-strong);
}

.day-toggle-selected {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    border-color: transparent;
    color: #FAF5EF;
    box-shadow: var(--shadow-glow-primary);
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.6rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

/* --------------------------------------------------------------------
   Themed select (replaces native <select> — its open popup can't be
   restyled, so this renders the option list as themed markup instead)
   -------------------------------------------------------------------- */
.themed-select {
    position: relative;
    width: 100%;
}

.themed-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.92rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.themed-select-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.themed-select-trigger.is-open {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.themed-select-trigger.is-open .icon {
    transform: rotate(180deg);
}

.themed-select-trigger .icon {
    flex-shrink: 0;
    color: var(--color-text-faint);
    transition: transform 0.2s ease;
}

.themed-select-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.themed-select-placeholder {
    color: var(--color-text-muted);
}

.themed-select-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: transparent;
}

/* Solid (not glass) — this panel can float over bright backdrop blobs or
   another glass surface, so it needs its own opaque ground for the option
   text to stay legible instead of compounding translucency with whatever
   is behind it. */
.themed-select-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    z-index: 151;
    max-height: 260px;
    overflow-y: auto;
    padding: 0.4rem;
    background: linear-gradient(180deg, #2a211c 0%, #1c1512 100%);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card-hover);
    animation: fadeInUp 0.15s ease;
}

.themed-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s ease;
}

.themed-select-option:hover {
    background: var(--color-surface-strong);
}

.themed-select-option-muted {
    color: var(--color-text-muted);
}

.themed-select-option-selected {
    color: #F7C3AD;
    background: var(--color-primary-soft);
    font-weight: 600;
}

.themed-select-option-selected:hover {
    background: var(--color-primary-soft);
}

.themed-select-option-empty {
    color: var(--color-text-muted);
    cursor: default;
}

.themed-select-option-empty:hover {
    background: none;
}

/* --------------------------------------------------------------------
   Framework bits kept from the template
   -------------------------------------------------------------------- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-success);
}

.invalid {
    outline: 1px solid var(--color-error);
}

.validation-message {
    color: #E8A5A9;
    font-size: 0.8rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #7a2020;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--radius-sm);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* --------------------------------------------------------------------
   Attendance calendar (EmployeeAttendanceCalendar.razor)
   -------------------------------------------------------------------- */
.calendar-month {
    margin-bottom: 1.75rem;
}

.calendar-month:last-child {
    margin-bottom: 0;
}

.calendar-month-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0.25rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-faint);
    padding-bottom: 0.35rem;
}

.calendar-day {
    min-height: 82px;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    padding: 0.45rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-day-blank {
    background: transparent;
    border-color: transparent;
}

.calendar-day-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.calendar-day-time {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

/* Reuses the app's existing .badge component (same look as the Employees Active/Inactive
   badge, or History's status badges) for the status pill, so the calendar reads as part of
   the same design system rather than inventing its own color language — this class only
   overrides the sizing/wrapping .badge assumes for a table cell, not the badge-success/
   warning/error/neutral color pairs, which it reuses unchanged in both themes and in print. */
.calendar-day-badge {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.66rem;
    padding: 0.2rem 0.55rem;
    white-space: normal;
    text-align: left;
    line-height: 1.3;
    align-self: flex-start;
}

.calendar-day-present { border-left-color: var(--color-success); }
.calendar-day-late { border-left-color: var(--color-warning); }
.calendar-day-absent,
.calendar-day-incomplete { border-left-color: var(--color-error); }
.calendar-day-onleave { border-left-color: var(--color-text-faint); }

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    margin-top: 1.25rem;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-legend-dot-present { background: var(--color-success); }
.calendar-legend-dot-late { background: var(--color-warning); }
.calendar-legend-dot-absent { background: var(--color-error); }
.calendar-legend-dot-onleave { background: var(--color-text-faint); }

@media (max-width: 640px) {
    .calendar-day { min-height: 50px; padding: 0.3rem; }
    .calendar-day-time { display: none; }
}

/* --------------------------------------------------------------------
   Print — used by the employee attendance calendar's Print button
   (a plain onclick="window.print()", no JS interop needed). Anything
   marked .no-print (filters, buttons, the whole app shell) is hidden so
   the printed page is just the calendar.

   This app's whole palette is dark-theme-first: text colors like
   --color-text-muted, --color-text-faint, and the badge/legend colors,
   are pale/translucent so they read against a near-black background.
   Paper is always white, so every one of those has to be pinned to a
   solid, ink-dark (or solid-fill) color here explicitly — inheriting
   the live theme's variables (even the light theme's) is what made the
   first version of this print out as barely-visible pale gray text.
   -------------------------------------------------------------------- */
@media print {
    .sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }

    .app-shell,
    .main-area,
    .content {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .print-area {
        color: #111 !important;
    }

    .glass,
    .glass-strong {
        background: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid #ccc !important;
    }

    .print-only {
        display: block !important;
    }

    .print-only h2 {
        color: #111 !important;
    }

    .print-only p {
        color: #444 !important;
    }

    .calendar-month-title {
        color: #111 !important;
    }

    .calendar-weekday {
        color: #444 !important;
    }

    .calendar-day {
        background: #fff !important;
        border-color: #ccc !important;
        break-inside: avoid;
    }

    .calendar-day-number,
    .calendar-day-time {
        color: #444 !important;
    }

    .calendar-month {
        break-inside: avoid;
    }

    /* Badge backgrounds are normally a translucent 18-22% tint, tuned to sit on this app's
       dark glass surfaces — on white paper that reads as barely-there pale gray. Print gets
       its own solid, high-contrast fills instead of the on-screen badge-* colors. */
    .calendar-day-badge,
    .badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .calendar-day-present .calendar-day-badge,
    .badge-success {
        background: #2F5A38 !important;
        color: #fff !important;
    }

    .calendar-day-late .calendar-day-badge,
    .badge-warning {
        background: #8A5A1E !important;
        color: #fff !important;
    }

    .calendar-day-absent .calendar-day-badge,
    .calendar-day-incomplete .calendar-day-badge,
    .badge-error {
        background: #8C3D42 !important;
        color: #fff !important;
    }

    .calendar-day-onleave .calendar-day-badge,
    .badge-neutral {
        background: #555 !important;
        color: #fff !important;
    }

    .calendar-legend {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .calendar-legend-item {
        color: #111 !important;
    }

    .calendar-legend-dot-present { background: #2F5A38 !important; }
    .calendar-legend-dot-late { background: #8A5A1E !important; }
    .calendar-legend-dot-absent { background: #8C3D42 !important; }
    .calendar-legend-dot-onleave { background: #555 !important; }
}
