@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
  --bg: #f4f7f5;
  --bg-2: #e8f0ec;
  --panel: #ffffff;
  --panel-soft: #f8fbf9;
  --line: rgba(28, 55, 45, 0.1);
  --text: #1c372d;
  --muted: #5f7468;
  --accent: #0d9488;
  --accent-2: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --warn: #b45309;
  --danger: #be123c;
  --ok: #047857;
  --shadow: 0 12px 40px rgba(28, 55, 45, 0.08);
  --radius: 18px;
  --sidebar: 260px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(13, 148, 136, 0.1), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(15, 118, 110, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  backdrop-filter: blur(14px);
  animation: slideInLeft .45s ease both;
}

.brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: transparent;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.22);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark img {
  width: 44px; height: 44px; display: block;
}
.brand h1 {
  margin: 0; font-size: 1.28rem; font-family: Fraunces, serif; letter-spacing: .01em; color: var(--text);
}
.brand h1 .brand-ai { color: var(--accent-2); }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }

.nav-group { margin-top: 16px; }
.nav-label {
  color: var(--muted); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .12em; margin: 0 0 8px 10px; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-bottom: 4px; border-radius: 12px;
  color: var(--text); border: 1px solid transparent;
  transition: .2s ease;
}
.nav a:hover, .nav a.active {
  background: var(--accent-soft);
  border-color: rgba(13, 148, 136, 0.18);
  color: var(--accent-2);
}
.nav .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.nav-icon {
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent-2); opacity: .9;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav a.active .nav-icon, .nav a:hover .nav-icon { color: var(--accent); opacity: 1; }

.nav-tree { display: flex; flex-direction: column; gap: 4px; }
.nav-acc {
  border: 1px solid transparent; border-radius: 12px; margin-bottom: 2px;
}
.nav-acc[open] { background: rgba(13,148,136,.04); border-color: rgba(13,148,136,.12); }
.nav-acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; color: var(--text); font-weight: 600; font-size: .92rem;
  user-select: none;
}
.nav-acc > summary::-webkit-details-marker { display: none; }
.nav-acc > summary:hover { background: var(--accent-soft); color: var(--accent-2); }
.nav-caret {
  margin-left: auto; width: 16px; height: 16px; display: inline-flex;
  opacity: .55; transition: transform .2s ease;
}
.nav-caret svg { width: 14px; height: 14px; }
.nav-acc[open] > summary .nav-caret { transform: rotate(180deg); opacity: .9; }
.nav-sub {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 8px 10px 18px;
}
.nav-sub a {
  padding: 9px 12px 9px 28px; margin: 0; font-size: .88rem; position: relative;
}
.nav-sub a::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--muted); transform: translateY(-50%); opacity: .55;
}
.nav-sub a.active::before, .nav-sub a:hover::before { background: var(--accent); opacity: 1; }

.nav-feature {
  display: flex !important; align-items: center; gap: 12px;
  margin: 8px 0 10px !important; padding: 12px 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(13,148,136,.16), rgba(13,148,136,.04));
  border: 1px solid rgba(13,148,136,.28) !important;
  box-shadow: 0 8px 22px rgba(13,148,136,.12);
}
.nav-feature:hover, .nav-feature.active {
  background: linear-gradient(135deg, rgba(13,148,136,.22), rgba(13,148,136,.08)) !important;
  border-color: rgba(13,148,136,.4) !important;
}
.nav-feature-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(13,148,136,.18); color: var(--accent); flex-shrink: 0;
}
.nav-feature-icon svg { width: 18px; height: 18px; }
.nav-feature-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.nav-feature-copy strong { font-size: .92rem; line-height: 1.2; }
.nav-feature-copy small { color: var(--muted); font-size: .72rem; }
.avatar-img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(13,148,136,.25);
}
.profile-photo {
  width: 96px; height: 96px; border-radius: 24px; object-fit: cover;
  border: 2px solid var(--line); background: var(--panel-soft);
}
.toolbar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.hint-text { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
body.theme-dark {
  --bg: #0f1714;
  --bg-2: #121c18;
  --panel: #18241f;
  --panel-soft: #1c2a24;
  --line: rgba(200, 230, 220, 0.12);
  --text: #e7f2ec;
  --muted: #9bb0a6;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
}
body.theme-dark .sidebar,
body.theme-dark .login-card,
body.theme-dark .user-chip,
body.theme-dark .stat,
body.theme-dark .panel,
body.theme-dark .btn-ghost,
body.theme-dark .icon-btn,
body.theme-dark .table-wrap,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: var(--panel);
  color: var(--text);
}
body.theme-dark table.data-grid th { background: var(--panel-soft); }
body.theme-dark table.data-grid tbody tr { background: var(--panel); }
body.theme-dark .grid-pager button { background: var(--panel-soft); color: var(--text); }
body[data-accent="Blue"] { --accent:#2563eb; --accent-2:#1d4ed8; --accent-soft:rgba(37,99,235,.12); }
body[data-accent="Green"] { --accent:#16a34a; --accent-2:#15803d; --accent-soft:rgba(22,163,74,.12); }
body[data-accent="Slate"] { --accent:#475569; --accent-2:#334155; --accent-soft:rgba(71,85,105,.12); }

.main {
  flex: 1; padding: 28px 28px 0; animation: fadeUp .45s ease both;
  display: flex; flex-direction: column; min-width: 0; min-height: 100vh;
}
.main-body { flex: 1 1 auto; padding-bottom: 18px; }

.auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-layout-body { flex: 1 1 auto; display: flex; }

.site-footer {
  flex-shrink: 0;
  padding: 14px 8px 18px;
  text-align: center;
}
.site-footer-inner {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 61, 58, .05);
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .01em;
}
.site-footer-mark {
  color: var(--accent);
  font-size: .55rem;
  transform: translateY(-0.5px);
}
.site-footer-brand {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
}
.site-footer-brand:hover,
.site-footer-link:hover { text-decoration: underline; }
.site-footer-dot { opacity: .55; }
.site-footer-link {
  color: var(--muted);
  text-decoration: none;
}
.site-footer-auth .site-footer-inner {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
}
.site-footer-app {
  margin: 8px -8px 0;
  padding-bottom: 16px;
}
body.theme-dark .site-footer-inner {
  background: rgba(20, 32, 29, .88);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.topbar h2 {
  margin: 0; font-family: Fraunces, serif; font-size: 1.55rem; font-weight: 600;
}
.topbar .sub { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.user-menu { position: relative; z-index: 40; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
  transition: .2s ease;
}
.user-chip:hover, .user-menu.open .user-chip {
  border-color: rgba(13,148,136,.35);
  box-shadow: 0 10px 28px rgba(13,148,136,.12);
}
.user-chip .chev {
  width: 16px; height: 16px; color: var(--muted); margin-left: 2px;
  transition: transform .2s ease;
}
.user-menu.open .user-chip .chev { transform: rotate(180deg); color: var(--accent); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  animation: fadeUp .2s ease both;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px;
  color: var(--text); font-weight: 500; font-size: .92rem;
  transition: .15s ease;
}
.user-dropdown a:hover {
  background: var(--accent-soft);
  color: var(--accent-2);
}
.user-dropdown a .nav-icon { width: 18px; height: 18px; }
.user-dropdown a .nav-icon svg { width: 16px; height: 16px; }
.user-dropdown .sep {
  height: 1px; background: var(--line); margin: 6px 4px;
}
.user-dropdown a.danger { color: var(--danger); }
.user-dropdown a.danger:hover { background: rgba(190,18,60,.08); color: var(--danger); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, #5eead4, #0d9488);
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .85rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: fadeUp .5s ease both;
}
.panel + .panel { margin-top: 16px; }
.panel-title {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.panel-title h3 { margin: 0; font-family: Fraunces, serif; font-size: 1.08rem; font-weight: 600; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px;
}
.stat {
  padding: 18px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: .25s ease; animation: fadeUp .55s ease both;
}
.stat:hover { transform: translateY(-3px); border-color: rgba(13,148,136,.28); }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: 6px; font-family: Fraunces, serif; color: var(--accent-2); }

.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
label { display: block; color: var(--muted); font-size: .84rem; margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-soft);
  color: var(--text); outline: none; transition: .2s ease;
  font-family: inherit;
  font-size: .95rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
select {
  padding-right: 42px;
  background-color: var(--panel-soft);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-2) 50%),
    linear-gradient(135deg, var(--accent-2) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px),
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  cursor: pointer;
}
select:hover {
  border-color: rgba(13,148,136,.35);
}
select option,
select optgroup {
  background: var(--panel);
  color: var(--text);
  padding: 10px;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(13,148,136,.55);
  box-shadow: 0 0 0 4px rgba(13,148,136,.1);
  background-color: #fff;
}
select:focus {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px),
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}
body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  background-color: var(--panel-soft);
}
body.theme-dark select:focus {
  background-color: var(--panel-soft);
}
textarea { min-height: 120px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 11px 18px; cursor: pointer;
  font-weight: 600; font-family: inherit; transition: .2s ease; font-size: .92rem;
}
.btn-primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 8px 22px rgba(13,148,136,.25);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost {
  background: #fff; color: var(--text); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-danger { background: #be123c; color: white; }
.btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.pwd-field {
  position: relative;
  display: block;
}
.pwd-field input {
  width: 100%;
  padding-right: 44px;
}
.pwd-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.pwd-toggle svg { width: 18px; height: 18px; }
.pwd-toggle:hover { color: var(--accent-2); background: var(--accent-soft); }
.field-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: .8rem;
}
.secret-area {
  width: 100%;
  font-family: Consolas, "Courier New", monospace;
  font-size: .88rem;
  line-height: 1.45;
  min-height: 96px;
}

.html-editor {
  width: 100%;
  font-family: Consolas, "Courier New", monospace;
  font-size: .85rem;
  line-height: 1.45;
  min-height: 320px;
}
.html-preview-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #eef6f4;
}
.html-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
}
.html-preview-frame {
  display: block;
  width: 100%;
  height: min(620px, 70vh);
  border: 0;
  background: #fff;
}

.alert {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
  border: 1px solid var(--line); animation: fadeUp .3s ease both;
}
.alert-ok { background: rgba(4,120,87,.08); border-color: rgba(4,120,87,.22); color: var(--ok); }
.alert-error { background: rgba(190,18,60,.08); border-color: rgba(190,18,60,.2); color: var(--danger); }
.alert-warn { background: rgba(180,83,9,.08); border-color: rgba(180,83,9,.2); color: var(--warn); }

.toast-host {
  position: fixed; top: 18px; right: 18px; z-index: 4000;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 28px)); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(15, 61, 58, .14);
  color: var(--ink); font-size: .9rem; line-height: 1.45;
  opacity: 0; transform: translateY(-8px); transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hide { opacity: 0; transform: translateY(-6px); }
.toast-msg { flex: 1; }
.toast-close {
  border: 0; background: transparent; color: var(--muted);
  font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 2px;
}
.toast-ok { border-color: rgba(4,120,87,.25); background: #f3faf7; color: var(--ok); }
.toast-error { border-color: rgba(190,18,60,.25); background: #fff5f7; color: var(--danger); }
.toast-warn { border-color: rgba(180,83,9,.25); background: #fff8f1; color: var(--warn); }

/* ===== Production data grid ===== */
.grid-card { display: flex; flex-direction: column; gap: 0; }
.grid-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.grid-toolbar-left, .grid-toolbar-right {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
}
.btn-add {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px;
  padding: 0 16px; border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff !important; font-weight: 600; border: none;
  box-shadow: 0 8px 20px rgba(13,148,136,.22);
  transition: .2s ease; white-space: nowrap;
}
.btn-add:hover { transform: translateY(-1px); filter: brightness(1.05); color: #fff !important; }
.btn-add svg { width: 16px; height: 16px; }
.grid-search {
  position: relative; width: 280px; max-width: 42vw; flex: 0 1 280px;
}
.grid-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.grid-search input {
  padding-left: 38px; margin: 0; height: 42px;
  border-radius: 12px; background: var(--panel-soft);
}
.grid-pagesize {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 6px 0 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-soft); color: var(--muted); font-size: .84rem;
  white-space: nowrap; flex-shrink: 0;
}
.grid-pagesize select {
  width: auto; min-width: 64px; height: 38px;
  padding: 0 32px 0 8px; margin: 0; border: none; background-color: transparent;
  box-shadow: none;
}
.grid-pagesize select:focus {
  box-shadow: none; background-color: transparent;
}
.grid-filter select {
  width: auto; min-width: 150px; height: 42px; margin: 0; padding-top: 8px; padding-bottom: 8px;
}
@media (max-width: 860px) {
  .grid-toolbar-left, .grid-toolbar-right { flex-wrap: wrap; width: 100%; }
  .grid-search { width: 100%; max-width: none; flex: 1 1 100%; }
  .grid-pagesize { width: 100%; justify-content: space-between; }
}
.table-wrap {
  overflow: auto; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel);
}
table.data-grid {
  width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px;
}
table.data-grid th, table.data-grid td {
  padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: .9rem; vertical-align: middle; white-space: nowrap;
}
table.data-grid td.wrap, table.data-grid th.wrap { white-space: normal; }
table.data-grid th {
  background: var(--panel-soft); color: var(--muted);
  font-weight: 600; position: sticky; top: 0; z-index: 2;
  letter-spacing: .01em;
}
table.data-grid th.sortable {
  cursor: pointer; user-select: none;
}
table.data-grid th.sortable:hover { color: var(--accent-2); }
table.data-grid th .sort-ico {
  display: inline-block; margin-left: 6px; opacity: .35; font-size: .72rem;
}
table.data-grid th.sorted-asc .sort-ico,
table.data-grid th.sorted-desc .sort-ico { opacity: 1; color: var(--accent); }
table.data-grid tbody tr {
  transition: background .15s ease; background: var(--panel);
}
table.data-grid tbody tr:hover { background: rgba(13,148,136,.045); }
table.data-grid tbody tr:last-child td { border-bottom: none; }
table.data-grid .cell-main { font-weight: 600; color: var(--text); }
table.data-grid .cell-sub { color: var(--muted); font-size: .78rem; margin-top: 2px; }

.icon-actions {
  display: inline-flex; align-items: center; gap: 6px;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--panel-soft);
  color: var(--muted); cursor: pointer; transition: .15s ease;
  padding: 0; text-decoration: none;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--accent-2); border-color: rgba(13,148,136,.35); background: var(--accent-soft); }
.icon-btn.view:hover { color: #0369a1; border-color: rgba(3,105,161,.3); background: rgba(3,105,161,.08); }
.icon-btn.edit:hover { color: var(--accent-2); }
.icon-btn.delete:hover,
.icon-btn.danger:hover {
  color: var(--danger); border-color: rgba(190,18,60,.28); background: rgba(190,18,60,.08);
}
.icon-btn.ok:hover { color: var(--ok); border-color: rgba(4,120,87,.3); background: rgba(4,120,87,.08); }
form.icon-form { display: inline; margin: 0; }

.grid-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 4px;
  color: var(--muted); font-size: .86rem;
}
.grid-pager { display: flex; align-items: center; gap: 6px; }
.grid-pager button {
  min-width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text); cursor: pointer; font-weight: 600; font-family: inherit;
}
.grid-pager button:hover:not(:disabled) {
  border-color: rgba(13,148,136,.35); color: var(--accent-2); background: var(--accent-soft);
}
.grid-pager button.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.grid-pager button:disabled { opacity: .4; cursor: not-allowed; }
.grid-empty {
  text-align: center; padding: 36px 16px; color: var(--muted);
}
.badge {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  font-size: .74rem; border: 1px solid rgba(13,148,136,.2); color: var(--accent-2);
  background: var(--accent-soft); font-weight: 600;
}
.badge-muted {
  border-color: var(--line); color: var(--muted); background: var(--panel-soft);
}
.badge-danger {
  border-color: rgba(190,18,60,.2); color: var(--danger); background: rgba(190,18,60,.08);
}

/* Auth pages */
.login-page {
  flex: 1; width: 100%;
  min-height: 0; display: grid; place-items: center; padding: 24px;
  position: relative; overflow: hidden;
}
.login-page:not(.has-video)::before,
.login-page:not(.has-video)::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(50px);
  animation: float 9s ease-in-out infinite;
}
.login-page:not(.has-video)::before {
  width: 300px; height: 300px; background: rgba(13,148,136,.16); top: 8%; left: 10%;
}
.login-page:not(.has-video)::after {
  width: 260px; height: 260px; background: rgba(15,118,110,.12); bottom: 6%; right: 8%;
  animation-delay: -3s;
}
.login-backdrop {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(160deg, #e8f4f1 0%, #f4faf8 45%, #eef6f4 100%);
}
.login-backdrop-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(0.92) contrast(0.96) brightness(1.05);
}
.login-backdrop-wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(238,246,244,.55) 0%, rgba(247,251,250,.72) 42%, rgba(238,246,244,.78) 100%),
    radial-gradient(ellipse at 20% 15%, rgba(13,148,136,.18), transparent 48%),
    radial-gradient(ellipse at 85% 80%, rgba(15,118,110,.14), transparent 42%);
}
.login-card {
  width: min(460px, 100%); position: relative; z-index: 1;
  padding: 32px 28px; border-radius: 24px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(14px);
  animation: fadeUp .5s ease both;
}
.login-card.wide { width: min(560px, 100%); }
.login-card h2 { margin: 0 0 6px; font-family: Fraunces, serif; }
.login-card .hint { color: var(--muted); margin-bottom: 20px; font-size: .92rem; }
.login-card .field { margin-bottom: 14px; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: .9rem; }

/* Modal */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 55, 45, .35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.modal-backdrop.show { display: flex; animation: fadeIn .2s ease; }
.modal {
  width: min(760px, 100%);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0;
  box-shadow: var(--shadow);
  animation: scaleIn .25s ease;
}
.modal-header { flex-shrink: 0; padding: 20px 22px 10px; }
.modal-header h3 { margin: 0 0 8px; font-family: Fraunces, serif; }
.modal-header p { margin: 0; color: var(--muted); font-size: .9rem; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 22px; }
.modal-footer {
  flex-shrink: 0; padding: 14px 22px 20px;
  border-top: 1px solid var(--line); background: var(--panel-soft);
}
.modal-footer .actions { margin-top: 0; }
.modal .data-grid { min-width: 0; }

.attach-slots {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px;
}
.attach-slot {
  border: 1px dashed var(--line); border-radius: 12px; padding: 12px; text-align: center;
  background: var(--panel-soft); min-height: 88px;
}
.attach-slot small { color: var(--muted); display: block; margin-top: 6px; word-break: break-all; }

.sidebar-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .attach-slots { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: relative;
    display: none;
  }
  .sidebar.open { display: block; }
  .sidebar-toggle { display: inline-flex; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .main { padding: 18px; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Landing page */
.landing-layout {
  background:
    radial-gradient(900px 420px at 10% -5%, rgba(13,148,136,.12), transparent 55%),
    radial-gradient(700px 380px at 95% 8%, rgba(15,118,110,.1), transparent 50%),
    linear-gradient(180deg, #f3faf7 0%, #eef6f3 35%, #f7fbf9 100%);
}
.landing-layout .auth-layout-body {
  display: block;
  flex: 1 1 auto;
}
.landing {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 64px;
}
.landing-atmosphere {
  pointer-events: none; position: absolute; inset: -40px -10% auto;
  height: 520px;
  background:
    radial-gradient(circle at 30% 40%, rgba(45,212,191,.16), transparent 45%),
    radial-gradient(circle at 70% 20%, rgba(13,148,136,.12), transparent 40%);
  filter: blur(8px); z-index: 0;
}
.landing > *:not(.landing-atmosphere) { position: relative; z-index: 1; }

[data-reveal] {
  opacity: 0; transform: translateY(28px) scale(.985);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1);
}
[data-reveal].is-in {
  opacity: 1; transform: none;
}

.landing-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 4px 28px;
}
.landing-brand {
  display: inline-flex; align-items: center; gap: 12px; color: inherit;
}
.landing-brand img {
  width: 42px; height: 42px; border-radius: 12px;
  box-shadow: 0 8px 20px rgba(13,148,136,.18);
}
.landing-brand strong {
  display: block; font-family: Fraunces, serif; font-size: 1.25rem; line-height: 1.1;
}
.landing-brand small { color: var(--muted); font-size: .78rem; }
.landing-nav-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.landing-hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  min-height: min(72vh, 680px);
  padding: 20px 0 56px;
}
.landing-kicker {
  margin: 0 0 14px; color: var(--accent-2); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; font-size: .72rem;
  display: inline-flex; align-items: center; gap: 8px;
}
.landing-kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(13,148,136,.14);
  animation: landingPing 2.4s ease-out infinite;
}
.landing-hero-copy h1 {
  margin: 0; font-family: Fraunces, serif; font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.7rem); line-height: 1.06; color: var(--text);
}
.landing-hero-copy h1 em {
  font-style: normal; color: var(--accent-2);
}
.landing-lead {
  margin: 18px 0 26px; max-width: 34rem;
  color: var(--muted); font-size: 1.08rem; line-height: 1.6;
}
.landing-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.landing-cta .btn {
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease, background .25s ease;
}
.landing-cta .btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15,61,58,.16); }
.landing-cta-link {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: var(--accent-2) !important; font-weight: 650; padding-left: 4px; padding-right: 4px;
}
.landing-cta-link:hover { transform: none; background: transparent !important; }
.landing-depth { perspective: 1000px; }

/* Hero orbit — product glass preview (matches AIFJobs mint UI) */
.landing-hero-art {
  --ox: 0px; --oy: 0px;
  position: relative; min-height: 480px;
  display: grid; place-items: center;
  isolation: isolate;
}
.hero-orbit-glow {
  position: absolute; width: 78%; height: 78%; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,.2), rgba(204,251,241,.18) 40%, transparent 68%);
  filter: blur(6px); z-index: 0; pointer-events: none;
  transform: translate(var(--ox), var(--oy));
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.hero-orbit-dust {
  position: absolute; inset: 6% 4%; z-index: 1; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 24%, rgba(13,148,136,.55), transparent),
    radial-gradient(1.5px 1.5px at 82% 20%, rgba(15,118,110,.4), transparent),
    radial-gradient(1.2px 1.2px at 66% 74%, rgba(13,148,136,.4), transparent),
    radial-gradient(1.4px 1.4px at 26% 76%, rgba(94,234,212,.55), transparent),
    radial-gradient(1px 1px at 90% 52%, rgba(15,61,58,.28), transparent);
  animation: heroDustDrift 14s ease-in-out infinite alternate;
}
.hero-orbit-scene {
  position: relative; z-index: 2; width: min(100%, 440px); aspect-ratio: 1;
  display: grid; place-items: center;
  transform: translate3d(var(--ox), var(--oy), 0);
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
}
.hero-orbit-ring {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.hero-orbit-ring.ring-outer {
  inset: 1%;
  animation: heroOrbitSpin 32s linear infinite;
  background: conic-gradient(from 30deg, transparent 0 70%, rgba(13,148,136,.4) 76%, transparent 84%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 100%);
}
.hero-orbit-ring.ring-mid {
  inset: 10%;
  border: 1px solid rgba(13,148,136,.14);
  animation: heroOrbitSpin 22s linear infinite reverse;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.hero-orbit-ring.ring-inner {
  inset: 19%;
  border: 1px dashed rgba(13,148,136,.18);
  animation: heroOrbitSpin 16s linear infinite;
}
.hero-orbit-core {
  position: relative; z-index: 3; width: 58%;
  animation: heroCoreFloat 7s ease-in-out infinite;
}
.hero-core-glass {
  border-radius: 26px;
  padding: 16px 14px 14px;
  background:
    linear-gradient(165deg, rgba(255,255,255,.96), rgba(236,253,245,.88));
  border: 1px solid rgba(13,148,136,.18);
  box-shadow:
    0 28px 56px rgba(15,61,58,.14),
    0 0 0 8px rgba(255,255,255,.35),
    inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-core-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding: 0 2px 10px;
  border-bottom: 1px solid rgba(13,148,136,.1);
}
.hero-core-brand > img {
  width: 36px; height: 36px; border-radius: 11px;
  box-shadow: 0 8px 16px rgba(13,148,136,.22);
}
.hero-core-brand strong {
  display: block; font-family: Fraunces, serif; font-size: .98rem; line-height: 1.1;
}
.hero-core-brand span {
  color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .02em;
}
.hero-core-rows { display: grid; gap: 8px; }
.hero-core-row {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(13,148,136,.1);
}
.hero-core-row strong { display: block; font-size: .78rem; line-height: 1.15; }
.hero-core-row small { color: var(--muted); font-size: .65rem; }
.hero-core-row em {
  font-style: normal; font-size: .72rem; font-weight: 800; color: var(--accent-2);
  background: rgba(13,148,136,.1); padding: 3px 7px; border-radius: 999px;
}
.hero-core-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #14b8a6; box-shadow: 0 0 0 3px rgba(20,184,166,.18);
}
.hero-core-dot.d2 { background: #0d9488; }
.hero-core-dot.d3 { background: #0f766e; }
.hero-core-foot {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  font-size: .68rem; font-weight: 650; color: var(--accent-2);
  padding: 8px 10px; border-radius: 12px;
  background: rgba(13,148,136,.08);
}
.hero-core-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #14b8a6; flex-shrink: 0;
  animation: landingPing 1.8s ease-out infinite;
}
.hero-orbit-chip {
  position: absolute; z-index: 4;
  min-width: 112px; padding: 10px 12px; border-radius: 16px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(13,148,136,.14);
  box-shadow: 0 12px 28px rgba(15,61,58,.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .4s ease, border-color .4s ease;
}
.hero-orbit-chip em {
  display: block; font-style: normal; font-size: .62rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 2px;
}
.hero-orbit-chip strong { display: block; font-size: .88rem; line-height: 1.2; }
.hero-orbit-chip small { color: var(--muted); font-size: .7rem; }
.hero-orbit-chip.chip-match {
  top: 6%; left: -4%;
  animation: heroChipFloat 5.5s ease-in-out infinite;
}
.hero-orbit-chip.chip-mail {
  top: 12%; right: -6%;
  animation: heroChipFloat 6.2s ease-in-out infinite .6s;
}
.hero-orbit-chip.chip-pipe {
  bottom: 10%; left: -2%;
  animation: heroChipFloat 5.8s ease-in-out infinite 1.1s;
}
.hero-orbit-chip.chip-ai {
  bottom: 6%; right: -4%;
  animation: heroChipFloat 6.8s ease-in-out infinite .3s;
}
.landing-hero-art:hover .hero-orbit-chip {
  border-color: rgba(13,148,136,.28);
  box-shadow: 0 16px 34px rgba(15,61,58,.14);
}

@keyframes heroOrbitSpin {
  to { transform: rotate(360deg); }
}
@keyframes heroCoreFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes heroChipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes heroDustDrift {
  from { transform: translate3d(0,0,0); opacity: .4; }
  to { transform: translate3d(5px,-6px,0); opacity: .65; }
}
.landing-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin: 8px 0 48px;
}
.landing-stat {
  position: relative; overflow: hidden;
  padding: 24px 20px; border-radius: 22px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(13,148,136,.14);
  box-shadow: 0 16px 40px rgba(15,61,58,.08);
  transition: box-shadow .25s ease, border-color .25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.landing-stat:hover {
  border-color: rgba(13,148,136,.35);
  box-shadow: 0 24px 50px rgba(15,61,58,.14);
}
.landing-stat:nth-child(2) { animation-delay: .08s; }
.landing-stat:nth-child(3) { animation-delay: .16s; }
.landing-stat:nth-child(4) { animation-delay: .24s; }
.landing-stat-value {
  font-family: Fraunces, serif; font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--accent-2); line-height: 1.1; font-weight: 700;
}
.landing-stat-label { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.landing-stat-pulse {
  position: absolute; inset: auto 12px 10px auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); opacity: .35;
}
.landing-stat.bump {
  animation: landingBump .55s ease;
}
.landing-stat.bump .landing-stat-pulse {
  box-shadow: 0 0 0 0 rgba(13,148,136,.45);
  animation: landingPing 1s ease;
}
.landing-stat-ico {
  width: 34px; height: 34px; border-radius: 11px; margin-bottom: 10px;
  display: grid; place-items: center; color: var(--accent-2);
  background: rgba(13,148,136,.12);
}
.landing-stat-ico svg { width: 18px; height: 18px; }

.landing-divider {
  display: flex; align-items: center; gap: 14px; margin: 18px 0 42px;
  color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
}
.landing-divider span {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,148,136,.35), transparent);
}
.landing-divider em { font-style: normal; font-weight: 700; color: var(--accent-2); }

.landing-showcase {
  margin: 10px 0 56px; padding: 28px;
  border-radius: 28px; border: 1px solid rgba(13,148,136,.16);
  background:
    radial-gradient(500px 240px at 50% 0%, rgba(13,148,136,.16), transparent 60%),
    rgba(255,255,255,.55);
  box-shadow: 0 24px 60px rgba(15,61,58,.08);
}
.landing-showcase-scene {
  position: relative; min-height: 260px;
  display: grid; place-items: center; perspective: 1000px;
}
.landing-showcase-core {
  z-index: 2; text-align: center; padding: 28px 32px; border-radius: 24px;
  background: rgba(255,255,255,.92); border: 1px solid rgba(13,148,136,.2);
  box-shadow: 0 22px 50px rgba(15,61,58,.14);
  transform: translateZ(40px);
}
.landing-showcase-core img { width: 54px; height: 54px; margin-bottom: 8px; }
.landing-showcase-core strong { display: block; font-family: Fraunces, serif; font-size: 1.2rem; }
.landing-showcase-core span { color: var(--muted); font-size: .85rem; }
.landing-float-card {
  position: absolute; width: 150px; padding: 14px; border-radius: 18px;
  background: rgba(255,255,255,.95); border: 1px solid rgba(13,148,136,.18);
  box-shadow: 0 18px 40px rgba(15,61,58,.14); text-align: left;
  animation: landingFloat 5.5s ease-in-out infinite;
}
.landing-float-card strong { display: block; margin-top: 8px; font-size: .9rem; }
.landing-float-card small { color: var(--muted); font-size: .75rem; }
.landing-float-card.f1 { left: 6%; top: 18%; animation-delay: 0s; }
.landing-float-card.f2 { right: 8%; top: 12%; animation-delay: -1.5s; }
.landing-float-card.f3 { left: 18%; bottom: 10%; animation-delay: -3s; }
.landing-art-icon {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #14b8a6, #0f766e); color: #fff;
}
.landing-art-icon svg { width: 16px; height: 16px; stroke: #fff; }
@keyframes landingFloat {
  0%, 100% { transform: translateY(0) rotateY(-4deg); }
  50% { transform: translateY(-14px) rotateY(4deg); }
}

.landing-how { margin: 28px 0 64px; }
.landing-section-head { margin-bottom: 28px; }
.landing-section-head h2 {
  margin: 0 0 10px; font-family: Fraunces, serif; font-size: clamp(1.8rem, 3vw, 2.3rem);
}
.landing-section-head p { margin: 0; color: var(--muted); max-width: 40rem; }
.landing-how-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.landing-how-card {
  padding: 26px 22px; border-radius: 22px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(13,148,136,.14);
  box-shadow: 0 16px 40px rgba(15,61,58,.07);
  transition: box-shadow .25s ease, border-color .25s ease;
  transform-style: preserve-3d; will-change: transform;
}
.landing-how-card:hover {
  border-color: rgba(13,148,136,.35);
  box-shadow: 0 26px 54px rgba(15,61,58,.14);
}
.landing-how-card:nth-child(2) { animation-delay: .1s; }
.landing-how-card:nth-child(3) { animation-delay: .2s; }
.landing-how-icon {
  width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2);
  margin-bottom: 12px; font-size: 1rem;
}
.landing-how-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.landing-how-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .92rem; }

.landing-promise { margin: 8px 0 40px; }
.landing-promise-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.landing-promise-card {
  padding: 24px 22px; border-radius: 22px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: fadeUp .6s ease both;
}
.landing-promise-card:nth-child(2) { animation-delay: .1s; }
.landing-promise-card:nth-child(3) { animation-delay: .2s; }
.landing-promise-card.accent {
  background: linear-gradient(165deg, rgba(13,148,136,.14), rgba(255,255,255,.92));
  border-color: rgba(13,148,136,.22);
}
.landing-promise-card h3 {
  margin: 0 0 10px; font-family: Fraunces, serif; font-size: 1.25rem;
}
.landing-promise-card p {
  margin: 0; color: var(--muted); line-height: 1.55; font-size: .94rem;
}

.landing-why { margin: 28px 0 64px; }
.landing-why-layout {
  display: grid; grid-template-columns: 1.35fr .85fr; gap: 24px; align-items: start;
}
.landing-benefit-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
}
.landing-benefit-list li {
  padding: 18px 20px; border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(13,148,136,.14);
  box-shadow: 0 14px 34px rgba(15,61,58,.06);
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.landing-benefit-list li:hover {
  border-color: rgba(13,148,136,.35);
  box-shadow: 0 22px 48px rgba(15,61,58,.12);
}
.landing-benefit-list li:nth-child(2) { animation-delay: .06s; }
.landing-benefit-list li:nth-child(3) { animation-delay: .12s; }
.landing-benefit-list li:nth-child(4) { animation-delay: .18s; }
.landing-benefit-list li:nth-child(5) { animation-delay: .24s; }
.landing-benefit-list strong {
  display: block; margin-bottom: 4px; font-size: .98rem;
}
.landing-benefit-list span {
  color: var(--muted); font-size: .9rem; line-height: 1.5;
}
.landing-why-card {
  padding: 24px 22px; border-radius: 22px;
  background: linear-gradient(165deg, rgba(255,255,255,.95), rgba(236,247,244,.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: sticky; top: 18px;
  animation: scaleIn .65s ease both;
}
.landing-why-tag {
  margin: 0 0 8px; color: var(--accent-2); font-size: .78rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.landing-why-card h3 {
  margin: 0 0 12px; font-family: Fraunces, serif; font-size: 1.35rem;
}
.landing-why-card ul {
  margin: 0 0 14px; padding-left: 1.1rem; color: var(--muted); line-height: 1.7;
}
.landing-why-note {
  margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .86rem;
}

.landing-close {
  text-align: center; padding: 48px 28px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(13,148,136,.14), rgba(255,255,255,.92));
  border: 1px solid rgba(13,148,136,.18);
  box-shadow: 0 24px 60px rgba(15,61,58,.1);
  margin: 24px 0 12px;
}
.landing-close h2 { margin: 0 0 12px; font-family: Fraunces, serif; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.landing-close p { margin: 0 auto 22px; color: var(--muted); max-width: 36rem; }

@keyframes landingBump {
  0% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
@keyframes landingPing {
  0% { box-shadow: 0 0 0 0 rgba(13,148,136,.4); opacity: .8; }
  100% { box-shadow: 0 0 0 14px rgba(13,148,136,0); opacity: .2; }
}

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; }
  .landing-stats { grid-template-columns: 1fr 1fr; }
  .landing-how-grid,
  .landing-promise-grid { grid-template-columns: 1fr; }
  .landing-why-layout { grid-template-columns: 1fr; }
  .landing-why-card { position: static; }
  .landing-float-card.f1 { left: 2%; }
  .landing-float-card.f2 { right: 2%; }
  .landing-float-card.f3 { display: none; }
  .landing-hero-art { min-height: 380px; margin-top: 8px; }
  .hero-orbit-scene { width: min(100%, 360px); }
  .hero-orbit-chip.chip-match { left: 0; }
  .hero-orbit-chip.chip-mail { right: 0; }
  .hero-orbit-chip.chip-pipe { left: 2%; }
  .hero-orbit-chip.chip-ai { right: 2%; }
}
@media (max-width: 560px) {
  .landing-stats { grid-template-columns: 1fr; }
  .landing-nav-actions .btn-ghost { display: none; }
  .landing-float-card { display: none; }
  .landing-showcase { padding: 18px; }
  .hero-orbit-chip { min-width: 100px; padding: 8px 10px; }
  .hero-orbit-chip small { display: none; }
  .landing-hero-art { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .landing-float-card { animation: none; }
  .landing-tilt { transform: none !important; }
  .landing-mosaic-card::before,
  .landing-mosaic-card::after { opacity: 0 !important; }
  .landing-mosaic-visual img { transform: none !important; transition: none !important; }
  .hero-orbit-ring,
  .hero-orbit-core,
  .hero-orbit-chip,
  .hero-orbit-dust,
  .hero-core-pulse,
  .landing-kicker-dot { animation: none !important; }
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.35) rgba(232, 240, 236, 0.9);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
  background: rgba(232, 240, 236, 0.9);
  border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.35);
  border-radius: 10px;
  border: 2px solid rgba(232, 240, 236, 0.9);
}

/* Messages full-bleed workspace */
body.page-messages .main {
  padding: 18px 18px 0;
}
body.page-messages .topbar { margin-bottom: 12px; }
body.page-messages .main-body {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
body.page-messages .msg-app {
  flex: 1 1 auto;
  min-height: calc(100vh - 168px);
  height: calc(100vh - 168px);
  max-width: none;
  width: 100%;
  border-radius: 18px;
  margin: 0;
}
body.page-messages .ai-bot { display: none !important; }

/* User-to-user messenger */
.msg-app {
  display: grid; grid-template-columns: minmax(260px, 320px) 1fr;
  min-height: min(72vh, 780px); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; background: var(--panel);
}
.msg-sidebar {
  border-right: 1px solid var(--line); background: var(--panel-soft);
  display: flex; flex-direction: column; min-height: 0;
}
.msg-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 8px;
}
.msg-sidebar-head h3 { margin: 0; font-family: Fraunces, serif; font-size: 1.05rem; }
.msg-start {
  display: flex; gap: 6px; padding: 0 12px 10px;
}
.msg-start input { flex: 1; min-width: 0; height: 40px; }
.msg-search-wrap { position: relative; padding: 0 12px 10px; }
.msg-search-wrap input { width: 100%; height: 40px; }
.msg-search-results {
  position: absolute; left: 12px; right: 12px; top: 100%; z-index: 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12); max-height: 240px; overflow: auto;
}
.msg-search-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; padding: 10px 12px; cursor: pointer; color: var(--text);
}
.msg-search-item:hover { background: rgba(13,148,136,.08); }
.msg-search-item span { color: var(--muted); font-size: .78rem; }
.msg-search-empty { padding: 12px; color: var(--muted); font-size: .85rem; }
.msg-thread-list { flex: 1; overflow: auto; padding: 0 8px 12px; }
.msg-thread-item {
  display: flex; gap: 10px; align-items: center; padding: 10px;
  border-radius: 12px; text-decoration: none; color: inherit; margin-bottom: 4px;
}
.msg-thread-item:hover, .msg-thread-item.active { background: rgba(13,148,136,.1); }
.msg-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(13,148,136,.15); color: var(--accent-2); font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.msg-thread-meta { min-width: 0; flex: 1; }
.msg-thread-top { display: flex; justify-content: space-between; gap: 8px; }
.msg-thread-top strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-thread-top span { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.msg-thread-preview {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 2px;
  color: var(--muted); font-size: .78rem;
}
.msg-thread-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-unread {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-style: normal; font-size: .68rem;
  display: inline-grid; place-items: center;
}
.msg-empty-side { padding: 18px 10px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.msg-main { display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.msg-main-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.msg-peer-sub { color: var(--muted); font-size: .78rem; }
.msg-typing { color: var(--accent); font-size: .78rem; margin-top: 2px; }
.msg-thread {
  flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px;
  background:
    radial-gradient(circle at 10% 10%, rgba(13,148,136,.05), transparent 40%),
    var(--panel);
}
.msg-bubble {
  max-width: min(78%, 480px); padding: 8px 10px 6px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.msg-bubble.mine {
  align-self: flex-end; background: rgba(13,148,136,.12); border-color: rgba(13,148,136,.22);
}
.msg-bubble.theirs { align-self: flex-start; }
.msg-text { white-space: pre-wrap; line-height: 1.45; font-size: .92rem; }
.msg-time { margin-top: 4px; font-size: .7rem; color: var(--muted); text-align: right; }
.msg-ticks { margin-left: 4px; letter-spacing: -1px; }
.msg-media img {
  display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin-top: 6px;
}
.msg-video {
  display: block; max-width: 100%; max-height: 280px; border-radius: 10px; margin-top: 6px; background: #000;
}
.msg-file {
  display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 8px 10px;
  border-radius: 10px; background: rgba(0,0,0,.04); text-decoration: none; color: var(--text);
  font-weight: 600; font-size: .88rem;
}
.msg-file small { font-weight: 500; color: var(--muted); }
.msg-compose {
  display: flex; gap: 8px; align-items: center; padding: 12px 14px;
  border-top: 1px solid var(--line); background: var(--panel-soft);
}
.msg-compose input[type="text"] { flex: 1; min-width: 0; height: 44px; }
.msg-attach {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; background: var(--panel);
  font-size: 1.2rem; color: var(--accent-2); flex-shrink: 0;
}
.msg-attach input { display: none; }
.msg-emoji-wrap { position: relative; flex-shrink: 0; }
.msg-emoji-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-size: 1.15rem; line-height: 1;
}
.msg-emoji-btn:hover { border-color: rgba(13,148,136,.35); }
.msg-emoji-panel {
  position: absolute; left: 0; bottom: 52px; z-index: 8;
  width: 240px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
  padding: 10px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); box-shadow: 0 14px 36px rgba(0,0,0,.22);
}
.msg-emoji-panel[hidden] { display: none !important; }
.msg-emoji-panel button {
  width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent;
  cursor: pointer; font-size: 1.15rem; line-height: 1;
}
.msg-emoji-panel button:hover { background: rgba(13,148,136,.12); }
.msg-attach-name {
  padding: 0 14px 10px; font-size: .8rem; color: var(--muted); background: var(--panel-soft);
}
.msg-placeholder {
  margin: auto; text-align: center; padding: 40px 24px; max-width: 420px; color: var(--muted);
}
.msg-placeholder h3 { margin: 0 0 8px; color: var(--text); font-family: Fraunces, serif; }

@media (max-width: 860px) {
  .msg-app { grid-template-columns: 1fr; min-height: 70vh; }
  .msg-sidebar { max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .msg-main { min-height: 48vh; }
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.nav-badge {
  margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700;
  display: inline-grid; place-items: center;
}
.notify-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); text-decoration: none; cursor: pointer;
}
.notify-bell .nav-icon { width: 20px; height: 20px; display: block; }
.notify-bell .nav-icon svg { width: 20px; height: 20px; }
.notify-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--danger, #dc2626);
  color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center;
}

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(8, 16, 14, .45);
  backdrop-filter: blur(2px);
}
.notify-drawer {
  position: fixed; top: 0; right: 0; z-index: 85; width: min(400px, 100vw); height: 100vh;
  background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  transform: translateX(104%); transition: transform .28s ease;
}
.notify-drawer.open { transform: translateX(0); }
.notify-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--line);
}
.notify-drawer-head h3 { margin: 0; font-family: Fraunces, serif; font-size: 1.15rem; }
.notify-drawer-head p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.notify-drawer-body { flex: 1; overflow: auto; padding: 12px; }
.notify-item {
  display: block; text-decoration: none; color: inherit;
  padding: 12px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-soft); margin-bottom: 8px;
}
.notify-item:hover { border-color: rgba(13,148,136,.35); background: rgba(13,148,136,.08); }
.notify-item-type {
  display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); font-weight: 700; margin-bottom: 4px;
}
.notify-item strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.notify-item span { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.notify-item em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: .72rem; }
.notify-empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.notify-empty strong { display: block; color: var(--text); margin-bottom: 6px; font-family: Fraunces, serif; }
.notify-drawer-foot {
  display: flex; gap: 8px; justify-content: flex-end; padding: 12px 14px;
  border-top: 1px solid var(--line); background: var(--panel-soft);
}

.ai-bot { position: fixed; right: 22px; bottom: 22px; z-index: 70; }
.ai-bot-fab {
  width: 60px; height: 60px; border-radius: 18px; border: 1px solid rgba(13,148,136,.35);
  background: linear-gradient(160deg, #14b8a6, #0f766e); color: #fff;
  box-shadow: 0 14px 34px rgba(13,148,136,.35); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ai-bot-fab:hover, .ai-bot-fab.open { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px rgba(13,148,136,.42); }
.ai-bot-fab-ico { width: 22px; height: 22px; display: grid; place-items: center; }
.ai-bot-fab-ico svg { width: 20px; height: 20px; stroke: #fff; }
.ai-bot-fab-label { font-size: .65rem; font-weight: 700; letter-spacing: .08em; }
.ai-bot-panel {
  position: absolute; right: 0; bottom: 74px;
  width: min(380px, calc(100vw - 28px)); height: min(560px, calc(100vh - 120px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,.28); overflow: hidden;
  display: flex; flex-direction: column;
  animation: aiBotIn .22s ease;
}
.ai-bot-panel[hidden] {
  display: none !important;
}
@keyframes aiBotIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-bot-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 12px 10px; border-bottom: 1px solid var(--line); background: var(--panel-soft);
}
.ai-bot-head strong { display: block; font-size: .95rem; }
.ai-bot-head small { color: var(--muted); font-size: .72rem; }
.ai-bot-head-actions { display: flex; gap: 4px; }
.ai-bot-frame { flex: 1; width: 100%; border: 0; background: var(--panel); }

@media (max-width: 560px) {
  .ai-bot { right: 14px; bottom: 14px; }
  .ai-bot-panel { width: calc(100vw - 24px); height: min(70vh, 520px); }
  .notify-drawer { width: 100vw; }
}

.empty-state {
  margin-top: 14px; padding: 28px 22px; text-align: center;
  border: 1px dashed var(--line); border-radius: 16px; background: var(--panel-soft);
}
.empty-state h3 { margin: 0 0 8px; font-family: Fraunces, serif; }
.empty-state p { margin: 0 0 14px; color: var(--muted); }
.empty-state .btn { margin: 0 4px; }

.kanban {
  display: grid; grid-template-columns: repeat(7, minmax(200px, 1fr));
  gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-top: 12px;
}
.kanban-col {
  min-width: 200px; background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
}
.kanban-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kanban-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.kanban-card-title { font-weight: 600; font-size: .92rem; }
.kanban-card-sub { color: var(--muted); font-size: .78rem; margin: 4px 0 8px; }
.kanban-form select { width: 100%; margin-bottom: 8px; }
.kanban-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kanban-empty { color: var(--muted); font-size: .8rem; padding: 8px 2px; }

.chat-panel { max-width: 860px; }
.chat-thread {
  max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
.chat-bubble {
  max-width: 88%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel);
}
.chat-user { align-self: flex-end; background: rgba(13,148,136,.08); }
.chat-bot { align-self: flex-start; }
.chat-meta { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.chat-text { white-space: pre-wrap; line-height: 1.5; font-size: .92rem; }
.chat-compose textarea { width: 100%; resize: vertical; min-height: 84px; }

/* Premium AI Concierge stage */
body.page-aichat .main { padding: 18px 18px 0; }
body.page-aichat .topbar { margin-bottom: 10px; }
body.page-aichat .main-body { padding-bottom: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; }
body.page-aichat .ai-bot { display: none !important; }

.ai-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: calc(100vh - 168px);
  height: calc(100vh - 168px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(13,148,136,.22);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(45,212,191,.18), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(15,118,110,.16), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.2)),
    var(--panel);
  box-shadow: 0 24px 60px rgba(15, 61, 58, .08);
}
body.theme-dark .ai-stage {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(45,212,191,.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(13,148,136,.14), transparent 50%),
    linear-gradient(180deg, rgba(24,36,32,.9), rgba(15,23,20,.95));
}
.ai-stage-glow {
  pointer-events: none; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.08) 50%, transparent 60%);
  mix-blend-mode: soft-light; opacity: .55;
}
.ai-stage-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid rgba(13,148,136,.14);
  backdrop-filter: blur(10px); background: rgba(255,255,255,.35);
}
body.theme-dark .ai-stage-head { background: rgba(10,18,16,.35); }
.ai-stage-brand { display: flex; align-items: center; gap: 12px; }
.ai-stage-orb {
  width: 42px; height: 42px; border-radius: 14px;
  background: conic-gradient(from 180deg, #0d9488, #5eead4, #115e59, #0d9488);
  box-shadow: 0 0 0 4px rgba(13,148,136,.12), 0 10px 24px rgba(13,148,136,.28);
  animation: aiOrb 6s linear infinite;
}
@keyframes aiOrb { to { transform: rotate(360deg); } }
.ai-stage-head h3 {
  margin: 0; font-family: Fraunces, serif; font-size: 1.2rem; letter-spacing: .01em;
}
.ai-stage-head p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.ai-stage-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(13,148,136,.25);
  background: rgba(13,148,136,.08); color: var(--accent-2); font-size: .75rem; font-weight: 600;
}
.ai-stage-status i {
  width: 7px; height: 7px; border-radius: 50%; background: #10b981;
  box-shadow: 0 0 0 4px rgba(16,185,129,.18); animation: aiPing 1.6s ease infinite;
}
@keyframes aiPing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.35); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
.ai-stage-thread {
  position: relative; z-index: 1;
  flex: 1; overflow: auto; padding: 18px 18px 8px;
  display: flex; flex-direction: column; gap: 14px;
}
.ai-msg { display: flex; gap: 10px; max-width: min(820px, 92%); animation: aiMsgIn .28s ease; }
@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ai-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg-bot { align-self: flex-start; }
.ai-msg-avatar {
  width: 32px; height: 32px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  color: #fff; background: linear-gradient(145deg, #14b8a6, #0f766e);
  margin-top: 4px;
}
.ai-msg-card {
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.78); backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(15,61,58,.05);
}
body.theme-dark .ai-msg-card { background: rgba(24,36,32,.88); }
.ai-msg-user .ai-msg-card {
  background: linear-gradient(160deg, rgba(13,148,136,.18), rgba(13,148,136,.08));
  border-color: rgba(13,148,136,.28);
}
.ai-msg-meta { font-size: .7rem; color: var(--muted); margin-bottom: 4px; }
.ai-msg-text { white-space: pre-wrap; line-height: 1.55; font-size: .95rem; }

.ai-thinking {
  position: relative; z-index: 1; margin: 0 18px 8px; padding: 12px 14px;
  border-radius: 14px; border: 1px dashed rgba(13,148,136,.35);
  background: rgba(13,148,136,.06);
}
.ai-thinking[hidden] { display: none !important; }
.ai-thinking-inner { display: flex; align-items: center; gap: 12px; }
.ai-thinking-pulse {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(13,148,136,.25); border-top-color: var(--accent);
  animation: aiSpin .8s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-thinking strong { display: block; font-size: .86rem; }
.ai-thinking span { color: var(--muted); font-size: .78rem; }
.ai-thinking-bars { display: flex; gap: 5px; margin-top: 10px; }
.ai-thinking-bars span {
  height: 4px; flex: 1; border-radius: 99px; background: rgba(13,148,136,.18);
  overflow: hidden; position: relative;
}
.ai-thinking-bars span::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: aiShimmer 1.2s ease infinite;
}
.ai-thinking-bars span:nth-child(2)::after { animation-delay: .15s; }
.ai-thinking-bars span:nth-child(3)::after { animation-delay: .3s; }
@keyframes aiShimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(280%); }
}

.ai-stage-compose {
  position: relative; z-index: 1;
  padding: 10px 18px 16px; border-top: 1px solid rgba(13,148,136,.12);
  background: rgba(255,255,255,.4); backdrop-filter: blur(10px);
}
body.theme-dark .ai-stage-compose { background: rgba(10,18,16,.45); }
.ai-compose-shell {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 10px; border-radius: 18px; border: 1px solid rgba(13,148,136,.22);
  background: var(--panel); box-shadow: 0 10px 30px rgba(15,61,58,.06);
}
.ai-compose-shell textarea {
  flex: 1; min-height: 52px; max-height: 140px; resize: none; border: 0 !important;
  box-shadow: none !important; background: transparent !important; padding: 8px 6px;
  outline: none;
}
.ai-send {
  border: 0; border-radius: 14px; padding: 12px 18px; cursor: pointer;
  color: #fff; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 10px 22px rgba(13,148,136,.28);
}
.ai-send:disabled { opacity: .55; cursor: wait; }
.ai-compose-hint { margin-top: 8px; color: var(--muted); font-size: .72rem; padding-left: 4px; }

.ai-stage-embed {
  min-height: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none;
}
.ai-stage-embed .ai-stage-thread { padding: 12px; }
.ai-stage-embed .ai-stage-compose { padding: 10px 12px 12px; }
.ai-stage-embed .ai-thinking { margin: 0 12px 8px; }

@media (max-width: 860px) {
  body.page-messages .msg-app,
  .ai-stage { min-height: calc(100vh - 200px); height: calc(100vh - 200px); }
}

.help-tour {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .35);
  display: grid; place-items: end center; padding: 24px;
}
.help-tour-card {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.help-tour-card h3 { margin: 0 0 6px; font-family: Fraunces, serif; }
.help-tour-card p { margin: 0 0 12px; color: var(--muted); }

.landing-success-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 8px 0 48px; padding: 0;
}
.landing-success-item {
  border: 1px solid rgba(13,148,136,.14); border-radius: 20px; padding: 22px 20px;
  background: linear-gradient(160deg, rgba(13,148,136,.1), rgba(255,255,255,.85) 70%);
  box-shadow: 0 14px 36px rgba(15,61,58,.06);
  transition: box-shadow .25s ease, border-color .25s ease;
  transform-style: preserve-3d; will-change: transform;
}
.landing-success-item:hover {
  border-color: rgba(13,148,136,.35);
  box-shadow: 0 24px 50px rgba(15,61,58,.12);
}
.landing-success-item strong { display: block; font-family: Fraunces, serif; margin: 10px 0 6px; }
.landing-success-item span { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.landing-mini-ico {
  width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center;
  color: var(--accent-2); background: rgba(13,148,136,.12); flex-shrink: 0;
}
.landing-mini-ico svg { width: 16px; height: 16px; }

.landing-feature-mosaic { margin: 20px 0 64px; }
.landing-mosaic-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.landing-mosaic-card {
  --mx: 50%;
  --my: 50%;
  --spot: 0;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 0 0 20px; border-radius: 22px; border: 1px solid rgba(13,148,136,.12);
  background: rgba(255,255,255,.94); box-shadow: 0 14px 36px rgba(15,61,58,.06);
  transition: box-shadow .45s cubic-bezier(.22,.61,.36,1), border-color .45s ease;
}
.landing-mosaic-card.accent {
  background: linear-gradient(180deg, rgba(13,148,136,.06), rgba(255,255,255,.96));
  border-color: rgba(13,148,136,.2);
}
/* Soft mouse-follow spotlight border (no jump / no scale) */
.landing-mosaic-card::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 3;
  pointer-events: none; opacity: var(--spot);
  background: radial-gradient(180px circle at var(--mx) var(--my),
    rgba(255,255,255,.95),
    rgba(94,234,212,.65) 28%,
    rgba(13,148,136,.2) 48%,
    transparent 68%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: opacity .35s ease;
}
.landing-mosaic-card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; z-index: 2;
  pointer-events: none; opacity: calc(var(--spot) * .55);
  background: radial-gradient(220px circle at var(--mx) var(--my),
    rgba(255,255,255,.22),
    rgba(13,148,136,.08) 35%,
    transparent 62%);
  transition: opacity .35s ease;
}
.landing-mosaic-card.is-hot {
  border-color: rgba(13,148,136,.28);
  box-shadow: 0 18px 44px rgba(15,61,58,.1);
}
.landing-mosaic-visual {
  position: relative; height: 132px; margin-bottom: 8px; overflow: hidden;
  background: linear-gradient(135deg, #99f6e4, #0f766e);
}
.landing-mosaic-visual::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(15,61,58,.28));
  pointer-events: none;
}
.landing-mosaic-visual img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.01); filter: saturate(1.05) contrast(1.02);
  transition: transform .7s cubic-bezier(.22,.61,.36,1), filter .45s ease;
}
.landing-mosaic-card.is-hot .landing-mosaic-visual img {
  transform: scale(1.06);
  filter: saturate(1.12) contrast(1.04) brightness(1.03);
}
.landing-mosaic-ico {
  width: 44px; height: 44px; border-radius: 14px; margin: -22px 0 12px 18px;
  display: grid; place-items: center; color: #fff; position: relative; z-index: 4;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  box-shadow: 0 10px 20px rgba(13,148,136,.28);
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .45s ease;
}
.landing-mosaic-card.is-hot .landing-mosaic-ico {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(13,148,136,.34);
}
.landing-mosaic-ico svg { width: 20px; height: 20px; stroke: #fff; }
.landing-mosaic-card h3 {
  margin: 0 18px 8px; font-family: Fraunces, serif; font-size: 1.12rem; position: relative; z-index: 4;
  transition: color .35s ease, letter-spacing .45s ease;
}
.landing-mosaic-card.is-hot h3 { color: #0f766e; letter-spacing: .01em; }
.landing-mosaic-card p {
  margin: 0 18px; color: var(--muted); font-size: .92rem; line-height: 1.55; position: relative; z-index: 4;
  transition: color .35s ease, opacity .35s ease;
}
.landing-mosaic-card.is-hot p { color: #3f5f5c; }

.landing-split {
  display: grid; grid-template-columns: .95fr 1.05fr; gap: 36px; align-items: center;
  margin: 20px 0 64px;
}
.landing-split-visual {
  border-radius: 28px; border: 1px solid rgba(13,148,136,.16); padding: 24px;
  background:
    radial-gradient(420px 220px at 20% 0%, rgba(13,148,136,.18), transparent 60%),
    rgba(255,255,255,.88);
  box-shadow: 0 24px 56px rgba(15,61,58,.1); min-height: 320px;
}
.landing-split-panel { display: grid; gap: 12px; }
.landing-split-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 16px; background: rgba(255,255,255,.95); border: 1px solid rgba(13,148,136,.14);
  box-shadow: 0 10px 24px rgba(15,61,58,.05);
  transform-style: preserve-3d; will-change: transform;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.landing-split-row:hover {
  border-color: rgba(13,148,136,.35);
  box-shadow: 0 16px 34px rgba(15,61,58,.1);
}
.landing-split-row strong { flex: 1; }
.landing-split-row em { font-style: normal; color: var(--accent-2); font-size: .8rem; font-weight: 700; }
.landing-split-copy h2 { margin: 8px 0 10px; font-family: Fraunces, serif; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.landing-split-copy > p { color: var(--muted); line-height: 1.55; }
.landing-check-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.landing-check-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }

.landing-how-4 { grid-template-columns: repeat(4, 1fr); }
.landing-how-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(13,148,136,.12); color: var(--accent-2); margin-bottom: 10px;
}
.landing-how-icon svg { width: 20px; height: 20px; }

.landing-benefit-list li {
  display: flex; gap: 12px; align-items: flex-start;
}
.landing-benefit-list li > div { min-width: 0; }

.landing-stat-admin + .landing-stat-admin { margin-top: 12px; }
.ls-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  margin-bottom: 14px;
}
.ls-card-head h3 { margin: 0 0 4px; font-family: Fraunces, serif; font-size: 1.12rem; }
.ls-card-head p { margin: 0; color: var(--muted); font-size: .88rem; }
.ls-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.badge-accent {
  background: rgba(13,148,136,.12) !important;
  color: var(--accent-2) !important;
  border-color: rgba(13,148,136,.22) !important;
}

.ls-mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.ls-mode-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px 14px 12px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel-soft);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.ls-mode-card:hover { border-color: rgba(13,148,136,.35); }
.ls-mode-card.is-active {
  border-color: rgba(13,148,136,.55);
  background: linear-gradient(160deg, rgba(13,148,136,.12), rgba(13,148,136,.04));
  box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}
.ls-mode-card input {
  position: absolute; opacity: 0; pointer-events: none;
}
.ls-mode-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  border: 2px solid rgba(100,120,115,.35); background: var(--panel);
  display: grid; place-items: center; transition: .18s ease;
}
.ls-mode-card.is-active .ls-mode-check {
  border-color: var(--accent); background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}
.ls-mode-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-mode-copy strong { font-size: .95rem; }
.ls-mode-copy small { color: var(--muted); font-size: .78rem; line-height: 1.35; }

.ls-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.ls-field label {
  display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 600; color: var(--muted);
}
.ls-field input[type="number"] {
  width: 100%;
}
.ls-field input[type="number"].is-disabled,
.ls-field input[type="number"][readonly] {
  opacity: .55; cursor: not-allowed; background: var(--panel-soft);
  color: var(--muted);
}
.ls-bump-box {
  min-height: 46px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line);
  background: var(--panel-soft); color: var(--muted); font-size: .86rem;
}

@media (max-width: 860px) {
  .ls-mode-switch,
  .ls-fields { grid-template-columns: 1fr; }
  .ls-card-head { flex-direction: column; }
  .ls-badges { justify-content: flex-start; }
}

@media (max-width: 1100px) {
  .kanban { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
  .landing-mosaic-grid { grid-template-columns: 1fr 1fr; }
  .landing-how-4 { grid-template-columns: 1fr 1fr; }
  .landing-split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .kanban { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .chat-thread { max-height: 42vh; }
  .landing-success-strip { grid-template-columns: 1fr; }
  .landing-mosaic-grid { grid-template-columns: 1fr; }
  .landing-how-4 { grid-template-columns: 1fr; }
  .main-body { padding-bottom: 24px; }
  .actions { flex-wrap: wrap; }
  .panel .actions .btn { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .kanban { grid-template-columns: 1fr; }
  .notify-bell { width: 40px; height: 40px; }
  .user-chip strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
}
