:root {
  color-scheme: dark;
  --bg: #0c1014;
  --surface: rgba(20, 27, 33, .82);
  --surface-soft: #202b34;
  --line: rgba(167, 190, 205, .16);
  --text: #f1f5f7;
  --muted: #8c9aa5;
  --accent: #f36b6b;
  --accent-soft: rgba(199, 243, 107, .12);
  --danger: #ff9f9f;
  --shadow: 0 30px 80px rgba(0, 0, 0, .32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-height: 100svh; margin: 0; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.ambient { position: fixed; z-index: -1; border-radius: 50%; pointer-events: none; }
.ambient-one { top: -18rem; right: -10rem; width: 42rem; height: 42rem; background: radial-gradient(circle, rgba(199, 243, 107, .1), transparent 68%); }
.ambient-two { bottom: -28rem; left: -14rem; width: 48rem; height: 48rem; background: radial-gradient(circle, rgba(77, 143, 183, .12), transparent 68%); }
.app-loading { display: grid; place-items: center; gap: 1rem; min-height: 100svh; color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.loader { width: 1.5rem; height: 1.5rem; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100svh; }
.sidebar { display: flex; flex-direction: column; padding: 2rem 1.2rem; border-right: 1px solid var(--line); background: rgba(12, 16, 20, .64); }
.brand { display: flex; align-items: center; gap: .7rem; margin: 0 0 3.5rem .45rem; font-weight: 700; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .65rem; color: #17200c; background: var(--accent); font-weight: 900; }
.nav-label { margin: 0 .75rem .7rem; color: var(--muted); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .75rem .8rem; border: 1px solid transparent; border-radius: .65rem; color: var(--muted); font-size: .87rem; transition: color .2s ease, background .2s ease, transform .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--accent-soft); border-color: rgba(199, 243, 107, .15); transform: translateX(2px); }
.nav-icon { display: grid; place-items: center; width: 1.2rem; color: var(--accent); font-size: 1rem; }
.sidebar-footer { margin-top: auto; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.main { width: min(100%, 78rem); padding: 3.5rem clamp(1.25rem, 5vw, 5rem) 4rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 3.5rem; }
.eyebrow { margin: 0 0 .65rem; color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.page-title { margin: 0; font-size: clamp(2.25rem, 5vw, 4.8rem); font-weight: 400; letter-spacing: -.055em; line-height: .98; }
.page-lede { max-width: 42rem; margin: 1rem 0 0; color: var(--muted); font-size: 1rem; }
.user-menu { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; }
.avatar { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid rgba(199, 243, 107, .45); border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.7rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: .55rem; color: var(--text); background: var(--surface-soft); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button:hover { border-color: rgba(199, 243, 107, .5); background: #29363f; transform: translateY(-2px); }
.button-primary { border-color: var(--accent); color: #142006; background: var(--accent); }
.button-primary:hover { background: #ff7f7f; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; font-size: 1.1rem; font-weight: 500; }
.section-heading p { margin: 0; color: var(--muted); font-size: .8rem; }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 3rem; }
.option-card, .todo-panel, .login-card { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.option-card { min-height: 9rem; padding: 1.25rem; transition: transform .25s ease, border-color .25s ease; }
.option-card:hover { border-color: rgba(199, 243, 107, .3); transform: translateY(-5px); }
.card-icon { color: var(--accent); font-size: 1.5rem; }
.option-card h3 { margin: 1.3rem 0 .35rem; font-size: 1rem; font-weight: 500; }
.option-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.todo-preview { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; }
.todo-panel { overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 1rem; font-weight: 500; }
.panel-header span { color: var(--muted); font-size: .76rem; }
.todo-list { margin: 0; padding: 0; list-style: none; }
.todo-row { position: relative; display: flex; align-items: center; gap: .75rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); transition: background .2s ease, opacity .2s ease, transform .2s ease; }
.todo-row:last-child { border-bottom: 0; }
.todo-row.dragging { opacity: .4; }
.todo-row.drop-target { background: var(--accent-soft); }
.todo-row.drop-target::before { position: absolute; top: -.08rem; right: 1.3rem; left: 1.3rem; height: 2px; background: var(--accent); content: ''; }
.todo-drag-handle { width: 1.2rem; padding: .25rem 0; border: 0; color: var(--muted); background: transparent; font-size: 1rem; letter-spacing: -.25em; line-height: 1; cursor: grab; touch-action: none; }
.todo-drag-handle:active { cursor: grabbing; }
.todo-check { width: 1rem; height: 1rem; flex: 0 0 auto; border: 1px solid var(--muted); border-radius: 50%; background: transparent; }
.todo-row.done .todo-check { border-color: var(--accent); background: var(--accent); }
.todo-row.done .todo-description { color: var(--muted); text-decoration: line-through; }
.todo-description { min-width: 0; flex: 1; padding: 0; border: 0; color: var(--text); background: transparent; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; text-align: left; white-space: normal; }
.todo-description:hover, .todo-description:focus-visible { color: var(--accent); }
.todo-edit-input { min-width: 0; flex: 1; padding: .35rem .5rem; border: 1px solid var(--accent); border-radius: .35rem; color: var(--text); background: rgba(0, 0, 0, .2); }
.delete-todo { margin-left: auto; padding: .35rem; border: 0; color: var(--muted); background: transparent; font-size: 1.1rem; line-height: 1; opacity: .7; transition: color .2s ease, opacity .2s ease, transform .2s ease; }
.delete-todo:hover, .delete-todo:focus-visible { color: var(--danger); opacity: 1; transform: scale(1.08); }
.todo-empty, .todo-loading { padding: 2rem 1.3rem; color: var(--muted); font-size: .85rem; }
.stats-card { padding: 1.3rem; }
.stats-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.stats-number { display: block; margin: 1rem 0 .2rem; color: var(--accent); font-size: 3rem; line-height: 1; }
.view-error, .view-status { margin-top: 1rem; font-size: .82rem; }
.view-error { color: var(--danger); }
.view-status { color: var(--accent); }
.login-page { display: grid; place-items: center; min-height: 100svh; padding: 1.5rem; }
.login-card { width: min(100%, 27rem); padding: clamp(1.5rem, 5vw, 3rem); animation: rise .5s ease both; }
.login-card h1 { margin: 0; font-size: 2.8rem; font-weight: 400; letter-spacing: -.06em; }
.login-card .page-lede { margin-bottom: 2rem; font-size: .9rem; }
.auth-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.login-note { margin: 1.25rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.divider { display: flex; align-items: center; gap: .7rem; margin: 1.5rem 0; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.divider::before, .divider::after { height: 1px; flex: 1; background: var(--line); content: ''; }
.email-form, .add-form { display: grid; gap: .7rem; }
.text-input { width: 100%; min-width: 0; padding: .75rem .8rem; border: 1px solid var(--line); border-radius: .55rem; color: var(--text); background: rgba(0, 0, 0, .16); }
.status-message { min-height: 1.3rem; margin: 1rem 0 0; color: var(--muted); font-size: .78rem; }
.status-message.error { color: var(--danger); }
.add-form { padding: 1rem 1.3rem; border-top: 1px solid var(--line); }
.add-form .text-input { border: 0; border-bottom: 1px solid var(--muted); border-radius: 0; background: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 800px) { .option-grid { grid-template-columns: 1fr; } .todo-preview { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .shell { display: block; } .sidebar { position: fixed; z-index: 2; right: 0; bottom: 0; left: 0; display: block; height: 4.4rem; padding: .7rem 1rem; border-top: 1px solid var(--line); border-right: 0; background: rgba(12, 16, 20, .92); backdrop-filter: blur(18px); } .brand, .nav-label, .sidebar-footer { display: none; } .nav-link { justify-content: center; width: max-content; margin: 0 auto; } .main { padding: 2rem 1rem 6rem; } .topbar { margin-bottom: 2.5rem; } .user-menu span { display: none; } }
