/* HRMS — Modern mobile-first design */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* VTS logo blues + white */
    --primary: #00a8f0;
    --primary-dark: #004992;
    --primary-light: #33c7ff;
    --accent: #33c7ff;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --info: #00a8f0;
    --info-bg: #eaf7ff;

    --bg: #f5faff;
    --bg-elevated: #ffffff;
    --text: #0b2438;
    --text-secondary: #3d5a73;
    --text-muted: #7a93a8;
    --border: #d7e8f4;
    --border-light: #eef6fb;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(11, 36, 56, 0.04);
    --shadow: 0 4px 6px -1px rgba(11, 36, 56, 0.06), 0 2px 4px -2px rgba(11, 36, 56, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(0, 73, 146, 0.10), 0 8px 10px -6px rgba(11, 36, 56, 0.04);
    --shadow-lg: 0 20px 40px -12px rgba(0, 168, 240, 0.18);
    --shadow-glow: 0 0 0 1px rgba(0, 168, 240, 0.10);

    --header-h: 64px;
    --sidebar-w: 272px;
    --topbar-h: 64px;
    --bottom-nav-h: 80px;
    --tap-min: 48px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration: 0.35s;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.app-layout {
    display: block;
}

/* ---- App shell (sidebar layout) ---- */
.app-shell {
    display: flex;
    min-height: 100dvh;
    background: var(--bg);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    pointer-events: none;
}

.sidebar-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-overlay[hidden] {
    display: block !important;
    visibility: hidden;
}

.sidebar-overlay[hidden].is-visible {
    visibility: visible;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 250;
    width: var(--sidebar-w);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(185deg, #004992 0%, #063a72 42%, #052649 100%);
    color: #e8f4fc;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 32px rgba(0, 40, 80, 0.28);
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease-out);
}

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

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.125rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    min-width: 0;
}

body.sidebar-open {
    overflow: hidden;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 0.8125rem;
    box-shadow: 0 6px 16px rgba(0, 73, 146, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.brand-logo {
    display: block;
    object-fit: contain;
    background: #ffffff;
    padding: 0;
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-brand-text strong {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sidebar-brand-text small {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-close svg { width: 18px; height: 18px; }

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.75rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-group-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 0 0.875rem;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.2rem;
    border-radius: 12px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    position: relative;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    padding: 7px;
    box-sizing: content-box;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    opacity: 0.9;
    transition: background 0.2s, color 0.2s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #f1f5f9;
}

.sidebar-link:hover svg {
    background: rgba(51, 199, 255, 0.22);
    color: #d9f4ff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(0, 168, 240, 0.42) 0%, rgba(0, 168, 240, 0.12) 100%);
    color: #fff;
    font-weight: 600;
}

.sidebar-link.active svg {
    background: rgba(51, 199, 255, 0.35);
    color: #eaf8ff;
    opacity: 1;
}

.sidebar-link-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.8125rem;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-meta {
    display: block;
    font-size: 0.6875rem;
    color: #94a3b8;
    font-weight: 500;
}

.sidebar-logout-form { margin: 0; }

.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sidebar-logout-btn svg { width: 16px; height: 16px; }

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.35);
}

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--topbar-h);
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.sidebar-toggle svg { width: 20px; height: 20px; }

.sidebar-toggle:hover {
    background: var(--info-bg);
    border-color: #b9e6fb;
    color: var(--primary);
}

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

.topbar-title {
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    padding: 0.25rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-light);
}

.topbar-punch-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 168, 240, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.topbar-punch-btn svg { width: 16px; height: 16px; }

.topbar-punch-btn:hover,
.topbar-punch-btn.active {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 73, 146, 0.42);
}

.topbar-user .user-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.8125rem;
}

/* Login / guest pages — full screen, no white gutters */
body.guest-page {
    background: #004992;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-12px) rotate(2deg); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 0.8; transform: scale(1.05); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

.animate-in {
    animation: fadeInUp var(--duration) var(--ease-out) both;
}

.animate-in-delay-1 { animation-delay: 0.08s; }
.animate-in-delay-2 { animation-delay: 0.16s; }
.animate-in-delay-3 { animation-delay: 0.24s; }
.animate-in-delay-4 { animation-delay: 0.32s; }

/* ---- Header ---- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    animation: slideDown 0.5s var(--ease-out);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: var(--header-h);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 73, 146, 0.22);
}

img.brand-icon,
img.brand-logo {
    display: block;
    padding: 0;
    object-fit: contain;
    background: #ffffff;
}

.nav-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: var(--tap-min);
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: background var(--duration), transform 0.2s;
}

.nav-toggle:active { transform: scale(0.95); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.app-nav {
    display: none;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border-light);
    animation: fadeIn 0.25s ease;
}

.app-nav.open { display: flex; }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.875rem 1rem;
    min-height: var(--tap-min);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease-out);
}

.nav-link svg { width: 20px; height: 20px; opacity: 0.7; flex-shrink: 0; }

.nav-link:hover,
.nav-link.active {
    background: var(--info-bg);
    color: var(--primary);
}

.nav-link:hover svg,
.nav-link.active svg { opacity: 1; color: var(--primary); }

.nav-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 168, 240, 0.28);
    overflow: hidden;
}

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

a.user-avatar {
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

a.user-avatar:hover,
a.user-avatar:focus-visible {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 16px rgba(0, 73, 146, 0.35);
    outline: none;
}

a.user-avatar.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary);
}

.nav-user-info { flex: 1; min-width: 0; }
.nav-user-name { display: block; font-weight: 700; font-size: 0.9375rem; color: var(--text); }
.nav-user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Desktop nav */
.header-desktop-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-left: 2rem;
}

.header-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* ---- Bottom mobile nav ---- */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-light);
    padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease-out);
    min-height: var(--tap-min);
    justify-content: center;
}

.bottom-nav-item svg { width: 22px; height: 22px; transition: transform 0.25s var(--ease-spring); }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active svg { transform: scale(1.1); }
.bottom-nav-item:active svg { transform: scale(0.9); }
.bottom-nav-item.disabled { opacity: 0.4; pointer-events: none; }

/* ---- Main ---- */
.app-main {
    flex: 1;
    padding: 1.25rem;
    width: 100%;
    max-width: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 168, 240, 0.04) 0%, transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.03) 0%, transparent 38%),
        var(--bg);
}

body.app-layout.has-bottom-nav .app-main {
    padding-bottom: calc(1.5rem + var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

body.app-layout:not(.has-bottom-nav) .app-main {
    padding-bottom: 1.25rem;
}

body.no-bottom-nav .app-main {
    padding-bottom: 1.25rem;
    max-width: none;
}

body.no-bottom-nav .bottom-nav { display: none; }

.app-footer {
    text-align: center;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    background: var(--bg-elevated);
}

body.app-layout .app-footer,
body.no-bottom-nav .app-footer { display: block; }

body.app-layout .page-header h1 {
    display: none;
}

body.app-layout .page-header {
    margin-bottom: 1.25rem;
}

body.app-layout .page-toolbar .page-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-top: 0;
    line-height: 1.5;
    max-width: 40rem;
}

.page-toolbar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.page-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.page-meta-pill-warn {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.page-toolbar-intro {
    flex: 1;
    min-width: 0;
}

/* ---- Auth page ---- */
.auth-page {
    flex: 1;
    width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #031a33 0%, #004992 38%, #006bb3 72%, #0088cc 100%);
}

.auth-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.auth-particles canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.auth-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: pulse-soft 8s ease-in-out infinite;
}

.auth-shape-1 {
    width: 300px; height: 300px;
    background: rgba(0, 168, 240, 0.45);
    top: -80px; right: -60px;
}

.auth-shape-2 {
    width: 250px; height: 250px;
    background: rgba(51, 199, 255, 0.30);
    bottom: -60px; left: -40px;
    animation-delay: -3s;
}

.auth-shape-3 {
    width: 180px; height: 180px;
    background: rgba(0, 73, 146, 0.35);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.7s var(--ease-out);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.1rem;
    background: #ffffff;
    border-radius: 20px;
    display: block;
    object-fit: contain;
    image-rendering: auto;
    box-shadow: 0 8px 24px rgba(0, 73, 146, 0.18);
    border: 1px solid rgba(0, 73, 146, 0.08);
}

.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
}

.auth-tagline {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    animation: fadeIn 1s ease 0.5s both;
}

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font);
    min-height: var(--tap-min);
    background: var(--bg-elevated);
    color: var(--text);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

/* Native select / dropdown */
select.form-control {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: var(--font);
    font-weight: 500;
    min-height: var(--tap-min);
    background-color: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 1.125rem;
    transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

select.form-control:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

select.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 168, 240, 0.12);
    background-color: #fff;
}

select.form-control:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: var(--bg);
}

select.form-control.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px var(--danger);
}

select.form-control option {
    color: var(--text);
    background: #fff;
    padding: 0.5rem;
}

/* Text inputs must never look like dropdowns */
input.form-control,
textarea.form-control {
    background-image: none !important;
    padding-right: 1rem;
    cursor: text;
    appearance: auto;
    -webkit-appearance: auto;
}

input.form-control[type="checkbox"],
input.form-control[type="radio"] {
    width: auto;
    min-height: auto;
    padding: 0;
    cursor: pointer;
}

.select-wrap {
    position: relative;
    width: 100%;
}

.select-wrap select.form-control {
    width: 100%;
}

.filter-card select.form-control,
.hr-filter-form select.form-control {
    max-width: 420px;
}

.form-row select.form-control {
    min-width: 0;
}

@media (max-width: 640px) {
    .filter-card select.form-control,
    .hr-filter-form select.form-control {
        max-width: none;
    }
}

.form-control:hover { border-color: #cbd5e1; }

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 168, 240, 0.12);
    background: #fff;
}

.input-wrap:focus-within svg { color: var(--primary); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    min-height: var(--tap-min);
    text-decoration: none;
    transition: all 0.25s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 168, 240, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 168, 240, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.97) translateY(0); }

.btn-ghost {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: #fff;
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; min-height: 40px; }

.btn-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 0.5rem;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.card-interactive:hover,
a.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ---- Page header ---- */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.2;
}

.page-header .page-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--info-bg);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.page-badge strong {
    font-weight: 800;
    color: var(--primary-dark);
}

.page-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-soft 2s infinite;
}

/* ---- Welcome hero ---- */
.welcome-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #00a8f0 50%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 168, 240, 0.25);
}

.welcome-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.welcome-hero-content { position: relative; z-index: 1; }

.welcome-hero h2 {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.welcome-hero p {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

.welcome-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.welcome-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---- Stat grid ---- */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.35s var(--ease-out);
    cursor: default;
}

a.stat-card,
.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.stat-card:hover,
.stat-card-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

a.stat-card:focus-visible,
.stat-card-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

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

.stat-icon svg { width: 24px; height: 24px; }

.stat-present .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-total .stat-icon   { background: var(--info-bg); color: var(--info); }
.stat-absent .stat-icon  { background: var(--danger-bg); color: var(--danger); }

.stat-body { flex: 1; min-width: 0; }

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.125rem;
}

/* ---- Company filter ---- */
.filter-card {
    margin-bottom: 1.5rem;
}

.filter-card label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-card label svg { width: 16px; height: 16px; color: var(--primary); }

/* ---- Quick actions ---- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s var(--ease-out);
}

.quick-action svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
    transition: transform 0.3s var(--ease-spring);
}

.quick-action:hover {
    background: var(--info-bg);
    border-color: rgba(0, 168, 240, 0.2);
    color: var(--primary);
    transform: translateY(-2px);
}

.quick-action:hover svg { transform: scale(1.15); }

.quick-action.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

/* ---- Alerts ---- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeInUp 0.4s var(--ease-out);
}

.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.alert-content {
    flex: 1;
    min-width: 0;
    line-height: 1.55;
}

.alert-content p {
    margin: 0;
}

.alert-content p + p {
    margin-top: 0.5rem;
}

.alert-heading {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.alert-note {
    color: inherit;
    opacity: 0.95;
}

.alert-error {
    background: var(--danger-bg);
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ---- Error pages (standalone + in-app) ---- */
.error-layout-page .error-page-shell {
    min-height: 100dvh;
}

.error-card {
    text-align: center;
    max-width: 420px;
}

.error-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-bg);
    color: var(--danger);
}

.error-card-icon svg {
    width: 32px;
    height: 32px;
}

.error-card-icon-404 {
    background: var(--info-bg);
    color: var(--info);
}

.error-card-icon-419 {
    background: var(--warning-bg);
    color: var(--warning);
}

.error-code {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.error-message {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.error-page {
    text-align: center;
    padding: 4rem 1.5rem;
    animation: fadeInUp 0.6s var(--ease-out);
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ---- Map picker (onboarding) ---- */
.map-picker {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}

.map-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.map-picker-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.625rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.map-picker-frame {
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
}

@media (max-width: 520px) {
    .map-picker-frame { height: 280px; }
}

/* ---- Utilities ---- */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

/* ---- Tablet+ ---- */
@media (min-width: 640px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-actions { grid-template-columns: repeat(4, 1fr); }

    body.app-layout.has-bottom-nav .bottom-nav { display: none; }
    body.app-layout.has-bottom-nav .app-main { padding-bottom: 1.75rem; }

    .nav-toggle { display: none; }

    .header-desktop-nav { display: none; }

    .app-nav {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .app-main { padding: 1.75rem 2rem 2rem; }
    .page-header h1 { font-size: 1.875rem; }
    .auth-card { padding: 3rem 2.5rem; }
    .topbar-title { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
    .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle,
    .sidebar-close {
        display: none !important;
    }

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

    .topbar-punch-btn {
        display: inline-flex;
    }

    .app-main {
        padding: 2rem 2.25rem 2.5rem;
        max-width: 1280px;
    }

    .app-content {
        align-items: stretch;
    }

    .app-content > .app-main {
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 1023px) {
    .sidebar-close {
        display: flex;
    }
}

.alert-success {
    background: var(--success-bg);
    color: #047857;
    border: 1px solid #a7f3d0;
}

.form-control.no-icon { padding-left: 1rem; }

select.form-control.no-icon {
    padding-left: 1rem;
    padding-right: 2.75rem;
}

input.form-control.no-icon,
textarea.form-control.no-icon {
    padding-left: 1rem;
    padding-right: 1rem;
}

.field-error {
    display: block;
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

.form-control.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px var(--danger);
}

.validation-error-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.validation-error-list a {
    font-weight: 600;
}

.review-block-error {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.req { color: var(--danger); }
.req-badge, .opt-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
    vertical-align: middle;
}
.req-badge { background: var(--danger-bg); color: var(--danger); }
.opt-badge { background: var(--border-light); color: var(--text-muted); }

/* ---- Notice bubbles (onboarding pending) ---- */
.notice-toast {
    position: fixed;
    top: calc(var(--header-h) + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    width: calc(100% - 2rem);
    max-width: 480px;
    pointer-events: none;
}

.notice-toast .notice-bubble { pointer-events: auto; }

.notice-bubble {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    border: 1px solid transparent;
    animation: fadeInUp 0.5s var(--ease-out);
}

.notice-bubble-info {
    background: linear-gradient(135deg, #eff6ff 0%, #eaf8ff 100%);
    border-color: #b9e6fb;
    color: #3730a3;
}

.notice-bubble-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
    color: #92400e;
}

.notice-bubble-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #a7f3d0;
    color: #047857;
}

.notice-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    animation: pulse-soft 2s infinite;
}

.notice-action {
    margin-left: auto;
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
    white-space: nowrap;
    font-size: 0.8125rem;
}

.notice-dismiss {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.25rem;
    margin-left: 0.25rem;
}

.notice-dismiss:hover { opacity: 1; }

.notice-bubble-inline {
    margin-bottom: 1.25rem;
    background: var(--warning-bg);
    border-color: #fde68a;
    color: #92400e;
}

.dashboard-notice { margin-bottom: 1.25rem; }
.dashboard-notice .notice-bubble { flex-wrap: wrap; }
.dashboard-notice .notice-content { flex: 1; min-width: 180px; }
.dashboard-notice .notice-content strong { display: block; margin-bottom: 0.25rem; }

/* ---- Plain-language help boxes ---- */
.help-notice {
    margin-bottom: 1.25rem;
    padding: 1rem 1.125rem;
    border-radius: var(--radius);
    background: var(--warning-bg);
    border: 1px solid #fde68a;
    color: #78350f;
}

.help-notice-title {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #92400e;
}

.help-notice-list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.875rem;
    line-height: 1.55;
}

.help-notice-list li + li {
    margin-top: 0.35rem;
}

.help-notice-list strong {
    color: #92400e;
}

/* ---- Onboarding wizard ---- */
.onboarding-wrap { max-width: 900px; margin: 0 auto; width: 100%; }

.onboarding-header {
    margin-bottom: 1.25rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.onboarding-header h1 {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.onboarding-progress-wrap {
    width: 100%;
    align-self: stretch;
    margin-top: 0.875rem;
}

.onboarding-progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 0 0 0.375rem;
    overflow: hidden;
}

.onboarding-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    max-width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.6s var(--ease-out);
    min-width: 0;
}

.onboarding-progress-fill.has-progress {
    min-width: 8px;
}

.onboarding-progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.onboarding-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.onboarding-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.375rem;
    padding: 0.625rem 0.5rem;
    min-height: 76px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1.5px solid var(--border);
    transition: all 0.25s var(--ease-out);
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
}

.onboarding-tab .tab-label {
    line-height: 1.25;
    max-width: 100%;
}

.onboarding-tab .tab-num {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: all 0.3s var(--ease-out);
}

.onboarding-tab.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--info-bg);
    box-shadow: var(--shadow-glow);
}

.onboarding-tab.active .tab-num {
    background: var(--primary);
    color: #fff;
}

.onboarding-tab.done .tab-num {
    background: var(--success);
    color: #fff;
}

.onboarding-tab:not(.active) { color: var(--text-secondary); }

.onboarding-tab.locked {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 720px) {
    .onboarding-tabs {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .onboarding-tabs::-webkit-scrollbar { display: none; }

    .onboarding-tab {
        flex: 0 0 88px;
        min-height: 76px;
    }
}

.onboarding-panel { padding: 1.5rem; }

.panel-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.panel-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

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

@media (min-width: 480px) {
    .form-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.form-actions .btn-primary { margin-left: auto; }

/* Documents */
.doc-list { display: flex; flex-direction: column; gap: 1rem; }

.doc-item {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-light);
    background: var(--bg);
    transition: border-color 0.25s;
}

.doc-item.doc-uploaded { border-color: #a7f3d0; background: var(--success-bg); }
.doc-item.doc-pending { border-color: #fde68a; background: var(--warning-bg); }

.doc-item-info {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.doc-status-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.doc-uploaded .doc-status-icon { color: var(--success); }
.doc-pending .doc-status-icon { color: var(--warning); }

.doc-filename { color: var(--success) !important; font-weight: 600; }
.doc-file-link {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.doc-file-link:hover { color: var(--primary-dark); }

.doc-upload-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    flex: 1 1 100%;
    min-width: min(100%, 280px);
}

.doc-file-input { display: none; }

.doc-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0;
    text-align: center;
    cursor: pointer;
    background: var(--bg-elevated);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    overflow: hidden;
}
.doc-drop-label {
    display: block;
    padding: 1rem 0.875rem;
    cursor: pointer;
    margin: 0;
}

.doc-drop-zone:hover {
    border-color: var(--primary-light);
    background: var(--info-bg);
}

.doc-drop-zone.doc-drop-active {
    border-color: var(--primary);
    background: #eaf8ff;
    transform: scale(1.01);
}

.doc-drop-zone.doc-drop-has-file {
    border-color: #86efac;
    background: var(--success-bg);
}

.doc-drop-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    pointer-events: none;
}

.doc-drop-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.doc-drop-icon svg {
    width: 22px;
    height: 22px;
}

.doc-drop-title {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
}

.doc-drop-meta {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.doc-drop-filename {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--success);
    word-break: break-all;
}

.doc-drop-submit {
    align-self: flex-start;
}

.doc-done-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--success);
}

/* Review */
.review-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.review-block {
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    position: relative;
}

.review-block h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.review-block p { font-size: 0.875rem; color: var(--text-secondary); }

.review-edit {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.review-edit:hover { text-decoration: underline; }

.email-preview-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.email-preview-header h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
}

.email-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .email-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.email-meta-full {
    grid-column: 1 / -1;
}

.email-preview-frame {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #f4f6f8;
}

.email-preview-iframe {
    display: block;
    width: 100%;
    min-height: 520px;
    border: 0;
    background: #fff;
}

.stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
    .stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.attendance-summary-card { margin-top: 1.25rem; padding: 1.25rem 1.35rem; }
.attendance-summary-card .profile-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.9rem;
}
.attendance-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.holiday-form-card { margin-bottom: 1.25rem; }
.holiday-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.holiday-entry-form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .holiday-entry-form .form-row { grid-template-columns: 1.2fr 1fr 1.5fr; }
}
.holiday-apply-all {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.holiday-apply-all input { margin-top: 0.2rem; }
.holiday-quick-add {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.holiday-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.holiday-quick-chip {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.holiday-quick-chip:hover {
    border-color: var(--primary-light);
    background: #eaf8ff;
    color: var(--primary);
}
.inline-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.attendance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0;
}
@media (min-width: 640px) {
    .attendance-summary-grid { grid-template-columns: repeat(3, 1fr); }
}
.attendance-stat {
    text-align: center;
    padding: 0.7rem 0.4rem;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.attendance-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.attendance-stat-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.stat-present-color { color: var(--success); }
.stat-absent-color { color: var(--danger); }
.stat-leave-color { color: #0284c7; }
.stat-holiday-color { color: #d97706; }

.attendance-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-light);
}
.attendance-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.attendance-meta-chip strong {
    color: var(--text);
    font-weight: 700;
}
.attendance-meta-chip-warn {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.attendance-meta-chip-warn strong {
    color: #9a3412;
}

.attendance-row-hours-short {
    background: #fff7ed !important;
}
.attendance-row-hours-short:hover {
    background: #ffedd5 !important;
}
.report-hours-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    color: #9a3412;
}
.report-hours-legend-swatch {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 2px;
    background: #f59e0b;
    flex-shrink: 0;
}

.weekly-late-card {
    margin-top: 1.25rem;
}
.weekly-late-hint {
    margin: 0 1.25rem 0.75rem;
}
.weekly-late-download-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 1.25rem 0.75rem;
}
.weekly-late-weeks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1.25rem 1.25rem;
}
.weekly-late-week {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg);
    overflow: hidden;
}
.weekly-late-week-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}
.weekly-late-week-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.weekly-late-week-label {
    font-weight: 700;
    color: var(--text);
}
.weekly-late-week-sub {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.weekly-late-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.weekly-late-view-btn.is-open {
    background: rgba(0, 168, 240, 0.08);
    color: #004992;
}
.weekly-late-days {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}
.late-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
    padding-top: 0.85rem;
}
.late-day-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 0.85rem 0.95rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.late-day-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.late-day-card-date {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
}
.late-day-card-total {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}
.late-punch-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.late-punch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.late-punch-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.late-punch-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.late-punch-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.late-punch-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9a3412;
    background: #ffedd5;
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
}
.late-day-card-empty {
    margin: 0;
    color: var(--text-secondary);
}

.punch-working-hours-card {
    padding: 1rem 1.15rem;
    text-align: center;
}
.punch-working-hours-card .punch-working-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.attendance-hours-block {
    margin-bottom: 1.15rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
}
.attendance-hours-ok {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(180deg, #f0fdf9 0%, #fff 70%);
}
.attendance-hours-short {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(180deg, #fffbeb 0%, #fff 72%);
}
.attendance-hours-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.attendance-hours-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.25rem;
}
.attendance-hours-lead {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.attendance-hours-figures {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.4;
}
.attendance-hours-figures strong {
    color: var(--text);
}
.attendance-hours-sub {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
}
.attendance-hours-sub strong {
    color: var(--text);
    font-weight: 600;
}
.attendance-hours-sep {
    margin: 0 0.35rem;
    color: var(--text-muted);
}
.attendance-hours-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}
.attendance-hours-metric {
    padding: 0.75rem 0.65rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-light);
    text-align: center;
}
.attendance-hours-metric-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.attendance-hours-metric-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.attendance-hours-metric.is-short .attendance-hours-metric-value {
    color: #c2410c;
}
.attendance-hours-metric.is-ok .attendance-hours-metric-value {
    color: #059669;
}
.attendance-hours-solo {
    margin: 0.35rem 0 0.5rem;
    font-size: 1.75rem;
}
.attendance-hours-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.attendance-hours-bar {
    flex: 1;
    height: 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-bottom: 0;
}
.attendance-hours-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.4s ease;
    min-width: 0;
}
.attendance-hours-short .attendance-hours-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.attendance-hours-ok .attendance-hours-fill {
    background: linear-gradient(90deg, var(--success), #34d399);
}
.attendance-hours-percent {
    flex-shrink: 0;
    min-width: 2.75rem;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}
.attendance-hours-foot,
.attendance-hours-note {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.attendance-summary-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0.25rem;
}
@media (min-width: 900px) {
    .attendance-summary-split {
        grid-template-columns: 1.05fr 0.95fr;
        align-items: stretch;
    }
}

.attendance-paid-block {
    margin-bottom: 0;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 68%);
}
.attendance-days-block {
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
}
.attendance-days-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.85rem;
}
.attendance-paid-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
.attendance-paid-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.2rem;
}
.attendance-paid-total {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #059669;
    font-variant-numeric: tabular-nums;
}
.attendance-unpaid-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
}
.attendance-unpaid-pill strong {
    font-size: 0.9375rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.attendance-paid-composition {
    display: flex;
    width: 100%;
    height: 0.65rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.18);
}
.attendance-paid-composition-seg {
    min-width: 0.35rem;
    transition: flex-grow 0.2s ease;
}
.attendance-paid-composition-seg--present { background: #10b981; }
.attendance-paid-composition-seg--leave { background: #00a8f0; }
.attendance-paid-composition-seg--holiday { background: #f59e0b; }
.attendance-paid-composition-seg--weekoff { background: #94a3b8; }

.attendance-paid-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.75rem;
}
.attendance-paid-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    min-width: 0;
}
.attendance-paid-legend-item strong {
    margin-left: auto;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.attendance-paid-legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: #94a3b8;
}
.attendance-paid-legend-item--present .attendance-paid-legend-dot { background: #10b981; }
.attendance-paid-legend-item--leave .attendance-paid-legend-dot { background: #00a8f0; }
.attendance-paid-legend-item--holiday .attendance-paid-legend-dot { background: #f59e0b; }
.attendance-paid-legend-item--weekoff .attendance-paid-legend-dot { background: #94a3b8; }
.attendance-paid-legend-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-paid-breakdown-grid {
    display: none;
}
.attendance-paid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border-light);
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.attendance-paid-item-value {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}
.attendance-paid-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.attendance-paid-item--present .attendance-paid-item-value { color: #059669; }
.attendance-paid-item--leave .attendance-paid-item-value { color: #00a8f0; }
.attendance-paid-item--holiday .attendance-paid-item-value { color: #d97706; }
.attendance-paid-item--weekoff .attendance-paid-item-value { color: #64748b; }
.attendance-paid-item--present { border-top: 3px solid #10b981; }
.attendance-paid-item--leave { border-top: 3px solid #00a8f0; }
.attendance-paid-item--holiday { border-top: 3px solid #f59e0b; }
.attendance-paid-item--weekoff { border-top: 3px solid #94a3b8; }

.attendance-unpaid-callout {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-top: 0.25rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.attendance-unpaid-callout-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--danger);
}
.attendance-unpaid-callout-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--danger);
    line-height: 1;
}
.attendance-unpaid-callout-suffix {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.attendance-paid-foot {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

@media (max-width: 560px) {
    .attendance-hours-metrics {
        grid-template-columns: 1fr;
    }
    .attendance-hours-metric {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        text-align: left;
        gap: 0.75rem;
        padding: 0.65rem 0.85rem;
    }
    .attendance-hours-metric-label {
        margin-top: 0;
        order: -1;
    }
    .attendance-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header-row .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ---- HR onboarding list ---- */

.hr-filter-card { padding: 1rem 1.25rem; }

/* Shared filter toolbar — label above control, button lined up with fields */
.hr-filter-form,
.filter-row-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.85rem 1.15rem;
}

.hr-filter-form .form-group,
.filter-row-form .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    margin: 0;
    min-width: min(100%, 200px);
    flex: 1 1 200px;
    max-width: 320px;
}

.hr-filter-form label,
.filter-row-form label,
.filter-card > label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    line-height: 1.25;
}

.hr-filter-form label svg,
.filter-row-form label svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
    vertical-align: -2px;
    margin-right: 0.25rem;
}

.hr-filter-form .form-control,
.filter-row-form .form-control,
.hr-filter-form select.form-control,
.filter-row-form select.form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.hr-filter-form .btn,
.filter-row-form .btn,
.hr-filter-form button[type="submit"],
.filter-row-form button[type="submit"] {
    flex: 0 0 auto;
    align-self: flex-end;
    min-height: 2.75rem;
    margin: 0;
}

@media (max-width: 640px) {
    .hr-filter-form .form-group,
    .filter-row-form .form-group {
        flex: 1 1 100%;
        max-width: none;
    }

    .hr-filter-form .btn,
    .filter-row-form .btn,
    .hr-filter-form button[type="submit"],
    .filter-row-form button[type="submit"] {
        width: 100%;
    }
}

.hr-onboarding-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.hr-onboarding-card-head .section-title { margin-bottom: 0; }

.hr-list-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
}

.hr-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.hr-empty-state p { margin-bottom: 1rem; }

.hr-employee-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
}

.stat-card.stat-ctc .stat-icon { background: #fef3c7; color: #d97706; }

.hr-employee-list { display: flex; flex-direction: column; gap: 0.625rem; }

.hr-employee-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-out);
}

.hr-employee-row:hover {
    border-color: rgba(0, 168, 240, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.hr-employee-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hr-employee-main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.hr-employee-main strong {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.hr-employee-email {
    color: var(--text-muted);
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-employee-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hr-row-chevron {
    display: flex;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
}

.hr-row-chevron svg { width: 20px; height: 20px; }

.hr-employee-row:hover .hr-row-chevron {
    color: var(--primary);
    transform: translateX(2px);
}

.hr-status-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.3125rem 0.625rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    border: 1px solid transparent;
}

.hr-status-badge.status-done { background: var(--success-bg); color: var(--success); border-color: #a7f3d0; }
.hr-status-badge.status-warn { background: var(--warning-bg); color: #92400e; border-color: #fde68a; }
.hr-status-badge.status-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.hr-status-badge.status-muted { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }

.hr-ref-desc { margin-bottom: 1rem; }

.ref-doc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

@media (min-width: 480px) {
    .ref-doc-grid { grid-template-columns: 1fr 1fr; }
}

.ref-doc-chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.ref-doc-chip svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }

.ref-doc-chip:hover {
    border-color: rgba(0, 168, 240, 0.3);
    background: var(--info-bg);
    color: var(--primary);
}

@media (max-width: 560px) {
    .hr-employee-row { flex-wrap: wrap; }
    .hr-employee-actions {
        width: 100%;
        justify-content: space-between;
        padding-left: calc(44px + 0.875rem);
    }
}

.ref-doc-list { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.ref-doc-list a { color: var(--primary); font-weight: 600; }

.doc-ref-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}
.onboarding-back { margin-bottom: 0.75rem; }

/* ---- Punch page ---- */
.punch-status-card { text-align: center; padding: 1.5rem; }
.punch-status-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9375rem;
}
.punch-status-in { background: var(--success-bg); color: var(--success); }
.punch-status-out { background: var(--info-bg); color: var(--info); }
.punch-status-none { background: var(--warning-bg); color: #92400e; }
.punch-status-break { background: #fef3c7; color: #b45309; }

.break-timer-wrap {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--bg);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.break-timer-wrap.break-timer-exceeded {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
}
.break-timer-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.break-timer {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}
.break-timer-exceeded .break-timer { color: var(--danger); }

.punch-break-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.punch-break-actions-active {
    grid-template-columns: 1fr;
}
.punch-break-actions-active .punch-form {
    grid-column: 1 / -1;
}

.btn-break-start {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.btn-break-start:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.5);
}
.btn-break-start:active:not(:disabled) { transform: scale(0.98); }
.btn-break-start:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-break-end {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.btn-break-end:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.45);
}
.btn-break-end:active:not(:disabled) { transform: scale(0.98); }
.btn-break-end:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.punch-already-in-note {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}
.punch-actions-locked .btn-punch {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.6);
}
.punch-on-break-note {
    grid-column: 1 / -1;
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    text-align: center;
}

.punch-log-type.punch-type-break_start { background: #fef3c7; color: #b45309; }
.punch-log-type.punch-type-break_end { background: var(--success-bg); color: var(--success); }

.page-header-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.parent-co-label { font-weight: 600; color: var(--primary); }

.geo-away_from_in { background: var(--danger-bg); color: var(--danger); }
.geo-row-away_from_in .geo-pill { background: var(--danger-bg); color: var(--danger); }

.punch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.punch-form { margin: 0; }
.btn-punch {
    width: 100%;
    min-height: 120px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
    color: #fff;
}
.btn-punch svg { width: 36px; height: 36px; }
.btn-punch:active:not(:disabled) { transform: scale(0.97); }
.btn-punch:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-punch-in {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}
.btn-punch-out {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.punch-page .punch-hero { text-align: center; padding: 1.5rem; }
.punch-clock {
    font-size: 2.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: var(--primary);
}
.punch-working-hours {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}
.punch-working-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.punch-working-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.punch-working-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.punch-working-live { color: var(--success); font-weight: 600; }
.punch-working-paused { color: #b45309; font-weight: 600; }
.punch-shift-pick {
    margin-bottom: 0.75rem;
    padding: 1rem 1.1rem;
}
.punch-shift-pick-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.punch-shift-pick-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
    border: 1.5px solid var(--border-light, #e2e8f0);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    background: #fff;
}
.punch-shift-pick-option:has(input:checked),
.punch-shift-pick-option.is-selected {
    border-color: var(--primary, #4f46e5);
    background: #eef2ff;
}
.punch-shift-pick-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.punch-shift-locked {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.75rem;
    background: #f0fdf4;
    border-radius: var(--radius-sm, 8px);
    color: #166534;
}
.shift-multi-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.shift-multi-list.input-error {
    outline: 1px solid var(--danger, #dc2626);
    outline-offset: 2px;
    border-radius: var(--radius-sm, 8px);
    padding: 0.35rem;
}
.shift-multi-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: var(--radius-sm, 8px);
    background: #fff;
    cursor: pointer;
}
.shift-multi-row .shift-multi-check {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.shift-multi-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}
.shift-multi-primary {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
}
.shift-assign-form .shift-multi-list {
    margin-top: 0.75rem;
}
.punch-gps-card { margin: 1rem 0; }
.punch-gps-status { font-weight: 600; color: var(--primary); margin-top: 0.35rem; }
.punch-gps-hint { margin-bottom: 0.25rem; }

.punch-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.punch-loading-overlay[hidden] { display: none; }
.punch-loading-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    min-width: 220px;
}
.punch-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: punch-spin 0.7s linear infinite;
}
@keyframes punch-spin {
    to { transform: rotate(360deg); }
}
.punch-loading-box p {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}
.camera-wrap {
    position: relative;
    background: #111;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    max-height: 320px;
}
.camera-wrap video,
.camera-wrap .punch-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.camera-wrap video {
    transform: scaleX(-1);
    z-index: 1;
}
.camera-wrap .punch-preview {
    z-index: 2;
    transform: scaleX(-1);
}
.camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.camera-review-note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    color: #1e40af;
    font-weight: 500;
}
#btnConfirmPunch {
    font-weight: 700;
    flex: 1 1 auto;
    min-width: 140px;
}
.camera-help-link-wrap { margin-top: 0.35rem; }
.camera-help-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}
.camera-help-link:hover { color: var(--primary-dark); }
.punch-laptop-only-alert { margin-bottom: 0.75rem; }

.punch-help-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.punch-help-modal[hidden] { display: none; }
body.punch-modal-open { overflow: hidden; }
.punch-help-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}
.punch-help-modal-box {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.125rem 1.25rem 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}
.punch-help-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.punch-help-modal-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.punch-help-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.15rem;
}
.punch-help-steps {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.punch-help-steps li { margin-bottom: 0.45rem; }
.punch-help-steps li:last-child { margin-bottom: 0; }

.punch-log-card { margin-top: 1rem; }
.punch-log-selfie { margin-left: auto; font-size: 1rem; }

.doc-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 0.75rem;
}
.doc-upload-form { width: 100%; max-width: 360px; }
.doc-action-form { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.doc-reject-input { max-width: 180px; min-height: 36px; padding: 0.35rem 0.5rem; font-size: 0.8125rem; }
.doc-status-pill {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.35rem;
    vertical-align: middle;
}
.doc-status-verified { background: var(--success-bg); color: var(--success); }
.doc-status-review { background: var(--warning-bg); color: #92400e; }
.doc-status-rejected { background: var(--danger-bg); color: var(--danger); }
.doc-status-pending { background: var(--bg); color: var(--text-muted); }
.doc-reject-note { color: var(--danger); margin-top: 0.25rem; }
.text-danger { color: var(--danger); }

.geo-pill {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}
.geo-ok { background: var(--success-bg); color: var(--success); }
.geo-away { background: var(--danger-bg); color: var(--danger); }
.geo-warn, .geo-no_home_set { background: var(--warning-bg); color: #92400e; }
.geo-muted, .geo-unknown { background: var(--bg); color: var(--text-muted); }

.punch-hr-list { display: flex; flex-direction: column; gap: 0.75rem; }
.punch-hr-row {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border-left: 4px solid var(--border);
}
.punch-hr-row.geo-away { border-left-color: var(--danger); background: #fef2f2; }
.punch-hr-row.geo-ok { border-left-color: var(--success); }

/* Super Admin punch log with selfies */
.admin-punch-page { max-width: 960px; margin: 0 auto; width: 100%; }

.admin-punch-list { display: flex; flex-direction: column; gap: 0.75rem; }

.admin-punch-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    border-left: 4px solid var(--border);
}

.admin-punch-row.geo-away { border-left-color: var(--danger); }
.admin-punch-row.geo-ok { border-left-color: var(--success); }

.admin-punch-selfie-link { flex-shrink: 0; display: block; }

.admin-punch-selfie {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: #111;
}

.admin-punch-selfie-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
}

.admin-punch-body { flex: 1; min-width: 0; }

.admin-punch-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

#gpsStatus {
    color: var(--text-secondary);
    font-weight: 600;
    min-height: 1.25rem;
}

.punch-hr-geo { margin-top: 0.5rem; }
.punch-address { margin: 0.25rem 0 0; }
.geo-distance { color: var(--danger); font-weight: 600; }
.geo-capture-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.geo-same-as-row { margin-bottom: 0.5rem; }
.geo-same-as-row .checkbox-label { font-weight: 600; }
.filter-row-form { /* layout lives with .hr-filter-form */ }
.punch-log-detail { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.punch-address-inline { color: var(--text-muted); }
.punch-home-card { margin-bottom: 1rem; }

.punch-log { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.punch-log-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
}
.punch-log-type {
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    min-width: 48px;
    text-align: center;
}
.punch-log-in .punch-log-type { background: var(--success-bg); color: var(--success); }
.punch-log-out .punch-log-type { background: var(--danger-bg); color: var(--danger); }

/* ---- CTC admin ---- */
.ctc-admin-page,
.hr-onboarding-page {
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
}

.hr-onboarding-page.page-wide {
    max-width: 100%;
}

.ctc-edit-page { max-width: 760px; }

.ctc-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ctc-stat-chip {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

.ctc-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ctc-stat-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.ctc-stat-pending .ctc-stat-value { color: #d97706; }
.ctc-stat-done .ctc-stat-value { color: var(--success); }
.ctc-stat-total .ctc-stat-value { color: var(--primary); }

.ctc-avatar {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.ctc-row-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.ctc-amount {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text);
}

.ctc-amount-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ctc-row-meta {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
}

.ctc-employee-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.ctc-employee-banner strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.ctc-banner-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.ctc-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .ctc-summary-grid { grid-template-columns: repeat(4, 1fr); }
}

.ctc-takehome-banner {
    background: linear-gradient(135deg, #00a8f0 0%, #06b6d4 100%);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.ctc-takehome-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
    margin-bottom: 0.375rem;
}

.ctc-takehome-amount {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.ctc-takehome-sub {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin-top: 0.375rem;
}

.ctc-summary-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
}

.ctc-summary-highlight {
    background: linear-gradient(135deg, #eff6ff, #ecfdf5);
    border-color: rgba(0, 168, 240, 0.2);
}

.ctc-summary-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.ctc-summary-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.ctc-summary-ded { color: var(--danger); }

.ctc-form-section {
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem;
}

.ctc-form-section .form-row { margin-top: 0.5rem; }

.ctc-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.ctc-section-head svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.ctc-section-head h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.125rem;
    letter-spacing: -0.02em;
}

.ctc-section-head p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.ctc-form { margin-bottom: 2rem; }

.ctc-form-actions {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-top: 0;
}

.input-with-prefix {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-with-prefix:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 240, 0.12);
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--bg);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.875rem;
    border-right: 1px solid var(--border-light);
}

.input-with-prefix .form-control {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
    line-height: 1.4;
}

@media (max-width: 560px) {
    .ctc-stat-row { grid-template-columns: 1fr; }
    .hr-employee-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.35rem;
    }
    .ctc-row-amount {
        text-align: right;
    }
    .ctc-row-amount .ctc-amount {
        font-size: 0.9375rem;
    }
}

/* ---- Super Admin: staff directory & profile ---- */
.onboarding-header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-cred-notice { margin-bottom: 1rem; }

.admin-staff-table-card { padding: 0; overflow: hidden; }

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.data-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface-elevated);
}

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

.login-email,
.stored-password {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
    word-break: break-all;
}

.stored-password.copied { color: var(--success); }

.cred-card { margin-bottom: 1.25rem; }

.cred-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cred-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cred-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.cred-value {
    font-family: ui-monospace, monospace;
    font-size: 0.9375rem;
    word-break: break-all;
}

.cred-value-plain { font-size: 0.9375rem; }

.password-reset-details {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.password-reset-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
}

.password-reset-form {
    margin-top: 0.75rem;
    max-width: 320px;
}

.detail-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.detail-block-wide { grid-column: 1 / -1; }

.detail-block h3 {
    font-size: 0.9375rem;
    margin: 0 0 0.75rem;
}

.detail-list {
    display: grid;
    grid-template-columns: minmax(120px, 38%) 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
    font-size: 0.875rem;
}

.detail-list dt {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-list dd { margin: 0; }

.doc-status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-status-list li {
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

.dt-punch-breaks,
.dt-punch-log {
    font-size: 0.8125rem;
    line-height: 1.35;
    max-width: 160px;
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}

.dt-punch-log {
    max-width: 88px;
    color: var(--text);
}

.dt-col-center {
    text-align: center;
}

.att-log-empty {
    color: var(--text-muted, #94a3b8);
}

/* Eye button — opens punch log modal */
.att-log-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 2.5rem;
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-sm, 10px);
    color: var(--primary-dark, #004992);
}

.att-log-view-btn svg {
    flex-shrink: 0;
}

.att-log-view-count {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary, #3d5a73);
}

/* Compact breaks summary in table */
.att-break-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary, #3d5a73);
}

.att-break-summary-count {
    font-weight: 600;
}

.att-break-summary-mins {
    font-size: 0.68rem;
    font-weight: 700;
    color: #92400e;
    background: #fde68a;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
}

.att-break-summary-open .att-break-summary-mins {
    color: #b91c1c;
    background: #fecaca;
}

/* Punch log modal */
body.att-log-modal-open {
    overflow: hidden;
}

.att-log-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.att-log-modal[hidden] {
    display: none;
}

.att-log-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 36, 56, 0.45);
}

.att-log-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: min(80vh, 640px);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.att-log-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-light, #eef6fb);
}

.att-log-modal-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #0b2438);
}

.att-log-modal-close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted, #7a93a8);
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
}

.att-log-modal-close:hover {
    background: var(--border-light, #eef6fb);
    color: var(--text, #0b2438);
}

.att-log-modal-body {
    padding: 1rem 1.15rem 1.25rem;
    overflow-y: auto;
}

.att-log-modal-empty {
    margin: 0;
    color: var(--text-muted, #7a93a8);
    font-size: 0.9rem;
}

.att-log-modal-breaks {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light, #eef6fb);
}

.att-log-modal-breaks h4 {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #3d5a73);
}

/* ---- Punch timeline (modal) ---- */
.att-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.att-timeline .att-tl-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0 0.35rem 1.2rem;
    min-height: 1.85rem;
}

.att-timeline-modal .att-tl-item {
    align-items: flex-start;
}
.att-timeline-modal .att-tl-dot {
    top: 0.7rem;
    transform: none;
}

.att-timeline .att-tl-item::before {
    content: "";
    position: absolute;
    left: 0.29rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light, #e2e8f0);
}

.att-timeline .att-tl-item:first-child::before {
    top: 50%;
}

.att-timeline .att-tl-item:last-child::before {
    bottom: 50%;
}

.att-tl-dot {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: var(--text-muted, #94a3b8);
    box-shadow: 0 0 0 2px var(--bg-elevated, #fff);
    z-index: 1;
}

.att-tl-label {
    min-width: 5.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary, #64748b);
}

.att-tl-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    color: var(--text, #0f172a);
}

.att-tl-in .att-tl-dot { background: var(--success, #16a34a); }
.att-tl-in .att-tl-label { color: var(--success, #16a34a); }

.att-tl-out .att-tl-dot { background: var(--danger, #dc2626); }
.att-tl-out .att-tl-label { color: var(--danger, #dc2626); }

.att-tl-break .att-tl-dot { background: #d97706; }
.att-tl-break .att-tl-label { color: #b45309; }

.att-tl-back .att-tl-dot { background: #2563eb; }
.att-tl-back .att-tl-label { color: #1d4ed8; }

.att-tl-flag {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    white-space: nowrap;
}

.att-tl-flag-missed {
    background: #ede9fe;
    color: #5b21b6;
}

.att-tl-missed .att-tl-time {
    color: #5b21b6;
}

.att-tl-flag-warn {
    background: #fee2e2;
    color: #b91c1c;
}

.att-tl-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    flex: 1;
    min-width: 0;
}
.att-tl-meta {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    width: 100%;
}
.att-tl-address {
    word-break: break-word;
}
.att-tl-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}
.att-tl-selfie img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-light, #e2e8f0);
    display: block;
}

.att-log-modal-notes {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm, 8px);
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
}

.att-log-modal-notes h4 {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5b21b6;
}

.att-log-modal-notes ul {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary, #3d5a73);
}

.att-break-zero {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Break chips (used inside modal) */
.att-break-log {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.att-break-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.35rem 0.28rem 0.65rem;
    border-radius: 999px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    width: fit-content;
}

.att-break-open {
    background: #fef2f2;
    border-color: #fecaca;
}

.att-break-range {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text, #0f172a);
}

.att-break-arrow {
    opacity: 0.5;
    margin: 0 0.1rem;
}

.att-break-mins {
    font-size: 0.68rem;
    font-weight: 700;
    color: #92400e;
    background: #fde68a;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.att-break-open .att-break-mins {
    color: #b91c1c;
    background: #fecaca;
}

.shift-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.shift-day-check {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
}

.shift-preview {
    margin: 1rem 0;
    padding: 0.875rem 1rem;
    background: var(--surface-elevated);
}

.report-filter-form .form-row { margin-bottom: 0.75rem; }

/* Report downloads: keep buttons in a clear wrap row (do not push primary with margin-left:auto). */
.report-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.report-filter-actions .btn {
    flex: 0 1 auto;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
}

.report-filter-actions .btn-primary {
    margin-left: 0;
}

.report-filter-actions-apply {
    margin-right: 0.25rem;
}

@media (max-width: 720px) {
    .report-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .report-filter-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .report-filter-actions-apply {
        margin-right: 0;
    }
}

.date-range-filter {
    grid-column: 1 / -1;
}

.date-range-filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.date-range-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.date-range-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.date-range-field {
    margin-bottom: 0;
}

.date-range-field label {
    font-size: 0.8125rem;
}

.date-range-input {
    min-height: 2.5rem;
    width: 100%;
}

.date-range-hint {
    margin: 0.5rem 0 0;
}

@media (max-width: 640px) {
    .date-range-inputs {
        grid-template-columns: 1fr;
    }

    .date-range-presets .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.35rem);
    }
}

.data-table tr.row-late td:last-child {
    color: var(--danger);
    font-weight: 600;
}

.punch-shift-info { margin-top: 0.25rem; }

/* ---- Employee profile page ---- */
.profile-page {
    max-width: 100%;
    margin: 0 auto;
}

.profile-page.page-wide {
    width: 100%;
}

.profile-hero {
    padding: 0;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}

.profile-back {
    display: inline-block;
    padding: 1rem 1.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.profile-back:hover { text-decoration: underline; }

.profile-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 0.5rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eaf8ff 100%);
}

.profile-avatar-xl {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), #33c7ff);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 168, 240, 0.35);
}

.profile-hero-main { flex: 1; min-width: 200px; }

.profile-hero-main h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.profile-hero-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.profile-chip {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.profile-chip-shift {
    background: #eaf8ff;
    border-color: #b9e6fb;
    color: var(--primary);
}

.profile-hero-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.profile-panel-accent {
    border-color: #b9e6fb;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.profile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.profile-panel-head h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.profile-panel-head p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.cred-block {
    margin-bottom: 1rem;
}

.cred-block-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.cred-block-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cred-block-row code,
.cred-secret {
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.cred-secret {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.cred-block-inline {
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}

.profile-collapse {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.profile-collapse summary {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}

.profile-collapse .password-reset-form {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-shift-current {
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.shift-blocks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.shift-block-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.8125rem;
}

.shift-block-label {
    font-weight: 700;
    color: var(--primary);
    min-width: 3.5rem;
}

.shift-block-time {
    color: var(--text);
    font-weight: 600;
}

.shift-block-grace {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    margin-left: auto;
}

.shift-weekly-grace {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.65rem;
    background: #fffbeb;
    border-radius: 8px;
    border: 1px solid #fde68a;
}

/* ---- Combined shift schedule ---- */
.shift-combined-badge {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    background: #eaf8ff;
    color: var(--primary);
    vertical-align: middle;
}

.shift-schedule-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.65rem;
}

.shift-schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shift-schedule-block {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
}

.shift-schedule-block-next {
    border-color: #7ad4f8;
    background: #eaf8ff;
    box-shadow: 0 0 0 1px rgba(0, 168, 240, 0.15);
}
.shift-schedule-block-active {
    border-color: rgba(16, 185, 129, 0.55);
    background: var(--success-bg);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}
.shift-schedule-block-active .shift-schedule-block-num {
    background: var(--success);
}
.shift-schedule-block-done {
    border-color: var(--border-light);
    background: #f1f5f9;
    border-left-color: #94a3b8;
    opacity: 0.92;
}
.shift-schedule-block-done .shift-schedule-block-num {
    background: #94a3b8;
}

.shift-schedule-block-num {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shift-schedule-block-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.65rem;
    min-width: 0;
}

.shift-schedule-block-label {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8125rem;
}

.shift-schedule-block-time {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text);
}

.shift-schedule-block-grace,
.shift-schedule-block-next-tag,
.shift-schedule-block-active-tag,
.shift-schedule-block-done-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
}

.shift-schedule-block-grace {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.shift-schedule-block-next-tag {
    background: var(--primary);
    color: #fff;
}
.shift-schedule-block-active-tag {
    background: var(--success);
    color: #fff;
}
.shift-schedule-block-done-tag {
    background: #e2e8f0;
    color: #64748b;
}

.shift-block-status {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.shift-block-status-running,
.shift-block-status-break {
    background: var(--success-bg);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.shift-block-status-between,
.shift-block-status-ready {
    background: #eaf8ff;
    color: #004992;
    border: 1px solid rgba(0, 168, 240, 0.2);
}
.shift-block-status-done {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--border-light);
}
.punch-block-hero-hint {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 28rem;
}
.punch-status-between {
    background: #eaf8ff;
    color: #004992;
}

.shift-schedule-gap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.75rem 0.45rem 2.15rem;
    position: relative;
}

.shift-schedule-gap::before {
    content: '';
    position: absolute;
    left: 0.7rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 4px, transparent 4px, transparent 8px);
}

.shift-schedule-gap-icon {
    font-size: 0.875rem;
    opacity: 0.7;
}

.shift-schedule-gap-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.shift-schedule-gap-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.shift-schedule-gap-time {
    font-weight: 600;
}

.shift-schedule-gap-mins {
    background: #fef3c7;
    color: #92400e;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-weight: 600;
}

.shift-schedule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-light);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.shift-schedule-compact .shift-schedule-timeline {
    gap: 0.35rem;
}

.shift-schedule-compact .shift-schedule-block {
    padding: 0.45rem 0.55rem;
    font-size: 0.75rem;
}

.shift-schedule-compact .shift-schedule-block-num {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
}

.shift-schedule-compact .shift-schedule-gap {
    padding: 0.25rem 0.55rem 0.25rem 1.85rem;
}

.shift-assigned-card {
    margin-bottom: 1rem;
}

.shift-next-hint {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.65rem;
    background: #eaf8ff;
    border-radius: 8px;
}

.shift-preview-days {
    margin: 0.75rem 0 0;
}

.shift-assign-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-rows { display: flex; flex-direction: column; }

.info-row {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    align-items: start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 120px;
}

.info-value {
    color: var(--text);
    text-align: left;
    word-break: break-word;
}

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

.profile-doc-table-wrap {
    overflow-x: auto;
    margin: 0 -0.25rem;
}

.profile-doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.profile-doc-table th {
    text-align: left;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.profile-doc-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-grid-2 { grid-template-columns: 1fr; }
    .profile-hero-inner { padding: 0.5rem 1rem 1.25rem; }
}

@media (max-width: 560px) {
    .info-row { flex-direction: column; gap: 0.25rem; }
    .info-value { text-align: left; }
}

/* ---- My profile (self-view) — mp-* namespace ---- */
.mp-page {
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 1.5rem;
}

.mp-alert {
    margin-bottom: 0.75rem;
}

.mp-shell {
    position: relative;
}

.mp-header {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    background: var(--bg-elevated);
}

.mp-header::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.mp-header-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem 1.15rem;
}

.mp-avatar-block {
    position: relative;
    flex-shrink: 0;
}

.mp-avatar {
    width: 104px;
    height: 104px;
    border-radius: var(--radius-full);
    border: 4px solid #fff;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(0, 73, 146, 0.28);
    overflow: hidden;
}

.mp-avatar.has-photo {
    background: #e8f4fc;
}

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

.mp-avatar-edit {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 34px;
    height: 34px;
    border: 2.5px solid #fff;
    border-radius: var(--radius-full);
    background: var(--primary-dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 73, 146, 0.35);
    transition: transform 0.18s var(--ease-spring), background 0.18s ease;
}

.mp-avatar-edit:hover {
    transform: scale(1.08);
    background: var(--primary);
}

.mp-identity {
    flex: 1;
    min-width: 200px;
    padding-top: 0;
}

.mp-eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.mp-name {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.2rem;
    line-height: 1.15;
    color: var(--text);
}

.mp-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0 0 0.45rem;
}

.mp-title-muted {
    color: var(--warning);
    font-weight: 500;
}

.mp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.mp-code {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: var(--info-bg);
    color: var(--primary-dark);
}

.mp-meta-dot {
    opacity: 0.5;
}

.mp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mp-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-full);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.mp-badge-success {
    background: var(--success-bg);
    border-color: #a7f3d0;
    color: #047857;
}

.mp-badge-warn {
    background: var(--warning-bg);
    border-color: #fde68a;
    color: #b45309;
}

.mp-badge-info {
    background: var(--info-bg);
    border-color: #b9e6fb;
    color: var(--primary-dark);
}

.mp-badge-muted {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

.mp-badge-shift {
    background: linear-gradient(135deg, #eaf8ff, #f0f9ff);
    border-color: #b9e6fb;
    color: var(--primary-dark);
}

.mp-quick-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.mp-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.35rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mp-quick-link:hover {
    background: var(--info-bg);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.mp-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(145deg, #f0f9ff, #fff);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.mp-quick-icon svg {
    width: 18px;
    height: 18px;
}

.mp-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.65rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    background: linear-gradient(180deg, #fafcff 0%, #fff 100%);
}

.mp-tabs::-webkit-scrollbar { display: none; }

.mp-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mp-tab-icon {
    display: flex;
    width: 16px;
    height: 16px;
    opacity: 0.75;
}

.mp-tab-icon svg {
    width: 16px;
    height: 16px;
}

.mp-tab:hover {
    color: var(--primary-dark);
    background: rgba(0, 168, 240, 0.08);
}

.mp-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 14px rgba(0, 73, 146, 0.28);
}

.mp-tab.is-active .mp-tab-icon {
    opacity: 1;
}

.mp-tab-count {
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #b45309;
    color: #fff;
    font-size: 0.625rem;
    line-height: 1.1rem;
    text-align: center;
}

.mp-tab.is-active .mp-tab-count {
    background: #fff;
    color: #b45309;
}

.mp-body {
    animation: fadeInUp 0.35s var(--ease-out) both;
}

.mp-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.mp-panel-flush {
    padding: 0;
    overflow: hidden;
    border: none;
    background: transparent;
    box-shadow: none;
}

.mp-panel-flush .attendance-summary-card {
    margin: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.mp-panel-title {
    margin-bottom: 1.15rem;
}

.mp-panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mp-panel-title h2 {
    font-size: 1.0625rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
    letter-spacing: -0.02em;
}

.mp-panel-title p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.mp-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.mp-field-grid-single {
    grid-template-columns: 1fr;
}

.mp-field-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fafcff 0%, #fff 100%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mp-field-card:hover {
    border-color: #c5e4f7;
    box-shadow: 0 4px 12px rgba(0, 73, 146, 0.06);
}

.mp-field-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--info-bg);
    color: var(--primary);
}

.mp-field-icon svg {
    width: 18px;
    height: 18px;
}

.mp-field-body {
    min-width: 0;
    flex: 1;
}

.mp-field-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.mp-field-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
    line-height: 1.4;
}

.mp-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.mp-shift-wrap {
    padding: 0.25rem 0;
}

.mp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.65rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.mp-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--info-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-empty-icon svg {
    width: 22px;
    height: 22px;
}

.mp-doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mp-doc-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: #fff;
    transition: border-color 0.15s ease;
}

.mp-doc-item:hover {
    border-color: #c5e4f7;
}

.mp-doc-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--info-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-doc-icon svg {
    width: 18px;
    height: 18px;
}

.mp-doc-body {
    flex: 1;
    min-width: 0;
}

.mp-doc-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.mp-doc-status {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.28rem 0.6rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mp-doc-status-success { background: var(--success-bg); color: #047857; }
.mp-doc-status-info { background: var(--info-bg); color: var(--primary-dark); }
.mp-doc-status-warn { background: var(--warning-bg); color: #b45309; }
.mp-doc-status-muted { background: #f1f5f9; color: #64748b; }

/* Photo modal */
body.mp-modal-open {
    overflow: hidden;
}

.mp-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mp-photo-modal[hidden] {
    display: none !important;
}

.mp-photo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 36, 56, 0.55);
    backdrop-filter: blur(4px);
}

.mp-photo-dialog {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 1.35rem;
    border: none;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s var(--ease-out) both;
}

.mp-photo-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mp-photo-dialog-head h2 {
    font-size: 1.0625rem;
    font-weight: 800;
    margin: 0 0 0.15rem;
}

.mp-photo-dialog-head p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.mp-photo-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.mp-photo-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.mp-photo-preview {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 3px solid var(--border);
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.mp-photo-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border);
    background: var(--bg);
    color: var(--primary-dark);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.mp-photo-upload-btn:hover {
    border-color: var(--primary);
    background: var(--info-bg);
}

.mp-photo-upload-btn input {
    display: none;
}

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

.mp-photo-actions .btn {
    flex: 1;
    min-width: 120px;
}

@media (max-width: 768px) {
    .mp-header-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.15rem 1rem 1rem;
    }
    .mp-identity { padding-top: 0; }
    .mp-meta { justify-content: center; }
    .mp-badges { justify-content: center; }
    .mp-quick-nav { grid-template-columns: repeat(2, 1fr); }
    .mp-field-grid,
    .mp-split { grid-template-columns: 1fr; }
    .mp-avatar { width: 92px; height: 92px; font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .mp-tab span:not(.mp-tab-icon):not(.mp-tab-count) { display: none; }
    .mp-tab { padding: 0.55rem 0.75rem; }
    .mp-tab.is-active span:not(.mp-tab-icon):not(.mp-tab-count) { display: inline; }
}

/* ---- Processed salary ---- */
.salary-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.salary-stat-chip {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.salary-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
}

.salary-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.salary-stat-pending .salary-stat-value { color: var(--warning, #d97706); }
.salary-stat-net .salary-stat-value { color: var(--primary); font-size: 1rem; }

.salary-filter-form .form-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.salary-process-form {
    flex-shrink: 0;
}

.salary-record-list {
    display: flex;
    flex-direction: column;
}

.salary-record-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.salary-record-row:last-child { border-bottom: none; }

.salary-record-row-mobile {
    flex-direction: column;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.salary-record-main {
    flex: 1;
    min-width: 0;
}

.salary-record-main strong {
    display: block;
    font-weight: 700;
}

.salary-record-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.salary-record-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.salary-net-pay {
    text-align: right;
    margin-right: 0.25rem;
}

.salary-net-label {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.salary-net-value {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--primary);
}

.salary-pending-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.salary-list-card { padding: 0; overflow: hidden; }

.salary-employee-page {
    max-width: 640px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .salary-stat-row { grid-template-columns: 1fr; }
    .page-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .page-header-row .btn-primary {
        width: 100%;
        justify-content: center;
    }
    body.app-layout .page-header-row {
        margin-bottom: 1rem;
    }
    body.app-layout .page-header-row .page-subtitle {
        margin-top: 0;
        line-height: 1.45;
    }
    .salary-process-form .btn { width: 100%; }
    .salary-record-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
    .salary-record-actions .btn { flex: 1; text-align: center; }
}

.auth-help-text {
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-muted);
    text-align: center;
}
.auth-remember-row {
    margin-bottom: 1.25rem;
}
.auth-remember-row .checkbox-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Simplified punch page */
.punch-page-simple .punch-shift-compact {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}
.punch-page-simple .punch-shift-compact .shift-schedule-compact {
    margin-top: 0.75rem;
}
.punch-break-window-banner {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}
.punch-break-window-banner.is-active {
    background: #fef3c7;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}
.punch-next-action {
    margin: 1rem auto 0;
    max-width: 32rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff 0%, #eaf8ff 100%);
    border: 1px solid #b9e6fb;
    text-align: left;
}
.punch-next-action-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #004992;
    margin-bottom: 0.25rem;
}
.punch-next-action p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #063a72;
}
.punch-primary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}
.punch-primary-actions .btn-break-start,
.punch-primary-actions .btn-break-end,
.punch-primary-actions .btn-punch {
    width: 100%;
}
.punch-secondary-action .btn-break-start {
    background: #fff7ed;
    color: #9a3412;
    border: 1.5px solid #fdba74;
    font-weight: 700;
    box-shadow: none;
}
.punch-secondary-action .btn-break-start:hover:not(:disabled) {
    background: #ffedd5;
    filter: none;
}
.punch-mode-ready .btn-punch-in,
.punch-mode-working .btn-punch-out,
.punch-mode-close_previous .btn-punch-out,
.punch-mode-out_only .btn-punch-out,
.punch-mode-break .btn-break-end {
    min-height: 64px;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}
.punch-out-hint {
    text-align: center;
    margin: -0.15rem 0 0;
}
.punch-log-details {
    padding: 0.85rem 1rem;
}
.punch-log-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}
.punch-log-details[open] summary {
    margin-bottom: 0.75rem;
}
@media (max-width: 640px) {
    .punch-next-action { max-width: none; }
}

/* ===================== Punch page v2 — compact two-column ===================== */
.punch-page-v2 { max-width: 1060px; margin: 0 auto; width: 100%; }

.punch-page-v2 .punch-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 880px) {
    .punch-page-v2 .punch-grid { grid-template-columns: 1fr; }
}

.punch-page-v2 .punch-col-action,
.punch-page-v2 .punch-col-context {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.punch-page-v2 .card {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

/* Hero */
.punch-page-v2 .punch-hero {
    text-align: center;
    padding: 1.75rem 1.5rem 1.85rem;
    background:
        radial-gradient(130% 130% at 50% -30%, rgba(0, 168, 240, 0.12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.punch-page-v2 .punch-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.punch-page-v2 .punch-status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
}
.punch-page-v2 .punch-status-in .punch-status-dot { animation: pulse-soft 1.6s ease-in-out infinite; }
.punch-page-v2 .punch-clock {
    font-size: clamp(2.6rem, 6vw, 3.4rem);
    line-height: 1.05;
    margin: 0.6rem 0 0;
    background: linear-gradient(120deg, #00a8f0 0%, #004992 60%, #00a8f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.punch-page-v2 .punch-since { margin: 0.55rem 0 0; }
.punch-page-v2 .break-timer-wrap { margin-top: 1rem; }
.punch-page-v2 .punch-working-hours { margin-top: 1.15rem; }

/* Next action — cleaner callout */
.punch-page-v2 .punch-next-action {
    margin: 0;
    max-width: none;
    padding: 0.9rem 1.05rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #eaf8ff 0%, #f5faff 100%);
    border: 1px solid #b9e6fb;
    box-shadow: var(--shadow-sm);
}

/* GPS card with icon head */
.punch-page-v2 .punch-gps-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.punch-page-v2 .punch-gps-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: #eaf8ff;
    color: var(--primary);
}
.punch-page-v2 .punch-gps-icon svg { width: 22px; height: 22px; }
.punch-page-v2 .punch-gps-head .section-title { margin: 0; }
.punch-page-v2 .punch-gps-hint { margin: 0.15rem 0 0; }
.punch-page-v2 .punch-gps-status:empty { display: none; }
.punch-page-v2 .punch-gps-status {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    background: #eaf8ff;
    color: var(--primary);
}

/* Primary action buttons */
.punch-page-v2 .punch-primary-actions { margin: 0; }
.punch-page-v2 .punch-working-hours-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.punch-page-v2 .btn-punch {
    min-height: 92px;
    flex-direction: row;
    gap: 0.65rem;
    font-size: 1.05rem;
    border-radius: var(--radius);
    letter-spacing: 0.01em;
    transition: transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out), filter 0.2s;
}
.punch-page-v2 .btn-punch svg { width: 26px; height: 26px; }
.punch-page-v2 .btn-punch:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.03); }
.punch-page-v2 .btn-break-start,
.punch-page-v2 .btn-break-end { border-radius: var(--radius); }

/* Shift card */
.punch-page-v2 .punch-shift-compact { padding: 1.15rem 1.25rem; margin: 0; }

/* Today's punches — timeline */
.punch-page-v2 .punch-log-card-v2 { padding: 1.15rem 1.25rem; }
.punch-log-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.punch-log-count {
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}
.punch-log-empty { margin: 0; }
.punch-log-timeline {
    gap: 0;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 0.15rem;
}
.punch-log-timeline .punch-log-item {
    position: relative;
    background: transparent;
    padding: 0.55rem 0 0.55rem 0.35rem;
    border-radius: 0;
    align-items: flex-start;
}
.punch-log-timeline .punch-log-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 31px;
    top: 2.1rem;
    bottom: -0.35rem;
    width: 2px;
    background: var(--border);
}
.punch-log-timeline .punch-log-type {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.punch-log-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.punch-log-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.1rem; }
.punch-log-timeline .punch-address-inline { display: block; margin-top: 0.15rem; line-height: 1.35; }

@media (prefers-reduced-motion: reduce) {
    .punch-page-v2 .punch-status-in .punch-status-dot,
    .punch-page-v2 .btn-punch { animation: none; transition: none; }
    .punch-page-v2 .btn-punch:hover:not(:disabled) { transform: none; }
}

.punch-demo-steps {
    margin: 0.85rem 0 1.15rem;
    padding-left: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-muted, #64748b);
}
.punch-demo-steps strong { color: var(--text, #0f172a); }
.punch-demo-reset-wrap { margin: 0.25rem 0 0; text-align: center; }
.punch-demo-page #demoActions { display: flex; flex-direction: column; gap: 0.65rem; }


.hr-status-badge.status-pending { background: var(--warning-bg); color: #92400e; border-color: #fde68a; }
.hr-status-badge.status-approved { background: var(--success-bg); color: var(--success); border-color: #a7f3d0; }
.hr-status-badge.status-rejected,
.hr-status-badge.status-cancelled { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }

.geo-pill.geo-missed-punch {
    background: #ede9fe;
    color: #5b21b6;
}
.geo-pill.geo-home {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.geo-pill.geo-office {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.geo-pill.geo-overtime {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

/* Employee self-serve home location */
.home-loc-notice {
    margin-bottom: 1.25rem;
}
.home-loc-notice-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    box-shadow: var(--shadow-sm);
}
.home-loc-notice-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(146, 64, 14, 0.1);
    color: #b45309;
}
.home-loc-notice-body {
    flex: 1;
    min-width: 0;
}
.home-loc-notice-body strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}
.home-loc-notice-body p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #78350f;
}
.home-loc-notice-cta {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .home-loc-notice-inner {
        flex-direction: column;
    }
    .home-loc-notice-cta {
        width: 100%;
        text-align: center;
    }
}

.home-loc-card {
    padding: 0;
    overflow: hidden;
}
.home-loc-banner {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #eaf8ff 55%, #f8fafc 100%);
    border-bottom: 1px solid var(--border);
}
.home-loc-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #3730a3;
    border: 1px solid #b9e6fb;
}
.home-loc-banner-body h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
}
.home-loc-banner-body p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.home-loc-form {
    padding: 1.25rem 1.5rem 1.5rem;
}
.home-loc-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px dashed var(--border);
}
.home-loc-actions .btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}
.home-loc-note {
    margin: 1rem 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.875rem;
    line-height: 1.45;
}
@media (max-width: 640px) {
    .home-loc-banner {
        flex-direction: column;
        padding: 1rem;
    }
    .home-loc-form {
        padding: 1rem;
    }
    .home-loc-actions .btn-lg {
        width: 100%;
        justify-content: center;
    }
}

.settings-readonly-box {
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border-light);
}

.settings-divider-top {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.settings-office-card .form-actions {
    margin-top: 0.5rem;
}

/* Notification feed (full page) */
.notif-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notif-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 1.125rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.notif-card:hover {
    border-color: #b9e6fb;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.notif-card-unread {
    border-color: #b9e6fb;
    background: linear-gradient(90deg, #fafbff 0%, #fff 28%);
}

.notif-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-card-icon svg { width: 22px; height: 22px; }

.notif-card-body { min-width: 0; }

.notif-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.notif-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.35;
}

.notif-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0, 168, 240, 0.15);
}

.notif-card-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.375rem;
    line-height: 1.5;
}

.notif-card-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.notif-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.notif-card-action svg { width: 16px; height: 16px; }

.notif-card-action:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateX(2px);
}

.empty-state-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    background: var(--info-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg { width: 32px; height: 32px; }

.empty-state-card h2 {
    font-size: 1.125rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.empty-state-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 28rem;
    margin-inline: auto;
}

@media (max-width: 640px) {
    .notif-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .notif-card-action {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }
}

.notif-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.notif-item .notif-dropdown-icon { flex-shrink: 0; }
.notif-item:last-child { border-bottom: none; }
.notif-unread { background: #f8fafc; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }

.inline-form-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.punch-overtime-card textarea { min-height: 5rem; }

/* Header notification bell */
.notif-bell-wrap {
    position: relative;
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .notif-bell-wrap {
        margin-left: 0;
        margin-right: 0;
    }
}

.notif-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.notif-bell-btn:hover,
.notif-bell-btn[aria-expanded="true"] {
    background: var(--info-bg);
    color: var(--primary);
    border-color: #b9e6fb;
}

.notif-bell-btn svg {
    width: 20px;
    height: 20px;
}

.notif-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    max-height: min(70vh, 480px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    z-index: 300;
}

.notif-dropdown[hidden] { display: none !important; }

.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.notif-dropdown-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--info-bg);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
}

.notif-dropdown-empty {
    padding: 1.25rem 1rem;
    text-align: center;
}

.notif-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.notif-dropdown-item { border-bottom: 1px solid var(--border-light); }
.notif-dropdown-item:last-child { border-bottom: none; }

.notif-dropdown-link {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.notif-dropdown-link:hover { background: #f8fafc; }

.notif-dropdown-unread .notif-dropdown-link {
    background: #f8fafc;
}

.notif-dropdown-unread .notif-dropdown-title {
    font-weight: 700;
}

.notif-dropdown-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--info-bg);
    color: var(--primary);
}

.notif-dropdown-icon svg { width: 18px; height: 18px; }

.notif-icon-overtime { background: #fef3c7; color: #b45309; }
.notif-icon-leave { background: #dbeafe; color: #1d4ed8; }
.notif-icon-onboarding { background: #ede9fe; color: #6d28d9; }
.notif-icon-punch { background: #fee2e2; color: #b91c1c; }
.notif-icon-ctc { background: #d1fae5; color: #047857; }
.notif-icon-birthday { background: #fce7f3; color: #be185d; }
.notif-icon-anniversary { background: #eaf8ff; color: #004992; }
.notif-icon-probation { background: #ffedd5; color: #c2410c; }

.notif-dropdown-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.notif-dropdown-title {
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--text);
}

.notif-dropdown-body {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.notif-dropdown-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.notif-dropdown-foot {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.notif-dropdown-foot a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.notif-dropdown-foot a:hover { text-decoration: underline; }

.notif-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.notif-backdrop.is-visible {
    display: block;
}

/* ---- Mobile layout polish ---- */
@media (max-width: 639px) {
    .app-topbar {
        padding: 0.65rem 0.875rem;
        padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
        gap: 0.625rem;
        min-height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    }

    .topbar-actions {
        gap: 0.5rem;
        padding-left: 0.5rem;
    }

    .topbar-user .user-avatar {
        width: 36px;
        height: 36px;
    }

    .app-main {
        padding: 1rem 0.875rem;
    }

    body.app-layout.has-bottom-nav .app-main {
        padding-bottom: calc(1.75rem + var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    }

    body.app-layout .page-header {
        margin-bottom: 0.875rem;
    }

    .stat-grid {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 1rem 1.125rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .card {
        padding: 1rem 1.125rem;
    }

    .attendance-summary-card .profile-panel-head,
    .profile-panel-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .attendance-hours-block,
    .attendance-paid-block,
    .attendance-days-block {
        padding: 0.875rem 1rem;
    }

    .attendance-summary-card {
        padding: 1rem;
    }

    .attendance-hours-head,
    .attendance-paid-head {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .attendance-hours-note {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .bottom-nav {
        z-index: 250;
        padding: 0.4rem 0.35rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
    }

    .bottom-nav-item {
        padding: 0.4rem 0.25rem;
        font-size: 0.625rem;
        gap: 0.2rem;
    }

    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
    }

    /* Keep notification panel fully on-screen */
    .notif-bell-wrap {
        position: static;
    }

    .notif-dropdown {
        position: fixed;
        top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 0.35rem);
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-width: none;
        max-height: min(65vh, calc(100dvh - var(--topbar-h) - var(--bottom-nav-h) - 2rem));
        z-index: 320;
        border-radius: 14px;
    }

    .notif-dropdown-empty {
        padding: 1.125rem 1rem;
    }

    .notif-dropdown-empty p {
        margin: 0 0 0.35rem;
        word-break: break-word;
    }

    .notif-dropdown-empty .text-sm {
        display: block;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.45;
    }

    .punch-page-v2 .punch-hero {
        padding: 1.15rem 1rem;
    }

    .punch-page-v2 .punch-clock {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

    .punch-page-v2 .btn-punch {
        min-height: 56px;
        font-size: 1rem;
    }

    .punch-page-v2 .punch-primary-actions .btn-break-start,
    .punch-page-v2 .punch-primary-actions .btn-break-end,
    .punch-page-v2 .punch-primary-actions .btn-punch {
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .header-inner {
        gap: 0.75rem;
    }
}

/* ---- SweetAlert2 — HRMS theme ---- */
.hrms-swal-popup {
    font-family: var(--font) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.75rem 1.5rem 1.35rem !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
}

.hrms-swal-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--text) !important;
}

.hrms-swal-text {
    font-size: 0.875rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.55 !important;
}

.hrms-swal-icon {
    margin: 0.5rem auto 1rem !important;
    border-width: 3px !important;
}

.hrms-swal-icon.swal2-warning {
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.hrms-swal-icon.swal2-success {
    border-color: var(--success) !important;
}

.hrms-swal-icon.swal2-success [class^='swal2-success-line'] {
    background-color: var(--success) !important;
}

.hrms-swal-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.35) !important;
}

.hrms-swal-actions {
    gap: 0.65rem !important;
    margin-top: 1.35rem !important;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.hrms-swal-btn {
    min-width: 9rem;
    margin: 0 !important;
}

.btn-cancel-request {
    color: var(--danger);
    border-color: #fecaca;
}

.btn-cancel-request:hover {
    background: var(--danger-bg);
    color: #b91c1c;
    border-color: #fca5a5;
}

.swal2-container {
    z-index: 3000 !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Work Planner — card UI + Framer-like motion */
@keyframes wpRise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes wpPop {
    0% { transform: scale(0.92); opacity: 0; }
    70% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}

.wp-shell {
    --wp-accent: #0f766e;
    --wp-accent-soft: #ccfbf1;
    --wp-ink: #0f172a;
    --wp-muted: #64748b;
    --wp-card: #ffffff;
    --wp-line: rgba(15, 23, 42, 0.08);
    --wp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.wp-shell-form {
    max-width: 520px;
}

.wp-reveal {
    opacity: 0;
    animation: wpRise 0.55s var(--wp-ease) forwards;
}

.wp-delay-1 { animation-delay: 0.05s; }
.wp-delay-2 { animation-delay: 0.1s; }
.wp-delay-3 { animation-delay: 0.15s; }
.wp-delay-4 { animation-delay: 0.2s; }
.wp-delay-5 { animation-delay: 0.25s; }
.wp-delay-6 { animation-delay: 0.3s; }
.wp-delay-7 { animation-delay: 0.35s; }

.wp-card.wp-reveal {
    animation-delay: calc(var(--wp-i, 1) * 0.05s);
}

.wp-hero,
.wp-form-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.4rem;
    border-radius: 1.25rem;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(15, 118, 110, 0.14), transparent 55%),
        linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid var(--wp-line);
}

.wp-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp-accent);
}

.wp-hero h1,
.wp-form-hero h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    letter-spacing: -0.03em;
    color: var(--wp-ink);
}

.wp-hero-sub {
    margin: 0.4rem 0 0;
    color: var(--wp-muted);
    max-width: 36rem;
    line-height: 1.45;
}

.wp-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    background: var(--wp-ink);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s var(--wp-ease), box-shadow 0.25s var(--wp-ease);
}

.wp-cta:hover {
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.wp-cta-icon {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.05rem;
    line-height: 1;
}

.wp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0.65rem;
    color: var(--wp-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.wp-back:hover { color: var(--wp-ink); }

.wp-toolbar,
.wp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.05rem;
    border-radius: 1rem;
    background: var(--wp-card);
    border: 1px solid var(--wp-line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.wp-month-form {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 180px;
}

.wp-month-form label,
.wp-filters label {
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--wp-muted);
}

.wp-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-left: auto;
}

.wp-stat-pills-hero { margin-left: 0; }

.wp-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 650;
    background: #f1f5f9;
    color: #334155;
}

.wp-pill-pending { background: #fff7ed; color: #c2410c; }
.wp-pill-checked { background: #ecfdf5; color: #047857; }

.wp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.wp-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0;
    min-height: 160px;
    border-radius: 1.15rem;
    overflow: hidden;
    background: var(--wp-card);
    border: 1px solid var(--wp-line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s var(--wp-ease), box-shadow 0.3s var(--wp-ease);
}

.wp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.wp-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 1rem 0.5rem;
    background: linear-gradient(180deg, #0f766e 0%, #134e4a 100%);
    color: #fff;
}

.wp-day {
    font-size: 1.55rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.03em;
}

.wp-mon,
.wp-dow {
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.wp-card-body {
    padding: 1rem 1.05rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wp-card-top,
.wp-emp-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.wp-card-title {
    margin: 0;
    flex: 1;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--wp-ink);
    line-height: 1.3;
}

.wp-badge {
    flex-shrink: 0;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wp-badge-ok { background: #d1fae5; color: #047857; }
.wp-badge-wait { background: #ffedd5; color: #c2410c; }

.wp-qty {
    margin: 0;
    font-weight: 650;
    color: var(--wp-accent);
    font-size: 0.9rem;
}

.wp-desc {
    margin: 0;
    color: var(--wp-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.wp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.wp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--wp-line);
    font-size: 0.75rem;
    color: #475569;
}

.wp-files {
    list-style: none;
    margin: 0.15rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.wp-files a {
    font-size: 0.8rem;
    color: #1d4ed8;
}

.wp-card-actions {
    margin-top: auto;
    padding-top: 0.55rem;
    display: flex;
    justify-content: flex-end;
}

.wp-avatar {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: var(--wp-accent-soft);
    color: var(--wp-accent);
    font-size: 0.75rem;
    font-weight: 750;
    flex-shrink: 0;
}

.wp-emp-row { margin-bottom: 0.25rem; }
.wp-emp-row .wp-badge { margin-left: auto; }

.wp-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 1.25rem;
    background: var(--wp-card);
    border: 1px dashed rgba(15, 23, 42, 0.15);
}

.wp-empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.85rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    background: var(--wp-accent-soft);
    color: var(--wp-accent);
    animation: wpPop 0.55s var(--wp-ease) both;
}

.wp-empty-icon svg { width: 1.6rem; height: 1.6rem; }
.wp-empty h2 { margin: 0 0 0.35rem; letter-spacing: -0.02em; }
.wp-empty p { margin: 0 0 1rem; color: var(--wp-muted); }

.wp-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wp-field-card {
    padding: 0.95rem 1.05rem;
    border-radius: 1rem;
    background: var(--wp-card);
    border: 1px solid var(--wp-line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s var(--wp-ease), box-shadow 0.25s var(--wp-ease);
}

.wp-field-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 118, 110, 0.35);
}

.wp-field-card > label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: #334155;
}

.wp-optional {
    font-weight: 500;
    color: var(--wp-muted);
    font-size: 0.75rem;
}

.wp-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 650;
    font-size: 0.82rem;
    cursor: pointer;
}

.work-attach-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 650;
}

.work-attach-list {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
}

.work-location-toggle {
    background: none;
    border: 0;
    padding: 0;
    color: #1d4ed8;
    font-weight: 650;
    cursor: pointer;
}

.work-location-fields {
    margin-top: 0.35rem;
    animation: wpRise 0.35s var(--wp-ease) both;
}

.wp-form-footer {
    position: sticky;
    bottom: 0.75rem;
    padding-top: 0.35rem;
    z-index: 5;
}

.wp-save-btn {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    transition: background 0.25s var(--wp-ease), color 0.25s var(--wp-ease), transform 0.25s var(--wp-ease), box-shadow 0.25s var(--wp-ease);
}

.wp-save-btn.is-ready {
    background: var(--wp-ink);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

.wp-save-btn.is-ready:hover {
    transform: translateY(-2px);
}

.wp-filters .form-group {
    min-width: 140px;
    flex: 1;
    margin: 0;
}

@media (max-width: 640px) {
    .wp-card {
        grid-template-columns: 64px 1fr;
    }
    .wp-hero,
    .wp-form-hero {
        padding: 1.1rem;
    }
    .wp-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-reveal,
    .wp-empty-icon,
    .work-location-fields {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
    .wp-card:hover,
    .wp-cta:hover,
    .wp-field-card:focus-within,
    .wp-save-btn.is-ready:hover {
        transform: none !important;
    }
}
