:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: rgba(23, 32, 51, 0.11);
  --blue: #1f64d8;
  --blue-dark: #164a9f;
  --green: #15935f;
  --amber: #b96b14;
  --soft-blue: #eaf2ff;
  --soft-green: #eaf8f0;
  --soft-amber: #fff3df;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(31, 100, 216, 0.08), transparent 340px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  min-height: 42px;
  border-radius: 8px;
}

button {
  border: 0;
  padding: 0 15px;
  background: var(--blue);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.72;
}

select {
  border: 1px solid var(--line);
  padding: 0 12px;
  background: white;
  color: var(--ink);
  font-weight: 750;
}

input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

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

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  background: #f8fafc;
  font-size: 0.88em;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.login-view {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 34px;
  align-items: center;
}

.login-view h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2.4rem, 5.8vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.login-panel {
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(35, 48, 80, 0.07);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--amber);
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.topbar h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4.8vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-strip article,
.side-panel,
.main-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(35, 48, 80, 0.07);
}

.status-strip article {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 15px;
}

.status-strip span,
.event-card p,
.event-card small,
.reminder-card p,
.reminder-card small,
.setup-help p,
.rule-row small {
  color: var(--muted);
}

.status-strip span {
  font-size: 0.82rem;
  font-weight: 850;
}

.status-strip strong {
  font-size: 1.25rem;
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.side-panel,
.main-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.calendar-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(160deg, var(--soft-blue), #ffffff 64%);
}

.visual-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 14px;
  background: var(--blue);
}

.visual-header span {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 18px;
}

.visual-grid span,
.visual-grid strong,
.visual-grid b,
.visual-grid i,
.visual-grid em {
  aspect-ratio: 1;
  border-radius: 8px;
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.visual-grid strong {
  background: var(--soft-green);
  box-shadow: inset 0 0 0 2px var(--green);
}

.visual-grid b {
  background: var(--soft-amber);
  box-shadow: inset 0 0 0 2px var(--amber);
}

.visual-grid i {
  background: var(--blue);
}

.visual-grid em {
  background: var(--green);
}

.panel-block {
  display: grid;
  gap: 12px;
}

.panel-block h2,
.section-head h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.rule-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.rule-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.rule-row span {
  display: grid;
  gap: 3px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--blue-dark);
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.tab-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.tab-button.active {
  border-color: transparent;
  background: var(--ink);
  color: white;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.event-list,
.reminder-list {
  display: grid;
  gap: 10px;
}

.event-card,
.reminder-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, white, #fbfcff);
}

.event-card time {
  display: grid;
  place-items: center;
  min-height: 64px;
  border-radius: 8px;
  background: var(--soft-blue);
  color: var(--blue-dark);
}

.event-card time strong {
  font-size: 1.45rem;
}

.event-card time span {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.event-card h3,
.reminder-card h3 {
  margin-bottom: 5px;
  font-size: 1.02rem;
}

.event-card p,
.reminder-card p {
  margin-bottom: 4px;
  line-height: 1.35;
}

.event-card small,
.reminder-card small {
  font-weight: 750;
}

.reminder-card {
  grid-template-columns: 16px minmax(0, 1fr);
}

.check-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--green);
}

.empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fbfcff;
}

@media (max-width: 820px) {
  .topbar,
  .section-head {
    display: grid;
  }

  .status-strip,
  .workspace,
  .login-view {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}
