:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --text: #17343b;
  --muted: #62757b;
  --line: #dfe7e4;
  --primary: #0f5965;
  --primary-dark: #0b4149;
  --lavender: #d9d2ff;
  --coral: #ff8f7a;
  --success: #2f8f6b;
  --danger: #b94b5c;
  --shadow: 0 18px 60px rgba(20, 48, 55, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(246, 248, 247, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand, .nav { display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 800; color: var(--text); }
.nav { flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--text); font-size: 14px; }

.main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.hero {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 42px;
  align-items: center;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.98;
  margin: 0 0 22px;
  letter-spacing: 0;
}

.hero p { max-width: 620px; font-size: 20px; color: var(--muted); }
.eyebrow { color: var(--primary); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }

.living-orb {
  width: min(430px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.95), transparent 24%),
    radial-gradient(circle at 70% 75%, var(--coral), transparent 28%),
    radial-gradient(circle at 28% 70%, var(--lavender), transparent 34%),
    radial-gradient(circle at 55% 45%, #72d4c9, var(--primary));
  box-shadow: var(--shadow);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.985); filter: saturate(1); }
  50% { transform: scale(1.025); filter: saturate(1.1); }
}

.orb-mini {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  background: radial-gradient(circle at 35% 30%, #fff, #8ad8cf 35%, var(--primary));
  box-shadow: 0 0 0 4px rgba(15, 89, 101, .1);
}
.orb-mini.large { width: 46px; height: 46px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 750;
  cursor: pointer;
}
.button:hover { background: var(--primary-dark); color: #fff; }
.button.secondary { background: #e8eeee; color: var(--text); }
.button.small { min-height: 34px; padding: 0 12px; }

.panel, .card, .stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(20, 48, 55, 0.06);
}
.panel { padding: clamp(22px, 4vw, 36px); margin-bottom: 24px; }
.panel.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.card { padding: 24px; }
.stat { padding: 24px; display: grid; gap: 4px; }
.stat strong { font-size: 34px; }
.stat span, .muted { color: var(--muted); }

.grid { display: grid; gap: 18px; margin: 24px 0; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.form { display: grid; gap: 16px; }
.form.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; }

.notice {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  background: #eef6f3;
  border: 1px solid #cae2da;
}
.notice.error { background: #fff0f1; border-color: #f0c4cb; color: var(--danger); }
.notice.success { color: var(--success); }

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}

.list { display: grid; gap: 10px; }
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.chat-shell {
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}
.chat-side, .chat-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.chat-panel { display: grid; grid-template-rows: 1fr auto; min-height: 620px; }
.messages { display: grid; align-content: end; gap: 14px; overflow: auto; padding-bottom: 18px; }
.message { max-width: 76%; border-radius: 8px; padding: 14px 16px; }
.message p { margin: 0; }
.message small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.message.user { justify-self: end; background: var(--primary); color: #fff; }
.message.assistant { justify-self: start; background: #eef4f3; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }

.footer {
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .hero, .chat-shell, .grid.three, .grid.four, .form.split { grid-template-columns: 1fr; }
  .site-header, .dashboard-head { align-items: flex-start; flex-direction: column; }
  .message { max-width: 94%; }
  .chat-form { grid-template-columns: 1fr; }
}

