@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/PlusJakartaSans.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --teal-950: #052f2a;
  --teal-900: #073c34;
  --teal-800: #0d5145;
  --teal-700: #0d6a5a;
  --teal-500: #27896e;
  --teal-100: #dceee6;
  --amber: #e0a045;
  --amber-dark: #a96b16;
  --amber-soft: #faf0dd;
  --cream: #f5f0e5;
  --surface: #fffdf9;
  --surface-2: #fbf7ef;
  --ink: #17231e;
  --muted: #64746b;
  --line: #e7e0d3;
  --line-strong: #d8cfbf;
  --danger: #b4493f;
  --danger-soft: #faeae6;
  --success: #1e7a58;
  --success-soft: #e4f3eb;
  --warning: #966515;
  --warning-soft: #fbf0da;
  --info: #426e8a;
  --info-soft: #e9f0f5;
  --shadow-sm: 0 1px 3px rgba(23, 35, 30, 0.05);
  --shadow-md: 0 20px 46px -26px rgba(23, 35, 30, 0.28), 0 2px 8px rgba(23, 35, 30, 0.035);
  --shadow-lg: 0 34px 80px -24px rgba(5, 47, 42, 0.45);
  --radius: 22px;
  --radius-sm: 13px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(440px, 1.05fr) minmax(420px, 0.95fr);
  background: var(--surface);
}
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 500px at -10% 110%, rgba(232, 163, 61, 0.28), transparent 55%),
    radial-gradient(800px 600px at 110% -10%, rgba(33, 139, 123, 0.55), transparent 60%),
    linear-gradient(150deg, #062622 0%, #0b3733 55%, #114a43 100%);
  color: #f6f2e8;
}
.login-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 75%);
  pointer-events: none;
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: -0.02em; font-size: 19px; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,0.25)); border-radius: 12px; object-fit: cover; background: #063C34; }
.login-copy { position: relative; z-index: 1; max-width: 560px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  margin: 0 0 18px;
}
.login-copy h1 { font-size: clamp(36px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -0.045em; margin: 0 0 24px; font-weight: 700; }
.login-copy p:last-child { font-size: 16px; line-height: 1.7; color: rgba(246,242,232,0.74); max-width: 470px; margin: 0; }
.login-foot { position: relative; z-index: 1; font-size: 12px; letter-spacing: 0.04em; color: rgba(246,242,232,0.55); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--surface); }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 28px; letter-spacing: -0.03em; margin: 0 0 6px; }
.login-card > p { margin: 0 0 30px; }
.login-card label { display: block; font-size: 12px; font-weight: 700; margin: 18px 0 7px; letter-spacing: 0.02em; }
.login-card input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--surface-2);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.login-card input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(33,139,123,0.12); background: #fff; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.password-wrap .icon-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--teal-700); width: auto; padding: 6px 8px; }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; margin: 14px 0 0; }
.btn-block { width: 100%; justify-content: center; margin-top: 22px; padding: 13px 18px; }
.demo-hint { margin-top: 26px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.demo-hint strong { color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 272px;
  flex: none;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 20px 20px;
  background:
    radial-gradient(500px 300px at 0% 100%, rgba(232,163,61,0.13), transparent 70%),
    linear-gradient(180deg, var(--teal-950), var(--teal-900));
  color: #eef3ee;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 8px; }
.sidebar-brand .brand-mark { width: 38px; height: 38px; }
.sidebar-brand span { display: grid; line-height: 1.25; }
.sidebar-brand strong { font-size: 15px; letter-spacing: -0.01em; }
.sidebar-brand small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(238,243,238,0.5); margin-top: 3px; }
.nav { display: grid; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(238,243,238,0.68);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a svg { width: 18px; height: 18px; opacity: 0.75; }
.nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav a.active {
  background: var(--amber);
  color: var(--teal-950);
  box-shadow: 0 10px 24px -14px rgba(224,160,69,0.8);
  font-weight: 700;
}
.nav a.active svg { opacity: 1; color: var(--teal-950); }
.sidebar-card {
  margin-top: auto;
  padding: 14px;
  border-radius: 13px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
}
.sidebar-card strong { font-size: 11.5px; color: var(--amber); display: flex; align-items: center; gap: 6px; }
.sidebar-card p { margin: 7px 0 0; font-size: 11px; line-height: 1.55; color: rgba(238,243,238,0.56); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 13px 6px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.avatar {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--amber), #c9861e);
  color: var(--teal-950);
  font-weight: 800;
  font-size: 14px;
}
.sidebar-user > div:nth-child(2) { min-width: 0; display: grid; line-height: 1.3; }
.sidebar-user strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { font-size: 10.5px; color: rgba(238,243,238,0.48); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .icon-btn { margin-left: auto; color: rgba(238,243,238,0.55); width: 30px; height: 30px; }
.sidebar-user .icon-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

.main { margin-left: 272px; min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 34px;
  background: rgba(246,244,238,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(215,208,194,0.6);
}
.topbar h1 { font-size: 23px; letter-spacing: -0.035em; margin: 0; font-weight: 700; }
.topbar p { margin: 2px 0 0; font-size: 12.5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.clock { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.page-content { padding: 28px 34px 48px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.page-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--teal-900); color: #fff; box-shadow: 0 8px 20px -10px rgba(11,55,51,0.7); }
.btn-primary:hover { background: var(--teal-800); }
.btn-amber { background: var(--amber); color: var(--teal-950); }
.btn-amber:hover { background: #f0b052; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9d382f; }
.btn-sm { padding: 6px 10px; font-size: 11.5px; border-radius: 8px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: none; border-radius: 9px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--cream); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.input, select.input {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  padding: 9px 12px;
  outline: none;
  color: var(--ink);
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(33,139,123,0.1); }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 35px; width: 260px; }

/* ---------- Cards / stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.card-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { margin: 0; font-size: 14px; letter-spacing: -0.01em; }
.card-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.card-body { padding: 18px 20px; }
.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px;
  margin-bottom: 20px;
  border-radius: 28px;
  background:
    radial-gradient(480px 260px at 92% 0%, rgba(224,160,69,0.28), transparent 65%),
    linear-gradient(135deg, var(--teal-950), var(--teal-800));
  box-shadow: var(--shadow-lg);
  color: #f7f3e9;
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(100deg, transparent 45%, rgba(0,0,0,0.8));
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero-copy .eyebrow { margin-bottom: 11px; color: #f0c47f; }
.hero-copy h2 { margin: 0 0 9px; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -0.045em; color: #fffdf8; }
.hero-copy p { margin: 0; max-width: 560px; font-size: 13px; line-height: 1.65; color: rgba(247,243,233,0.68); }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.hero-actions .btn-amber { background: var(--amber); color: var(--teal-950); border-color: transparent; font-weight: 700; }
.hero-actions .btn-hero-ghost { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.14); }
.hero-actions .btn-hero-ghost:hover { background: rgba(255,255,255,0.14); }
.hero-metrics { position: relative; z-index: 1; display: flex; gap: 10px; flex: none; }
.hero-metric { min-width: 120px; padding: 15px 16px; border-radius: 18px; background: rgba(255,255,255,0.075); border: 1px solid rgba(255,255,255,0.11); backdrop-filter: blur(8px); }
.hero-metric span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: rgba(247,243,233,0.55); }
.hero-metric strong { display: block; margin-top: 6px; font-size: 22px; line-height: 1; letter-spacing: -0.04em; color: #fffdf8; }
.hero-metric small { display: block; margin-top: 5px; font-size: 10px; color: rgba(247,243,233,0.52); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { position: relative; overflow: hidden; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-card::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -38px; top: -38px; background: var(--teal-100); opacity: 0.6; }
.stat-card.accent::after { background: var(--amber-soft); opacity: 1; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stat-label { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.stat-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--teal-100); color: var(--teal-800); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber-dark); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.15; }
.stat-note { font-size: 11px; color: var(--muted); margin-top: 5px; }
.stat-note strong { color: var(--success); font-weight: 600; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.billing-bars { display: grid; gap: 18px; margin-top: 4px; }
.bar-row { display: grid; gap: 7px; }
.bar-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.bar-meta strong { font-weight: 700; }
.bar-track { height: 9px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; transition: width 0.5s ease; }
.bar-fill.trial { background: var(--amber); }
.bar-fill.active { background: var(--teal-500); }
.bar-fill.readonly { background: #b9b2a4; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.trial { background: var(--amber); }
.dot.active { background: var(--teal-500); }
.dot.readonly { background: #b9b2a4; }

.mini-list { display: grid; gap: 2px; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: none; }
.mini-row .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; background: var(--teal-100); color: var(--teal-800); }
.mini-main { min-width: 0; flex: 1; display: grid; gap: 1px; }
.mini-main strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-main small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-amount { font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  text-align: left;
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(246,244,238,0.55); }
.cell-main { display: grid; gap: 1px; }
.cell-main strong { font-weight: 600; }
.cell-main small { font-size: 11px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 4px; }
.empty-icon { width: 46px; height: 46px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 14px; background: var(--cream); color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.trial, .badge.pending { background: var(--warning-soft); color: var(--warning); }
.badge.active, .badge.paid { background: var(--success-soft); color: var(--success); }
.badge.readonly, .badge.expired { background: #efede7; color: #777065; }
.badge.canceled { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: var(--info-soft); color: var(--info); }
.role-tag { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--cream); border: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.role-tag.head { background: var(--amber-soft); border-color: #f3dfbc; color: var(--amber-dark); font-weight: 700; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.count-pill { font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

/* ---------- Packages ---------- */
.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.package-card { position: relative; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.package-card.recommended { border-color: #eccf9f; box-shadow: 0 12px 34px -18px rgba(185,122,23,0.45); }
.package-card.inactive { opacity: 0.68; }
.ribbon { position: absolute; top: 14px; right: 14px; background: var(--amber); color: var(--teal-950); font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.package-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.package-duration { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.package-price { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; }
.package-price small { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.package-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.package-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.package-actions .btn { flex: 1; justify-content: center; }

/* ---------- Integration Settings ---------- */
.nav-separator { height: 1px; background: rgba(255,255,255,0.09); margin: 10px 12px; }
.notice-card { display: flex; gap: 14px; align-items: flex-start; padding: 15px 18px; border: 1px solid #d9e8e2; background: linear-gradient(135deg, #f1f8f5, #fffdf8); border-radius: 14px; margin-bottom: 18px; }
.notice-card svg { width: 22px; height: 22px; fill: var(--teal-700); flex: none; margin-top: 1px; }
.notice-card strong { display: block; font-size: 12.5px; margin-bottom: 3px; }
.notice-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.integration-card { padding: 20px; }
.integration-card[data-kind="asetlink"] { grid-column: span 2; }
.integration-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.integration-name { display: flex; gap: 12px; align-items: flex-start; }
.integration-name h3 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.integration-name p { margin: 4px 0 0; font-size: 11px; color: var(--muted); line-height: 1.55; max-width: 370px; }
.surface-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-100); color: var(--teal-800); flex: none; }
.surface-icon svg { width: 19px; height: 19px; fill: currentColor; }
.integration-form { display: grid; gap: 13px; }
.secret-control { position: relative; display: flex; }
.secret-control .input { padding-right: 68px; }
.reveal-btn { position: absolute; right: 4px; top: 4px; bottom: 4px; font-size: 10.5px; width: 58px; border-radius: 7px; color: var(--teal-700); }
.field-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.saved-secret code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; color: var(--ink); font-size: 9.5px; }
.saved-secret.empty { opacity: 0.65; font-style: italic; }
.integration-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 3px; flex-wrap: wrap; }
.integration-foot .actions { display: flex; gap: 8px; margin-left: auto; }
.test-result { flex: 1 1 220px; font-size: 11px; line-height: 1.5; border-radius: 8px; padding: 8px 10px; }
.test-result.success { color: var(--success); background: var(--success-soft); }
.test-result.error { color: var(--danger); background: var(--danger-soft); }
.integration-meta { margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 10px; }
.webhook-box { display: flex; gap: 8px; }
.webhook-box .input { flex: 1; font-size: 11px; background: var(--surface-2); }
.webhook-box .btn { flex: none; white-space: nowrap; }
textarea.input { resize: vertical; min-height: 96px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.55; }

/* ---------- Security ---------- */
.security-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr); gap: 18px; align-items: start; }
.security-aside { display: grid; gap: 14px; }
.security-aside h3 { margin: 12px 0 5px; font-size: 14px; }
.security-aside p { margin: 0; font-size: 11.5px; line-height: 1.65; }
.profile-line { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.password-meter { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.password-meter span { display: block; height: 100%; width: 0; background: var(--amber); transition: width 0.22s ease, background 0.22s ease; }
.password-meter span[data-score="2"] { background: #7fa53d; }
.password-meter span[data-score="3"] { background: var(--success); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(6,38,34,0.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fadeIn 0.15s ease; }
.modal { width: 100%; max-width: 460px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop 0.18s ease; max-height: 90vh; overflow: auto; }
.modal-head { padding: 20px 22px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.modal-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.modal-body { padding: 18px 22px 22px; display: grid; gap: 13px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding-top: 6px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 700; }
.field .hint { font-size: 10.5px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--teal-700); }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; max-width: 340px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--teal-950); color: #f4f1e8; font-size: 12.5px; box-shadow: var(--shadow-md); animation: slideUp 0.2s ease; }
.toast.error { background: #7d2f27; }
.toast .toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-top: 5px; flex: none; }
.toast.error .toast-dot { background: #f3b1a9; }

/* ---------- Loading ---------- */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 20px; color: var(--muted); font-size: 12.5px; }
.loading-block .spinner { border-color: var(--line-strong); border-top-color: var(--teal-700); }
.skeleton { background: linear-gradient(90deg, #efece4 25%, #f7f5ef 50%, #efece4 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .integration-card[data-kind="asetlink"] { grid-column: auto; }
  .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { padding: 30px 22px; }
  .dashboard-hero { flex-direction: column; align-items: stretch; padding: 24px; }
  .hero-metrics { flex-wrap: wrap; }
  .hero-metric { flex: 1; min-width: 130px; }
  .sidebar { transform: translateX(-105%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: grid; place-items: center; }
  .topbar { padding: 15px 18px; }
  .clock { display: none; }
  .page-content { padding: 20px 18px 40px; }
  .search-box .input { width: 100%; }
  .toolbar { align-items: stretch; }
  .search-box { flex: 1; min-width: 180px; }
}
@media (max-width: 620px) {
  .stat-grid, .package-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 19px; }
  .topbar p { display: none; }
  .topbar-right .btn span { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

/* ---------- v0.4 editorial refinements ---------- */
.page-content { max-width: 1480px; margin: 0 auto; }
.topbar {
  background: rgba(245, 240, 229, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 224, 211, 0.8);
}
.topbar h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; }
.topbar p { color: var(--muted); font-size: 12px; }
.sidebar { width: 280px; padding: 28px 20px 18px; }
.main { margin-left: 280px; }
.card { box-shadow: var(--shadow-md); }
.card-head { padding: 20px 22px; }
.card-head h3 { font-size: 14.5px; font-weight: 800; }
.card-body { padding: 20px 22px; }
.btn {
  min-height: 40px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
  box-shadow: 0 10px 22px -14px rgba(7,60,52,0.7);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--teal-800), var(--teal-950)); }
.btn:focus-visible, .nav a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(39,137,110,0.25);
  outline-offset: 2px;
}
.input { border-radius: 12px; min-height: 42px; background: var(--surface); }
.input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(39,137,110,0.1); }
.stat-card {
  padding: 20px 20px 18px;
  border-color: rgba(231,224,211,0.85);
  box-shadow: var(--shadow-md);
}
.stat-value { font-size: 29px; font-weight: 800; }
.stat-card.accent { background: linear-gradient(150deg, var(--surface) 30%, var(--amber-soft)); }
table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  padding-top: 11px;
  padding-bottom: 11px;
}
tbody tr { transition: background 0.16s ease; }
tbody tr:hover { background: rgba(220,238,230,0.3); }
.badge { border-radius: 30px; font-size: 9.5px; letter-spacing: 0.05em; }
.package-card { box-shadow: var(--shadow-md); }
.package-card.featured { background: linear-gradient(160deg, var(--teal-900), var(--teal-800)); }
.login-panel {
  background:
    radial-gradient(520px 380px at 100% 100%, rgba(224,160,69,0.12), transparent 65%),
    var(--surface);
}
.login-copy h1 { font-weight: 800; }
.login-card h2 { font-weight: 800; }
.integration-card { box-shadow: var(--shadow-md); }
.security-card { box-shadow: var(--shadow-md); }
.toast { border-radius: 14px; }
.modal-card { border-radius: 24px; }
@media (max-width: 900px) {
  .main { margin-left: 0; }
  .sidebar { width: 280px; }
  .topbar h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
