/* ─────────────────────────────────────────────
   AURUM MEADOWS — LAUNCH CHECKLIST
   styles.css
   ───────────────────────────────────────────── */

:root {
  --cream:        #F7F3EC;
  --cream2:       #EDE7DC;
  --cream3:       #E2D9CC;
  --sand:         #C9B99A;
  --gold:         #A8844E;
  --gold-light:   #D4AC6E;
  --gold-pale:    #F5ECD9;
  --terra:        #B86B4A;
  --terra-pale:   #F8EDE7;
  --sage:         #7A9170;
  --sage-light:   #A4B89C;
  --sage-pale:    #D8E5D4;
  --charcoal:     #2C2A25;
  --charcoal2:    #403C35;
  --brown:        #6B5D4E;
  --brown-light:  #8C7D6E;
  --muted:        #9A8E82;
  --border:       #DDD4C6;
  --border-light: #EAE3D8;
  --white:        #FDFAF6;
  --shadow:       0 2px 20px rgba(44,42,37,.07);
  --shadow-md:    0 6px 40px rgba(44,42,37,.14);
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ─── */
.layout { display: flex; min-height: 100vh; }
.main   { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar               { width: 5px; height: 5px; }
::-webkit-scrollbar-track         { background: transparent; }
::-webkit-scrollbar-thumb         { background: var(--sand); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover   { background: var(--gold); }

/* ════════════════════════
   SIDEBAR
════════════════════════ */
.sidebar {
  width: 224px;
  background: var(--charcoal);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: .03em;
  line-height: 1.2;
}
.sidebar-logo .tagline {
  font-size: 10px;
  color: rgba(255,255,255,.32);
  margin-top: 5px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.sidebar-nav { padding: 10px 0; flex: 1; }

.nav-progress-mini {
  height: 2px;
  background: rgba(255,255,255,.07);
  border-radius: 99px;
  margin: 0 20px 1px;
  overflow: hidden;
}
.nav-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gold);
  transition: width .35s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background .13s, color .13s;
  border-left: 2px solid transparent;
  color: rgba(255,255,255,.48);
  font-size: 12.5px;
  font-weight: 400;
  user-select: none;
  touch-action: manipulation;
}
.nav-item:hover   { background: rgba(255,255,255,.05); color: rgba(255,255,255,.78); }
.nav-item.active  { background: rgba(168,132,78,.13); border-left-color: var(--gold); color: var(--gold-light); }

.nav-icon  { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-count {
  font-size: 10px;
  background: rgba(255,255,255,.07);
  padding: 1px 7px;
  border-radius: 99px;
  color: rgba(255,255,255,.35);
  flex-shrink: 0;
}
.nav-item.active .nav-count { background: rgba(168,132,78,.22); color: var(--gold-light); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer .overall-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.28);
  margin-bottom: 7px;
}
.sidebar-footer .overall-bar {
  height: 4px;
  background: rgba(255,255,255,.09);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.sidebar-footer .overall-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width .35s ease;
}
.sidebar-footer .overall-txt { font-size: 11px; color: rgba(255,255,255,.35); }

/* ════════════════════════
   HEADER
════════════════════════ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  flex-shrink: 0;
}
.header-left .page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--charcoal);
}
.header-left .page-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.launch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sage-pale);
  color: var(--sage);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid var(--sage-light);
}

.countdown { display: flex; align-items: center; gap: 14px; }
.cblock    { text-align: center; }
.cnum {
  font-size: 24px;
  font-weight: 500;
  color: var(--charcoal);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1;
}
.clbl  { font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-top: 2px; }
.csep  { font-size: 20px; color: var(--border); margin-bottom: 10px; }

/* ════════════════════════
   MOBILE NAV
════════════════════════ */
.mobile-nav {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }

.mobile-nav-item {
  flex-shrink: 0;
  padding: 5px 13px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  background: var(--white);
  color: var(--brown-light);
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  transition: all .13s;
  touch-action: manipulation;
}
.mobile-nav-item.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--gold-light);
}

/* ════════════════════════
   CONTENT AREA
════════════════════════ */
.content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

/* ─── FILTERS ─── */
.filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.filter-group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.filter-label { font-size: 11px; color: var(--muted); }
.filter-sep   { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }

.fbtn {
  padding: 4px 13px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  background: var(--white);
  color: var(--brown-light);
  font-family: 'DM Sans', sans-serif;
  transition: all .13s;
  line-height: 1.6;
}
.fbtn:hover { border-color: var(--sand); color: var(--brown); }
.fbtn.on    { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }

/* ─── CAT HEADER ─── */
.cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}
.cat-title-row  { display: flex; align-items: center; gap: 12px; }
.cat-icon-wrap  {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.cat-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.1;
}
.cat-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.cat-prog-wrap  { display: flex; align-items: center; gap: 10px; }
.cat-prog-bar   { width: 120px; height: 5px; background: var(--cream3); border-radius: 99px; overflow: hidden; }
.cat-prog-fill  { height: 100%; border-radius: 99px; transition: width .35s ease; }
.cat-prog-txt   { font-size: 12px; white-space: nowrap; }

.lock-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  justify-content: flex-end;
}
.lock-hint svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ─── WEEK GROUP ─── */
.week-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 16px 0 7px;
}
.week-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ─── TASK CARDS ─── */
.task-list {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 6px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .11s;
  position: relative;
  user-select: none;
  touch-action: manipulation;
}
.task-item:last-child { border-bottom: none; }
.task-item:hover      { background: var(--cream); }
.task-item.completed  { background: var(--cream); }

.task-cb {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 1.5px solid var(--sand);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  background: var(--white);
}
.task-item.completed .task-cb {
  background: var(--sage);
  border-color: var(--sage);
}
.task-cb svg        { display: none; width: 10px; height: 10px; }
.task-item.completed .task-cb svg { display: block; }

.task-text {
  font-size: 13.5px;
  color: var(--charcoal);
  line-height: 1.55;
  flex: 1;
}
.task-week-prefix {
  font-size: 11px;
  font-weight: 600;
  color: var(--brown-light);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 5px;
}
.task-source-prefix {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-right: 4px;
}
.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--muted);
}

.task-actions {
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity .13s;
  flex-shrink: 0;
  margin-top: 1px;
}
.task-item:hover .task-actions { opacity: 1; }

.task-del {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  color: var(--muted);
  font-size: 12px;
  border-radius: 5px;
  font-family: inherit;
  transition: color .11s, background .11s;
  line-height: 1;
  touch-action: manipulation;
}
.task-del:hover { color: var(--terra); background: var(--terra-pale); }

/* ─── ADD TASK BUTTON ─── */
.add-task-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: color .13s, border-color .13s;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  margin-top: 6px;
  touch-action: manipulation;
}
.add-task-btn:hover { color: var(--gold); border-color: var(--gold); }
.add-task-btn .plus { font-size: 17px; line-height: 1; }

.empty-state {
  text-align: center;
  padding: 36px;
  color: var(--muted);
  font-size: 13px;
}

/* ════════════════════════
   MODALS
════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,42,37,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 16px;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
  width: 100%;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }

.modal-icon {
  width: 50px;
  height: 50px;
  background: var(--cream2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 18px;
}
.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 7px;
}
.modal-sub {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.55;
}
.modal-sub strong { color: var(--charcoal); font-weight: 500; }

/* ─── PIN MODAL ─── */
.pin-modal-box { max-width: 320px; }

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}
.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--sand);
  transition: all .15s;
}
.pin-dot.filled { background: var(--gold); border-color: var(--gold); transform: scale(1.15); }

.pin-error {
  color: var(--terra);
  font-size: 12px;
  text-align: center;
  min-height: 20px;
  margin-bottom: 12px;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  touch-action: manipulation;
}
.pin-key {
  padding: 13px;
  font-size: 17px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .11s;
  color: var(--charcoal);
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:hover  { background: var(--cream2); border-color: var(--sand); }
.pin-key:active { transform: scale(.95); background: var(--cream3); }
.del-key        { font-size: 13px; color: var(--brown-light); }

.pin-cancel {
  width: 100%;
  padding: 11px;
  font-size: 13px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  transition: all .13s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pin-cancel:hover { border-color: var(--sand); color: var(--brown); }

/* ─── ADD TASK MODAL ─── */
.add-modal-box { max-width: 420px; }

.add-modal-box textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  resize: none;
  outline: none;
  line-height: 1.55;
  transition: border .14s;
}
.add-modal-box textarea:focus { border-color: var(--gold); }

.add-modal-box select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  outline: none;
  margin-top: 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239A8E82' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

/* ─── DELETE CONFIRM MODAL ─── */
.del-modal-box { max-width: 360px; }

.add-modal-footer {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}
.btn-primary {
  flex: 1;
  padding: 11px;
  font-size: 13px;
  background: var(--charcoal);
  color: var(--gold-light);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: background .13s;
}
.btn-primary:hover { background: var(--charcoal2); }
.btn-sec {
  flex: 1;
  padding: 11px;
  font-size: 13px;
  background: none;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .13s;
}
.btn-sec:hover { border-color: var(--sand); color: var(--brown); }
.btn-danger {
  flex: 1;
  padding: 11px;
  font-size: 13px;
  background: var(--terra);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: background .13s;
}
.btn-danger:hover { background: #9E5438; }

/* ════════════════════════
   RESPONSIVE
════════════════════════ */
@media (max-width: 768px) {
  .sidebar      { display: none; }
  .mobile-nav   { display: flex; }
  .header       { padding: 14px 16px; }
  .content      { padding: 16px; }
  .filters      { gap: 5px; }
  .cat-header   { gap: 10px; }
  .cat-prog-bar { width: 80px; }
}
@media (max-width: 480px) {
  .countdown    { gap: 8px; }
  .cnum         { font-size: 18px; }
  .cat-title    { font-size: 22px; }
}

/* ════════════════════════
   VIEW LOCK SCREEN
════════════════════════ */
.view-lock-screen {
  position: fixed;
  inset: 0;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.view-lock-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  text-align: center;
}

.vl-logo {
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.vl-logo-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
}

.vl-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.vl-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.vl-divider {
  width: 40px;
  height: 1.5px;
  background: var(--gold);
  margin: 18px auto;
  border-radius: 99px;
  opacity: .5;
}

.vl-prompt {
  font-size: 13px;
  color: var(--brown-light);
  margin-bottom: 16px;
}

/* View lock pin dots */
.view-pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 6px;
}
.view-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--sand);
  transition: all .15s;
}
.view-pin-dot.filled {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.18);
}

.view-pin-error {
  color: var(--terra);
  font-size: 12px;
  min-height: 20px;
  margin-bottom: 14px;
}

.vl-keypad {
  margin-bottom: 20px;
}

.vl-footer {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  margin-top: 4px;
}

@media (max-width: 420px) {
  .view-lock-card { padding: 32px 20px 24px; }
  .vl-title       { font-size: 22px; }
}
