/* WORKBY STUDIO · sade görünüm katmanı
   Bu dosya en son yüklenir ve yalnızca görünümü değiştirir. Kaldırılırsa panel eski görünümüne döner. */
:root {
  --page: #F7F7F9;
  --paper: #FFFFFF;
  --ink: #18161D;
  --muted: #6E6A78;
  --faint: #9A96A3;
  --line: #ECEAF0;
  --line-strong: #DCD8E3;
  --accent: #7448C2;
  --accent-ink: #5B35A3;
  --accent-soft: #F3EEFB;
  --late: #B3261E;
  --late-soft: #FCEDEB;
  --ok: #2E7D4F;
  --warn-soft: #FFF6E5;
  --warn-ink: #7A5200;
  --beige: var(--accent-soft);
  --lavender: var(--accent-soft);
  --surface: var(--page);
  --sidebar-width: 232px;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--page);
}
body { background: var(--page); color: var(--ink); }

/* Kenar menü */
aside { background: var(--paper); border-right: 1px solid var(--line); padding: 26px 14px; }
.brand { font-size: 13px; letter-spacing: .14em; padding: 0 10px 24px; font-weight: 700; }
nav { display: grid; gap: 14px; }
.nav-group { display: grid; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--faint); padding: 0 10px 4px; letter-spacing: .02em; }
nav a { min-height: 38px; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 500; color: #4A4654; border: 0; }
nav a:hover { background: #F4F3F6; color: var(--ink); }
nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; border: 0; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; color: #8A8594; }
nav a.active .nav-icon { color: var(--accent); }

/* Üst şerit */
header { background: rgba(247,247,249,.85); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); height: 56px; position: sticky; top: 0; z-index: 3; }
#crumb { font-weight: 600; color: var(--ink); font-size: 13px; }
#today { color: var(--muted); }
#view { max-width: 1240px; padding-top: 28px; }

/* Tipografi */
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: 14px; font-weight: 600; }
.sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.muted, .empty { color: var(--muted); }
.empty { padding: 10px 0; font-size: 13px; }
.heading { margin-bottom: 20px; align-items: flex-end; }

/* Kartlar */
.panel, .stat, .card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; padding: 18px; }
.panel-title { margin-bottom: 10px; align-items: center; }
.panel-title .muted { font-size: 13px; }
.row { border-bottom: 1px solid var(--line); padding: 11px 0; }
.link { color: var(--accent-ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Düğmeler: tek ana düğme mor, diğerleri sade */
button, .button-link { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 9px; padding: 8px 14px; font-weight: 500; font-size: 13px; color: var(--ink); min-height: 36px; }
button:hover, .button-link:hover { background: #F4F3F6; }
.primary, button.primary, .button-link.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover, button.primary:hover, .button-link.primary:hover { background: var(--accent-ink); }
.button-link { display: inline-flex; align-items: center; margin-top: 12px; }
.danger { color: var(--late); }
input, select, textarea { border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 10px; min-height: 36px; background: var(--paper); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); outline-offset: 0; }
.toolbar { gap: 10px; align-items: flex-end; margin: 0 0 14px; }
.toolbar label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.toolbar label input, .toolbar label select { color: var(--ink); font-size: 14px; }
.panel > .toolbar:last-child { margin-bottom: 0; }

/* Durum etiketleri: daha küçük ve sakin */
.pill { font-size: 11.5px; font-weight: 500; padding: 3px 8px; background: #F1F0F4; color: #4A4654; }

/* İstatistikler */
.stats { gap: 12px; }
.stat { display: grid; gap: 6px; padding: 14px 16px; }
.stat .value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
.stat .muted { font-size: 12.5px; }
.stat:hover { border-color: var(--line-strong); }
.compact-stats { grid-template-columns: repeat(4, minmax(0,1fr)); margin: 16px 0; }

/* Tablolar */
table { font-size: 13px; }
th { font-size: 12px; font-weight: 500; color: var(--muted); background: #FAFAFB; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
tbody tr:hover td { background: #FAFAFB; }
.table { border: 1px solid var(--line); border-radius: 10px; }
.table tr:last-child td { border-bottom: 0; }

/* Bugün ekranı */
.today-heading .sub { font-size: 15px; }
.text-late { color: var(--late); font-weight: 500; }
.today-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 16px; align-items: start; }
.today-side { display: grid; gap: 16px; }
.today-todos { padding: 20px; }
.todo-progress { width: 110px; height: 6px; border-radius: 6px; background: #EFEDF3; overflow: hidden; }
.todo-progress span { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .25s ease; }
.todo-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.todo { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo label { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; font-size: 14px; cursor: pointer; }
.todo input[type=checkbox] { width: 19px; height: 19px; min-height: 0; accent-color: var(--ok); flex: 0 0 auto; margin: 0; }
.todo-title { overflow-wrap: anywhere; }
.todo.done .todo-title { color: var(--faint); text-decoration: line-through; }
.todo-tag { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.todo-tag.late { color: var(--late); font-weight: 500; }
.icon-button { min-height: 28px; width: 28px; padding: 0; border: 0; color: var(--faint); font-size: 18px; line-height: 1; background: transparent; }
.icon-button:hover { color: var(--late); background: var(--late-soft); }
.todo-add { display: flex; gap: 8px; margin-top: 14px; }
.todo-add input { flex: 1; min-width: 0; }
.todo-add select { width: auto; }
.todo-manage { margin-top: 14px; font-size: 13px; }
.todo-manage summary { color: var(--muted); }
.todo-note { margin-top: 12px; font-size: 12.5px; color: var(--warn-ink); background: var(--warn-soft); border-radius: 9px; padding: 9px 11px; }
.form-error { color: var(--late); font-size: 13px; margin-top: 8px; }
.due { font-size: 12px; color: var(--muted); white-space: nowrap; }
.due.now { color: var(--accent-ink); font-weight: 600; }
.due.late { color: var(--late); font-weight: 600; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.mini-stats div { background: var(--page); border-radius: 9px; padding: 10px 12px; display: grid; gap: 2px; }
.mini-stats span { font-size: 12px; }
.mini-stats strong { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }

/* Raporlar: sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.guide-panel { display: grid; gap: 6px; justify-items: start; padding: 22px; }
.guide-panel .muted { max-width: 62ch; font-size: 14px; }
.account-chip { display: grid; gap: 4px; font-size: 12px; }
.account-chip strong { font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.settings-panel { margin-top: 16px; }
.settings-panel summary { list-style: none; display: flex; justify-content: space-between; align-items: center; }
.settings-panel summary::-webkit-details-marker { display: none; }
.settings-panel summary::after { content: "Aç"; font-size: 13px; color: var(--accent-ink); font-weight: 500; }
.settings-panel[open] summary::after { content: "Kapat"; }
.settings-panel[open] summary { margin-bottom: 12px; }
.account-list { display: grid; margin-top: 8px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-row .check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.account-row .check span { display: grid; }
.account-row .check .muted { font-size: 12px; }
.account-row input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.account-row select { width: auto; max-width: 260px; }
#workby-ad-comparison { margin-top: 16px; }

/* Araçlar */
.tool-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tool-card { display: grid; gap: 8px; align-content: start; transition: border-color .15s ease; }
.tool-card:hover { border-color: var(--accent); }
.tool-card .nav-icon { width: 22px; height: 22px; color: var(--accent); }

/* Giriş ekranı */
body.auth-screen #view { background: var(--page); }
body.auth-screen .auth-panel { box-shadow: 0 1px 2px #18161d0a, 0 12px 32px #18161d0d; border-color: var(--line); }

/* Tablet */
@media (max-width: 1080px) {
  .today-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  :root { --sidebar-width: 210px; }
  .compact-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
/* Telefon */
@media (max-width: 650px) {
  #view { padding-top: 18px; }
  h1 { font-size: 23px; }
  aside { background: var(--paper); }
  .heading { align-items: flex-start; }
  .heading > .primary, .heading > button { width: auto; }
  .panel, .stat, .card { padding: 14px; }
  .today-todos { padding: 16px; }
  .todo-add { flex-wrap: wrap; }
  .todo-add input { flex: 1 1 100%; }
  .todo-add select { flex: 1; }
  .todo label { font-size: 15px; }
  .compact-stats { gap: 8px; }
  .stat .value { font-size: 19px; }
  .account-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .account-row select { max-width: none; width: 100%; }
  .toolbar label { flex: 1 1 140px; }
  .toolbar > button { flex: 1 1 100%; }
  .mini-stats strong { font-size: 16px; }
  .tabs { margin-inline: calc(var(--page-gutter) * -1); padding-inline: var(--page-gutter); }
}
@media print { header, aside, .tabs { display: none !important; } body { background: #fff; } }
.compare-panel #workby-ad-comparison { border: 0; padding: 0; margin: 0; box-shadow: none; }
.compare-panel #workby-ad-comparison > .panel-title { display: none; }
