@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg: #f4efe5;
  --bg-accent: #f7f2e9;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-strong: #fffaf2;
  --text: #1d2433;
  --muted: #5d6779;
  --line: rgba(29, 36, 51, 0.08);
  --shadow: 0 24px 60px rgba(111, 88, 55, 0.16);
  --primary: #0f766e;
  --primary-deep: #115e59;
  --danger: #c2410c;
  --badge: rgba(15, 118, 110, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 224, 130, 0.38), transparent 26%),
    radial-gradient(circle at right 10% top 10%, rgba(94, 234, 212, 0.28), transparent 18%),
    linear-gradient(135deg, #f7f2e7 0%, #efe7d8 50%, #f2efe8 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page,
.app-page {
  position: relative;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 24rem;
  height: 24rem;
  filter: blur(18px);
  border-radius: 999px;
  opacity: 0.55;
  z-index: 0;
}

.aurora-one {
  top: 4rem;
  left: -6rem;
  background: rgba(251, 191, 36, 0.3);
}

.aurora-two {
  right: -6rem;
  bottom: 6rem;
  background: rgba(45, 212, 191, 0.22);
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem;
}

.login-hero,
.login-card,
.panel,
.sidebar-card,
.editor-card {
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-hero {
  background: linear-gradient(160deg, rgba(17, 94, 89, 0.9), rgba(18, 56, 72, 0.86));
  color: #f6fbff;
  border-radius: 2rem;
  padding: 3rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: inherit;
  opacity: 0.76;
}

.login-hero h1,
.topbar h1,
.panel h2 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
}

.login-hero h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: 0.95;
}

.login-hero p {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  color: rgba(246, 251, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.hero-points article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  padding: 1rem;
}

.hero-points strong,
.login-card h2,
.sidebar-card h2,
.panel h2,
.editor-card h3 {
  display: block;
  margin-bottom: 0.35rem;
}

.login-card {
  background: rgba(255, 250, 242, 0.9);
  border-radius: 2rem;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.login-card-head p,
.panel-head p,
.sidebar-profile p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stack-form.compact {
  margin-top: 1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select,
.toolbar input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--line);
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.toolbar input:focus {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.button-primary,
.button-secondary,
.button-danger,
.mini-button,
.nav-chip,
.icon-button {
  border: none;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.button-primary:hover,
.button-secondary:hover,
.button-danger:hover,
.mini-button:hover,
.nav-chip:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: white;
  padding: 0.92rem 1.2rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.button-large {
  padding-block: 1rem;
}

.button-secondary,
.button-danger.subtle,
.icon-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 0.82rem 1rem;
  border: 1px solid var(--line);
}

.button-danger.subtle {
  color: var(--danger);
}

.button-secondary {
  font-weight: 600;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: var(--badge);
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.78rem;
}

.error-text {
  margin: 0;
  color: #b91c1c;
  font-size: 0.92rem;
}

.app-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at right top, rgba(255, 204, 188, 0.34), transparent 18%),
    radial-gradient(circle at left bottom, rgba(179, 229, 252, 0.26), transparent 18%);
}

.topbar,
.dashboard {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 0;
}

.topbar h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.dashboard {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.5rem;
}

.sidebar-card {
  position: sticky;
  top: 1.2rem;
  align-self: start;
  background: rgba(255, 250, 242, 0.84);
  border-radius: 1.8rem;
  padding: 1.35rem;
}

.sidebar-summary {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.sidebar-summary article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 0.95rem 1rem;
}

.summary-label,
.tiny-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.side-nav {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.nav-chip {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.nav-chip.active,
.nav-chip:hover {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 224, 130, 0.3));
}

.content-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--surface);
  border-radius: 1.8rem;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.form-row,
.toolbar,
.card-actions,
.dialog-head,
.dialog-actions,
.content-card-head,
.reply-card-head,
.card-topline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.toolbar {
  margin-top: 1rem;
}

.toolbar input {
  background: rgba(255, 255, 255, 0.62);
}

.triple-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 0.8rem;
  align-items: end;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--muted);
}

.checkline input {
  width: 1rem;
  height: 1rem;
}

.clocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.clock-card,
.content-card,
.reply-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  padding: 1rem;
}

.clock-card {
  background:
    linear-gradient(180deg, rgba(18, 56, 72, 0.94), rgba(17, 94, 89, 0.88)),
    rgba(255, 255, 255, 0.05);
  color: white;
  min-height: 158px;
}

.clock-card .tiny-meta,
.clock-date {
  color: rgba(255, 255, 255, 0.74);
}

.clock-card h3 {
  margin: 0.45rem 0;
  font-size: 1.1rem;
}

.clock-time {
  margin-top: 1.2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
}

.sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.95rem;
  margin-top: 1rem;
}

.sticky-card {
  background: var(--sticky-color, #ffe082);
  border-radius: 1.2rem;
  padding: 1rem;
  min-height: 230px;
  box-shadow: 0 14px 28px rgba(76, 63, 36, 0.12);
  display: flex;
  flex-direction: column;
}

.sticky-card h3,
.content-card h3,
.reply-card h3 {
  margin: 0.45rem 0 0.7rem;
}

.sticky-card p,
.reply-card p,
.content-card-body {
  color: rgba(29, 36, 51, 0.86);
  line-height: 1.65;
}

.sticky-card p {
  flex: 1;
}

.content-card-body {
  max-height: 220px;
  overflow: auto;
  padding-right: 0.25rem;
}

.list-cards,
.reply-grid {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.reply-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mini-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  font-size: 0.84rem;
  border: 1px solid rgba(29, 36, 51, 0.08);
}

.mini-button.danger {
  color: var(--danger);
}

.empty-state {
  border: 1px dashed rgba(29, 36, 51, 0.16);
  border-radius: 1.25rem;
  padding: 1.2rem;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
}

.editor-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 720px;
  width: calc(100% - 2rem);
}

.editor-dialog::backdrop {
  background: rgba(20, 25, 34, 0.28);
  backdrop-filter: blur(8px);
}

.editor-card {
  background: rgba(255, 250, 242, 0.96);
  border-radius: 1.75rem;
  padding: 1.35rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  background: rgba(18, 56, 72, 0.94);
  color: white;
  padding: 0.95rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(18, 56, 72, 0.22);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .login-shell,
  .dashboard,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }

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

@media (max-width: 720px) {
  .login-shell,
  .topbar,
  .dashboard {
    padding: 1rem;
  }

  .login-hero,
  .login-card,
  .panel,
  .sidebar-card {
    border-radius: 1.4rem;
  }

  .login-hero {
    padding: 1.6rem;
  }

  .topbar {
    gap: 1rem;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    overflow: auto;
    padding-bottom: 0.15rem;
  }

  .button-secondary,
  .button-danger.subtle {
    white-space: nowrap;
  }

  .form-row,
  .dialog-head,
  .dialog-actions,
  .content-card-head,
  .reply-card-head,
  .card-topline {
    flex-direction: column;
    align-items: stretch;
  }

  .card-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .clock-time {
    font-size: 1.8rem;
  }
}
