/* ========================
   CSS RESET & ROOT TOKENS
======================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --blue-primary: #4a9fc8;
  --blue-dark: #2b6e94;
  --blue-light: #e8f4fb;
  --circle-active-bg: #2b5f7a;
  --circle-active-text: #ffffff;
  --circle-inactive-border: #4a9fc8;
  --circle-inactive-text: #333;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-noshift: #888;
  --card-bg: #ffffff;
  --card-border: #e8ecef;
  --card-shadow: 0 1px 4px rgba(0,0,0,0.06);
  --bg-page: #f2f4f6;
  --nav-bg: #ffffff;
  --nav-active: #4a9fc8;
  --nav-inactive: #9aa5b4;
  --header-h: 56px;
  --nav-h: 70px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================
   BASE LAYOUT
======================== */
html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  overflow: hidden; /* prevent body scroll; let main scroll */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

/* ========================
   SAFE AREAS (iPhone notch / dynamic island)
======================== */
.status-bar-spacer {
  height: env(safe-area-inset-top, 0px);
  background: var(--blue-primary);
  flex-shrink: 0;
}

.safe-area-bottom {
  height: env(safe-area-inset-bottom, 0px);
  background: var(--nav-bg);
  flex-shrink: 0;
}

/* ========================
   HEADER
======================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--blue-primary);
  height: var(--header-h);
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
}

.header-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.header-left {
  width: 36px;
}

.header-right {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.header-right:hover,
.header-right:active {
  background: rgba(255,255,255,0.15);
}

/* ========================
   SCHEDULE LIST
======================== */
.schedule-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Custom scrollbar */
.schedule-list::-webkit-scrollbar { width: 3px; }
.schedule-list::-webkit-scrollbar-track { background: transparent; }
.schedule-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ========================
   DAY CARD
======================== */
.day-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: flex-start;
  padding: 14px 14px 14px 14px;
  gap: 14px;
  animation: cardIn 0.35s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger animation */
.day-card:nth-child(1) { animation-delay: 0.04s; }
.day-card:nth-child(2) { animation-delay: 0.08s; }
.day-card:nth-child(3) { animation-delay: 0.12s; }
.day-card:nth-child(4) { animation-delay: 0.16s; }
.day-card:nth-child(5) { animation-delay: 0.20s; }
.day-card:nth-child(6) { animation-delay: 0.24s; }
.day-card:nth-child(7) { animation-delay: 0.28s; }

/* ========================
   DAY LABEL + CIRCLE
======================== */
.day-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 46px;
}

.day-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.day-name.active {
  color: var(--blue-primary);
  font-weight: 600;
}

.day-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  border: 2.5px solid var(--circle-inactive-border);
  color: var(--circle-inactive-text);
  transition: all 0.2s;
}
.day-circle.active {
  background: var(--circle-active-bg);
  border-color: var(--circle-active-bg);
  color: var(--circle-active-text);
}
.day-circle.today {
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  font-weight: 700;
}

/* ========================
   SHIFT INFO AREA
======================== */
.shift-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 42px;
  justify-content: center;
}

.shift-time {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.shift-time.active {
  color: var(--blue-primary);
}

.shift-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.shift-meta svg {
  flex-shrink: 0;
  opacity: 0.65;
}

.no-shift-text {
  font-size: 16px;
  color: var(--text-noshift);
  font-style: normal;
  align-self: center;
}

/* ========================
   HOURS BADGE
======================== */
.shift-hours {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 2px;
}

/* ========================
   BOTTOM NAVIGATION
======================== */
.bottom-nav {
  background: var(--nav-bg);
  border-top: 1px solid #e4e8ec;
  display: flex;
  height: var(--nav-h);
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nav-inactive);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 0 4px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active {
  color: var(--nav-active);
}
.nav-item:active {
  opacity: 0.7;
}

.nav-icon {
  width: 26px;
  height: 26px;
}
.nav-label {
  font-size: 10.5px;
}

/* ========================
   RESPONSIVE / DESKTOP GUARD
======================== */
@media (min-width: 431px) {
  body {
    box-shadow: 0 0 60px rgba(0,0,0,0.12);
    border-radius: 2px;
  }
}
