:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,.08);
  --panel-2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted2: rgba(255,255,255,.55);
  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --radius-sm: 12px;

  --rob: #d8c6ff;
  --noah: #bfe3ff;
  --other: #ffd6ad;
  --done: #c9f2c9;
  --white: #ffffff;

  --accent: #7aa9ff;
  --accent2: #a98bff;
  --danger: #ff7f7f;

  --focus: 0 0 0 3px rgba(122,169,255,.35);
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(169,139,255,.22), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(122,169,255,.22), transparent 50%),
    radial-gradient(900px 900px at 50% 120%, rgba(201,242,201,.12), transparent 55%),
    var(--bg);
  color: var(--text);
}

.app-shell{
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 42px;
}

.topbar{
  display:flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  box-shadow: var(--shadow);
  overflow:hidden;
}

.title-wrap h1{
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}
.subtitle{
  margin:0;
  color: var(--muted);
  font-size: 13.5px;
}

.title-line{
  display:flex;
  align-items:center;
  gap: 10px;
}

.chip{
  font-size: 12px;
  color: rgba(0,0,0,.85);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(0,0,0,.14);
  padding: 6px 10px;
  border-radius: 999px;
}

.cats-hero{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.cats-hero img{ height:56px; width:auto; }

.cats-hero img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.nav-row{
  margin-top: 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}

.tabs{
  display:flex;
  gap: 8px;
  align-items:center;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
}

.tab{
  appearance:none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  line-height:1.05;
  gap: 2px;
}
.tab:hover{ color: var(--text); background: rgba(255,255,255,.06); }
.tab[aria-selected="true"]{
  color: var(--text);
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(122,169,255,.22), rgba(169,139,255,.18));
}
.tab-label{ font-weight: 650; font-size: 13px; }
.tab-year{ font-size: 11px; color: var(--muted2); }
.tab[aria-selected="true"] .tab-year{ color: rgba(255,255,255,.75); }

.nav-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

.btn{
  border-radius: 14px;
  padding: 11px 14px;
  font-weight: 650;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ background: rgba(255,255,255,.09); }
.btn:active{ transform: translateY(1px); }
.btn:focus{ outline:none; box-shadow: var(--focus); }

.btn-primary{
  border-color: rgba(122,169,255,.32);
  background: linear-gradient(180deg, rgba(122,169,255,.35), rgba(169,139,255,.28));
}
.btn-primary:hover{ background: linear-gradient(180deg, rgba(122,169,255,.42), rgba(169,139,255,.32)); }

.btn-ghost{
  background: rgba(255,255,255,.04);
}

.content{
  margin-top: 14px;
}

.panel{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.panel-head{
  padding: 16px 16px 10px;
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title h2{
  margin:0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.meta{
  margin-top: 6px;
  color: var(--muted2);
  font-size: 12px;
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}
.meta .dot{
  width: 7px;
  height: 7px;
  background: rgba(201,242,201,.65);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201,242,201,.12);
}
.meta .sep{ color: rgba(255,255,255,.18); }

.legend{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.legend-item{
  display:flex;
  gap: 7px;
  align-items:center;
  font-size: 12px;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(0,0,0,.10);
}

.legend-sep{
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,.18);
  margin: 0 2px;
}
.legend-icon{
  width: 18px;
  height: 18px;
  display:block;
}
.legend-icon-item{
  padding: 6px 10px;
}

.btn-sm{
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}
.swatch{
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.12);
}
.swatch-rob{ background: var(--rob); }
.swatch-noah{ background: var(--noah); }
.swatch-other{ background: var(--other); }
.swatch-done{ background: var(--done); }

.calendar{
  padding: 0 12px 12px;
}

.weekday{
  font-size: 11.5px;
  color: var(--muted2);
  padding: 10px 6px 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
  display:inline-block;
  width: calc(100% / 7);
}

.grid{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.day{
  position: relative;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.14);
  min-height: 118px;
  background: rgba(255,255,255,.06);
}

.day.inactive{
  opacity: .62;
}

.day-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 10px 10px 6px;
}

.day-num{
  font-weight: 750;
  font-size: 13px;
  color: rgba(0,0,0,.92);
}
.badge-today{
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(201,242,201,.14);
  border: 1px solid rgba(201,242,201,.25);
  color: rgba(0,0,0,.85);
}

.day-body{
  position: relative;
  padding: 8px 10px 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.mode-pill{
  position:absolute;
  right: 10px;
  top: 46px;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(0,0,0,.14);
  color: rgba(0,0,0,.78);
}

.planning-matrix{
  display:grid;
  grid-template-columns: 1fr 44px 44px 44px;
  gap: 6px 8px;
  align-items:center;
  font-size: 12px;
  color: rgba(0,0,0,.85);
}

/* Planning: per-day "Other" custom label */
.other-label{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  gap: 8px;
  margin-top: 2px;
}
.other-label-title{
  font-weight: 650;
}
.other-label-input{
  flex: 1;
  min-width: 0;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.70);
  color: rgba(0,0,0,.90);
  padding: 0 10px;
  font-size: 12px;
}
.other-label-input:focus{ outline:none; box-shadow: var(--focus); }
.matrix-head{
  display:flex;
  align-items:center;
  justify-content:center;
  padding-bottom: 2px;
}
.person{
  font-weight: 650;
}
.c.matrix-head{
  display:flex;
  align-items:center;
  justify-content:center;
  padding-bottom: 2px;
}
.matrix-icon{
  width: 18px;
  height: 18px;
  display:block;
}
.task-icon{
  width: 18px;
  height: 18px;
  display:block;
}
ell{
  display:flex;
  justify-content:center;
  align-items:center;
}

.pseudo-radio{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.28);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  position: relative;
  transition: transform .08s ease, background .12s ease;
}
.pseudo-radio:hover{ background: rgba(255,255,255,.10); }
.pseudo-radio:active{ transform: scale(.98); }
.pseudo-radio[data-checked="true"]::after{
  content:"";
  position:absolute;
  inset: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,.90);
}

.task-checks{
  display:flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: rgba(0,0,0,.88);
}

.task-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(0,0,0,.12);
}

.task-row .label{
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 650;
}

.pill{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  color: rgba(0,0,0,.78);
  background: rgba(255,255,255,.06);
}

.checkbox{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.28);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  position: relative;
}
.checkbox[data-checked="true"]{
  background: rgba(201,242,201,.32);
  border-color: rgba(201,242,201,.35);
}
.checkbox[data-checked="true"]::after{
  content:"";
  position:absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,.90);
  border-bottom: 2px solid rgba(255,255,255,.90);
  transform: rotate(40deg);
}

.panel-foot{
  padding: 12px 16px 16px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.hint{
  color: var(--muted2);
  font-size: 12px;
}
.kbd{
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.06);
  color: rgba(0,0,0,.82);
  margin-right: 6px;
}
.save-status{
  font-size: 12px;
  color: rgba(0,0,0,.78);
}

/* Modal */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 80;
}
.hidden{ display:none !important; }

.modal{
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(20,26,50,.92);
  box-shadow: 0 30px 80px rgba(0,0,0,.50);
  overflow:hidden;
  backdrop-filter: blur(10px);
}
.modal-head{
  padding: 14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.modal-head h3{
  margin:0;
  font-size: 16px;
}
.icon-btn{
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.06);
  color: rgba(0,0,0,.88);
  cursor:pointer;
  width: 36px;
  height: 36px;
}
.icon-btn:focus{ outline:none; box-shadow: var(--focus); }
.modal-body{
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.instructions-textarea{
  width: 100%;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}
.instructions-textarea:focus{ outline:none; box-shadow: var(--focus); }
.instructions-textarea:read-only{ opacity: .85; }
.modal-actions{
  padding: 12px 14px 14px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
}

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(20,26,50,.95);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(0,0,0,.90);
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  font-size: 12.5px;
  z-index: 90;
}

/* Responsive */
@media (max-width: 980px){
  .topbar{ flex-direction: column; align-items: flex-start; }
  .cats-hero{ width: 100%; min-width: 0; height: 110px; }
  .nav-row{ flex-direction: column; align-items: stretch; }
  .tabs{ justify-content: space-between; }
  .tab{ flex: 1; align-items: center; }
  .panel-head{ flex-direction: column; align-items: flex-start; }
  .legend{ justify-content:flex-start; }
}
@media (max-width: 680px){
  .weekday{ display:none; }
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day{ min-height: 132px; }
  .planning-matrix{ grid-template-columns: 1fr 44px 44px 44px; }
}


/* === UI fixes per request === */
.calendar-day,
.calendar-day * {
    color: #000000 !important;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #000000;
}

/* Planning mode background */
bodybody.planning-mode{
  --text: rgba(0,0,0,.88);
  --muted: rgba(0,0,0,.65);
  --muted2: rgba(0,0,0,.52);
  background: #d9f3f1;
  color: var(--text);
}

/* Remove watermarks/labels */
.day-mode-label {
    display: none !important;
}


body.planning-mode { background: #d9f3f1 !important; }

.money-box {
  margin-left: 14px;
  font-weight: 700;
  font-size: 18px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.08);
  color: #000;
}


/* --- UI fixes (Jan 2026) --- */
body.planning-mode{
  background: #d9f3f1 !important;
  color: rgba(0,0,0,.88) !important;
}
body.planning-mode .subtitle,
body.planning-mode .tip,
body.planning-mode .chip{
  color: rgba(0,0,0,.65) !important;
}
.money-box{
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.75);
  color: rgba(0,0,0,.90);
  font-weight: 700;
  font-size: 16px;
  text-align: right;
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
}
.header-right{
  display:flex;
  align-items:center;
  gap: 12px;
}
.day .date-num,
.day .date-dow,
.day .mode-pill,
.day label,
.day .row,
.day .name,
.day .task-label,
.day .task-pill{
  color: rgba(0,0,0,.88) !important;
}

body.planning-mode .task-pill, body.planning-mode .task-label{ color: rgba(0,0,0,.88) !important; }

.cats-hero img{ display:block; height:56px; width:auto; }

/* Planning mode theme */
body.planning-mode{
  --bg: #d9f3f1;
  --panel: rgba(255,255,255,.70);
  --panel-2: rgba(255,255,255,.78);
  --border: rgba(0,0,0,.14);
  --text: rgba(0,0,0,.90);
  --muted: rgba(0,0,0,.65);
  --muted2: rgba(0,0,0,.55);
  background: #d9f3f1 !important;
  color: var(--text) !important;
}
body.planning-mode .panel,
body.planning-mode .topbar,
body.planning-mode .tabs,
body.planning-mode .day{
  border-color: var(--border);
}

body.planning-mode .task-pill, body.planning-mode .task-label, body.planning-mode .matrix-head{ color: rgba(0,0,0,.88) !important; }



/* Planning mode: force light teal page background (not day cards) */
html body.planning-mode{
  background: #d9f3f1 !important;
}
