﻿:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-muted: #eef4ff;
  --text: #112033;
  --muted: #5e7086;
  --line: #d8e2ef;
  --accent: #0b7285;
  --accent-soft: #d2edf2;
  --danger: #b42318;
  --danger-soft: #ffe5e5;
  --shadow: 0 10px 24px rgba(17, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 5%, #d8ebff 0%, rgba(216, 235, 255, 0) 45%),
    radial-gradient(circle at 96% 3%, #dff7f1 0%, rgba(223, 247, 241, 0) 40%),
    var(--bg);
}

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 14px 36px;
}

.app-header h1 {
  margin: 6px 0 4px;
  font-size: 1.6rem;
}

.app-header p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 1rem;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button.ghost {
  color: var(--text);
  background: var(--panel-muted);
}

.hint {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar-bottom {
  margin-top: 8px;
  margin-bottom: 0;
}

.items-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.item-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.item-row.dragging {
  opacity: 0.45;
}

.drag-handle {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--panel-muted);
  color: var(--muted);
  font-size: 1.1rem;
  padding: 0;
}

.item-check {
  width: 20px;
  height: 20px;
}

.item-text {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.item-text.done {
  color: var(--muted);
  text-decoration: line-through;
}

.move-tools {
  display: none;
  gap: 4px;
}

.move-btn {
  min-width: 40px;
  height: 34px;
  border-radius: 9px;
  background: var(--panel-muted);
  color: var(--text);
  padding: 0 8px;
}

.remove-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 1.1rem;
  padding: 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  margin-top: 12px;
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(20px);
  min-width: 220px;
  max-width: calc(100vw - 26px);
  background: #102a43;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.9rem;
  text-align: center;
}

.toast.error {
  background: #8f1d14;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (pointer: coarse) {
  .drag-handle {
    display: none;
  }

  .move-tools {
    display: inline-flex;
  }

  .item-row {
    grid-template-columns: auto 1fr auto auto;
  }
}

@media (min-width: 768px) {
  .shell {
    padding-top: 26px;
  }

  .app-header h1 {
    font-size: 1.85rem;
  }
}
