/* ============================================================
   index.css — Complete standalone stylesheet for index.php
   Replaces: Bootstrap, timetracks.css, style.css
   ============================================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px;
}

body {
    min-height: 100vh;
    background: #041270;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    outline: none;
}

/* Bootstrap utility needed by hidden elements */
.d-none {
    display: none !important;
}

/* ---- App container ---------------------------------------- */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(165deg, #061d86 0%, #1535b8 55%, #2547d0 100%);
}

/* ---- Header (invisible spacer) ---------------------------- */
.mobile-header {
    height: 48px;
    background: transparent;
    flex-shrink: 0;
}

/* ---- Success toast ---------------------------------------- */
.alert-popup {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    border-radius: 40px;
    padding: 11px 22px;
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    transition: opacity 0.3s, transform 0.3s;
}

.alert-popup .popup-content {
    display: flex;
    align-items: center;
    gap: 9px;
}

.alert-popup .popup-content i {
    color: #4ade80;
    font-size: 16px;
}

/* ============================================================
   SCREEN 1 — NOT STARTED (fingerprint)
   ============================================================ */
.not-started-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 24px 100px;
    text-align: center;
}

.ns-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 16px;
    position: relative;
}

.ns-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.not-started-section .button-container {
    padding: 0;
    width: auto;
    margin-top: 60px;
}

/* ---- Fingerprint button ---- */
.fingerprint-container {
    position: relative;
    width: 170px;
    height: 170px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto 70px;
    animation: fp-pulse 2s ease-in-out infinite;
}

.fingerprint-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.fingerprint-path {
    fill: rgba(255, 255, 255, 0.18);
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 0.3px;
    stroke-dasharray: 200;
    stroke-dashoffset: 0;
    animation: fp-draw 4s linear infinite;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #64d8ff, transparent);
    border-radius: 2px;
    animation: fp-scan 1.6s linear infinite;
}

.ripple1,
.ripple2 {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    opacity: 0;
    animation: fp-ripple 2.8s ease-out infinite;
}

.ripple2 {
    animation-delay: 1s;
}

.glow {
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 68%);
    animation: fp-glow 2.2s ease-in-out infinite;
    pointer-events: none;
}

.status {
    position: absolute;
    bottom: -38px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.2px;
    transition: color 0.3s;
}

.fingerprint-container:active .fingerprint-path {
    stroke: #ff8080;
}

.fingerprint-container:active .scan-line {
    background: linear-gradient(to right, transparent, #ff8080, transparent);
}

/* ---- Welcome text ---- */
.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.welcome-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.8;
    max-width: 290px;
    animation: slideUp 0.9s ease-out both;
}

.fingerprint-icon2 {
    color: rgba(255, 255, 255, 0.88);
}

/* Manage devices link (sibling div after not-started-section) */
.not-started-section~div {
    text-align: center;
    margin-top: 10px;
}

.not-started-section~div a {
    color: rgba(255, 255, 255, 0.42) !important;
    font-size: 13px;
    padding: 8px 12px;
    display: inline-block;
}

/* ============================================================
   SCREEN 2 — ACTIVE SESSION
   ============================================================ */

/* Hero (blue top section) */
.session-hero {
    position: relative;
    padding: 48px 22px 36px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.session-hero.working {
    background: linear-gradient(150deg, #020e4a 0%, #061d86 40%, #1535b8 100%);
}

.session-hero.on-break {
    background: linear-gradient(150deg, #1c0902 0%, #78350f 40%, #b45309 100%);
}

/* Decorative background circles */
.session-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.session-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

/* Avatar wrapper — holds avatar + camera button */
.sh-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
    position: relative;
}

/* Avatar — centered at top of hero */
.sh-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

/* Pending badge — clock icon on avatar top-right */
.sh-avatar-pending {
    position: absolute;
    top: -2px;
    inset-inline-end: calc(50% - 44px);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

/* Rejection message — below avatar, above camera button */
.selfie-rejected-msg {
    display: none;
    margin-top: 8px;
    padding: 5px 10px;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
    text-align: center;
    line-height: 1.4;
    max-width: 180px;
}

.selfie-rejected-msg i {
    margin-inline-end: 4px;
}

@media (max-width: 1024px) and (pointer: coarse) {
    .selfie-rejected-msg {
        display: block;
    }
}

/* Camera button — small, below avatar, mobile only */
.sh-camera-form {
    display: none;
}

@media (max-width: 1024px) and (pointer: coarse) {
    .sh-camera-form {
        display: block;
    }
}

.sh-camera-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: background 0.2s;
}

.sh-camera-btn:active {
    background: rgba(255, 255, 255, 0.38);
}

/* Top row: greeting + badge */
.sh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.sh-greeting {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
}

.sh-greeting strong {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.sh-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.sh-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: dotPulse 1.6s ease-in-out infinite;
}

.on-break .sh-dot {
    background: #fbbf24;
}

/* Timer — centrepiece */
.sh-timer {
    font-size: 68px;
    font-weight: 900;
    letter-spacing: -3px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #fff;
    text-align: center;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    margin-bottom: 28px;
}

/* Bottom meta row */
.sh-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.sh-since {
    flex-shrink: 0;
}

.sh-since-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 3px;
}

.sh-since-time {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.sh-bar-wrap {
    flex: 1;
}

.sh-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 500;
}

.sh-bar-pct {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.sh-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.sh-bar-fill {
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.6), #fff);
    border-radius: 10px;
    transition: width 1s linear;
    min-width: 4px;
    position: relative;
    overflow: hidden;
}

.sh-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    animation: barShimmer 2.2s ease-in-out infinite;
}

/* White panel (bottom section) */
.session-panel {
    flex: 1;
    background: #f0f4f8;
    border-radius: 28px 28px 0 0;
    padding: 28px 20px 90px;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.14);
    transition: border-radius .25s ease;
}
/* While on break, drop the rounded top so the panel goes edge-to-edge. */
body.is-on-break .session-panel {
    border-radius: 0;
}

/* Mobile: allow normal page scrolling. The previous body-lock approach
   (position:fixed on body + inner .app-container scroller) trapped the
   bottom navigation off-screen on long pages. Keep only the break-mode
   lock — that one is intentional (no scrolling during a break). */
@media (max-width: 600px) {
    body.is-on-break {
        overflow: hidden;
        overscroll-behavior: none;
    }
}

.sp-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.sp-stat {
    background: #fff;
    border-radius: 20px;
    padding: 18px 12px 14px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sp-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.sp-stat-icon.working {
    background: rgba(6, 29, 134, 0.08);
    color: #061d86;
}

.sp-stat-icon.break {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.sp-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    display: block;
    letter-spacing: -0.5px;
}

.sp-stat-lbl {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 5px;
    font-weight: 500;
}

.sp-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-btn {
    width: 100%;
    padding: 17px 20px;
    height: auto !important;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
    letter-spacing: 0.1px;
}

.sp-btn-end {
    background: linear-gradient(135deg, #061d86 0%, #1535b8 60%, #2040cc 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(6, 29, 134, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sp-btn-end:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(6, 29, 134, 0.42);
}

.sp-btn-end:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(6, 29, 134, 0.25);
}

.sp-btn-break {
    background: #fff;
    color: #92400e;
    border: 1.5px solid #fed7aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sp-btn-resume {
    background: #fff;
    color: #166534;
    border: 1.5px solid #bbf7d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sp-btn:hover:not(.sp-btn-end) {
    transform: translateY(-1px);
}

/* ─── Break card as clickable button ─────────────────────────────────────
   Tapping the "break" stat card toggles the break (mobile UX). On desktop
   the dedicated button is still shown as a backup; on mobile (<= 600px)
   only the card itself acts as the toggle. */
.sp-stat-break-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s;
    outline: none;
}
.sp-stat-break-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.sp-stat-break-toggle:active {
    transform: translateY(0) scale(.98);
}
.sp-stat-break-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(245,158,11,.45);
}
/* On-break state — visually different so it's clear a tap will RESUME work. */
.sp-stat-break-toggle.is-on-break {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
}
.sp-stat-break-toggle.is-on-break .sp-stat-icon.break {
    animation: sp-pulse-break 1.4s ease-in-out infinite;
}
@keyframes sp-pulse-break {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
    50%      { box-shadow: 0 0 0 12px rgba(245,158,11,0); }
}

/* Mobile: hide the explicit break button — the card alone toggles. */
@media (max-width: 600px) {
    .sp-buttons .sp-btn-break,
    .sp-buttons .sp-btn-resume {
        display: none !important;
    }
}

.sp-btn:active:not(.sp-btn-end) {
    transform: translateY(0);
}

.sp-btn.loading,
.sp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* ---- Daily target card ------------------------------------ */
.dtc-card {
    margin-top: 16px;
    background: #fff;
    border-radius: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dtc-left {
    flex: 1;
}

.dtc-time {
    font-size: 38px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1.5px;
    line-height: 1;
}

.dtc-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
    font-weight: 500;
}

/* Ring */
.dtc-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.dtc-ring {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.dtc-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 6;
}

.dtc-ring-fill {
    fill: none;
    stroke: #061d86;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    transition: stroke-dashoffset 1s linear;
}

.on-break .dtc-ring-fill {
    stroke: #d97706;
}

.dtc-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dtc-remain {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.dtc-remain-lbl {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================================
   SCREEN 3 — WORK COMPLETED
   ============================================================ */
.completion-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px 100px;
    text-align: center;
}

/* Date chip */
.cs-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 28px;
}

/* Avatar + check badge (completion screen) */
.cs-avatar-wrap {
    position: relative;
    width: 84px;
    height: 84px;
    margin-bottom: 20px;
}

.cs-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

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

.cs-check-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.5);
}

.cs-check-badge i {
    font-size: 13px;
    color: #fff;
}

.cs-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.cs-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 32px;
}

/* Stats row: start | total | end */
.cs-stats {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}

.cs-stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 16px 8px;
    text-align: center;
}

.cs-stat-main {
    flex: 1.25;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.cs-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.cs-start {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.cs-end {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.cs-total {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.cs-stat-val {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.cs-stat-big {
    font-size: 26px;
}

.cs-stat-lbl {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 5px;
    letter-spacing: 0.3px;
}

/* Break card — full-width, styled like the 3 stat cards above */
.cs-break {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 14px 16px;
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}
.cs-break i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.22);
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.cs-break strong {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    margin-inline-start: auto;
    letter-spacing: 0.5px;
}

/* ============================================================
   LOCATION MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 28px 22px;
    border-radius: 22px;
    text-align: center;
    width: 88%;
    max-width: 320px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
    line-height: 1;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 22px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-continue,
.btn-cancel {
    width: 100%;
    padding: 13px;
    height: auto !important;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-continue {
    background: linear-gradient(135deg, #061d86, #1a3bbf);
    color: #fff;
}

.btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

/* ============================================================
   CONFIRM POPUP
   ============================================================ */
#confirmPopup {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
}

#confirmPopup.active {
    display: flex !important;
}

#confirmPopup .confirm-popup-box {
    background: #fff;
    border-radius: 24px;
    padding: 30px 24px;
    width: 88%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.28);
}

#confirmPopup .confirm-popup-message {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 24px;
    line-height: 1.5;
}

#confirmPopup .confirm-popup-buttons {
    display: flex;
    gap: 10px;
}

#confirmPopup .confirm-popup-btn {
    flex: 1;
    padding: 13px;
    height: auto !important;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}

#confirmPopup .confirm-popup-btn-yes {
    background: linear-gradient(135deg, #061d86, #1a3bbf);
    color: #fff;
}

#confirmPopup .confirm-popup-btn-no {
    background: #f1f5f9;
    color: #0f172a;
}

#confirmPopup .confirm-popup-btn:hover {
    opacity: 0.88;
}

#confirmPopup .confirm-popup-btn:active {
    opacity: 0.75;
}

/* ============================================================
   BOTTOM NAV (from nav.php)
   ============================================================ */
.emp-bottom-nav {
    position: fixed;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    display: flex; align-items: stretch; justify-content: space-around;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 -4px 24px rgba(0,0,0,.10);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.emp-bottom-tab {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 2px 10px;
    color: #94a3b8; font-size: 9.5px; font-weight: 600;
    text-decoration: none; position: relative; min-width: 0;
    -webkit-tap-highlight-color: transparent; transition: color .18s;
}
.emp-bottom-tab i { font-size: 18px; line-height: 1; display: block; transition: filter .18s; }
.emp-bottom-tab span {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; text-align: center; display: block;
}
.emp-bottom-tab.active { color: #7c5cff; }
.emp-bottom-tab.active i { filter: drop-shadow(0 0 5px rgba(124,92,255,.55)); }
.emp-bottom-tab:hover:not(.active) { color: #64748b; }
.emp-nav-badge {
    position: absolute; top: 5px;
    inset-inline-end: calc(50% - 19px);
    background: #ef4444; color: #fff;
    font-size: 8.5px; font-weight: 800;
    min-width: 15px; height: 15px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding: 0 2px;
    line-height: 1; pointer-events: none;
}
.emp-nav-badge.nb-blue { background: #4361ee; }
.emp-nav-badge.nb-teal { background: #0f766e; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fp-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes fp-scan {
    0% {
        transform: translateY(0);
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(170px);
        opacity: 0.55;
    }
}

@keyframes fp-ripple {
    0% {
        transform: scale(0.5);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

@keyframes fp-glow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.85;
    }
}

@keyframes fp-draw {
    0% {
        stroke-dashoffset: 200;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.75);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

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

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

    60%,
    100% {
        transform: translateX(200%);
    }
}

/* ── Contact admin button & modal ────────────────────────── */
.cs-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    width: 100%;            /* matches the .cs-stats row width above */
    padding: 18px 20px;     /* taller than before (was 9px) */
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;    /* match cs-stat corner radius for visual harmony */
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.cs-contact-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.cs-contact-btn:active { transform: translateY(0); }

.cs-contact-btn i {
    font-size: 16px;
    color: #fbbf24;         /* amber for the warning icon */
}

.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 18, 112, .82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 0;
    animation: cmOverlayIn .25s ease;
}
@keyframes cmOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.contact-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 720px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    animation: cmBoxIn .35s cubic-bezier(.16,1,.3,1);
    display: flex;
    flex-direction: column;
}
@keyframes cmBoxIn {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Gradient header with branded look (matches modals across the app) */
.contact-modal-header {
    position: relative;
    padding: 38px 28px 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #fff;
    text-align: center;
    border: none;
}
.contact-modal-header::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 50%);
    pointer-events: none;
}
.contact-modal-header i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    border-radius: 18px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    font-size: 24px;
    color: #fff;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
}
.contact-modal-header .cmh-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}
.contact-modal-header .cmh-sub {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    font-weight: 500;
    line-height: 1.5;
    max-width: 420px;
    margin: 0 auto;
}

.contact-modal-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.contact-modal-close:hover {
    background: rgba(255,255,255,.3);
    transform: rotate(90deg);
}

.contact-modal-body {
    padding: 30px 28px 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.contact-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1d2b55;
    letter-spacing: .2px;
    margin-bottom: -8px;
}
.contact-label::before {
    content: '';
    width: 4px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, #4f46e5, #06b6d4);
    display: inline-block;
}

.contact-input,
.contact-textarea {
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    width: 100%;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.contact-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}
.contact-input:focus,
.contact-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
.contact-input:hover,
.contact-textarea:hover {
    border-color: #cbd5e1;
}

.contact-feedback {
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex; align-items: center; gap: 8px;
    animation: cmFeedIn .25s ease;
}
@keyframes cmFeedIn {
    from { transform: translateY(-6px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.contact-feedback.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.contact-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.contact-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    transition: transform .15s, box-shadow .25s;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
    margin-top: 6px;
    align-self: stretch;
    width: 100%;
}
.contact-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(79, 70, 229, .5);
}
.contact-send-btn:active { transform: translateY(0); }
.contact-send-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.contact-send-btn i { font-size: 15px; }

/* Desktop: leave breathing room on both sides */
@media (min-width: 768px) {
    .contact-modal-overlay { padding: 40px 20px; align-items: center; }
    .contact-modal-box {
        min-height: auto;
        max-height: calc(100vh - 80px);
        border-radius: 24px;
        overflow: auto;
    }
}