:root {
  --bg-deep: #0b1022;
  --bg-mid: #131a36;
  --orb-blue: #2d74ff;
  --orb-cyan: #1bd3ff;
  --card-bg: rgba(15, 22, 43, 0.62);
  --card-border: rgba(154, 188, 255, 0.24);
  --text-main: #eef4ff;
  --text-soft: #a9bad8;
  --btn-bg: #f5f7ff;
  --btn-text: #0f2040;
  --btn-shadow: rgba(76, 135, 255, 0.45);
  --status-ok: #8ecbff;
  --status-err: #ff8484;
  --bg-0: var(--bg-deep);
  --bg-1: var(--bg-mid);
  --bg-2: #0f1b31;
  --panel: #101c33cc;
  --panel-solid: #101c33;
  --text-0: var(--text-main);
  --text-1: #c0cde6;
  --text-2: var(--text-soft);
  --line-soft: #8aa0c71f;
  --line-mid: var(--card-border);
  --primary: #58a6ff;
  --primary-soft: #58a6ff24;
  --danger: #f08c96;
  --warning: #f3bd74;
  --info: #7ec0ff;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(120% 120% at 15% 15%, #1e2f61 0%, var(--bg-deep) 55%),
    linear-gradient(140deg, var(--bg-mid), #0a1228);
}

.hidden { display: none !important; }

.auth-visual {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  filter: blur(42px);
}

.orb-a {
  width: 280px;
  height: 280px;
  background: var(--orb-blue);
  top: -70px;
  left: -60px;
  opacity: .42;
  animation: float-a 9s ease-in-out infinite;
}

.orb-b {
  width: 320px;
  height: 320px;
  background: var(--orb-cyan);
  right: -95px;
  bottom: -110px;
  opacity: .25;
  animation: float-b 10s ease-in-out infinite;
}

.bg-grid {
  position: fixed;
  z-index: 2;
  inset: 0;
  background-image:
    linear-gradient(rgba(163,197,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163,197,255,.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.login-shell {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  overflow: hidden;
}

.login-shell > .login-card {
  position: relative;
  width: min(92vw, 360px);
  min-height: 410px;
  border-radius: 26px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 34px 26px;
  animation: card-enter .55s cubic-bezier(.2,.72,.28,1);
}

.logo-wrap {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.32);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  overflow: hidden;
}

.app-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

h1, h2, h3 { margin: 0; }
.login-shell h1 {
  margin: 2px 0 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  text-align: center;
}
.login-shell h2 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .2px;
  text-align: center;
}
h3 {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  color: #dce8ff;
}

.main-header h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  font-weight: 800;
  text-align: left;
  letter-spacing: 0;
}

.eyebrow,
.subheadline,
.subtitle,
.login-warning,
.auth-status {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.35;
  text-align: center;
  font-size: 14px;
}

.subtitle {
  margin: 0 0 8px;
}

.subheadline {
  margin-top: 4px;
  color: var(--text-soft);
}

.actions {
  width: 100%;
  margin-top: 8px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.cta-primary,
.cta-secondary,
.cta-muted,
.google-btn {
  width: 100%;
  max-width: 260px;
  min-height: 52px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, border-color .2s ease;
}

.cta-primary,
.google-btn {
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 12px 28px -6px var(--btn-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.cta-primary:hover,
.google-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.cta-primary:active,
.google-btn:active { transform: translateY(0); }

.cta-secondary, .cta-muted, .secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.cta-secondary,
.secondary-link {
  width: 100%;
  max-width: 260px;
  min-height: 46px;
  border: 1px solid rgba(154, 188, 255, 0.24);
  border-radius: 15px;
  color: #dceaff;
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .15px;
}

.cta-muted {
  min-height: 46px;
  border: 1px solid rgba(154, 188, 255, 0.18);
  background: rgba(255, 255, 255, .04);
  color: #c8d9f6;
  cursor: pointer;
}

.secondary-button {
  cursor: pointer;
}

.cta-secondary:hover, .cta-muted:hover, .secondary-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .32);
}

.google-btn-wrap {
  width: 100%;
  max-width: 260px;
  margin-top: 0;
  border-radius: 15px;
  background: transparent;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 12px 28px -6px var(--btn-shadow);
  overflow: hidden;
}

#googleButton {
  width: 260px;
  max-width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

#googleButton > div,
#googleButton iframe {
  width: 260px !important;
  max-width: 100% !important;
}
.status {
  min-height: 20px;
  text-align: center;
  color: var(--status-ok);
  font-size: 13px;
  letter-spacing: .15px;
}

.status.error {
  color: var(--status-err);
}

.auth-status {
  min-height: 20px;
  margin-top: 0;
  color: var(--status-ok);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .15px;
}

.login-warning {
  margin-top: -4px;
  color: var(--text-soft);
  font-size: 13px;
}

.actions-login {
  grid-template-columns: 1fr;
}

#landingView,
#loginView {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
}

#loginView {
  gap: 11px;
}

#landingView.hidden,
#loginView.hidden {
  display: none !important;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(5, 10, 24, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
}

.onboarding-modal {
  width: min(92vw, 520px);
  border-radius: 22px;
  border: 1px solid rgba(154, 188, 255, 0.26);
  background: linear-gradient(170deg, rgba(16, 26, 52, 0.95), rgba(13, 22, 43, 0.95));
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.46);
  padding: 26px 24px 22px;
  position: relative;
  display: grid;
  gap: 12px;
  animation: card-enter .28s ease;
}

.onboarding-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #d8e9ff;
  cursor: pointer;
}

.onboarding-stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 2px;
}

.onboarding-stepper span {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.onboarding-stepper span.active {
  background: rgba(130, 188, 255, 0.86);
}

.onboarding-modal h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.14;
  text-align: left;
}

.onboarding-modal p {
  margin: 0;
  color: var(--text-soft);
}

.onboarding-step {
  display: grid;
  gap: 12px;
}

.onboarding-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.onboarding-choice {
  border: 1px solid rgba(154, 188, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #e8f1ff;
  text-align: left;
  padding: 14px;
  display: grid;
  gap: 6px;
  min-height: 122px;
  cursor: pointer;
}

.onboarding-choice strong {
  font-size: 16px;
}

.onboarding-choice span {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.34;
}

.onboarding-step label {
  font-size: 14px;
  color: #dce8ff;
  font-weight: 700;
}

.onboarding-step input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(154, 188, 255, 0.28);
  background: rgba(8, 17, 35, 0.86);
  color: #e8f1ff;
  padding: 0 14px;
  font-size: 14px;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.onboarding-actions.single {
  justify-content: center;
}

.onboarding-actions .cta-primary,
.onboarding-actions .secondary-link {
  max-width: none;
  min-width: 132px;
}

.onboarding-done-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.sidebar {
  border-right: 1px solid var(--line-soft);
  background: #0a1428c7;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  backdrop-filter: blur(10px);
}

.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  font-size: 18px;
  color: #f3f8ff;
}

.sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.sidebar-block {
  border-radius: var(--radius-lg);
  padding: 10px;
  background: #ffffff05;
  border: 1px solid transparent;
}

.sidebar-title {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-item {
  border-radius: 10px;
  padding: 10px 11px;
  background: #ffffff05;
  border: 1px solid transparent;
  color: #d3e2fa;
  transition: background-color 170ms ease, border-color 170ms ease, transform 170ms ease;
}

.sidebar-item:hover {
  background: #58a6ff12;
  border-color: #7cb7ff3f;
}

.sidebar-item.active {
  background: #58a6ff1a;
  border-color: #8bc2ff61;
  box-shadow: inset 0 0 0 1px #6caef13a;
}

.create-project-btn {
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid #72b9ff66;
  color: #d8eeff;
  background: linear-gradient(180deg, #1f6ca95c, #14527f52);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.create-project-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 20px #0e47742e; }

.sidebar-list-copy { color: var(--text-2); font-size: 13px; }
.sidebar-footer { margin-top: auto; padding: 8px; }
.link-btn { border: 0; background: transparent; color: #9eb6dc; cursor: pointer; font-size: 14px; }

.main-pane {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2px 2px 4px;
}

.main-header p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.companion-badge {
  border: 1px solid #7db6f65e;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  color: #c8defd;
  background: #58a6ff17;
  font-weight: 600;
}

.panel {
  border: 1px solid #8faeda2b;
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, #13324a8f, #0f2439af);
  padding: 14px;
  backdrop-filter: blur(7px);
}

.summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.summary-pill {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #a1bddf3b;
  background: #17375a85;
  cursor: pointer;
  text-align: left;
  color: #eef7ff;
  transition: transform 170ms ease, border-color 170ms ease, background-color 170ms ease;
}

.summary-pill:hover { transform: translateY(-1px); border-color: #a7c4e85f; }
.summary-pill strong { display: block; font-size: 30px; margin-top: 6px; line-height: 1; font-weight: 800; }
.summary-pill[data-bucket="overdue"] { border-color: #ea8f9a59; background: #4a1f3169; }
.summary-pill[data-bucket="today"] { border-color: #f2ba7161; background: #4c37206b; }
.summary-pill[data-bucket="upcoming"] { border-color: #8dc1ff57; background: #1a39616b; }
.summary-pill[data-bucket="no_due"] { border-color: #a8b5ca4f; background: #24344a66; }
.summary-pill.active { box-shadow: inset 0 0 0 1px #9dc4f56e; }

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
}

select {
  width: 100%;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid #9cb3d243;
  background: #0e2138db;
  color: #e9f1ff;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

select:focus {
  outline: none;
  border-color: #8bbcff87;
  box-shadow: 0 0 0 3px #58a6ff1f;
}

.check-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #bfd0ea;
}

.check-row input { accent-color: #6daff5; }

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}

.task-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.task-group {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.task-group h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #dce9fb;
}

.task-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.task-card {
  border-radius: var(--radius-lg);
  border: 1px solid #b8d0ea36;
  background: #12334f96;
  padding: 14px;
  box-shadow: 0 6px 16px #0000001f;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: #bdd7f657;
  box-shadow: 0 10px 20px #0000002e;
}

.task-card[data-bucket-kind="overdue"] { border-color: #ea8f9a6e; }
.task-card[data-bucket-kind="today"] { border-color: #efbf7e70; }
.task-card[data-bucket-kind="upcoming"] { border-color: #8ec2ff69; }
.task-card[data-bucket-kind="no_due"] { border-color: #b4bfd154; }

.task-card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.meta-line {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 5px;
  color: #deebff;
}

.meta-line span {
  color: var(--text-2);
  font-weight: 600;
  margin-right: 4px;
}

.bucket-badge {
  float: right;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid #c5d9f350;
  background: #ffffff0d;
  color: #e1efff;
  font-weight: 700;
}

.more-wrap { display: flex; justify-content: center; margin-top: 12px; }

@keyframes card-enter {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 26px); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-18px, -25px); }
}

@media (max-width: 1200px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .filter-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .main-header h2 { font-size: 32px; }
}

@media (max-width: 640px) {
  .login-card { padding: 20px; border-radius: 18px; }
  .actions-login { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .onboarding-choice-grid { grid-template-columns: 1fr; }
  .onboarding-modal h2 { font-size: 24px; }
}
