/* ============ Design tokens ============ */
:root {
  --brand: #5b5bf0;
  --brand-600: #4a4ae0;
  --brand-2: #8b5cf6;
  --brand-3: #d946ef;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,70,229,.12), rgba(192,38,211,.10));
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --border: #e8eaf3;
  --text: #171a2e;
  --muted: #6b7190;
  --sidebar-w: 272px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23,26,46,.04), 0 8px 24px -8px rgba(23,26,46,.08);
  --shadow-lg: 0 20px 50px -18px rgba(79,70,229,.35);
  --ok: #10b981; --warn: #f59e0b; --bad: #ef4444; --info: #0ea5e9;

  --bs-primary: #5b5bf0;
  --bs-primary-rgb: 91, 91, 240;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-border-radius: 12px;
  --bs-link-color-rgb: 91, 91, 240;
}
[data-bs-theme="dark"] {
  --bg: #0b0d18;
  --surface: #141729;
  --surface-2: #191c32;
  --border: #252941;
  --text: #eceefb;
  --muted: #9aa0c2;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -10px rgba(0,0,0,.55);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-2);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
.tabular { font-variant-numeric: tabular-nums; }
.text-muted, .text-secondary { color: var(--muted) !important; }
a { text-decoration: none; }
h1, h2, h3, h4, h5 { letter-spacing: -.02em; font-weight: 700; }

.btn { font-weight: 600; border-radius: 12px; padding: .6rem 1.05rem; white-space: nowrap; transition: transform .12s ease, box-shadow .2s ease, background .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  background-image: var(--grad); border: 0; box-shadow: 0 8px 20px -8px rgba(91,91,240,.7); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(91,91,240,.8); filter: brightness(1.05); }
.btn-soft { background: var(--grad-soft); color: var(--brand); border: 0; }
.btn-soft:hover { background: rgba(91,91,240,.2); color: var(--brand-600); }
[data-bs-theme="dark"] .btn-soft { color: #a9a9ff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: 12px; }
.form-control, .form-select { border-radius: 12px; padding: .65rem .9rem; background-color: var(--surface); border-color: var(--border); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,91,240,.15); background-color: var(--surface); }
.form-label { font-weight: 600; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.6rem; }

/* ============ Layout ============ */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, #141533 0%, #0e1027 100%); color: #c9cdf0; display: flex; flex-direction: column; padding: 1.25rem 1rem; z-index: 1040; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .75rem; padding: .25rem .5rem 1.25rem; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-logo { width: 40px; height: 40px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; font-size: 1.3rem; color: #fff; box-shadow: 0 8px 20px -6px rgba(124,58,237,.8); flex: none; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: #8d92c0; letter-spacing: 0; margin-top: -2px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6c719f; margin: 1.1rem .75rem .4rem; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: .8rem; padding: .62rem .85rem; border-radius: 12px; color: #b4b9e4; font-weight: 500; font-size: .93rem; margin-bottom: 2px; transition: all .15s; position: relative; }
.side-link i { font-size: 1.1rem; opacity: .85; width: 20px; text-align: center; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: linear-gradient(90deg, rgba(124,58,237,.35), rgba(79,70,229,.15)); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 #a78bfa; }
.side-link .badge { margin-left: auto; background: var(--grad); font-size: .68rem; }
.side-user { margin-top: auto; padding: .85rem; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.side-user .name { color: #fff; font-weight: 600; font-size: .9rem; line-height: 1.2; }
.side-user .role { font-size: .75rem; color: #8d92c0; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; backdrop-filter: saturate(180%) blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); padding: .9rem 1.75rem; display: flex; align-items: center; gap: 1rem; }
.topbar h1 { font-size: 1.35rem; margin: 0; }
.topbar .sub { color: var(--muted); font-size: .82rem; }
.content { padding: 1.75rem; max-width: 1480px; width: 100%; margin: 0 auto; flex: 1; }
.bottom-nav { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.4); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding-bottom: 76px; }
  .topbar { padding: .75rem 1rem; }
  .topbar h1 { font-size: 1.15rem; }
  .content { padding: 1rem; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1035; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); padding: .35rem 0; border: 0; background: none; border-radius: 12px; }
  .bottom-nav i { font-size: 1.3rem; }
  .bottom-nav .active { color: var(--brand); }
}
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(8,10,25,.55); z-index: 1039; backdrop-filter: blur(2px); }
.sidebar-backdrop.show { display: block; }

/* ============ Cards ============ */
.card-soft { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-soft > .card-head { padding: 1.1rem 1.35rem; display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid var(--border); }
.card-soft > .card-head h2, .card-soft > .card-head h3 { font-size: 1.02rem; margin: 0; }
.card-body-pad { padding: 1.35rem; }
.fade-up { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.fade-up:nth-child(2) { animation-delay: .05s; } .fade-up:nth-child(3) { animation-delay: .1s; } .fade-up:nth-child(4) { animation-delay: .15s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.kpi { padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: 1rem; height: 100%; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi .ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.kpi .val { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.kpi .lbl { font-size: .78rem; color: var(--muted); font-weight: 500; margin-top: 4px; }
.tone-brand { background: rgba(91,91,240,.14); color: #6366f1; }
@media (max-width: 575.98px) {
  .kpi-compact { flex-direction: column; text-align: center; padding: .9rem .4rem; gap: .5rem; }
  .kpi-compact .val { font-size: 1.05rem; }
  .kpi-compact .ico { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 12px; }
  .kpi-compact .lbl { font-size: .68rem; }
}
.tone-ok { background: rgba(16,185,129,.14); color: #059669; }
.tone-warn { background: rgba(245,158,11,.16); color: #d97706; }
.tone-bad { background: rgba(239,68,68,.14); color: #dc2626; }
.tone-info { background: rgba(14,165,233,.14); color: #0284c7; }
.tone-muted { background: rgba(107,113,144,.14); color: var(--muted); }
[data-bs-theme="dark"] .tone-ok { color: #34d399; } [data-bs-theme="dark"] .tone-warn { color: #fbbf24; }
[data-bs-theme="dark"] .tone-bad { color: #f87171; } [data-bs-theme="dark"] .tone-info { color: #38bdf8; } [data-bs-theme="dark"] .tone-brand { color: #a5a6ff; }

/* ============ Avatars, pills ============ */
.avatar { --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: calc(var(--size) * .36); flex: none; background: hsl(var(--hue, 250) 65% 52%); background-image: linear-gradient(135deg, rgba(255,255,255,.25), transparent); box-shadow: 0 4px 10px -4px hsl(var(--hue, 250) 65% 40% / .6); letter-spacing: 0; }
.avatar.lg { --size: 64px; } .avatar.sm { --size: 32px; } .avatar.xl { --size: 88px; }

.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.working, .pill.present, .pill.approved { background: rgba(16,185,129,.14); color: #059669; }
.pill.break, .pill.pending, .pill.late { background: rgba(245,158,11,.16); color: #b45309; }
.pill.out, .pill.off, .pill.cancelled, .pill.upcoming { background: rgba(107,113,144,.15); color: var(--muted); }
.pill.absent, .pill.rejected { background: rgba(239,68,68,.14); color: #dc2626; }
.pill.leave { background: rgba(14,165,233,.14); color: #0284c7; }
.pill.working::before { animation: blink 1.6s infinite; }
[data-bs-theme="dark"] .pill.working, [data-bs-theme="dark"] .pill.present, [data-bs-theme="dark"] .pill.approved { color: #34d399; }
[data-bs-theme="dark"] .pill.break, [data-bs-theme="dark"] .pill.pending, [data-bs-theme="dark"] .pill.late { color: #fbbf24; }
[data-bs-theme="dark"] .pill.absent, [data-bs-theme="dark"] .pill.rejected { color: #f87171; }
[data-bs-theme="dark"] .pill.leave { color: #38bdf8; }
@keyframes blink { 50% { opacity: .25; } }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .18rem .55rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.chip.ok { color: #059669; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); }
.chip.bad { color: #dc2626; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); }
.chip.warn { color: #b45309; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }

/* ============ Tables ============ */
.table-modern { --bs-table-bg: transparent; margin: 0; }
.table-modern thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--border); padding: .85rem 1.1rem; background: var(--surface-2); white-space: nowrap; }
.table-modern tbody td { padding: .85rem 1.1rem; vertical-align: middle; border-color: var(--border); white-space: nowrap; }
.table-modern .sub-row td, .table-modern.wrap tbody td { white-space: normal; }
.table-modern tbody tr { transition: background .15s; }
.table-modern tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.table-modern .sub-row td { background: var(--surface-2); padding: 0; }
.table-responsive:has(.table-modern) { border-radius: 0 0 var(--radius) var(--radius); }

/* ============ Hero / punch ============ */
.punch-hero { position: relative; overflow: hidden; border-radius: 28px; background: var(--grad); color: #fff; padding: 2rem; box-shadow: var(--shadow-lg); isolation: isolate; }
.punch-hero::before, .punch-hero::after { content: ''; position: absolute; border-radius: 50%; z-index: -1; filter: blur(2px); }
.punch-hero::before { width: 420px; height: 420px; right: -120px; top: -160px; background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); }
.punch-hero::after { width: 320px; height: 320px; left: -100px; bottom: -160px; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); }
.hero-greet { opacity: .9; font-weight: 500; }
.hero-date { opacity: .75; font-size: .9rem; }
.hero-date::first-letter, .topbar .sub::first-letter { text-transform: uppercase; }
.clock-time { font-size: clamp(3.2rem, 9vw, 5.2rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 6px 30px rgba(0,0,0,.2); }
.clock-time .sec { font-size: .42em; opacity: .65; font-weight: 600; letter-spacing: -.02em; margin-left: .15em; }
.hero-status { display: inline-flex; align-items: center; gap: .55rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); padding: .45rem .95rem; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.hero-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #a7f3d0; box-shadow: 0 0 0 4px rgba(167,243,208,.25); }
.hero-status.out .dot { background: #cbd5e1; box-shadow: 0 0 0 4px rgba(203,213,225,.2); }
.hero-status.break .dot { background: #fde68a; box-shadow: 0 0 0 4px rgba(253,230,138,.25); }
.hero-status.working .dot { animation: blink 1.6s infinite; }

.punch-main { position: relative; width: 168px; height: 168px; border-radius: 50%; border: 0; background: #fff; color: #5b21b6; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; font-weight: 800; font-size: 1.05rem; box-shadow: 0 20px 50px -12px rgba(0,0,0,.45), inset 0 -6px 0 rgba(91,33,182,.08); transition: transform .15s, box-shadow .2s; }
.punch-main i { font-size: 2.4rem; line-height: 1; }
.punch-main:hover { transform: scale(1.04); }
.punch-main:active { transform: scale(.96); }
.punch-main::before, .punch-main::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); animation: ring 2.6s cubic-bezier(.2,.6,.3,1) infinite; pointer-events: none; }
.punch-main::after { animation-delay: 1.3s; }
.punch-main.is-out { color: #be123c; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.55); opacity: 0; } }
.punch-main:disabled { opacity: .6; }
.punch-sec { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); border-radius: 16px; padding: .8rem 1.2rem; font-weight: 600; display: inline-flex; align-items: center; gap: .55rem; transition: all .15s; }
.punch-sec:hover { background: rgba(255,255,255,.28); color: #fff; transform: translateY(-1px); }
.punch-sec:disabled { display: none; }

.progress-thin { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress-thin > div { height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s ease; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 19px; top: 12px; bottom: 12px; width: 2px; background: var(--border); }
.timeline li { position: relative; display: flex; gap: 1rem; padding: .6rem 0; align-items: center; animation: fadeUp .4s both; }
.timeline .node { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; flex: none; z-index: 1; border: 3px solid var(--surface); }
.node.in { background: rgba(16,185,129,.18); color: #059669; } .node.out { background: rgba(107,113,144,.2); color: var(--muted); }
.node.break_start { background: rgba(245,158,11,.2); color: #d97706; } .node.break_end { background: rgba(14,165,233,.2); color: #0284c7; }
.timeline .t-time { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty-state { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.4rem; opacity: .5; display: block; margin-bottom: .5rem; }

/* ============ Modal / punch flow ============ */
.modal-content { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: 0 40px 80px -20px rgba(0,0,0,.45); overflow: hidden; }
.modal-header, .modal-footer { border-color: var(--border); }
.map-box { height: 220px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); position: relative; background: var(--surface-2); }
.map-box.tall { height: 380px; }
.map-box.dash { height: 340px; }
.cam-box { position: relative; aspect-ratio: 4/3; max-height: 260px; width: 100%; border-radius: 16px; overflow: hidden; background: #0b0d18; display: grid; place-items: center; color: #9aa0c2; }
.cam-box video, .cam-box img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-box img { transform: none; }
.step-status { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; }
.step-status .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.success-burst { display: none; text-align: center; padding: 2.5rem 1rem; }
.success-burst .check { width: 92px; height: 92px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-size: 3rem; animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; box-shadow: var(--shadow-lg); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ============ Auth ============ */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand { position: relative; background: var(--grad); color: #fff; padding: 3rem 4rem; display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate; }
.auth-brand::before { content: ''; position: absolute; width: 640px; height: 640px; right: -200px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); z-index: -1; }
.auth-brand::after { content: ''; position: absolute; width: 520px; height: 520px; left: -160px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.15), transparent 65%); z-index: -1; }
.auth-brand h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; font-weight: 800; }
.feat { display: flex; gap: .9rem; align-items: flex-start; margin-top: 1.1rem; }
.feat i { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.feat b { display: block; } .feat span { opacity: .8; font-size: .9rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.auth-card { width: 100%; max-width: 410px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-brand { display: none; } }

/* ============ Misc ============ */
.toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
.toast-lite { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 20px 40px -12px rgba(0,0,0,.3); animation: slideIn .35s cubic-bezier(.2,.8,.2,1) both; font-size: .9rem; font-weight: 500; }
.toast-lite .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast-lite.leaving { opacity: 0; transform: translateX(20px); transition: all .3s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: .75rem; }
.nav-pills-soft { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px; display: inline-flex; gap: 2px; }
.nav-pills-soft .nav-link { border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .88rem; padding: .45rem .95rem; }
.nav-pills-soft .nav-link.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.leaflet-container { font-family: inherit; border-radius: inherit; }
.map-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .72rem; border: 2px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.map-pin span { transform: rotate(45deg); }
.me-pulse { width: 18px; height: 18px; border-radius: 50%; background: #3b82f6; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(59,130,246,.6); animation: pulse 2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 18px rgba(59,130,246,0); } }
.day-chip { display: inline-grid; place-items: center; min-width: 44px; padding: .35rem .2rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1.1; }
.day-chip b { font-size: 1.05rem; } .day-chip small { font-size: .62rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.dropdown-menu { border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: .8rem 1.35rem; border-bottom: 1px solid var(--border); }
.list-clean li:last-child { border: 0; }
.selfie-thumb { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; cursor: zoom-in; border: 1px solid var(--border); }
.progress-ring { --p: 0; width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; position: relative; }
.progress-ring::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.progress-ring b { position: relative; z-index: 1; font-size: .85rem; }
.day-pick label { cursor: pointer; }
.day-pick input { display: none; }
.day-pick span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); font-weight: 700; font-size: .82rem; color: var(--muted); background: var(--surface-2); transition: all .15s; }
.day-pick input:checked + span { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -4px rgba(91,91,240,.6); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .6rem; margin-top: 1.1rem; }
.week-day { text-align: center; }
.week-day .bar { height: 64px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); position: relative; overflow: hidden; }
.week-day .bar > i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--grad); border-radius: 0 0 11px 11px; transition: height .6s ease; }
.week-day.today .bar { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,240,.15); }
.week-day small { display: block; margin-top: .35rem; font-weight: 700; font-size: .7rem; color: var(--muted); }
.week-day.today small { color: var(--brand); }
.week-day .h { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============ Footer, Microsoft sign-in, avatar photo ============ */
.app-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.25rem 1rem; }
.main > .app-footer { border-top: 1px solid var(--border); }
.app-footer a { color: var(--brand); font-weight: 600; }
.app-footer a:hover { text-decoration: underline; }
[data-bs-theme="dark"] .app-footer a { color: #a9a9ff; }
.btn-ms { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; background: #fff; color: #2f2f2f; border: 1px solid #8c8c8c; box-shadow: none; }
.btn-ms:hover { background: #f3f3f3; color: #2f2f2f; border-color: #5e5e5e; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
