:root {
  --bg: #f6f7fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --ink: #12131a;
  --muted: #697082;
  --soft: #e8ebf3;
  --line: rgba(18, 19, 26, 0.08);
  --brand: #5f6df5;
  --brand-2: #8b5cf6;
  --good: #14b8a6;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(21, 24, 39, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(95, 109, 245, 0.20), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.14), transparent 34rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.login-body {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-shell {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}

.login-hero,
.login-card,
.composer-card,
.stat-card,
.users-card,
.empty-state {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.login-hero {
  min-height: 620px;
  border-radius: 40px;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(95, 109, 245, 0.18), rgba(139, 92, 246, 0.07)),
    linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.55));
  z-index: -1;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 40px rgba(95, 109, 245, 0.35);
  margin-bottom: auto;
}

.brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 20px;
  margin: 0;
}

.eyebrow {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 14px;
}

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

.login-hero h1 {
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  max-width: 760px;
  margin-bottom: 24px;
}

.hero-copy {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hero-grid div {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.hero-grid span,
.stat-card span,
.sidebar-brand span,
.item-card small,
.user-row span,
label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.hero-grid strong {
  display: block;
  margin-top: 5px;
}

.login-card {
  border-radius: 40px;
  padding: 38px;
  align-self: center;
  position: relative;
  overflow: hidden;
}

.card-topline {
  height: 7px;
  width: 86px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--good));
  margin-bottom: 32px;
}

.login-card h2 {
  font-size: 34px;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.login-card p {
  color: var(--muted);
  margin-bottom: 34px;
}

.login-form,
.composer-card,
.admin-card {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  border-radius: 18px;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus {
  border-color: rgba(95, 109, 245, 0.62);
  box-shadow: 0 0 0 5px rgba(95, 109, 245, 0.13);
  background: #fff;
}

.primary-button,
.ghost-button,
.nav-item,
.delete-button,
.check-button {
  border: 0;
  border-radius: 18px;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button {
  min-height: 52px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 38px rgba(95, 109, 245, 0.27);
}

.primary-button:hover,
.ghost-button:hover,
.nav-item:hover,
.delete-button:hover,
.check-button:hover {
  transform: translateY(-1px);
}

.error-box {
  padding: 14px 16px;
  border-radius: 16px;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(20px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar nav {
  display: grid;
  gap: 10px;
}

.nav-item,
.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.sidebar-logout {
  margin-top: auto;
}

.main-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.07em;
  margin: 0;
}

.user-pill {
  padding: 12px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.stat-card {
  border-radius: 26px;
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: 34px;
  letter-spacing: -0.05em;
  margin-top: 8px;
}

.composer-card,
.users-card,
.empty-state {
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

.composer-main {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 14px;
}

.composer-main.secondary {
  grid-template-columns: 0.7fr 1fr auto;
  align-items: end;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin: 20px 0;
}

.item-list {
  display: grid;
  gap: 18px;
}

.category-group {
  display: grid;
  gap: 10px;
}

.category-group h2 {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 8px 0 2px;
}

.item-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(21, 24, 39, 0.06);
}

.item-card.done {
  opacity: 0.58;
}

.item-card.done h3 {
  text-decoration: line-through;
}

.check-button {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: #eef0ff;
  color: var(--brand);
  font-size: 20px;
}

.item-card.done .check-button {
  background: rgba(20, 184, 166, 0.15);
  color: var(--good);
}

.item-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.item-title-row h3 {
  margin: 0;
  font-size: 17px;
}

.item-title-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.item-content p {
  color: var(--muted);
  margin: 6px 0 4px;
}

.delete-button {
  padding: 11px 14px;
  color: #991b1b;
  background: #fee2e2;
}

.empty-state {
  text-align: center;
  padding: 58px 20px;
}

.empty-state div {
  font-size: 46px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}

.users-card h2,
.admin-card h2 {
  margin-bottom: 18px;
}

.users-list {
  display: grid;
  gap: 10px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.user-row strong,
.user-row span {
  display: block;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  padding: 15px 18px;
  border-radius: 18px;
  color: #fff;
  background: rgba(18, 19, 26, 0.90);
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 920px) {
  .login-shell,
  .app-shell,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-logout {
    margin-top: 18px;
  }

  .composer-main,
  .composer-main.secondary,
  .toolbar,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .login-body,
  .main-panel {
    padding: 18px;
  }

  .login-hero,
  .login-card {
    border-radius: 28px;
    padding: 28px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

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

  .delete-button {
    grid-column: 1 / -1;
  }
}


.install-card,
.offline-banner {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(24px);
  box-shadow: 0 14px 40px rgba(21, 24, 39, 0.08);
  border-radius: 24px;
  margin-bottom: 20px;
}

.install-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.install-card strong,
.install-card span {
  display: block;
}

.install-card span {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.install-card .primary-button {
  min-height: 44px;
  white-space: nowrap;
}

.offline-banner {
  padding: 14px 16px;
  color: #713f12;
  background: rgba(254, 243, 199, 0.92);
  font-weight: 800;
}

@media (display-mode: standalone) {
  .install-card {
    display: none !important;
  }
}

@media (max-width: 620px) {
  .install-card {
    align-items: stretch;
    flex-direction: column;
  }
}
