/* Shared design tokens — pulled from artist_homebase_v14.html aesthetic */
:root{
  --bg:#fafaf8;
  --card:#fff;
  --bd:#e8e7e3;
  --t:#111;
  --t2:#666;
  --t3:#999;
  --r:10px;
  --r-lg:14px;
  --r-sm:7px;
  --ac:#B5D4F4;      /* default accent — per-artist overrides this */
  --tc:#0C447C;      /* default text-on-accent — per-artist overrides this */
}

*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  background:var(--bg);
  color:var(--t);
  -webkit-font-smoothing:antialiased;
  font-size:14px;
  line-height:1.5;
}
a{color:#185FA5;text-decoration:none}
a:hover{text-decoration:underline}

/* Layout */
.wrap{max-width:880px;margin:0 auto;padding:24px 24px 60px}
.center-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

/* Cards & containers */
.card{
  background:var(--card);
  border:1px solid var(--bd);
  border-radius:var(--r-lg);
  padding:32px;
}

/* Wordmark / branding */
.wordmark{display:flex;flex-direction:column;gap:2px;margin-bottom:28px}
.wordmark-title{font-size:18px;font-weight:600;letter-spacing:-.3px}
.wordmark-sub{font-size:11px;color:var(--t3);letter-spacing:.1em;text-transform:uppercase}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:9px 16px;
  border-radius:8px;
  font-size:13px;
  font-family:inherit;
  cursor:pointer;
  white-space:nowrap;
  border:none;
  transition:opacity .15s, background .15s;
}
.btn-dk{background:var(--t);color:#fff;font-weight:500}
.btn-dk:hover{opacity:.85}
.btn-dk:disabled{opacity:.4;cursor:not-allowed}
.btn-lt{background:var(--card);color:var(--t);border:1px solid var(--bd)}
.btn-lt:hover{background:var(--bg)}
.btn-ghost{background:transparent;color:var(--t2);border:none}
.btn-ghost:hover{color:var(--t)}
.btn-block{width:100%;padding:11px 16px}

/* Form fields */
.field{margin-bottom:16px}
.field label{
  display:block;
  font-size:10px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--t2);
  margin-bottom:6px;
}
.field input, .field select, .field textarea{
  width:100%;
  padding:10px 12px;
  font-size:13px;
  border:1px solid var(--bd);
  border-radius:8px;
  background:var(--card);
  color:var(--t);
  font-family:inherit;
  outline:none;
}
.field input:focus, .field select:focus, .field textarea:focus{border-color:#aaa}

/* Helpers */
.muted{color:var(--t2);font-size:12px}
.small{font-size:12px;color:var(--t2);line-height:1.6}
.tiny{font-size:11px;color:var(--t3)}
.center{text-align:center}
.mt-4{margin-top:16px}
.mt-8{margin-top:32px}
.hidden{display:none}
.spinner{
  display:inline-block;
  width:14px;height:14px;
  border:2px solid #ddd;
  border-top-color:var(--t);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Toast */
.toast{
  position:fixed;bottom:24px;left:50%;transform:translateX(-50%);
  background:var(--t);color:#fff;
  font-size:12px;padding:10px 18px;
  border-radius:9px;
  z-index:999;
  opacity:0;transition:opacity .2s;
  pointer-events:none;
  white-space:nowrap;
}
.toast.show{opacity:1}

/* View-tab switcher (List / Calendar etc.) */
.view-tabs{display:flex;gap:4px;background:#f0efe9;padding:3px;border-radius:7px;margin-bottom:12px;width:fit-content}
.view-tabs button{background:none;border:none;padding:6px 12px;border-radius:5px;font:inherit;font-size:12px;cursor:pointer;color:var(--t2)}
.view-tabs button.active{background:#fff;color:var(--t);box-shadow:0 1px 2px rgba(0,0,0,.05);font-weight:600}

/* Calendar grid (month view) */
.cal-grid-wrap{border:1px solid var(--bd);border-radius:8px;overflow:hidden;background:#fff;width:100%}
/* Header row sized by content (the S/M/T/W…/S labels), every cell row after
   that pinned to a fixed height. Without grid-auto-rows the rows would
   stretch to fit the tallest cell, which is what made the wider modal look
   weird — empty cells were ballooning to match a chip-heavy row. */
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:auto;grid-auto-rows:120px}
.cal-dh{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--t3);padding:8px 6px;text-align:center;background:#fafaf8;border-bottom:1px solid var(--bd)}
.cal-cell{padding:5px 5px 6px;border-right:1px solid var(--bd);border-bottom:1px solid var(--bd);background:#fff;position:relative;display:flex;flex-direction:column;gap:2px;overflow:hidden;min-height:0}
.cal-cell:nth-child(7n){border-right:none}
.cal-cell.cal-off{background:#fafaf8}
.cal-cell.cal-today{background:#fff8e6}
.cal-cell.cal-drop-hover{background:#eff7ff;outline:2px dashed #185FA5;outline-offset:-2px}
.cal-dn{font-size:11px;color:var(--t2);font-weight:600;margin-bottom:1px}
.cal-cell.cal-today .cal-dn{color:#633806}
.cal-chip{font-size:10px;line-height:1.3;padding:2px 5px;border-radius:4px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;max-width:100%}
.cal-chip:hover{filter:brightness(.94)}
.cal-chip[draggable=true]{cursor:grab}
.cal-chip[draggable=true]:active{cursor:grabbing}
.cal-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.cal-toolbar .cal-month{font-size:14px;font-weight:600;flex:1;text-align:center;color:var(--t)}
.cal-toolbar button{font:inherit;background:#fff;border:1px solid var(--bd);border-radius:6px;padding:5px 10px;cursor:pointer;font-size:12px;color:var(--t)}
.cal-toolbar button:hover{background:var(--bg)}

@media (max-width:640px){
  .cal-grid{grid-auto-rows:72px}
  .cal-cell{padding:3px}
  .cal-chip{font-size:9px;padding:1px 4px;line-height:1.25}
  /* Disable iOS callout / text-select on chips so a touch-drag doesn't pop a
     context menu instead of starting the drag. */
  .cal-chip{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
  .cal-dn{font-size:10px}
  .cal-dh{font-size:9px;padding:6px 2px}
  /* Cal toolbar — keep prev/today/next + month label on a single row on 320px+ */
  .cal-toolbar{gap:6px;margin-bottom:8px;flex-wrap:nowrap}
  .cal-toolbar button{padding:5px 8px;font-size:11px}
  .cal-toolbar .cal-month{font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* View-tabs (List / Calendar switcher) */
  .view-tabs button{padding:5px 10px;font-size:11px}
  /* Activity feed — tighten rows so more fit per screen */
  .act-row{padding:9px 10px;font-size:12px;gap:9px}
  .act-icon{width:24px;height:24px;font-size:11px}
  .act-day-head{padding:12px 10px 5px}
}

/* Activity feed */
.act-row{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-bottom:1px solid var(--bd);font-size:12px}
.act-row:last-child{border-bottom:none}
.act-icon{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px}
.act-body{flex:1;min-width:0;line-height:1.45}
.act-actor{font-weight:600;color:var(--t)}
.act-meta{font-size:10px;color:var(--t3);margin-top:1px}
.act-day-head{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--t3);padding:14px 12px 6px;background:var(--bg);border-bottom:1px solid var(--bd)}

/* Overdue indicator — small red "!" pill that pops next to overdue task labels
   in the tasks list, timeline, master timeline, and This Week panel. */
.overdue-badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:15px;height:15px;
  border-radius:50%;
  background:#c0392b;color:#fff;
  font-size:9px;font-weight:700;
  flex-shrink:0;
  margin-right:6px;
  vertical-align:middle;
  line-height:1;
  animation:overdue-pulse 2.4s ease-in-out infinite;
}
@keyframes overdue-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(192,57,43,.45)}
  50%    {box-shadow:0 0 0 4px rgba(192,57,43,0)}
}
/* Whole task-row gets a subtle red left border when overdue, so even a
   collapsed list scans at a glance. */
.task-row.overdue{border-left:3px solid #c0392b;padding-left:8px}
.task-row.overdue .tlbl{color:#791F1F}
