@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --ink: #202633; --muted: #788292; --line: #e8ebf0; --surface: #fff;
  --bg: #f5f6f8; --accent: #4559d8; --shadow: 0 8px 24px rgba(28,39,60,.055);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'DM Sans', Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1440px; margin: auto; height: 68px; padding: 0 34px; display:flex; align-items:center; justify-content:space-between; }
.brand { display:flex; align-items:center; gap:11px; color:var(--ink); font:800 19px Manrope,sans-serif; text-decoration:none; letter-spacing:-.5px; }
.brand-mark { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; color:white; background:linear-gradient(145deg,#6678ed,#394cc3); font:800 24px Manrope,sans-serif; box-shadow:0 6px 15px #4559d833; }
.brand-mark.small { width:34px; height:34px; border-radius:11px; font-size:17px; }
.top-actions { display:flex; align-items:center; gap:24px; color:var(--muted); font-size:13px; }
.logout-link { color:#606b7a; text-decoration:none; font-weight:600; }
.logout-link:hover { color:var(--accent); }
.app-shell { max-width:1440px; margin:0 auto; padding:42px 34px 70px; }
.intro { display:flex; justify-content:space-between; align-items:center; margin-bottom:28px; }
h1,h2,p { margin-top:0; }
.intro h1 { font:800 29px Manrope,sans-serif; letter-spacing:-1px; margin-bottom:6px; }
.intro p { margin:0; color:var(--muted); font-size:14px; }
.primary-button { border:0; background:var(--accent); color:#fff; border-radius:10px; padding:12px 18px; font-weight:700; font-size:13px; box-shadow:0 5px 12px #4559d826; transition:.15s; }
.primary-button:hover { background:#3448c5; transform:translateY(-1px); }
.matrix { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.quadrant { min-height:270px; padding:23px 23px 17px; border-radius:16px; border:1px solid transparent; transition:border-color .15s,box-shadow .15s; }
.q1 { background:#fff5f4; border-color:#f5dedb; }
.q2 { background:#f1f6ff; border-color:#dce8fb; }
.q3 { background:#fff8ec; border-color:#f2e6cf; }
.q4 { background:#f2f3f5; border-color:#e4e6e9; }
.quadrant.drag-over { border:2px dashed #6475dc; box-shadow:0 0 0 4px #6475dc12; }
.quadrant-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:18px; }
.quadrant-kicker { font-size:9px; font-weight:800; letter-spacing:1.05px; color:#7e8795; }
.quadrant h2 { font:800 22px Manrope,sans-serif; letter-spacing:-.5px; margin:4px 0 0; }
.q1 h2 { color:#b64e4a; } .q2 h2 { color:#3e63b8; } .q3 h2 { color:#a66a1d; } .q4 h2 { color:#606a78; }
.q-number { font:700 14px Manrope,sans-serif; color:#aab1bd; }
.task-list { display:flex; flex-direction:column; gap:9px; min-height:48px; }
.empty-state { color:#a0a7b2; font-size:12px; padding:13px 2px; }
.task-card { background:#fff; border:1px solid #e9ebef; border-radius:10px; padding:12px 13px 9px; box-shadow:0 2px 6px rgba(30,40,60,.035); cursor:grab; }
.task-card:active { cursor:grabbing; }
.task-card.dragging { opacity:.4; }
.task-card-top { display:flex; justify-content:space-between; gap:8px; }
.task-title { border:0; background:none; padding:0; color:#303847; text-align:left; font-size:13px; font-weight:700; line-height:1.4; }
.task-title:hover { color:var(--accent); }
.task-description { white-space:pre-wrap; color:#7b8491; font-size:11px; line-height:1.5; margin:7px 0 2px; }
.task-actions { display:flex; justify-content:flex-end; gap:5px; margin-top:7px; opacity:.72; }
.mini-action { border:0; background:transparent; color:#7c8795; padding:3px 5px; font-size:10px; border-radius:5px; }
.mini-action:hover { background:#f1f3f7; color:#3448c5; }
.delete-action:hover { color:#bd4545; background:#fff0f0; }
.add-task { border:0; background:transparent; color:#737f91; font-size:12px; font-weight:600; padding:13px 2px 0; }
.add-task:hover { color:var(--accent); }
.completed-section { margin-top:24px; background:#fff; border:1px solid var(--line); border-radius:13px; overflow:hidden; }
.completed-toggle { display:flex; width:100%; align-items:center; gap:10px; border:0; background:#fff; padding:17px 20px; text-align:left; color:#465061; font-weight:700; font-size:13px; }
.count-pill { background:#f0f2f6; color:#788292; border-radius:20px; padding:3px 8px; font-size:10px; }
.chevron { margin-left:auto; font-size:17px; color:#87909d; }
.completed-list { padding:0 18px 17px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.completed-list[hidden] { display:none; }
.is-completed { opacity:.72; cursor:default; }
.is-completed .task-title { text-decoration:line-through; color:#8d96a3; }
.toast { position:fixed; bottom:25px; left:50%; transform:translate(-50%,15px); opacity:0; pointer-events:none; background:#202633; color:white; padding:11px 17px; border-radius:9px; font-size:12px; box-shadow:var(--shadow); transition:.2s; z-index:20; }
.toast.visible { opacity:1; transform:translate(-50%,0); }
.task-dialog { width:min(480px,calc(100% - 28px)); border:0; border-radius:17px; padding:25px; box-shadow:0 24px 80px #17203340; }
.task-dialog::backdrop { background:#17203380; backdrop-filter:blur(3px); }
.dialog-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.dialog-head h2 { font:800 21px Manrope,sans-serif; margin:0; }
.icon-button { border:0; background:#f2f3f6; width:30px; height:30px; border-radius:8px; font-size:21px; color:#707987; }
.task-dialog label,.login-card label { display:block; font-size:12px; font-weight:700; color:#4e5868; margin:14px 0 7px; }
.optional { color:#9aa2ad; font-weight:400; }
.task-dialog input,.task-dialog textarea,.task-dialog select,.login-card input { width:100%; border:1px solid #dfe3e9; border-radius:9px; padding:11px 12px; outline:none; color:var(--ink); background:#fff; font-size:13px; }
.task-dialog input:focus,.task-dialog textarea:focus,.task-dialog select:focus,.login-card input:focus { border-color:#7180e5; box-shadow:0 0 0 3px #7180e51c; }
.task-dialog textarea { resize:vertical; }
.dialog-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:23px; }
.secondary-button { border:1px solid #e1e4ea; background:#fff; color:#687384; border-radius:9px; padding:11px 15px; font-size:12px; font-weight:700; }
.login-page { min-height:100vh; display:grid; place-items:center; padding:20px; background:radial-gradient(circle at 50% 0%,#e9edff,transparent 45%),#f5f6f8; }
.login-card { width:min(400px,100%); background:white; border:1px solid var(--line); border-radius:19px; padding:34px; box-shadow:0 18px 50px #25304a0d; }
.login-card .brand-mark { margin-bottom:20px; }
.login-card h1 { font:800 25px Manrope,sans-serif; margin:0 0 7px; }
.muted { color:var(--muted); font-size:13px; line-height:1.6; margin-bottom:22px; }
.login-card form { margin-top:20px; }
.full-button { width:100%; margin-top:20px; }
.alert { border-radius:8px; background:#fff0ef; color:#a33d38; padding:10px 12px; font-size:12px; }
.success { color:#21734d; font-size:13px; line-height:1.6; }
@media (max-width:760px) {
  .topbar-inner { padding:0 18px; height:60px; }
  .date-label { display:none; }
  .app-shell { padding:28px 16px 50px; }
  .intro { align-items:flex-start; gap:15px; }
  .intro h1 { font-size:25px; }
  .intro p { max-width:230px; line-height:1.5; }
  .intro .primary-button { white-space:nowrap; padding:10px 12px; font-size:11px; }
  .matrix { grid-template-columns:1fr; gap:12px; }
  .quadrant { min-height:205px; padding:19px; }
  .completed-list { grid-template-columns:1fr; }
}


/* TaskBoard 1.1 – přepínání motivu */
.theme-toggle { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); background:var(--surface); color:var(--muted); border-radius:9px; padding:8px 11px; font-size:12px; font-weight:600; }
.theme-toggle:hover { color:var(--accent); border-color:#aab4ef; }
.theme-icon { font-size:16px; line-height:1; }
.task-card { transition:box-shadow .12s, transform .12s, opacity .12s; }
.task-card.dragging { transform:scale(.985); box-shadow:0 8px 22px rgba(30,40,60,.13); }
.task-list { border-radius:9px; }

:root[data-theme="dark"] {
  color-scheme:dark;
  --ink:#e8ebf2; --muted:#9ba5b5; --line:#303747; --surface:#202633;
  --bg:#151a23; --accent:#8795ff; --shadow:0 8px 24px rgba(0,0,0,.24);
}
:root[data-theme="dark"] body { background:var(--bg); color:var(--ink); }
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .completed-section,
:root[data-theme="dark"] .completed-toggle,
:root[data-theme="dark"] .task-dialog,
:root[data-theme="dark"] .login-card { background:#202633; border-color:#303747; color:var(--ink); }
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .logout-link { color:#e4e8f0; }
:root[data-theme="dark"] .intro p,
:root[data-theme="dark"] .date-label { color:#9ba5b5; }
:root[data-theme="dark"] .q1 { background:#352526; border-color:#573738; }
:root[data-theme="dark"] .q2 { background:#222e45; border-color:#35496b; }
:root[data-theme="dark"] .q3 { background:#3a3021; border-color:#5a472b; }
:root[data-theme="dark"] .q4 { background:#292e37; border-color:#414956; }
:root[data-theme="dark"] .q1 h2 { color:#ffaaa5; }
:root[data-theme="dark"] .q2 h2 { color:#a9c5ff; }
:root[data-theme="dark"] .q3 h2 { color:#ffd08c; }
:root[data-theme="dark"] .q4 h2 { color:#c2cad6; }
:root[data-theme="dark"] .quadrant-kicker { color:#aeb7c5; }
:root[data-theme="dark"] .q-number { color:#8994a5; }
:root[data-theme="dark"] .task-card { background:#252d3b; border-color:#3a4556; box-shadow:0 2px 7px rgba(0,0,0,.15); }
:root[data-theme="dark"] .task-title { color:#edf0f6; }
:root[data-theme="dark"] .task-title:hover { color:#aebaff; }
:root[data-theme="dark"] .task-description { color:#aab4c3; }
:root[data-theme="dark"] .mini-action { color:#aab4c3; }
:root[data-theme="dark"] .mini-action:hover { background:#364154; color:#c5ceff; }
:root[data-theme="dark"] .delete-action:hover { color:#ffaaa5; background:#493034; }
:root[data-theme="dark"] .add-task { color:#b0bac9; }
:root[data-theme="dark"] .empty-state { color:#8994a5; }
:root[data-theme="dark"] .completed-toggle { color:#e0e5ee; }
:root[data-theme="dark"] .count-pill { background:#343d4c; color:#c0c8d5; }
:root[data-theme="dark"] .chevron { color:#aab4c3; }
:root[data-theme="dark"] .task-dialog label { color:#cbd2de; }
:root[data-theme="dark"] .task-dialog input,
:root[data-theme="dark"] .task-dialog textarea,
:root[data-theme="dark"] .task-dialog select,
:root[data-theme="dark"] .login-card input { background:#171d28; color:#edf0f6; border-color:#414b5d; }
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .theme-toggle { background:#293242; color:#d5dbe6; border-color:#414b5d; }
:root[data-theme="dark"] .optional { color:#8994a5; }
:root[data-theme="dark"] .login-page { background:radial-gradient(circle at 50% 0%,#252e4d,transparent 45%),#151a23; }
:root[data-theme="dark"] .login-card .muted { color:#aab4c3; }
:root[data-theme="dark"] .is-completed .task-title { color:#9ba5b5; }
@media (max-width:760px) {
  .theme-toggle { padding:8px; }
  .theme-toggle .theme-label { display:none; }
}
