/* DayPilot — static HTML design system (matches Next app) */
:root {
  --background: #f6f8f7;
  --foreground: #14201c;
  --card: #ffffff;
  --muted: #e8eeeb;
  --muted-foreground: #5b6b64;
  --border: #d7e0db;
  --primary: #0f766e;
  --primary-foreground: #f4fffc;
  --accent: #d97706;
  --danger: #b91c1c;
  --success: #047857;
  --ring: #0f766e;
  --shadow: 0 10px 30px rgba(20, 32, 28, 0.06);
  --radius: 16px;
  --nav: #ffffffcc;
  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-note: "Caveat", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in oklab, var(--primary) 16%, transparent), transparent),
    radial-gradient(900px 500px at 100% 0%, color-mix(in oklab, var(--accent) 12%, transparent), transparent),
    var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

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

::selection {
  background: color-mix(in oklab, var(--primary) 30%, white);
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.shell {
  display: flex;
  max-width: 80rem;
  margin: 0 auto;
  min-height: 100vh;
}

.sidebar {
  display: none;
  width: 16rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 80%, transparent);
  backdrop-filter: blur(12px);
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
}

.sidebar-brand {
  margin-bottom: 2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
}

.sidebar-brand .name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.sidebar-brand .tag {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: background 0.15s, color 0.15s;
}

.sidebar nav a:hover {
  background: var(--muted);
  color: var(--foreground);
}

.sidebar nav a.active {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--primary);
}

.sidebar nav a svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.sidebar-cta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  border-radius: 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--nav) 90%, transparent);
  backdrop-filter: blur(12px);
  padding: 0.5rem 1rem;
}

.topbar-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.search {
  flex: 1;
  max-width: 24rem;
  min-height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  padding: 0 1rem;
  color: var(--foreground);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
}

.main {
  flex: 1;
  padding: 1rem 1rem 7rem;
}

.mobile-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid var(--border);
  background: var(--nav);
  backdrop-filter: blur(16px);
  padding: 0.5rem 0.5rem max(0.5rem, env(safe-area-inset-bottom));
}

.mobile-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  max-width: 32rem;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.25rem;
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  min-height: 2.75rem;
  flex: 1;
  border-radius: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.mobile-nav a.active {
  color: var(--primary);
}

.mobile-nav a svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mobile-nav .special {
  margin-top: -1.25rem;
}

.mobile-nav .special a {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.25);
  flex: none;
}

.card {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.muted {
  color: var(--muted-foreground);
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: none;
  border-radius: 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: var(--muted);
  color: var(--foreground);
}

.btn-outline {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.75rem;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

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

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

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.header-row h1 {
  font-size: 1.875rem;
  font-weight: 600;
}

.avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.bell {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bell .dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: var(--accent);
}

.clock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.clock {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  border: 3px solid var(--primary);
  background: var(--card);
  box-shadow: var(--shadow);
}

.clock svg {
  width: 100%;
  height: 100%;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  padding: 0.5rem 1rem;
  color: var(--foreground);
}

.textarea {
  min-height: 6rem;
  resize: vertical;
  font-family: inherit;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--muted);
  color: var(--muted-foreground);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.list-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1rem;
}

@media (min-width: 640px) {
  .list-card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  min-height: 2.25rem;
  border-radius: 999px;
  background: var(--muted);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.chip.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin-bottom: 1rem;
}

.filters a {
  flex: 1;
  min-height: 2.5rem;
  border-radius: 0.5rem;
  text-align: center;
  line-height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.filters a.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.note-paper {
  min-height: 18rem;
  border-radius: 1rem;
  padding: 0.75rem;
  background: #fef3c7;
  color: #14201c;
  font-family: Georgia, "Times New Roman", serif;
}

.sticky-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
}

.sticky {
  aspect-ratio: 1;
  padding: 1rem;
  background: #ffe14a;
  border-radius: 0.25rem;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.12);
  transform: rotate(-1.5deg);
}

.sticky h3 {
  font-family: var(--font-note);
  font-size: 1.35rem;
  font-weight: 600;
}

.bar {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-grid.cols-4 {
    grid-template-columns: 1fr auto auto auto auto;
    align-items: end;
  }
}

.kpi {
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--muted) 60%, transparent);
  padding: 0.75rem;
}

.kpi .label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.kpi .value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 26rem;
}

.login-card h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }

  .topbar-brand {
    display: none;
  }

  .topbar {
    padding: 0.5rem 2rem;
  }

  .main {
    padding: 1.5rem 2rem 2rem;
  }

  .mobile-nav {
    display: none;
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .header-row h1 {
    font-size: 2.25rem;
  }
}

.animate-in {
  animation: fade-up 0.35s ease-out both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sticky-note {
  background: #fff8dc;
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
  box-shadow: 2px 3px 0 rgba(20, 32, 28, 0.06);
}
