:root {
  color-scheme: light;
  --text: #10203b;
  --muted: #566781;
  --costco-blue: #005daa;
  --costco-blue-deep: #003f78;
  --costco-red: #e31837;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --border: #d8e4f8;
  --shadow: 0 18px 34px rgba(0, 53, 110, 0.12);
  --shadow-soft: 0 8px 20px rgba(0, 53, 110, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Avenir Next", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 93, 170, 0.15), transparent 38%),
    radial-gradient(circle at 100% 0%, rgba(227, 24, 55, 0.14), transparent 40%),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 70%, #edf4ff 100%);
}

.app-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 0.65rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr;
  align-items: start;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: var(--shadow-soft);
}

.hero {
  background: linear-gradient(140deg, #ffffff 0%, #f3f8ff 64%, #e8f2ff 100%);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  margin: 0 0 0.42rem;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(90deg, var(--costco-blue), #2e7ec4);
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.45rem;
}

h2 {
  margin-bottom: 0.65rem;
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.checklist-header h2 {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}

label,
.subtext {
  color: var(--muted);
}

.subtext {
  margin: 0.2rem 0 0;
  line-height: 1.35;
}

.panel-heading {
  margin-bottom: 0.7rem;
}

.sticky-add {
  position: sticky;
  top: 0.65rem;
  z-index: 20;
}

.list-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.74rem;
  font: inherit;
  background: #fff;
  color: inherit;
}

textarea {
  min-height: 112px;
  margin-bottom: 0.72rem;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--costco-blue), white 65%);
  border-color: color-mix(in srgb, var(--costco-blue), white 40%);
}

.actions,
.single-add {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

button {
  border: none;
  border-radius: 12px;
  padding: 0.68rem 0.96rem;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--costco-blue), #267ac3);
  box-shadow: 0 6px 14px rgba(0, 93, 170, 0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
  width: 100%;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 93, 170, 0.3);
}

button.secondary {
  background: linear-gradient(120deg, var(--costco-red), #f0526a);
  box-shadow: 0 6px 14px rgba(227, 24, 55, 0.24);
}

button.danger {
  background: linear-gradient(120deg, #7a1528, #b51d37);
  box-shadow: 0 6px 14px rgba(122, 21, 40, 0.26);
  color: #fff;
}

button.icon-btn {
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--costco-blue-deep);
  border: 1px solid var(--border);
  box-shadow: none;
}

button.icon-btn:hover {
  background: #e9f3ff;
  box-shadow: none;
  transform: none;
}

#list-panel {
  min-height: auto;
  position: static;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
}

#departments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.department {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem;
  background: #ffffff;
  text-align: left;
  overflow: visible;
}

.department h3 {
  margin-bottom: 0.58rem;
  color: var(--costco-blue-deep);
}

.items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.items li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  justify-content: start;
  column-gap: 0.56rem;
  row-gap: 0;
  text-align: left;
  padding: 0.28rem 0;
  width: 100%;
}

.items input[type="checkbox"] {
  margin: 0.1rem 0 0;
  justify-self: start;
  align-self: start;
}

.items label {
  margin: 0;
  color: var(--text);
  text-align: left;
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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


.item-row {
  cursor: grab;
}

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

.items.drag-over {
  outline: 2px dashed var(--costco-blue);
  outline-offset: 4px;
  border-radius: 8px;
  background: #eef6ff;
}

.item-delete {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--costco-red);
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  border-radius: 6px;
}

.item-delete:hover {
  transform: none;
  box-shadow: none;
  background: #ffe7eb;
}

.empty {
  color: var(--muted);
  font-style: italic;
}