/* ==========================================
   KASA CREW — Design System
   Clean minimal, mobile-first 
   ========================================== */

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Explicitly strip Android focus outlines and tap highlights from iteractive elements */
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

:root {
    --blue-deep: #1974d2;
    --blue-mid: #1974d2;
    --blue-light: #2471a3;
    --blue-faint: rgba(25, 116, 210, 0.06);
    --cream: #f5f0e8;
    --cream-light: #faf6ef;
    --gold: #f2d06b;
    --gold-light: #faedb5;
    --white: #ffffff;
    --bg: #f3f3f3;
    --text-dark: #000000;
    --text-muted: #6b7280;
    --text-faint: #9ca3af;
    --success: #16a34a;
    --success-light: rgba(22, 163, 74, 0.1);
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    background: #ffffff;
    overscroll-behavior: none;
    height: 100vh;
}

body {
    font-family: var(--font);
    background: #ffffff;
    overflow: hidden;
    height: 100vh;
    /* Fallback */
    height: var(--app-height, 100vh);
    /* Android JS controlled */
    width: 100%;
    position: fixed;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    margin: 0;
}

.hidden {
    display: none !important;
}

/* --- App Container --- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* No background here — body white shows through for Android bottom nav detection */
}

/* --- Page System --- */
.page {
    display: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--bg);
}

.page.page-white {
    background: #ffffff;
}

/* --- Page Transitions: only the content area slides, nav stays static --- */
/* .page-content-clip is a wrapper around .dash-scroll that provides clipping */
.page-content-clip {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}


.page-content-clip .pg-anim-target.pg-slide-in-right,
.page-content-clip .pg-anim-target.pg-slide-out-left,
.page-content-clip .pg-anim-target.pg-slide-in-left,
.page-content-clip .pg-anim-target.pg-slide-out-right {
    will-change: transform, opacity;
}

.page-content-clip .pg-anim-target.pg-slide-in-right {
    animation: slideInRight 0.34s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.page-content-clip .pg-anim-target.pg-slide-out-left {
    animation: slideOutLeft 0.34s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    /* Absolute so it doesn't collapse the layout while flying out */
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow-y: hidden;
    pointer-events: none;
}

.page-content-clip .pg-anim-target.pg-slide-in-left {
    animation: slideInLeft 0.34s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.page-content-clip .pg-anim-target.pg-slide-out-right {
    animation: slideOutRight 0.34s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow-y: hidden;
    pointer-events: none;
}

@keyframes slideInRight {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(0);    }
}

@keyframes slideOutLeft {
    0%   { transform: translateX(0);    opacity: 1; }
    100% { transform: translateX(-28%); opacity: 0.5; }
}

@keyframes slideInLeft {
    0%   { transform: translateX(-28%); opacity: 0.5; }
    100% { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
    0%   { transform: translateX(0);    }
    100% { transform: translateX(100%); }
}

@supports (-webkit-touch-callout: none) {

    /* iOS Safari PWA needs explicit dvh to punch through safe areas */
    body {
        height: 100dvh;
    }

    .app-container {
        height: 100dvh;
    }
}

.page.active {
    display: flex;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   LANDING PAGE
   ========================================== */
.landing-bg {
    width: 100%;
    min-height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    position: relative;
}

.landing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: calc(var(--safe-top) + 20px) 24px calc(var(--safe-bottom) + 20px);
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.landing-logo-wrap {
    text-align: center;
    margin-top: auto;
    margin-bottom: 8vh;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.landing-logo {
    width: 200px;
    height: auto;
}

/* Hero */
.landing-hero {
    margin-top: 12px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.landing-hero-icon {
    width: 56px;
    height: 56px;
    color: var(--text-dark);
    margin-bottom: 0px;
    opacity: 0.8;
}

.landing-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.landing-subtitle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0px;
}

.landing-subtitle-text {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.landing-login-link {
    font-size: 14px;
    color: var(--blue-mid);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.landing-login-link:active {
    opacity: 0.6;
}

/* Action Cards */
.landing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.landing-card {
    border-radius: 24px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
}

.landing-card:active {
    transform: scale(0.96);
}

/* Hiring card */
.hiring-card {
    background: var(--white);
    /* Stronger lift/shadow than the profile card */
    box-shadow: 0 12px 36px rgba(25, 116, 210, 0.3);
}

.hiring-card .card-icon-area {
    color: var(--blue-deep);
}

.hiring-card .card-small-label {
    color: var(--blue-mid);
}

.hiring-card .card-bold-title {
    color: var(--text-dark);
}

/* Profile card – white */
.profile-card {
    background: var(--white);
}

.profile-card .card-icon-area {
    color: var(--text-dark);
    opacity: 0.6;
}

.profile-card .card-small-label {
    color: var(--text-muted);
}

.profile-card .card-bold-title {
    color: var(--text-dark);
}

/* Card shared inner layout */
.card-icon-area {
    margin-bottom: auto;
}

.card-text-area {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.card-small-label {
    font-size: 13px;
    font-weight: 500;
}

.card-bold-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* Back FAB */
.back-fab {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 24px);
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a1a1a;
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.15s, background 0.15s;
}

.back-fab:active {
    transform: scale(0.9);
    background: #333;
}

.desktop-logout-btn {
    display: none;
}

/* ==========================================
   FORM PAGES (Login, Register, FaceID)
   ========================================== */
.form-page-bg {
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.form-page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: calc(var(--safe-top) + 48px) 24px calc(env(safe-area-inset-bottom, 0px) + 80px);
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}

.faceid-content {
    padding-bottom: calc(var(--safe-bottom) + 100px);
}

/* Header */
.form-page-header {
    margin-bottom: 36px;
    animation: fadeInUp 0.5s ease-out;
}

.form-icon-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.download-inline {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
}

.download-inline:active {
    opacity: 0.5;
}

.form-icon-circle {
    width: 56px;
    height: 56px;
    color: var(--text-dark);
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.form-page-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.form-subtitle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.form-subtitle-row a {
    color: var(--blue-mid);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.form-subtitle-row a:active {
    opacity: 0.6;
}

/* ==========================================
   FORM FIELDS
   ========================================== */
.register-form-area,
.login-form-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeInUp 0.5s ease-out 0.15s both;
}

.login-form-area {
    align-items: center;
    gap: 4px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.field-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.field-input:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(36, 113, 163, 0.12);
}

.field-input.valid {
    border-color: var(--success);
    box-shadow: 0 0 0 3px var(--success-light);
}

.field-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-light);
}

.field-input::placeholder {
    color: var(--text-faint);
    font-weight: 400;
}

.field-note {
    font-size: 12px;
    color: var(--text-faint);
    font-style: italic;
}

.field-error {
    font-size: 12px;
    color: var(--danger);
    font-weight: 500;
    background: var(--danger-light);
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
}

.field-success {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

/* ======= Portfolio Upload Zone ======= */
.upload-zone {
    border: 2px dashed #d0d5dd;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--blue-mid);
    background: rgba(36, 113, 163, 0.04);
}

.upload-zone.drag-over {
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(36, 113, 163, 0.1);
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    text-align: center;
}

.upload-zone-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(36, 113, 163, 0.08), rgba(36, 113, 163, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-mid);
    margin-bottom: 4px;
}

.upload-zone-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.upload-zone-hint {
    font-size: 12px;
    color: var(--text-faint);
    margin: 0;
    line-height: 1.4;
    max-width: 240px;
}

.upload-zone-types {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.upload-type-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-faint);
    background: rgba(0, 0, 0, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
}

.upload-zone-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(22, 163, 74, 0.06);
    border-top: 1px solid rgba(22, 163, 74, 0.12);
}

.upload-preview-file {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
    min-width: 0;
}

.upload-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-preview-remove {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.upload-preview-remove:hover {
    background: rgba(220, 38, 38, 0.15);
}

/* Phone Input Row */
.phone-input-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.phone-prefix {
    font-size: 15px;
    font-weight: 700;
    color: var(--blue-deep);
    background: #e8e8e8;
    padding: 14px 14px;
    border: 1.5px solid #e0e0e0;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    white-space: nowrap;
}

.phone-field {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* ==========================================
   LOGIN CODE DOTS
   ========================================== */
.login-code-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 16px 0 8px;
}

.code-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #c5c5c5;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.code-dot.filled {
    background: var(--text-dark);
    border-color: var(--text-dark);
    transform: scale(1.2);
}

.code-dot.error {
    background: var(--danger);
    border-color: var(--danger);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

/* ==========================================
   DIGIT PAD
   ========================================== */
.digit-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 270px;
    margin: 12px auto 0;
    padding: 4px;
}

.digit-pad.compact {
    max-width: 250px;
    gap: 10px;
}

.dpad-btn {
    width: 72px;
    height: 72px;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background 0.12s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
}

.digit-pad.compact .dpad-btn {
    width: 64px;
    height: 64px;
    font-size: 22px;
}

.dpad-btn:active {
    transform: scale(0.9);
    background: #e0e0e0;
}

.dpad-btn.action {
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

.dpad-btn.action:active {
    background: rgba(0, 0, 0, 0.04);
}

.login-hint {
    text-align: center;
    font-size: 13px;
    color: var(--danger);
    font-weight: 500;
    min-height: 20px;
    margin-top: 4px;
}


/* ==========================================
   PRIMARY BUTTON
   ========================================== */
.btn-primary-full {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    color: var(--white);
    background: #000000;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary-full:active {
    transform: scale(0.98);
    background: #222;
}

.btn-primary-full:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #b0b0b0;
}

.btn-complete {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    color: var(--white);
    background: var(--success);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.1s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
    margin-top: 16px;
}

.btn-complete:active {
    transform: scale(0.98);
}

.btn-complete:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================
   FACE ID PAGE
   ========================================== */
.faceid-welcome {
    text-align: center;
    margin-bottom: 16px;
    animation: fadeInUp 0.4s ease-out 0.2s both;
}

.faceid-welcome-text {
    font-size: 18px;
    color: var(--text-dark);
}

.faceid-welcome-text strong {
    color: var(--blue-mid);
}

.faceid-camera-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.camera-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #000;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

#faceid-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.camera-overlay-ring {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid var(--blue-mid);
    border-radius: 50%;
    pointer-events: none;
    transition: border-color 0.3s;
}

.camera-overlay-ring.success {
    border-color: var(--success);
}

.camera-overlay-ring.error {
    border-color: var(--danger);
}

.camera-default-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    color: var(--blue-deep);
    opacity: 0.5;
}

/* Enroll Progress Dots */
.enroll-progress-dots {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
}

.prog-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s;
}

.prog-dot.filled {
    background: var(--success);
    transform: scale(1.15);
}

.faceid-msg {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    min-height: 36px;
    line-height: 1.4;
    transition: color 0.2s;
}

/* Login Code Setup (on face ID page) */
.login-code-setup {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    animation: fadeInUp 0.4s ease-out;
}

.setup-dots {
    margin: 12px 0 8px;
}

/* ==========================================
   APPLY SUCCESS PAGE
   ========================================== */
.apply-success-wrap {
    text-align: center;
    padding: 40px 28px;
    max-width: 380px;
    animation: fadeInUp 0.6s ease-out;
}

.apply-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.apply-success-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.apply-success-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-deep);
    margin-bottom: 12px;
}

.apply-success-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.apply-success-info {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.apply-success-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.apply-success-row svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ==========================================
   SUCCESS PAGE
   ========================================== */
.success-bg {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(170deg, #1974d2 0%, #145c99 40%, #0f406b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-content {
    text-align: center;
    padding: 40px 32px;
    max-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.success-check {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    margin: 0 auto 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.3);
    }

    50% {
        box-shadow: 0 0 0 16px rgba(74, 222, 128, 0);
    }
}

.success-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--cream);
    margin-bottom: 12px;
}

.success-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* ==========================================
   TOAST
   ========================================== */
.toast-container {
    position: fixed;
    top: calc(var(--safe-top) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--text-dark);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
    white-space: nowrap;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   APPLY PAGE
   ========================================== */
.apply-hiring-banner {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

@media (min-width: 601px) {
    .apply-hiring-banner {
        border-color: rgba(25, 116, 210, 0.3);
    }
}

.apply-banner-icon {
    width: 38px;
    height: 38px;
    background: rgba(25, 116, 210, 0.08);
    /* faint blue */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-mid);
    flex-shrink: 0;
}

.apply-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apply-banner-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-mid);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.apply-banner-role {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Section labels & dividers */
.form-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    margin-top: 4px;
}

.form-section-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 4px 0 0;
}

/* Side-by-side field row */
.field-row {
    display: flex;
    gap: 12px;
}

.field-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    font-family: var(--font);
}

select.field-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* ==========================================
   EMPLOYEE DASHBOARD
   ========================================== */
.dash-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    overflow: hidden;
    /* Shell doesn't scroll — only .dash-scroll inside */
}

.dash-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: calc(var(--safe-top) + 32px) 20px 20px;
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}

/* Dash Header */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.dash-greeting {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.dash-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.dash-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--blue-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-mid);
    cursor: pointer;
    transition: transform 0.15s;
    overflow: hidden;
}

.dash-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-avatar:active {
    transform: scale(0.92);
}

/* Dash Cards */
.dash-card {
    background: var(--white);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 14px;
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.dash-card-chevron {
    margin-left: auto;
    color: var(--text-faint);
}

.dash-card--schedule {
    cursor: pointer;
    transition: transform 0.15s;
}

.dash-card--schedule:active {
    transform: scale(0.98);
}

/* Schedule body */

.dash-schedule-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.dash-schedule-shift {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Row for half cards */
.dash-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dash-card--half {
    margin-bottom: 14px;
}

/* Attendance body */
.dash-att-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-att-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
}

.dash-att-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

/* Daily hours body */
.dash-hours-body {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.dash-hours-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dash-hours-unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-faint);
}

/* Announcements — Compose Bar */
.admin-announce-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.admin-announce-compose .field-input {
    flex: 1;
    min-width: 0;
    min-height: unset;
    height: auto;
    font-family: var(--font);
}

#admin-announce-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.1s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

#admin-announce-btn:active {
    transform: scale(0.9);
}

#admin-announce-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Announcements — List */
.dash-announce-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Hide scrollbar for announcements to keep it clean but scrollable */
.dash-announce-list::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.dash-announce-empty {
    font-size: 14px;
    color: var(--text-faint);
    font-style: italic;
}

/* Announcements — Item */
.dash-announce-item {
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 12px;
}

.dash-announce-item p.announce-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

.dash-announce-item .announce-meta {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-announce-item .announce-actions {
    display: flex;
    gap: 2px;
}

.dash-announce-item .announce-action-btn {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.dash-announce-item .announce-action-btn:active {
    transform: scale(0.9);
}

.dash-announce-item .announce-action-btn.edit-btn {
    color: var(--text-faint);
}

.dash-announce-item .announce-action-btn.edit-btn:hover {
    color: var(--blue-mid);
    background: rgba(25, 116, 210, 0.06);
}

.dash-announce-item .announce-action-btn.delete-btn {
    color: var(--text-faint);
}

.dash-announce-item .announce-action-btn.delete-btn:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
}

/* Announcements — Edit Mode */
.announce-edit-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.announce-edit-wrap .field-input {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.announce-edit-actions {
    display: flex;
    gap: 6px;
}

.announce-edit-save {
    padding: 7px 18px;
    border: none;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.announce-edit-save:active {
    transform: scale(0.96);
}

.announce-edit-save:disabled {
    opacity: 0.3;
}

.announce-edit-cancel {
    padding: 7px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: none;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.announce-edit-cancel:active {
    border-color: #ccc;
}

/* Today's Schedule card */
.admin-schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 10px;
}

.admin-schedule-row .emp-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.admin-schedule-row .emp-shift {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-faint);
}

.admin-schedule-row .emp-shift.has-shift {
    color: var(--blue-mid);
    font-weight: 600;
}

/* Schedule Editor — Week Nav */
.sched-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    background: var(--white);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sched-nav-btn:active {
    transform: scale(0.92);
    background: var(--bg);
}

/* Schedule Editor — Shift Row */
.admin-shift-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
}

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

.admin-shift-row .shift-day-label {
    min-width: 80px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.admin-shift-row .shift-day-label.is-today {
    color: var(--blue-mid);
    font-weight: 700;
}

.admin-shift-row .field-input {
    flex: 1;
    padding: 8px 6px;
    font-size: 13px;
    height: auto;
    min-height: unset;
    text-align: center;
}

.admin-shift-row .shift-separator {
    font-size: 12px;
    color: var(--text-faint);
    flex-shrink: 0;
}

/* Repeat button */
#admin-schedule-repeat-btn:active {
    border-color: #bbb;
    background: var(--bg);
}

/* ==========================================
   BOTTOM NAVIGATION BAR
   ========================================== */
.bottom-nav {
    display: flex;
    background: var(--white);
    border-top: none;
    padding-bottom: 0;
    height: 68px;
    flex-shrink: 0;
    z-index: 50;
    align-items: center;
    justify-content: space-around;
}

@supports (-webkit-touch-callout: none) {
    .bottom-nav {
        height: 80px;
        padding-bottom: 12px;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
    background: rgba(25, 116, 210, 0.08);
    color: var(--blue-deep);
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item-dot {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue-mid);
    display: none;
}

/* ==========================================
   SUB PAGES (Schedule, Attendance)
   ========================================== */
.sub-page-header {
    margin-bottom: 32px;
    padding-top: 8px;
}

.sub-page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.sub-page-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Schedule list */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-empty,
.att-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 20px;
    gap: 12px;
}

.schedule-empty p,
.att-empty p {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
}

.schedule-empty span,
.att-empty span {
    font-size: 13px;
    color: var(--text-faint);
}



/* Attendance list */
.att-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.att-day-card {
    background: var(--white);
    border-radius: 20px;
    padding: 14px 18px;
}

.att-day-date {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.att-day-entries {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.att-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.att-entry-type {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    width: 32px;
}

.att-entry-time {
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   PROFILE PAGE
   ========================================== */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.profile-avatar-wrap {
    position: relative;
    cursor: pointer;
}

.profile-avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--blue-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-mid);
    overflow: hidden;
}

.profile-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-edit {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.profile-hero-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.profile-hero-role {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Profile menu sections */
.profile-section {
    background: var(--white);
    border-radius: 20px;
    margin-bottom: 12px;
    overflow: hidden;
}

.profile-menu-divider {
    height: 1px;
    background: var(--bg);
    margin: 0 18px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.profile-menu-item:active {
    background: rgba(0, 0, 0, 0.02);
}

.profile-menu-item span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
}

.profile-menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.profile-menu-chevron {
    color: var(--text-faint);
}

.profile-menu-item--danger .profile-menu-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.profile-menu-item--danger span {
    color: var(--danger);
}

/* Settings panel */
.profile-settings-panel {
    padding: 0 18px 16px;
}

.settings-section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 18px 8px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.settings-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot--green {
    background: var(--success);
}

.status-dot--red {
    background: var(--danger);
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 340px;
    animation: fadeInUp 0.3s ease-out;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.15s;
}

.modal-btn:active {
    opacity: 0.7;
}

.modal-btn--cancel {
    background: var(--bg);
    color: var(--text-muted);
}

.modal-btn--save {
    background: var(--blue-deep);
    color: var(--white);
}

/* Submit button with icon */
.btn-primary-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==========================================
   PWA INSTALL PROMPT
   ========================================== */
.install-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 24px;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.install-prompt-card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px 24px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    animation: installPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes installPopIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.install-prompt-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.install-prompt-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.install-prompt-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.install-prompt-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.install-prompt-text p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.install-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.install-prompt-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.15s;
}

.install-prompt-btn:active {
    opacity: 0.7;
}

.install-prompt-btn--install {
    background: var(--blue-deep);
    color: var(--white);
}

.install-prompt-btn--dismiss {
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
}

/* iOS install instructions */
.install-ios-steps {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: left;
}

.install-ios-steps strong {
    color: var(--text-dark);
}

/* Download icon button */
.download-fab {
    position: absolute;
    top: calc(var(--safe-top) + 16px);
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: none;
    background: transparent;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.download-fab:active {
    opacity: 0.5;
}

.refresh-fab {
    position: absolute;
    top: calc(var(--safe-top) + 16px);
    left: 16px;
    z-index: 10;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.refresh-fab:active {
    opacity: 0.6;
    transform: scale(0.95);
}

.refresh-fab.spinning svg {
    animation: spin-refresh 0.6s ease;
}

@keyframes spin-refresh {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   RESPONSIVE — Tablet (768px+)
   ========================================== */
@media (min-width: 480px) {
    .landing-logo {
        width: 260px;
    }

    .landing-title {
        font-size: 48px;
    }
}

@media (min-width: 768px) {

    /* Unlock body scroll for larger screens */
    body {
        overflow: auto;
        position: static;
        height: auto;
    }

    .app-container {
        height: auto;
        min-height: 100vh;
    }

    .page {
        position: relative;
        inset: unset;
        overflow: auto; /* allow form/apply pages to scroll on desktop */
    }

    /* -------- LANDING — centered card -------- */
    .landing-bg {
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 40px 24px;
    }

    .landing-content {
        flex: none;
        /* stop stretching to 100vh on tablet/desktop */
        min-height: auto;
        max-width: 440px;
        /* narrowed to make the square buttons smaller */
        background: var(--white);
        border-radius: 36px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
        padding: 40px 36px 36px;
        margin: 0 auto;
        overflow: hidden;
    }

    .landing-logo-wrap {
        margin-top: 0;
        margin-bottom: 20px;
    }

    .landing-logo {
        width: 180px;
    }

    .landing-hero {
        margin-top: 4px;
        margin-bottom: 20px;
    }

    .landing-title {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .landing-cards {
        gap: 12px;
        margin-bottom: 0;
    }

    /* Profile card needs shadow on white-on-white */
    .profile-card {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .refresh-fab {
        position: fixed;
    }

    /* Digit pad keys — more visible on white card */
    .dpad-btn {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .dpad-btn:hover {
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
        transform: scale(1.04);
    }

    /* -------- FORM PAGES — centered card -------- */
    .form-page-bg {
        min-height: 100vh;
        align-items: center;
        justify-content: flex-start;
        padding: 60px 24px 60px;
        overflow-y: auto;
    }

    .form-page-content {
        max-width: 520px;
        background: var(--white);
        border-radius: 36px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
        padding: 56px 44px 44px;
        margin: 0 auto;
    }

    /* Back button — top-left on desktop */
    .back-fab {
        position: fixed;
        top: 24px;
        left: 24px;
        bottom: unset;
    }

    /* Refresh button hover for desktop */
    .refresh-fab:hover {
        border-color: rgba(0, 0, 0, 0.3);
        color: var(--text-dark);
    }
}

/* ==========================================
   RESPONSIVE — Desktop (1024px+)
   A proper desktop layout using position:fixed for the
   authenticated shell so page-switching keeps working,
   while landing/form pages remain scrollable cards.
   ========================================== */
@media (min-width: 1024px) {

    /* ============================================================
       1. AUTHENTICATED PAGES — restore full-viewport fixed layout
       ============================================================ */
    #page-dashboard,
    #page-schedule,
    #page-sales,
    #page-salary,
    #page-profile,
    #page-edit-profile,
    #page-settings,
    #page-change-passcode {
        position: fixed;
        inset: 0;
        overflow: hidden;
    }

    /* ============================================================
       2. DASH SHELL — flex column with top nav on top
       ============================================================ */
    .dash-shell {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #f0f2f5;
        overflow: hidden;
    }

    /* ============================================================
       3. TOP NAVIGATION BAR
       The bottom-nav is moved to the top via flexbox order.
       ============================================================ */
    .bottom-nav {
        order: -1;           /* push to top of dash-shell */
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
        height: 64px;
        padding: 0 24px;
        padding-bottom: 0 !important;  /* kill SafeArea override */
        background: #ffffff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
        z-index: 100;
        position: relative; /* lock absolute children like .desktop-logout-btn */
    }

    /* Nav items: icon + label pill */
    .nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        height: 40px;
        padding: 0 18px;
        border-radius: 20px;
        border: none;
        background: transparent;
        font-family: var(--font);
        font-size: 14px;
        font-weight: 600;
        color: #666;
        cursor: pointer;
        transition: background 0.18s ease, color 0.18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    /* Text label added via ::after */
    .nav-item::after {
        display: block;
        font-family: var(--font);
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
    }
    .nav-item[data-tab="page-dashboard"]::after { content: "Overview"; }
    .nav-item[data-tab="page-schedule"]::after  { content: "Schedule"; }
    .nav-item[data-tab="page-profile"]::after   { content: "Profile"; }
    .nav-item[data-tab="page-sales"]::after     { content: "Sales"; }
    .nav-item[data-tab="page-salary"]::after    { content: "Salary"; }

    .nav-item:hover {
        background: rgba(25, 116, 210, 0.07);
        color: #1565c0;
    }
    .nav-item.active {
        background: rgba(25, 116, 210, 0.1);
        color: #1565c0;
    }
    .nav-item.active:hover {
        background: rgba(25, 116, 210, 0.15);
    }
    .nav-item-dot {
        top: 8px;
        right: 10px;
    }
    
    .desktop-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: var(--text-dark);
        cursor: pointer;
        transition: 0.2s;
        padding: 8px;
    }
    .desktop-logout-btn:hover {
        color: #e63946;
        transform: translateY(-50%) scale(1.1);
    }

    /* ============================================================
       4. PAGE CONTENT CLIP — fills the space below the top nav
       ============================================================ */
    .page-content-clip {
        flex: 1;
        overflow: hidden;  /* clips slide animations */
        min-height: 0;
        position: relative;
    }

    /* The scrollable container inside the clip.
       NOTE: .dash-scroll and .pg-anim-target are the SAME element,
       so padding/max-width go directly here, not on a child selector. */
    .dash-scroll {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        /* Center content at a comfortable reading width */
        max-width: 940px !important;
        width: 100%;
        margin: 0 auto !important;
        padding: 36px 48px 56px;
        box-sizing: border-box;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
    }

    /* Profile page: narrower centered column */
    #page-profile .dash-scroll {
        max-width: 620px !important;
        padding: 36px 40px 56px;
    }

    /* Salary page: full-width (has its own internal shell) */
    #page-salary .dash-scroll {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0;
    }

    /* ============================================================
       5. DASHBOARD — header, cards, grid
       ============================================================ */
    .dash-header {
        margin-bottom: 32px;
    }
    .dash-greeting {
        font-size: 14px;
    }
    .dash-name {
        font-size: 32px;
    }
    .dash-avatar {
        width: 58px;
        height: 58px;
    }

    /* Give each card a polished desktop look with larger corners */
    .dash-card {
        border-radius: 24px;
        padding: 24px 28px;
        margin-bottom: 18px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
        border: 1px solid rgba(0,0,0,0.03);
    }

    .dash-card--announce {
        border-radius: 24px;
        padding: 24px 28px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
        border: 1px solid rgba(0,0,0,0.03);
    }

    .dash-row {
        gap: 14px;
    }
    .dash-hours-value {
        font-size: 42px;
    }
    .dash-att-value {
        font-size: 20px;
    }
    .dash-announce-list {
        max-height: 300px;
    }

    /* Today's schedule admin card */
    #admin-today-schedule-card {
        border-radius: 24px;
    }

    /* Profile items rounded more */
    .prof-item, .prof-btn {
        border-radius: 20px;
    }

    /* ============================================================
       6. SCHEDULE PAGE
       ============================================================ */
    .sub-page-header {
        padding-top: 0;
        margin-bottom: 28px;
    }
    .sub-page-title {
        font-size: 30px;
    }

    /* 2-col layout for Manage Employee cards */
    #admin-manage-employees-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    #admin-manage-employees-container .emp-att-card {
        margin-bottom: 0;
        border-radius: 24px;
        padding: 20px 24px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    }

    /* Schedule set editor: side by side */
    #manage-tab-schedules {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 24px;
        align-items: start;
        margin-top: 12px;
    }
    #manage-tab-schedules > .sched-card:first-child {
        grid-column: 1 / -1;
    }
    #sched-calendar-wrap { grid-column: 1; }
    .sched-shift-editor  { grid-column: 2; margin-top: 0; }

    /* Increase sched-card polish for desktop */
    .sched-card {
        border-radius: 24px;
        padding: 24px;
        box-shadow: 0 4px 18px rgba(0,0,0,0.06);
        border: 1px solid rgba(0,0,0,0.04);
        margin-bottom: 0px; 
    }

    /* Employee schedule list: 2 col */
    .schedule-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding-bottom: 0;
    }
    .schedule-list .schedule-day-card.today {
        grid-column: 1 / -1;
    }

    /* ============================================================
       7. SALES PAGE — special split layout (fixed header + scroll)
       ============================================================ */
    /* The sales shell is the full scrollable area under the top nav */
    .sales-shell {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #f0f2f5;
    }

    .sales-fixed-header {
        flex-shrink: 0;
        background: #f0f2f5;
        padding: 24px 48px 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Center the inner header content */
    .sales-fixed-header > * {
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .sales-top-bar {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 16px;
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
    }
    .sales-title-group { 
        flex: 1; 
        text-align: left !important;
    }
    .sales-title-group .sub-page-title,
    .sales-title-group .sub-page-desc {
        text-align: left !important;
    }
    .sales-mini-stats {
        flex-shrink: 0;
        min-width: 260px;
        border-radius: 24px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    }
    .sales-mini-stat { padding: 18px 20px; }
    .sales-mini-val  { font-size: 20px; }

    .sales-date-bar {
        border-radius: 24px;
        padding: 8px;
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
        box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    }
    .sales-date-btn   { width: 40px; height: 40px; border-radius: 12px; }
    .sales-filter-row {
        padding: 10px 0;
        gap: 8px;
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
    }
    .sales-filter-chip { padding: 8px 18px; font-size: 14px; }

    .sales-orders-scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 12px 48px 32px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Center order list inside scroll area */
    #sales-orders-list {
        max-width: 820px;
        margin: 0 auto;
        width: 100%;
    }

    .sales-order-header      { padding: 18px 24px 12px; }
    .sales-order-items-list  { padding: 12px 24px 16px; }

    .sales-order-card {
        border-radius: 24px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    }
    
    .sales-order-swipe-content {
        cursor: pointer;
    }

    /* ============================================================
       8. SALARY PAGE — same split pattern
       ============================================================ */
    .salary-shell {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #f0f2f5;
    }

    .salary-fixed-header {
        flex-shrink: 0;
        padding: 28px 48px 0;
        background: #f0f2f5;
        max-width: 860px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    .salary-top-bar  { margin-bottom: 18px; }
    .salary-total-val { font-size: 22px; }
    .salary-rate-card { max-width: 560px; }

    .salary-scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 8px 48px 32px;
        max-width: 860px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    /* Salary modal: centered floating card */
    .salary-modal-overlay {
        align-items: center;
        justify-content: center;
        padding: 24px;
    }
    .salary-modal-card {
        border-radius: 24px;
        max-width: 420px;
        max-height: 80vh;
    }

    /* ============================================================
       9. PROFILE / SETTINGS / EDIT-PROFILE PAGES
       ============================================================ */
    /* These pages still use dash-shell + dash-scroll.
       Constrain to a narrower centered column. */
    #page-profile .dash-scroll .pg-anim-target,
    #page-edit-profile .dash-scroll,
    #page-settings .dash-scroll,
    #page-change-passcode .dash-scroll {
        max-width: 600px;
        margin: 0 auto;
        padding: 40px 32px 56px;
        box-sizing: border-box;
    }

    /* Avatar bigger on profile page */
    .profile-avatar-circle { width: 76px; height: 76px; }
    .profile-hero-name { font-size: 22px; }
    .profile-hero-role { font-size: 14px; }
    .profile-hero { gap: 20px; margin-bottom: 32px; }
    .profile-menu-item { padding: 17px 20px; }

    /* ============================================================
       10. BACK FAB — top-left anchor on desktop
       ============================================================ */
    .back-fab {
        position: fixed;
        top: 84px;     /* below the 64px topnav + gap */
        left: 28px;
        bottom: unset;
        z-index: 200;
    }

    /* ============================================================
       11. FORM PAGES (landing, login, apply) — wider cards
       The 768px block already handles card layout; we just widen.
       ============================================================ */
    .landing-content {
        max-width: 480px;
        padding: 40px;
    }
    .landing-title { font-size: 36px; }
    .landing-logo-wrap { margin-bottom: 20px; }
    .landing-hero { margin-bottom: 20px; }

    .form-page-content {
        max-width: 560px;
        padding: 52px 48px 44px;
    }
    .form-page-title { font-size: 36px; }
    .field-input { padding: 16px 18px; }

    /* Digit pad keys — bigger on desktop */
    .dpad-btn {
        width: 78px;
        height: 78px;
        font-size: 26px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    }
    .dpad-btn:hover {
        background: #f5f5f5;
        box-shadow: 0 4px 14px rgba(0,0,0,0.1);
        transform: scale(1.05);
    }
    .digit-pad.compact .dpad-btn {
        width: 70px; height: 70px; font-size: 24px;
    }

    /* ============================================================
       12. MISC POLISH
       ============================================================ */
    .refresh-fab:hover {
        border-color: rgba(0,0,0,0.3);
        color: var(--text-dark);
    }

    /* ============================================================
       13. LOGIN PAGE — allow scrolling when digit pad is tall
       ============================================================ */
    /* form-page-bg already has overflow-y: auto from 768px block.
       On desktop, also ensure the login card fits well. */
    #page-login .form-page-content,
    #page-register .form-page-content,
    #page-change-passcode .form-page-content {
        padding: 40px 44px 40px;
    }

    /* Slightly smaller digit pad on desktop to avoid overflow */
    .dpad-btn {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
    .digit-pad.compact .dpad-btn {
        width: 62px;
        height: 62px;
        font-size: 22px;
    }
    /* digit-pad grid: add a bit more gap for breathing room */
    .digit-pad {
        gap: 10px;
    }
}



/* ==========================================
   PHOTO CROP MODAL
   ========================================== */
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
    animation: cropFadeIn 0.2s ease;
}

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

.crop-modal.hidden {
    display: none;
}

.crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    padding-top: max(14px, env(safe-area-inset-top));
    background: #111;
}

.crop-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    font-family: var(--font);
}

.crop-cancel-btn,
.crop-save-btn {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    padding: 6px 2px;
    -webkit-tap-highlight-color: transparent;
}

.crop-cancel-btn {
    color: #999;
}

.crop-save-btn {
    color: #60a5fa;
    font-weight: 700;
}

.crop-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#crop-canvas {
    position: absolute;
    cursor: grab;
}

#crop-canvas:active {
    cursor: grabbing;
}

.crop-circle-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Radial gradient: transparent circle in the center, dark outside */
    background: radial-gradient(circle at center, transparent 120px, rgba(0,0,0,0.65) 122px);
}

/* Outline ring for the crop circle */
.crop-circle-overlay::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 242px;
    height: 242px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
}

.crop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    background: #111;
    color: #999;
}

.crop-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 3px;
    background: #444;
    outline: none;
}

.crop-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
/* ==========================================
   NATIVE ANDROID APP OVERRIDES
   Specifically for the Kasa Crew Android App
   ========================================== */
.is-native-android-app .dash-scroll {
    padding-top: 10px !important;
}

.is-native-android-app .form-page-content {
    padding-top: 20px !important;
}

.is-native-android-app .page.page-white {
    background: #f3f3f3 !important;
}

.is-native-android-app .bottom-nav {
    padding-bottom: 6px !important;
    height: 74px !important;
}

/* Adjust dashboard greeting for more room */
.is-native-android-app .dash-header {
    margin-top: 0px;
}

/* ==========================================
   SECTION DIVIDER HEADER
   ========================================== */
.section-divider-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 14px;
}
.section-divider-header::before,
.section-divider-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}
.section-divider-header span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
}

/* ==========================================
   EMPLOYEE CHIP ROW
   ========================================== */
.emp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.emp-chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--border-light);
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}
.emp-chip.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}
.emp-chip:hover:not(.active) {
    border-color: #aaa;
}

/* ==========================================
   FOLDABLE CALENDAR (Schedule)
   ========================================== */


.sched-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
}
.sched-cal-month {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}
.sched-cal-nav {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dark);
    -webkit-tap-highlight-color: transparent;
}
.sched-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 12px;
    margin-bottom: 4px;
}
.sched-cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    padding: 4px 0;
}
.sched-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0 12px 16px;
}

/* Shared calendar day cells */
.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.cal-day:hover { background: rgba(0,0,0,0.05); }
.cal-day.cal-blank { cursor: default; }
.cal-day.cal-blank:hover { background: none; }
.cal-day-num {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1;
}
.cal-day.cal-today .cal-day-num {
    font-weight: 800;
    color: #6c63ff;
}
.cal-day.cal-selected {
    background: #1a1a1a;
}
.cal-day.cal-selected .cal-day-num { color: #fff; }
.cal-day.cal-has-event .cal-day-num { color: #1a1a1a; font-weight: 700; }
.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #6c63ff;
    margin-top: 2px;
}
.cal-day.cal-selected .cal-dot { background: #fff; }
.cal-earn {
    font-size: 9px;
    font-weight: 700;
    color: #16a34a;
    margin-top: 1px;
    line-height: 1;
}
.cal-day.cal-selected .cal-earn { color: #a7f3d0; }

/* ==========================================
   SCHEDULE EDITOR
   ========================================== */
.sched-editor-header {
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    padding: 16px;
}
.sched-editor-who {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
    text-align: center;
}
.sched-time-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.sched-time-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sched-time-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.shift-separator {
    font-size: 13px;
    color: var(--text-faint);
    padding-bottom: 10px;
    flex-shrink: 0;
}
.btn-ghost-sm {
    padding: 10px 16px;
    background: none;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn-outline-full {
    width: 100%;
    padding: 12px;
    background: none;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    font-family: var(--font);
    text-align: center;
    transition: border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-outline-full:active { border-color: #999; }

/* ==========================================
   IMPROVED ATTENDANCE CARDS (Admin View)
   ========================================== */
.emp-att-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.emp-att-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.emp-att-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 10px;
}
.emp-att-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8ff4, #1974d2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(25,116,210,0.2);
}
.emp-att-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.emp-att-name {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.emp-att-sessions {
    font-size: 11px;
    font-weight: 600;
    color: #888;
}
.emp-att-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 10px;
    flex-shrink: 0;
}
.emp-status-active {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}
.emp-status-done {
    background: rgba(107, 114, 128, 0.08);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.15);
}
.emp-status-absent {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.15);
}
.emp-status-scheduled {
    background: rgba(25, 116, 210, 0.08);
    color: #1974d2;
    border: 1px solid rgba(25, 116, 210, 0.2);
}
.emp-status-late {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}
/* Schedule page empty state */
.schedule-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
}
.schedule-empty p {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}
.schedule-empty span {
    font-size: 12px;
    color: var(--text-faint);
}
.emp-att-sessions-wrap {
    background: #fafafa;
    border-top: 1px solid rgba(0,0,0,0.03);
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.att-session-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
}
.att-session-in { color: #1a1a1a; font-weight: 600; flex: 1; }
.att-session-out { color: #1a1a1a; font-weight: 600; }
.att-session-dur { color: #888; font-size: 11px; font-weight: 700; background: rgba(0,0,0,0.04); padding: 2px 6px; border-radius: 6px; }
.att-active-tag {
    color: #16a34a;
    font-weight: 800;
}
.att-session-empty {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-align: center;
    padding: 8px 0;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
}
.att-empty-msg {
    text-align: center;
    font-size: 14px;
    color: var(--text-faint);
    padding: 20px 0;
}

/* ==========================================
   SALES HISTORY PAGE
   ========================================== */
.sales-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.sales-summary-card {
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.sales-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}
.sales-summary-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

/* Date Navigation Bar */
.sales-date-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.sales-date-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0,0,0,0.03);
    border-radius: 12px;
    cursor: pointer;
    color: #1a1a1a;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, transform 0.1s;
}
.sales-date-btn:active { background: rgba(0,0,0,0.08); transform: scale(0.94); }
.sales-date-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    background: none;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Inline calendar for sales */
.sales-calendar-wrap {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 18px;
    margin-top: 10px;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    animation: calFadeIn 0.2s ease;
}
.sales-calendar-wrap.hidden { display: none; }
@keyframes calFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Order Cards */
.sales-orders-list-header {
    font-size: 12px;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
    margin-top: 6px;
    padding: 0 4px;
}

.sales-order-card:active {
    transform: scale(0.99);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.sales-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    gap: 8px;
}
.sales-order-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.sales-order-time {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}
.sales-order-items {
    font-size: 13px;
    font-weight: 600;
    color: #888;
}
.sales-pay-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(108, 99, 255, 0.08);
    color: #6c63ff;
}
.sales-order-total {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.sales-order-items-list {
    border-top: 1px solid rgba(0,0,0,0.04);
    padding: 8px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sales-order-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.sales-item-name {
    flex: 1;
    color: #333;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sales-item-variant {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}
.sales-item-qty {
    color: #888;
    font-size: 13px;
    font-weight: 700;
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.sales-item-price {
    font-weight: 800;
    color: #1a1a1a;
    font-size: 14px;
    flex-shrink: 0;
}
.sales-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 56px 20px;
    text-align: center;
}
.sales-empty-state p {
    font-size: 15px;
    font-weight: 600;
    color: #888;
    margin: 0;
}

/* ==========================================
   MANAGE EMPLOYEES — TAB BAR
   ========================================== */
.manage-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}
.manage-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.03);
    border-radius: 18px;
    padding: 6px;
    margin-bottom: 24px;
}
.manage-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 14px;
    border: none;
    background: transparent;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.3, 0.7, 0, 1);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.manage-tab.active {
    background: #ffffff;
    color: #1974d2;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.02);
}
.manage-tab.active svg {
    color: #1974d2;
}
.manage-tab-panel { display: block; animation: tabFadeIn 0.25s forwards; }
.manage-tab-panel.hidden { display: none; }
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   SCHEDULE: CARD-BASED LAYOUT
   ========================================== */
.sched-card {
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 8px;
}
.sched-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}
.sched-card-title svg {
    color: #1974d2;
    flex-shrink: 0;
}
.sched-emp-chips {
    gap: 7px;
    flex-wrap: wrap;
}
.sched-shift-editor {
    animation: schedEditorIn 0.25s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes schedEditorIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sched-editor-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sched-time-btns {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.sched-time-btn-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sched-time-btn-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    padding-left: 2px;
}
.sched-time-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: var(--bg);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    width: 100%;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
}
.sched-time-btn:active {
    background: rgba(25,116,210,0.06);
    border-color: #1974d2;
    color: #1974d2;
}
.sched-time-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    flex-shrink: 0;
    padding-bottom: 4px;
}
.sched-action-row {
    display: flex;
    gap: 8px;
}
.sched-save-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 16px;
    border-radius: 12px;
    border: none;
    background: #1974d2;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.sched-save-btn:active { background: #1565b8; }
.sched-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid #e8e8e8;
    background: transparent;
    color: #e04040;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.sched-clear-btn:active { background: rgba(224,64,64,0.06); border-color: #e04040; }
.sched-clear-btn svg { color: #e04040; }
.sched-repeat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1.5px dashed var(--border-light);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-faint);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.sched-repeat-btn:active {
    background: rgba(25,116,210,0.05);
    border-color: #1974d2;
    color: #1974d2;
}

/* ==========================================
   SALES HISTORY — SPLIT LAYOUT
   ========================================== */
.sales-shell {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sales-fixed-header {
    flex-shrink: 0;
    padding: 20px 20px 0;
    background: var(--bg, #f5f5f5);
}
@supports (-webkit-touch-callout: none) {
    .sales-fixed-header {
        padding-top: max(24px, calc(env(safe-area-inset-top, 0px) + 16px));
    }
}
.sales-top-bar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}
.sales-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* Mini stats strip — 3-column grid card */
.sales-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(0,0,0,0.06);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}
.sales-mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 14px 6px;
    background: #ffffff;
    text-align: center;
}
.sales-mini-val {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.sales-mini-lbl {
    font-size: 9px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sales-mini-divider { display: none; }

/* Filter chips */
.sales-filter-row {
    display: flex;
    gap: 6px;
    padding: 10px 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sales-filter-row::-webkit-scrollbar { display: none; }
.sales-filter-chip {
    padding: 7px 16px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.04);
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.sales-filter-chip.active {
    background: #1a1a1a;
    color: #fff;
}

/* Scrollable orders container */
.sales-orders-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 20px;
    min-height: 0;
}

/* Pay badge colours */
.sales-pay-badge.pay-cash   { background: rgba(22,163,74,0.1);  color: #16a34a; border: 1px solid rgba(22,163,74,0.15); }
.sales-pay-badge.pay-gcash  { background: rgba(37,99,235,0.1);  color: #2563eb; border: 1px solid rgba(37,99,235,0.15); }
.sales-pay-badge.pay-card   { background: rgba(109,40,217,0.1); color: #7c3aed; border: 1px solid rgba(109,40,217,0.15); }
.sales-pay-badge.pay-other  { background: rgba(107,114,128,0.1);color: #6b7280; border: 1px solid rgba(107,114,128,0.15); }

/* ==========================================
   EMP CHIP — avatar style
   ========================================== */
.emp-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px 7px 8px;
}
.chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
}
.chip-avatar-fallback {
    background: #1974d2;
    color: #fff;
}
.chip-avatar-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* ==========================================
   WEEK STRIP (Mon–Sun this-week overview)
   ========================================== */
.sched-week-strip {
    margin-top: 8px;
    margin-bottom: 4px;
}
.week-strip-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 8px;
}
.week-strip-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.week-strip-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1.5px solid var(--border-light);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.week-strip-day.is-today {
    border-color: #1974d2;
    background: rgba(25,116,210,0.04);
}
.week-strip-day.is-selected {
    background: #1a1a1a;
    border-color: #1a1a1a;
}
.week-strip-day.is-selected .wsd-name,
.week-strip-day.is-selected .wsd-num,
.week-strip-day.is-selected .wsd-shift,
.week-strip-day.is-selected .wsd-off {
    color: #fff;
}
.wsd-name {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}
.wsd-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}
.wsd-shift {
    font-size: 9px;
    font-weight: 600;
    color: #1974d2;
    text-align: center;
    line-height: 1.2;
}
.wsd-off {
    font-size: 9px;
    color: var(--text-faint);
}
.week-strip-day.has-shift .wsd-num {
    color: #1974d2;
}

/* Tiny start-time label on calendar cell */
.cal-shift-mini {
    font-size: 8px;
    font-weight: 600;
    color: #1974d2;
    margin-top: 1px;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ==========================================
   SALARY TRACKER PAGE
   ========================================== */
.salary-shell {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.salary-fixed-header {
    flex-shrink: 0;
    padding: 20px 20px 0;
    background: var(--bg, #f5f5f5);
}
@supports (-webkit-touch-callout: none) {
    .salary-fixed-header {
        padding-top: max(24px, calc(env(safe-area-inset-top, 0px) + 16px));
    }
}
.salary-top-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.salary-total-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 16px;
    padding: 12px 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.salary-total-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
}
.salary-total-val {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}
.salary-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.03);
    padding: 6px;
    border-radius: 18px;
}
.salary-filter-chip {
    flex: 1;
    padding: 10px 10px;
    border-radius: 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s cubic-bezier(0.3, 0.7, 0, 1);
    -webkit-tap-highlight-color: transparent;
}
.salary-filter-chip.active {
    background: #ffffff;
    color: #1974d2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.salary-rate-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 20px;
    padding: 6px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
    gap: 6px;
}
.salary-rate-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 14px;
    padding: 12px 6px;
    gap: 4px;
    text-align: center;
}
.salary-rate-divider {
    display: none;
}
.salary-rate-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}
.salary-rate-val {
    font-size: 14px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}
.salary-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 24px;
    min-height: 0;
}

/* Salary entry card */
.salary-entry-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 18px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
}
.salary-entry-card.is-today {
    border-color: #1974d2;
    box-shadow: 0 0 0 3px rgba(25,116,210,0.08);
}
.salary-entry-card.is-today .sel-date {
    color: #1974d2;
}
.salary-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
}
.salary-entry-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sel-date {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.sel-shift {
    font-size: 13px;
    color: #888;
    font-weight: 600;
}
.salary-entry-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sel-total {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}
.sel-edit-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1.5px solid rgba(0,0,0,0.05);
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.sel-edit-btn:active {
    background: rgba(0,0,0,0.05);
    transform: scale(0.95);
}
.salary-entry-adj {
    background: #fafafa;
    border-top: 1px solid rgba(0,0,0,0.03);
    padding: 12px 18px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.adj-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}
.adj-badge.add { background: #ffffff; color: #16a34a; border: 1px solid rgba(22,163,74,0.15); box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.adj-badge.ded { background: #ffffff; color: #dc2626; border: 1px solid rgba(239,68,68,0.15); box-shadow: 0 1px 2px rgba(0,0,0,0.02); }

/* Salary empty */
.salary-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 20px;
    text-align: center;
}
.salary-empty-state p { font-size: 14px; color: var(--text-faint); margin: 0; }

/* Salary Edit Modal */
.salary-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 9000;
    padding-bottom: 0;
    animation: smFadeIn 0.2s ease-out forwards;
}
@keyframes smFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.salary-modal-overlay.closing {
    animation: smFadeOut 0.25s ease-in forwards;
}
@keyframes smFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
.salary-modal-overlay.hidden { display: none; }
.salary-modal-card {
    background: #fff;
    border-radius: 28px 28px 0 0;
    padding: 28px 24px 36px;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 85vh;
    overflow-y: auto;
    animation: smSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    will-change: transform;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.salary-modal-overlay.closing .salary-modal-card {
    animation: smSlideDown 0.25s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes smSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes smSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}
.salary-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.salary-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1a;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s;
}
.salary-modal-close:active {
    background: rgba(0,0,0,0.08);
}
.salary-modal-base {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    padding: 14px 18px;
    background: #fafafa;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.03);
}
.salary-modal-section-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-top: 8px;
}
.salary-modal-amount-wrap {
    display: flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 12px 16px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.salary-modal-amount-wrap:focus-within {
    border-color: #1974d2;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(25,116,210,0.1);
}
.amount-currency {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
}
.salary-modal-amount-wrap input {
    flex: 1;
    border: none;
    background: none;
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    outline: none;
    font-family: var(--font);
    min-width: 0;
}
.salary-modal-amount-wrap input::placeholder {
    color: #ccc;
}
.salary-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.adj-chip {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0,0,0,0.06);
    background: #ffffff;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.3, 0.7, 0, 1);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.adj-chip.add.active {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
    box-shadow: 0 2px 8px rgba(34,197,94,0.15);
}
.adj-chip.ded.active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
    box-shadow: 0 2px 8px rgba(239,68,68,0.15);
}
.salary-modal-adj-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.salary-adj-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.03);
    font-size: 14px;
}
.salary-adj-row .adj-label { flex: 1; font-weight: 700; color: #1a1a1a; text-transform: capitalize; }
.salary-adj-row .adj-amt { font-weight: 800; }
.salary-adj-row .adj-amt.add { color: #16a34a; }
.salary-adj-row .adj-amt.ded { color: #dc2626; }
.salary-adj-row-del {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: rgba(220,38,38,0.1);
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.salary-adj-row-del:active { transform: scale(0.9); background: rgba(220,38,38,0.2); }
.salary-modal-actions {
    margin-top: 4px;
}

/* ==========================================
   WORK SCHEDULE — Improved Card Design
   ========================================== */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
}
.schedule-day-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.schedule-day-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.schedule-day-card.today {
    border-color: rgba(25,116,210,0.2);
    background: #f0f7ff;
    padding: 20px 22px;
    border-radius: 20px;
    margin-top: 6px;
    margin-bottom: 6px;
    box-shadow: 0 4px 16px rgba(25,116,210,0.1), 0 1px 3px rgba(25,116,210,0.05);
}
.schedule-day-left { display: flex; flex-direction: column; gap: 4px; }
.schedule-day-label {
    font-size: 13px;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.schedule-day-card.today .schedule-day-label { 
    color: #1974d2; 
    font-size: 14px; 
}
.schedule-day-datestr {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}
.schedule-day-card.today .schedule-day-datestr { 
    font-size: 13px; 
    color: #444;
}
.schedule-day-shift {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.schedule-day-card.today .schedule-day-shift { 
    color: #1974d2;
    font-size: 20px;
}
.schedule-today-badge {
    background: #1974d2;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(25,116,210,0.2);
}
.schedule-hours-badge {
    background: rgba(0,0,0,0.05);
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* Custom Clock Picker */
.time-picker-card {
    border-radius: 28px;
    padding: 24px;
    width: 310px;
}
.tp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.tp-time-display {
    display: flex;
    align-items: baseline;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
}
.tp-display-item {
    cursor: pointer;
    color: var(--text-faint);
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}
.tp-display-item.active {
    background: rgba(25, 116, 210, 0.1);
    color: #1974d2;
}
.tp-colon {
    color: var(--text-faint);
    margin: 0 4px;
}
.tp-ampm-toggle {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
}
.tp-ampm-toggle button {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-faint);
}
.tp-ampm-toggle button.active {
    background: #1974d2;
    color: #fff;
}
.tp-clock-container {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--bg);
    margin: 0 auto;
}
.tp-clock-face {
    position: absolute;
    inset: 0;
}
.tp-clock-bubble {
    position: absolute;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    margin-left: -22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.1s ease-out;
    user-select: none;
}
.tp-clock-bubble.active {
    background: #1974d2;
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(25, 116, 210, 0.4);
}
.tp-clock-bubble.hidden {
    display: none;
}

/* ==========================================
   SWIPE TO DELETE
   ========================================== */
.sales-order-swipe-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 6px;
}
.sales-order-delete-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #ff6b6b, #ef4444);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 36px;
    color: #fff;
    cursor: pointer;
    border-radius: 16px;
}
.delete-text-lbl {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.sales-order-swipe-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.3, 0.7, 0, 1);
    z-index: 2;
    will-change: transform;
}
