/* ============ DESIGN TOKENS ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --line-green: #06C755;
  --line-green-dark: #05A847;
  --line-green-light: #E8F8EE;
  --bg: #F4F6F8;
  --bg-soft: #FAFBFC;
  --card: #FFFFFF;
  --ink: #1F2937;
  --ink-mute: #6B7280;
  --line: #E5E7EB;
  --line-soft: #F3F4F6;
  --warn: #F59E0B;
  --warn-bg: #FEF3C7;
  --danger: #EF4444;
  --danger-bg: #FEE2E2;
  --info: #3B82F6;
  --info-bg: #DBEAFE;
  --purple: #8B5CF6;
  --purple-bg: #EDE9FE;
  --pink: #EC4899;
  --pink-bg: #FCE7F3;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-green: 0 8px 24px rgba(6,199,85,0.3);
}

html, body {
  font-family: 'Prompt', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: contain;
}
body {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
input, textarea, select {
  font-family: inherit;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes confetti {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes flash {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.1); }
  20%, 40% { transform: scale(0.95); }
}

/* ============ SCREENS ============ */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.3s ease;
}
.screen.active { display: flex; }

/* ============ TOPBAR ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.topbar h2 { font-size: 18px; font-weight: 600; }
.icon-btn {
  width: 38px; height: 38px;
  background: var(--line-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: var(--line);
  transform: scale(1.05);
}
.icon-btn.back { font-size: 20px; font-weight: 600; }

.content {
  flex: 1;
  padding: 20px 16px 100px;
  animation: slideUp 0.4s ease;
}

/* ============ LOGIN ============ */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, #06C755 0%, #00B248 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  top: -100px; right: -100px;
  animation: float 6s ease-in-out infinite;
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  bottom: -50px; left: -50px;
  animation: float 8s ease-in-out infinite reverse;
}
.login-logo {
  font-size: 72px;
  margin-bottom: 12px;
  animation: bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  position: relative;
  z-index: 1;
}
.login-wrap h1 {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.login-wrap > p {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.login-form {
  background: white;
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.6s ease 0.2s backwards;
  position: relative;
  z-index: 1;
}
.login-form label {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 6px;
  font-weight: 500;
}
.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 14px;
  transition: all 0.2s;
  background: var(--bg-soft);
}
.login-form input:focus {
  outline: none;
  border-color: var(--line-green);
  background: white;
  box-shadow: 0 0 0 4px var(--line-green-light);
}
.login-form .input-row {
  position: relative;
  margin-bottom: 14px;
}
.login-form .input-row input {
  margin-bottom: 0;
  padding-left: 42px;
}
.login-form .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--line-green), var(--line-green-dark));
  color: white;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
  box-shadow: var(--shadow-green);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(6,199,85,0.4); }
.login-btn:active { transform: scale(0.98); }
.login-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}
.login-btn:hover::before { left: 100%; }
.login-hints {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.6;
}
.login-hints strong { color: var(--ink); display: block; margin-bottom: 4px; }
.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 12px;
  animation: shake 0.4s ease;
  display: none;
}
.login-error.show { display: block; }

/* ============ HOME ============ */
.greeting {
  margin-bottom: 18px;
  animation: slideRight 0.4s ease;
}
.greeting .small {
  color: var(--ink-mute);
  font-size: 13px;
}
.greeting h3 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 2px;
}
.greeting .wave {
  display: inline-block;
  animation: wiggle 1.5s ease infinite;
  transform-origin: 70% 70%;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  animation: slideUp 0.4s ease backwards;
}
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-card .label {
  font-size: 11px;
  color: var(--ink-mute);
  display: flex;
  gap: 4px;
  align-items: center;
}
.stat-card .value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}
.stat-card .delta {
  font-size: 11px;
  color: var(--line-green);
  margin-top: 2px;
}

.checkin-card {
  background: linear-gradient(135deg, #06C755 0%, #00B248 100%);
  border-radius: 24px;
  padding: 22px;
  color: white;
  margin-bottom: 18px;
  box-shadow: var(--shadow-green);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.5s ease 0.15s backwards;
}
.checkin-card::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  top: -80px; right: -80px;
  animation: float 5s ease-in-out infinite;
}
.checkin-card::after {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  bottom: -40px; left: -40px;
  animation: float 7s ease-in-out infinite reverse;
}
.checkin-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.checkin-card .status-pill {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.checkin-card .status-pill.checked {
  background: rgba(255,255,255,0.95);
  color: var(--line-green-dark);
}
.checkin-card .time {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}
.checkin-card .date {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.location-info {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 12px;
  position: relative;
  z-index: 1;
}
.location-info .pin {
  font-size: 16px;
  animation: bounce 2s ease-in-out infinite;
}
.location-info strong { display: block; font-size: 13px; margin-bottom: 2px; }
.checkin-btn {
  width: 100%;
  background: white;
  color: var(--line-green-dark);
  padding: 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.checkin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.checkin-btn:active:not(:disabled) { transform: scale(0.97); }
.checkin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.qa-item {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  animation: pop 0.4s ease backwards;
}
.qa-item:nth-child(1) { animation-delay: 0.2s; }
.qa-item:nth-child(2) { animation-delay: 0.25s; }
.qa-item:nth-child(3) { animation-delay: 0.3s; }
.qa-item:nth-child(4) { animation-delay: 0.35s; }
.qa-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.qa-item:active { transform: scale(0.95); }
.qa-icon {
  width: 40px; height: 40px;
  background: var(--line-green-light);
  border-radius: 12px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.3s;
}
.qa-item:hover .qa-icon { animation: wiggle 0.5s ease; }
.qa-label { font-size: 10px; color: var(--ink); font-weight: 500; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}
.section-title h4 { font-size: 14px; font-weight: 600; }
.section-title a {
  font-size: 12px;
  color: var(--line-green);
  text-decoration: none;
}

.activity-list {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.activity-list .empty {
  padding: 30px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}
.activity-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  animation: slideRight 0.3s ease backwards;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line-green);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--line-green-light);
}
.activity-dot.out { background: var(--info); box-shadow: 0 0 0 4px var(--info-bg); }
.activity-dot.late { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.activity-dot.offsite { background: var(--purple); box-shadow: 0 0 0 4px var(--purple-bg); }
.activity-info { flex: 1; }
.activity-info .a-title { font-size: 13px; font-weight: 500; }
.activity-info .a-meta { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.activity-time { font-size: 12px; color: var(--ink-mute); font-weight: 500; }

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 16px;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.98);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  color: var(--ink-mute);
  font-size: 10px;
  padding: 6px 0;
  transition: all 0.2s;
}
.nav-item.active { color: var(--line-green); }
.nav-item.active .nav-icon { animation: pop 0.4s ease; }
.nav-icon {
  font-size: 22px;
  transition: transform 0.2s;
}
.nav-item:hover .nav-icon { transform: scale(1.15); }

/* ============ OFFSITE CHECKIN ============ */
.checkin-content {
  padding: 20px 16px 40px;
}
.gps-status {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--line-green-light);
  color: var(--line-green-dark);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
  animation: slideDown 0.3s ease;
}
.gps-status.searching {
  background: var(--warn-bg);
  color: #92400E;
}
.gps-status.error {
  background: var(--danger-bg);
  color: var(--danger);
}
.accuracy-dot {
  width: 10px; height: 10px;
  background: var(--line-green);
  border-radius: 50%;
  position: relative;
}
.accuracy-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--line-green);
  opacity: 0.4;
  animation: pulseRing 1.5s ease-out infinite;
}
.gps-status.searching .accuracy-dot { background: var(--warn); }
.gps-status.searching .accuracy-dot::after { background: var(--warn); }
.gps-status.error .accuracy-dot { background: var(--danger); }
.gps-status.error .accuracy-dot::after { display: none; }

.info-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.info-row:last-child { border-bottom: none; }
.info-row .lab { color: var(--ink-mute); }
.info-row strong { font-weight: 600; }

.required {
  color: var(--danger);
  font-size: 11px;
  margin-left: 6px;
  font-weight: 500;
}

/* ============ CAMERA ============ */
.camera-section {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.camera-frame {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 20px;
  gap: 8px;
}
.cam-icon {
  font-size: 48px;
  margin-bottom: 6px;
  animation: bounce 2s ease-in-out infinite;
}
.cam-hint {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
}
.camera-flash {
  position: absolute;
  inset: 0;
  background: white;
  pointer-events: none;
  opacity: 0;
}
.camera-flash.active {
  animation: flash 0.3s ease;
}
.camera-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cam-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}
.cam-btn:active { transform: scale(0.96); }
.cam-btn-primary {
  background: linear-gradient(135deg, var(--line-green), var(--line-green-dark));
  color: white;
  box-shadow: var(--shadow-green);
  animation: heartbeat 1.5s ease-in-out infinite;
}
.cam-btn-secondary {
  background: var(--line-soft);
  color: var(--ink);
}
.cam-btn-secondary:hover { background: var(--line); }
.cam-btn-icon {
  flex: 0;
  min-width: 44px;
  background: var(--line-soft);
}

.note-input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  resize: none;
  background: var(--card);
  transition: all 0.2s;
}
.note-input:focus {
  outline: none;
  border-color: var(--line-green);
  box-shadow: 0 0 0 4px var(--line-green-light);
}

.big-checkin {
  width: 100%;
  background: linear-gradient(135deg, var(--line-green), var(--line-green-dark));
  color: white;
  padding: 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 12px;
  box-shadow: var(--shadow-green);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.big-checkin:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6,199,85,0.4);
}
.big-checkin:not(:disabled):active { transform: scale(0.98); }
.big-checkin:disabled {
  background: var(--line);
  color: var(--ink-mute);
  cursor: not-allowed;
  box-shadow: none;
}

.warning-box {
  background: var(--warn-bg);
  color: #92400E;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.6;
  border-left: 3px solid var(--warn);
}

/* ============ REPORT ============ */
.summary-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  animation: slideUp 0.4s ease;
}
.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.summary-head h4 { font-size: 15px; font-weight: 600; }
.month-input {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-family: inherit;
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ss-item {
  text-align: center;
  padding: 14px 8px;
  border-radius: 12px;
  background: var(--bg-soft);
  transition: transform 0.2s;
  animation: pop 0.4s ease backwards;
}
.ss-item:nth-child(1) { animation-delay: 0.1s; }
.ss-item:nth-child(2) { animation-delay: 0.15s; }
.ss-item:nth-child(3) { animation-delay: 0.2s; }
.ss-item:hover { transform: translateY(-2px); }
.ss-item .ss-num { font-size: 24px; font-weight: 700; }
.ss-item.green { background: var(--line-green-light); }
.ss-item.green .ss-num { color: var(--line-green-dark); }
.ss-item.warn { background: var(--warn-bg); }
.ss-item.warn .ss-num { color: #B45309; }
.ss-item.info { background: var(--info-bg); }
.ss-item.info .ss-num { color: #1D4ED8; }
.ss-item .ss-label { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }

.day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-list .empty {
  background: var(--card);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}
.day-item {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: center;
  animation: slideRight 0.3s ease backwards;
  transition: transform 0.2s;
}
.day-item:hover { transform: translateX(4px); }
.day-date {
  width: 46px;
  height: 46px;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.day-date .dd { font-size: 18px; font-weight: 700; line-height: 1; }
.day-date .dm { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.day-info { flex: 1; min-width: 0; }
.day-info .d-times {
  display: flex;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 4px;
}
.day-info .lab { color: var(--ink-mute); font-size: 10px; }
.day-info .d-loc {
  font-size: 11px;
  color: var(--ink-mute);
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-status {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.day-status.ok { background: var(--line-green-light); color: var(--line-green-dark); }
.day-status.late { background: var(--warn-bg); color: #B45309; }
.day-status.off { background: var(--info-bg); color: #1D4ED8; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s;
  z-index: 200;
  max-width: 90%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: linear-gradient(135deg, var(--line-green), var(--line-green-dark));
}
.toast.error {
  background: linear-gradient(135deg, var(--danger), #B91C1C);
  animation: shake 0.4s ease;
}
.toast.warning {
  background: linear-gradient(135deg, var(--warn), #D97706);
}

/* ============ LOADING ============ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 300;
  animation: fadeIn 0.2s ease;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--line-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-overlay div:last-child {
  color: white;
  font-size: 13px;
  font-weight: 500;
}

/* ============ CONFETTI ============ */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 250;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  animation: confetti 3s ease-out forwards;
}

/* ============ SUCCESS MODAL ============ */
.success-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 280;
  padding: 24px;
}
.success-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}
.success-card {
  background: white;
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  animation: pop 0.4s ease;
}
.success-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--line-green), var(--line-green-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 16px;
  animation: heartbeat 1s ease;
  box-shadow: var(--shadow-green);
}
.success-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.success-card p {
  color: var(--ink-mute);
  font-size: 13px;
  margin-bottom: 18px;
}
.success-card .info-grid {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  text-align: left;
}
.success-card .info-grid > div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.success-card .info-grid .l { color: var(--ink-mute); }
.success-card .info-grid .v { font-weight: 600; }
.success-card button {
  width: 100%;
  background: linear-gradient(135deg, var(--line-green), var(--line-green-dark));
  color: white;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-green);
}
.success-card button:active { transform: scale(0.97); }

/* ============ MISC ============ */
.required { color: var(--danger); font-size: 11px; }
.empty { padding: 30px; text-align: center; color: var(--ink-mute); font-size: 13px; }
