/* CircleTogether — design tokens (shadcn "neutral" look) and small utilities on top of Tailwind. */
:root {
  --background: #ffffff;
  --foreground: #171717;
  --card: #ffffff;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --accent: #f5f5f5;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --ring: #a3a3a3;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --destructive: #dc2626;
  --sidebar: #fafafa;
  --radius: 10px;

  --tone-success: #15803d; --tone-success-bg: #ecfdf3;
  --tone-info: #1d4ed8;    --tone-info-bg: #eff4ff;
  --tone-warning: #b45309; --tone-warning-bg: #fffbeb;
  --tone-danger: #b91c1c;  --tone-danger-bg: #fef2f2;
  --tone-neutral: #525252; --tone-neutral-bg: #f5f5f5;
}
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--background); color: var(--foreground); }

/* Tones */
.tone-success { color: var(--tone-success); background: var(--tone-success-bg); border-color: color-mix(in srgb, var(--tone-success) 35%, transparent); }
.tone-info    { color: var(--tone-info);    background: var(--tone-info-bg);    border-color: color-mix(in srgb, var(--tone-info) 35%, transparent); }
.tone-warning { color: var(--tone-warning); background: var(--tone-warning-bg); border-color: color-mix(in srgb, var(--tone-warning) 35%, transparent); }
.tone-danger  { color: var(--tone-danger);  background: var(--tone-danger-bg);  border-color: color-mix(in srgb, var(--tone-danger) 35%, transparent); }
.tone-neutral { color: var(--tone-neutral); background: var(--tone-neutral-bg); border-color: color-mix(in srgb, var(--tone-neutral) 35%, transparent); }
.tone-unknown { color: var(--muted-foreground); background: transparent; border-style: dashed; border-color: var(--border); }
.dot-success { background: var(--tone-success); } .dot-info { background: var(--tone-info); } .dot-warning { background: var(--tone-warning); }
.dot-danger { background: var(--tone-danger); } .dot-neutral { background: var(--tone-neutral); }
.dot-unknown { background: transparent; border: 1.5px dashed var(--muted-foreground); }
.text-tone-danger { color: var(--tone-danger); } .text-tone-warning { color: var(--tone-warning); } .text-tone-success { color: var(--tone-success); }

/* Components */
.chip { display: inline-flex; align-items: center; gap: .375rem; white-space: nowrap; border: 1px solid; border-radius: 6px; font-weight: 500; line-height: 1; height: 1.5rem; padding: 0 .5rem; font-size: .75rem; }
.chip-xs { height: 1.25rem; padding: 0 .375rem; font-size: 11px; } .chip-md { height: 1.75rem; padding: 0 .625rem; font-size: .875rem; }
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 9999px; flex-shrink: 0; } .dot-sm { width: .375rem; height: .375rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; height: 2rem; padding: 0 .75rem; border-radius: 8px; font-size: .875rem; font-weight: 500; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); } .btn-primary:hover { background: #262626; }
.btn-outline { background: var(--card); border-color: var(--border); } .btn-outline:hover { background: var(--accent); }
.btn-ghost { background: transparent; } .btn-ghost:hover { background: var(--accent); }
.btn-danger { background: var(--destructive); color: #fff; } .btn-danger:hover { background: #b91c1c; }
.btn-sm { height: 1.75rem; padding: 0 .625rem; font-size: .8rem; } .btn-xs { height: 1.5rem; padding: 0 .5rem; font-size: .75rem; } .btn-icon { width: 2rem; padding: 0; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--input); border-radius: 8px; background: var(--card); padding: 0 .625rem; font-size: .875rem; height: 2.25rem; outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; padding: .5rem .625rem; line-height: 1.45; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 30%, transparent); }
.input-sm, .select-sm { height: 1.9rem; font-size: .8rem; }
.label { font-size: .75rem; font-weight: 500; color: var(--foreground); display: block; margin-bottom: .3rem; }
.hint { font-size: .75rem; color: var(--muted-foreground); margin-top: .3rem; }
.progress { height: .375rem; border-radius: 9999px; background: var(--muted); overflow: hidden; } .progress > span { display: block; height: 100%; background: var(--primary); border-radius: 9999px; }
.nav-link { display: flex; align-items: center; gap: .5rem; height: 2rem; padding: 0 .5rem; border-radius: 6px; font-size: .875rem; color: var(--foreground); }
.nav-link:hover { background: #f0f0f0; } .nav-link.active { background: #ededed; font-weight: 500; }
.nav-sub { padding-left: 1.75rem; height: 1.75rem; font-size: .8rem; color: var(--muted-foreground); } .nav-sub.active { color: var(--foreground); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: .5rem .75rem; border-bottom: 2px solid transparent; font-size: .875rem; color: var(--muted-foreground); white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--foreground); border-color: var(--border); } .tab.active { color: var(--foreground); border-color: var(--foreground); font-weight: 500; }
.table { width: 100%; font-size: .875rem; } .table th { text-align: left; font-weight: 500; font-size: .75rem; color: var(--muted-foreground); padding: .5rem .75rem; background: color-mix(in srgb, var(--muted) 60%, transparent); }
.table td { padding: .625rem .75rem; border-top: 1px solid var(--border); vertical-align: top; } .table tr:hover td { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.stage-btn { display: inline-flex; align-items: center; gap: .35rem; height: 1.75rem; padding: 0 .5rem; border-radius: 6px; border: 1px dashed var(--border); font-size: .75rem; color: var(--muted-foreground); background: transparent; cursor: pointer; }
.stage-btn:hover { border-style: solid; background: var(--accent); color: var(--foreground); }
.stage-btn.done { border-color: transparent; background: var(--muted); color: var(--muted-foreground); }
.stage-btn.active { font-weight: 500; border-style: solid; cursor: default; }
.diff-add { background: var(--tone-success-bg); color: var(--tone-success); border-radius: 2px; }
.diff-del { background: var(--tone-danger-bg); color: var(--tone-danger); text-decoration: line-through; border-radius: 2px; }
.flash { border-radius: 8px; padding: .5rem .75rem; font-size: .875rem; border: 1px solid; }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--muted-foreground); font-size: .875rem; }
details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; }
.sheet { position: fixed; inset: 0; z-index: 50; display: none; } .sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.sheet-panel { position: absolute; top: 0; right: 0; height: 100%; width: 100%; max-width: 42rem; background: var(--card); border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0,0,0,.08); overflow-y: auto; }
.htmx-request .htmx-indicator { display: inline-block; } .htmx-indicator { display: none; }
[hidden] { display: none !important; }
@media print { .no-print { display: none !important; } .print-break { break-before: page; } body { background: #fff; } main { padding: 0 !important; } .card { border: 0; } }
