:root {
  --ink: #15241e;
  --muted: #66736d;
  --line: #dfe8e3;
  --paper: #ffffff;
  --wash: #f3f8f5;
  --green: #0b8f62;
  --green-dark: #076646;
  --green-soft: #dcf6ea;
  --red: #c73f4b;
  --red-soft: #fff0f1;
  --shadow: 0 18px 60px rgba(16, 55, 40, .09);
  font-family: Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--wash); color: var(--ink); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0, #e1f7ec 0, transparent 33%), var(--wash); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }

.topbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { align-items: center; display: flex; gap: 11px; direction: ltr; }
.brand span:last-child { display: grid; line-height: 1.08; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 5px; }
.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #12ae78, #08714e);
  border-radius: 13px;
  box-shadow: 0 8px 25px rgba(11,143,98,.25);
  color: white;
  display: inline-flex;
  font: 800 22px/1 Arial, sans-serif;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.brand-mark.large { border-radius: 22px; font-size: 38px; height: 74px; margin: auto; width: 74px; }
.topbar nav { align-items: center; display: flex; gap: 24px; font-size: 14px; }
.topbar nav a:hover, .link-button:hover { color: var(--green); }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; color: var(--ink); padding: 0; }

.page-shell { margin: 0 auto; max-width: 1200px; padding: 56px 24px 90px; }
footer { color: var(--muted); font-size: 12px; padding: 24px; text-align: center; }
.eyebrow { color: var(--green); direction: ltr; font-size: 11px; font-weight: 800; letter-spacing: .15em; margin: 0 0 9px; text-align: right; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; margin-bottom: 14px; }
h2 { font-size: 24px; margin-bottom: 0; }
p { color: var(--muted); line-height: 1.85; }

.hero, .bot-header {
  align-items: center;
  background: linear-gradient(135deg, #fff, #f4fcf8);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 54px);
}
.panel-hero { margin-bottom: 56px; }
.balance-card { background: var(--ink); border-radius: 22px; color: white; min-width: 210px; padding: 24px; text-align: center; }
.balance-card span, .balance-card small { color: #b8cbc2; display: block; }
.balance-card strong { display: block; font-size: 32px; margin: 8px 0; }

.section-heading { align-items: end; display: flex; justify-content: space-between; margin: 44px 0 22px; }
.section-heading.compact { align-items: center; margin-top: 0; }
.section-heading > span { color: var(--muted); }
.button, button[type="submit"], .command-card button {
  background: var(--green);
  border: 0;
  border-radius: 12px;
  color: white;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 12px 18px;
  transition: transform .15s, background .15s;
}
.button:hover, button[type="submit"]:hover, .command-card button:hover { background: var(--green-dark); transform: translateY(-1px); }
.button.secondary { background: white; border: 1px solid var(--line); color: var(--ink); }
.button.wide { display: flex; width: 100%; }
.danger-button { background: var(--red) !important; }
.danger-text { color: var(--red) !important; }

.bot-grid, .package-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.bot-card, .package-card, .create-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 35px rgba(20,55,40,.05);
  padding: 23px;
}
.bot-card h3 { direction: ltr; font-size: 20px; text-align: right; }
.card-topline { align-items: center; color: var(--muted); display: flex; font-size: 12px; justify-content: space-between; margin-bottom: 24px; }
.status { align-items: center; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 800; gap: 6px; padding: 7px 10px; }
.status::before { background: currentColor; border-radius: 50%; content: ""; height: 7px; width: 7px; }
.status.online { background: var(--green-soft); color: var(--green-dark); }
.status.offline { background: #eef0ef; color: #77827c; }
.large-status { font-size: 14px; padding: 11px 15px; }
dl { margin: 0 0 22px; }
dl div { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 11px 0; }
dt { color: var(--muted); } dd { margin: 0; }

.empty-state { background: white; border: 1px dashed #b9cec3; border-radius: 24px; padding: 60px 24px; text-align: center; }
.empty-icon { align-items: center; background: var(--green-soft); border-radius: 50%; color: var(--green); display: flex; font-size: 34px; height: 70px; justify-content: center; margin: 0 auto 20px; width: 70px; }
.back-link { color: var(--green); display: inline-block; font-size: 13px; margin-bottom: 24px; }
.bot-header { margin-bottom: 24px; }

.result-box, .notice {
  background: #edf6f1;
  border: 1px solid #cbe5d8;
  border-radius: 15px;
  color: #24543f;
  line-height: 1.8;
  margin: 20px 0 36px;
  min-height: 58px;
  padding: 16px 18px;
  white-space: pre-wrap;
}
.result-box.error, .notice.error { background: var(--red-soft); border-color: #f0c5c9; color: #8d2530; }
.command-section { margin-top: 48px; }
.command-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.command-card { background: white; border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; gap: 15px; justify-content: space-between; min-height: 190px; padding: 20px; }
.command-card h3 { align-items: center; display: flex; font-size: 16px; gap: 8px; margin-bottom: 7px; }
.command-card p { font-size: 12px; line-height: 1.65; margin-bottom: 0; }
.risk-dot { align-items: center; background: var(--red-soft); border-radius: 50%; color: var(--red); display: inline-flex; font-size: 11px; height: 20px; justify-content: center; width: 20px; }
input, select {
  background: #fbfdfc;
  border: 1px solid #cfdcd5;
  border-radius: 10px;
  color: var(--ink);
  min-height: 44px;
  outline: 0;
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(11,143,98,.1); }
button:disabled, input:disabled, select:disabled { cursor: wait; opacity: .55; }
.busy { opacity: .72; }
.package-card { display: grid; gap: 12px; }
.package-card strong { color: var(--green-dark); font-size: 21px; }
.package-card span { color: var(--muted); }

.login-page { align-items: center; display: flex; justify-content: center; padding: 24px; }
.login-card { background: white; border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); max-width: 500px; padding: 50px; text-align: center; width: 100%; }
.login-card .eyebrow { margin-top: 24px; text-align: center; }
.login-card h1 { font-size: 34px; }
.login-card .button { margin-top: 5px; }

.create-shell { margin: 0 auto; max-width: 760px; }
.balance-pill { background: var(--ink); border-radius: 999px; color: white; padding: 11px 16px; }
.security-note { background: #e6f8ef; border: 1px solid #bfe5d1; border-radius: 18px; padding: 20px; }
.security-note p { margin: 7px 0 0; }
.create-card { display: grid; gap: 20px; margin: 25px 0; }
.create-card label { display: grid; font-weight: 700; gap: 9px; }
.create-card label input, .create-card label select { font-weight: 400; }

@media (max-width: 900px) {
  .bot-grid, .package-grid, .command-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { min-height: 66px; padding: 0 16px; }
  .topbar nav a { display: none; }
  .page-shell { padding: 30px 16px 70px; }
  .hero, .bot-header { align-items: stretch; flex-direction: column; gap: 25px; padding: 26px; }
  .balance-card { min-width: 0; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .bot-grid, .package-grid, .command-grid { grid-template-columns: 1fr; }
  .login-card { padding: 34px 22px; }
}
