:root {
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #eee8dc;
  --surface-3: #e4ddd0;
  --ink: #292522;
  --ink-soft: #625d57;
  --line: #ded7cb;
  --primary: #d97757;
  --primary-dark: #a94e35;
  --primary-soft: #f4d9ce;
  --green: #40735a;
  --green-soft: #d9e9df;
  --red: #a64b45;
  --red-soft: #f3d9d5;
  --blue: #526f85;
  --blue-soft: #dce8ef;
  --shadow: 0 18px 50px rgba(54, 44, 35, .08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: "Manrope", sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.material-symbols-rounded { font-size: 21px; line-height: 1; font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 24; }
.eyebrow { color: var(--primary-dark); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.muted { color: var(--ink-soft); }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(420px, .85fr); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(42px, 6vw, 92px); background: var(--ink); color: #fff9f1; }
.login-art::before { content: ""; position: absolute; width: 430px; height: 430px; left: 50%; top: 42%; transform: translate(-50%, -50%); border-radius: 42% 58% 55% 45%; background: var(--primary); filter: blur(.2px); opacity: .95; }
.login-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
.login-art p { position: relative; z-index: 2; margin: 0; max-width: 520px; font-size: clamp(33px, 4vw, 58px); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 6px); align-items: end; gap: 3px; width: 29px; height: 29px; padding: 5px; border-radius: 9px; background: var(--primary); transform: rotate(-5deg); }
.brand-mark span { display: block; border-radius: 4px; background: #fff7ee; }
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 9px; }
.brand-mark.large { position: absolute; z-index: 3; left: 50%; top: 42%; grid-template-columns: repeat(3, 18px); gap: 8px; width: 95px; height: 95px; padding: 16px; border-radius: 28px; background: #fff7ee; transform: translate(-50%, -50%) rotate(-7deg); box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.brand-mark.large span { background: var(--primary); }
.brand-mark.large span:nth-child(1) { height: 36px; }
.brand-mark.large span:nth-child(2) { height: 54px; }
.brand-mark.large span:nth-child(3) { height: 28px; }
.orbit { position: absolute; left: 50%; top: 42%; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 560px; height: 560px; }
.orbit-two { width: 760px; height: 760px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(45px, 8vw, 120px); background: var(--surface); }
.login-card h1 { margin: 14px 0 8px; font-size: clamp(38px, 4vw, 54px); line-height: 1; letter-spacing: -.045em; }
.login-card > p { margin: 0 0 36px; }
.login-card form { display: grid; gap: 18px; max-width: 460px; }

.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.field em { color: #928b83; font-style: normal; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 15px; outline: none; padding: 0 16px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
.field input, .field select { height: 56px; }
.field textarea { min-height: 230px; padding: 15px 16px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(217,119,87,.13); background: #fffdfa; }
.form-error { min-height: 18px; margin: -4px 0 0; color: var(--red); font-size: 13px; }

.button { min-height: 46px; border: 0; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; cursor: pointer; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s, opacity .15s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.button.filled { background: var(--primary); color: white; box-shadow: 0 8px 20px rgba(169,78,53,.18); }
.button.filled:hover { background: #ca694b; }
.button.dark { background: var(--ink); color: #fffaf2; }
.button.tonal { background: var(--primary-soft); color: #743b2a; }
.button.text { background: transparent; color: var(--ink-soft); }
.button.danger { background: var(--red); color: white; }
.button.wide { width: 100%; min-height: 54px; }
.text-button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 5px; color: var(--primary-dark); font-weight: 700; cursor: pointer; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar); display: flex; flex-direction: column; padding: 26px 18px 20px; background: #ece6da; border-right: 1px solid rgba(83,72,62,.08); }
.logo { display: flex; align-items: center; gap: 12px; padding: 0 12px 34px; color: inherit; text-decoration: none; }
.logo strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.logo small { display: block; margin-top: 1px; color: var(--primary-dark); font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { width: 100%; min-height: 50px; border: 0; border-radius: 15px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 8px; padding: 0 14px; background: transparent; color: #5d5852; cursor: pointer; text-align: left; font-size: 14px; font-weight: 650; transition: background .18s, color .18s; }
.nav-item:hover { background: rgba(255,255,255,.52); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: 0 7px 24px rgba(54,44,35,.06); }
.nav-item.active .material-symbols-rounded { color: var(--primary); font-variation-settings: "FILL" 1; }
.nav-item b { min-width: 25px; border-radius: 20px; padding: 3px 7px; background: rgba(41,37,34,.07); text-align: center; font-size: 10px; }
.sidebar-foot { display: grid; gap: 10px; margin-top: auto; }
.server-pill { display: flex; align-items: center; gap: 10px; margin: 0 4px 8px; padding: 13px; border-radius: 16px; background: rgba(255,255,255,.55); }
.server-pill i { width: 9px; height: 9px; border-radius: 50%; background: #49a36f; box-shadow: 0 0 0 5px rgba(73,163,111,.12); }
.server-pill span, .server-pill strong { display: block; }
.server-pill span { color: var(--ink-soft); font-size: 10px; }
.server-pill strong { margin-top: 2px; font-size: 12px; }
.nav-item.subtle { color: #7b746d; }

.content-shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 15; height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(24px, 4vw, 54px); background: rgba(245,241,232,.88); border-bottom: 1px solid rgba(83,72,62,.08); backdrop-filter: blur(18px); }
.topbar h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.55); cursor: pointer; transition: background .15s, transform .15s; }
.icon-button:hover { background: white; transform: translateY(-1px); }
.avatar { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; margin-left: 4px; background: var(--ink); color: white; font-weight: 700; }
.scan-indicator { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border-radius: 20px; background: var(--primary-soft); color: #7d3f2c; font-size: 12px; font-weight: 700; }
.scan-indicator span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.1s infinite; }
.mobile-only { display: none; }

.main-content { width: min(1480px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 52px); }
.view { display: none; animation: rise .32s ease; }
.view.active { display: block; }
.hero-card { position: relative; overflow: hidden; min-height: 390px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr); align-items: center; padding: clamp(34px, 5vw, 70px); border-radius: var(--radius-xl); background: var(--primary); color: #fff9f2; box-shadow: 0 24px 65px rgba(169,78,53,.18); }
.hero-card::before { content: ""; position: absolute; width: 320px; height: 320px; left: -100px; bottom: -180px; border-radius: 50%; background: rgba(255,255,255,.09); }
.hero-card > div:first-child { position: relative; z-index: 2; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.status-line i { width: 8px; height: 8px; border-radius: 50%; background: #d9f0df; box-shadow: 0 0 0 5px rgba(217,240,223,.15); }
.hero-card h1 { max-width: 700px; margin: 25px 0 18px; font-size: clamp(42px, 5vw, 73px); line-height: .98; letter-spacing: -.06em; }
.hero-card p { max-width: 610px; margin: 0 0 30px; color: rgba(255,249,242,.82); font-size: 15px; line-height: 1.75; }
.hero-visual { position: relative; min-height: 300px; display: grid; place-items: center; }
.pulse-ring { position: absolute; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; }
.ring-1 { width: 130px; height: 130px; }
.ring-2 { width: 220px; height: 220px; }
.ring-3 { width: 320px; height: 320px; }
.hero-core { position: relative; width: 98px; height: 98px; border-radius: 32px; display: grid; place-items: center; background: #fff9f2; color: var(--primary); transform: rotate(-6deg); box-shadow: 0 20px 45px rgba(96,42,28,.24); }
.hero-core .material-symbols-rounded { font-size: 48px; font-variation-settings: "FILL" 1; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.metric-card { min-height: 138px; display: flex; align-items: center; gap: 17px; padding: 22px; border: 1px solid rgba(83,72,62,.07); border-radius: var(--radius-lg); background: var(--surface); }
.metric-icon { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; }
.metric-icon .material-symbols-rounded { font-variation-settings: "FILL" 1; }
.metric-icon.terracotta { background: var(--primary-soft); color: var(--primary-dark); }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon.red { background: var(--red-soft); color: var(--red); }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.metric-card strong { margin: 4px 0 2px; font-size: 32px; letter-spacing: -.05em; }
.metric-card small { color: #948c83; font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 18px; }
.panel-card { border: 1px solid rgba(83,72,62,.07); border-radius: var(--radius-lg); padding: 26px; background: var(--surface); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-head h3 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.035em; }
.soft-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); color: var(--ink-soft); }
.health-chart { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 38px; padding: 28px 10px 5px; }
.donut { --online-deg: 0deg; --dead-deg: 0deg; width: 138px; height: 138px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 var(--online-deg), var(--red) var(--online-deg) calc(var(--online-deg) + var(--dead-deg)), var(--surface-3) 0); position: relative; }
.donut::before { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: var(--surface); }
.donut span { position: relative; z-index: 1; font-size: 25px; font-weight: 700; letter-spacing: -.04em; }
.legend { display: grid; gap: 14px; }
.legend > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend i.online { background: var(--green); }.legend i.dead { background: var(--red); }.legend i.error { background: #aaa196; }
.legend span { color: var(--ink-soft); font-size: 12px; }.legend strong { font-size: 13px; }
.activity-card { min-height: 264px; }
.empty-compact { min-height: 160px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--ink-soft); }
.empty-compact .material-symbols-rounded { font-size: 34px; color: var(--primary); }
.empty-compact p { max-width: 260px; margin: 12px auto 0; font-size: 12px; line-height: 1.6; }
.last-scan { margin-top: 28px; padding: 20px; border-radius: 18px; background: var(--surface-2); }
.last-scan strong { display: block; margin-bottom: 8px; font-size: 20px; }.last-scan p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-intro h1 { margin: 8px 0 7px; font-size: clamp(39px, 4vw, 58px); line-height: 1; letter-spacing: -.055em; }
.section-intro p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 13px 16px; border-radius: 19px; background: var(--surface); border: 1px solid rgba(83,72,62,.07); }
.search { min-width: min(390px, 100%); display: flex; align-items: center; gap: 9px; }
.search .material-symbols-rounded { color: #8a827a; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.filter-chips { display: flex; gap: 7px; }
.chip { min-height: 35px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 11px; font-weight: 700; }
.chip.active { border-color: transparent; background: var(--ink); color: white; }
.table-card { overflow: hidden; border: 1px solid rgba(83,72,62,.07); border-radius: var(--radius-lg); background: var(--surface); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 16px 18px; background: #f0ebe1; color: #827a72; text-align: left; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
td { padding: 17px 18px; border-top: 1px solid #eee8de; font-size: 12px; vertical-align: middle; }
.account-cell { display: flex; align-items: center; gap: 12px; min-width: 235px; }
.account-badge { width: 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.account-avatar { position: relative; flex: 0 0 auto; width: 42px; height: 42px; overflow: hidden; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.account-avatar img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-avatar img.failed { display: none; }
.account-avatar span { position: relative; }
.account-cell strong, .account-cell small { display: block; }.account-cell small { max-width: 210px; margin-top: 3px; color: #958d85; overflow: hidden; text-overflow: ellipsis; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; border-radius: 11px; padding: 0 10px; font-size: 10px; font-weight: 700; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; }
.status-chip.online { background: var(--green-soft); color: #315c45; }.status-chip.online i { background: var(--green); }
.status-chip.dead { background: var(--red-soft); color: #7f3732; }.status-chip.dead i { background: var(--red); }
.status-chip.error, .status-chip.offline, .status-chip.unknown { background: #e8e3da; color: #6c655f; }.status-chip.error i, .status-chip.offline i, .status-chip.unknown i { background: #8b837b; }
.status-chip.checking { background: var(--blue-soft); color: #415e72; }.status-chip.checking i { background: var(--blue); animation: pulse 1s infinite; }
.cell-muted { color: #817a72; }.error-detail { display: block; max-width: 260px; margin-top: 4px; color: #9c6762; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-action { width: 36px; height: 36px; border: 0; background: transparent; }
.danger-action { color: var(--red); }

.bot-workspace { display: grid; grid-template-columns: minmax(360px, 1.1fr) minmax(330px, .9fr); gap: 18px; }
.counter-pill { min-width: 38px; padding: 7px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); text-align: center; font-size: 11px; font-weight: 700; }
.bot-textarea { margin-top: 24px; }
.field-note { margin: 10px 0 20px; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.bot-progress { margin: 30px 0 25px; }
.bot-progress > div { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 11px; color: var(--ink-soft); font-size: 11px; }
.bot-progress strong { color: var(--ink); }
.bot-progress progress { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 99px; background: var(--surface-2); accent-color: var(--primary); }
.bot-progress progress::-webkit-progress-bar { border-radius: 99px; background: var(--surface-2); }
.bot-progress progress::-webkit-progress-value { border-radius: 99px; background: var(--primary); }
.bot-run-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -7px 0 19px; }
.bot-run-controls > div { display: flex; align-items: center; gap: 7px; }
.bot-run-controls > div:first-child { color: var(--ink-soft); }
.bot-run-controls > div:first-child .material-symbols-rounded { font-size: 16px; color: var(--primary); }
.bot-run-controls > div:first-child strong { font-size: 10px; }
.mini-control { min-height: 34px; border: 1px solid var(--line); border-radius: 11px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.mini-control .material-symbols-rounded { font-size: 17px; }
.mini-control.pause { background: var(--surface-2); }.mini-control.stop { border-color: #e9c5c0; color: var(--red); }
.mini-control:disabled { cursor: wait; opacity: .55; }
.bot-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bot-metrics > div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; min-height: 61px; padding: 13px; border-radius: 16px; background: var(--surface-2); }
.bot-metrics i { width: 8px; height: 8px; border-radius: 50%; background: #9e968e; }
.bot-metrics i.working { background: var(--green); }.bot-metrics i.dead { background: var(--red); }.bot-metrics i.waiting { background: #c08b42; }.bot-metrics i.error { background: #888078; }
.bot-metrics span { color: var(--ink-soft); font-size: 10px; }.bot-metrics strong { font-size: 19px; }
.bot-results-card { margin-top: 18px; }.table-panel-head { padding: 22px 24px 16px; }.table-panel-head h3 { margin: 5px 0 0; }
.bot-name { display: flex; align-items: center; gap: 10px; }.bot-name .material-symbols-rounded { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); }
.live-feed-shell { position: relative; min-height: 220px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.live-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.live-feed-head > div { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.live-feed-head > div > i { width: 7px; height: 7px; border-radius: 50%; background: #aaa196; }
.live-feed-head > div > i.active { background: var(--green); box-shadow: 0 0 0 5px rgba(64,115,90,.1); animation: pulse 1.1s infinite; }
.live-feed-head > small { color: var(--primary-dark); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.live-feed { max-height: 228px; overflow-y: auto; display: grid; gap: 7px; padding-right: 3px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.live-feed-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 11px; border: 1px solid rgba(83,72,62,.06); border-radius: 15px; background: #faf7f0; }
.live-feed-item.is-new { animation: live-item-in .28s ease; }
.live-bot-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); color: var(--ink-soft); font-size: 18px; }
.live-feed-item strong, .live-feed-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-feed-item strong { font-size: 11px; }.live-feed-item small { margin-top: 2px; color: #9a9289; font-size: 8px; }
.live-result { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 700; }
.live-result i { width: 6px; height: 6px; border-radius: 50%; background: #8d867e; }
.live-feed-item.online .live-result { color: var(--green); }.live-feed-item.online .live-result i { background: var(--green); }
.live-feed-item.dead .live-result { color: var(--red); }.live-feed-item.dead .live-result i { background: var(--red); }
.live-feed-item.checking .live-result { color: #a06d2d; }.live-feed-item.checking .live-result i { background: #c08b42; }
.live-feed-empty { min-height: 180px; display: grid; place-items: center; align-content: center; text-align: center; }
.live-feed-empty > strong { margin-top: 13px; font-size: 12px; }.live-feed-empty > small { max-width: 280px; margin-top: 5px; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.mini-radar { position: relative; width: 62px; height: 62px; display: grid; place-items: center; }
.mini-radar i { position: absolute; inset: 4px; border: 1px solid var(--primary-soft); border-radius: 50%; }.mini-radar i:nth-child(2) { inset: 14px; }
.mini-radar .material-symbols-rounded { position: relative; color: var(--primary); font-size: 23px; }
.history-summary { display: flex; align-items: baseline; gap: 6px; }.history-summary strong { font-size: 24px; }.history-summary span { color: var(--ink-soft); font-size: 9px; }
.bot-history-toolbar { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(460px, 1.6fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); background: #faf7f0; }
.bot-history-toolbar .search { min-width: 0; }
.bot-filter-chips { overflow-x: auto; padding-bottom: 2px; }
.copy-selection { white-space: nowrap; }
.bot-status-cell { display: grid; justify-items: start; gap: 5px; }
.bot-status-detail { display: block; max-width: 360px; overflow: hidden; color: var(--ink-soft); font-size: 8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.session-dialog { width: min(520px, 100%); }
.stepper { display: grid; grid-template-columns: 30px 1fr 30px 1fr 30px; align-items: center; margin: 0 0 28px; }
.stepper span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.stepper span.active { background: var(--primary); color: white; }.stepper i { height: 2px; background: var(--surface-2); }

.proxy-grid { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: 16px; }
.proxy-card { position: relative; min-height: 235px; display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(83,72,62,.07); border-radius: var(--radius-lg); background: var(--surface); transition: transform .18s, box-shadow .18s; }
.proxy-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.proxy-card.inactive { opacity: .66; }
.proxy-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.proxy-type-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.proxy-type-icon .material-symbols-rounded { font-variation-settings: "FILL" 1; }
.card-menu { display: flex; gap: 4px; }
.card-menu .icon-button { width: 35px; height: 35px; border: 0; background: transparent; }
.proxy-card h3 { margin: 20px 0 5px; font-size: 18px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.proxy-card > p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.proxy-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 22px; }
.proxy-health { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.proxy-health i { width: 8px; height: 8px; border-radius: 50%; background: #aaa196; }
.proxy-health.working i { background: var(--green); box-shadow: 0 0 0 4px rgba(64,115,90,.1); }
.proxy-health.failed i { background: var(--red); box-shadow: 0 0 0 4px rgba(166,75,69,.1); }
.mini-button { min-height: 34px; border: 0; border-radius: 11px; padding: 0 12px; background: var(--surface-2); cursor: pointer; font-size: 10px; font-weight: 700; }
.empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--ink-soft); }
.empty-state .material-symbols-rounded { font-size: 45px; color: var(--primary); }.empty-state h3 { margin: 14px 0 4px; color: var(--ink); }.empty-state p { margin: 0 0 18px; font-size: 12px; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(41,37,34,.45); backdrop-filter: blur(5px); animation: fade .18s ease; }
.dialog { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 28px; padding: 28px; background: var(--surface); box-shadow: 0 30px 90px rgba(27,22,19,.27); animation: dialog-in .24s ease; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 26px; }.dialog-head h2 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.045em; }
.form-grid { display: grid; grid-template-columns: 150px 1fr 120px; gap: 16px; }.field.grow { grid-column: span 1; }.form-grid .field:nth-child(4), .form-grid .field:nth-child(5) { grid-column: span 1; }.form-grid .field:nth-child(5) { grid-column: span 2; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 23px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row strong, .switch-row small { display: block; }.switch-row strong { font-size: 13px; }.switch-row small { margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }.switch-row i { position: relative; width: 48px; height: 28px; border-radius: 20px; background: #bdb5ab; transition: background .2s; }.switch-row i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 4px; top: 4px; border-radius: 50%; background: white; transition: transform .2s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }.switch-row input:checked + i { background: var(--primary); }.switch-row input:checked + i::after { transform: translateX(20px); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.confirm-dialog { width: min(430px, 100%); text-align: center; }.confirm-dialog h2 { margin: 16px 0 8px; }.confirm-dialog > p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }.danger-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto; border-radius: 19px; background: var(--red-soft); color: var(--red); }.confirm-dialog .dialog-actions { justify-content: center; }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 280px; max-width: 420px; display: flex; align-items: center; gap: 10px; padding: 15px 17px; border-radius: 16px; background: var(--ink); color: #fffaf2; box-shadow: 0 16px 40px rgba(26,22,19,.25); font-size: 12px; animation: toast-in .25s ease; }.toast.error { background: #753c37; }.toast.success .material-symbols-rounded { color: #aee0bd; }
.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(41,37,34,.4); }

@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes live-item-in { from { opacity: 0; transform: translateY(-5px); } }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .proxy-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { grid-template-columns: 1fr 270px; }
  .ring-3 { width: 270px; height: 270px; }
  .bot-history-toolbar { grid-template-columns: 1fr auto; }.bot-filter-chips { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 900px) {
  :root { --sidebar: 232px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.12); }.sidebar.open { transform: translateX(0); }
  .content-shell { margin-left: 0; }
  .mobile-only { display: grid; }
  .topbar { justify-content: flex-start; }.top-actions { margin-left: auto; }
  .hero-card { grid-template-columns: 1fr; }.hero-visual { position: absolute; right: -65px; top: 40px; width: 330px; opacity: .35; }.hero-card > div:first-child { max-width: 680px; }
  .overview-grid { grid-template-columns: 1fr; }
  .bot-workspace { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }.login-art { display: none; }.login-card { min-height: 100vh; align-items: center; }.login-card > * { width: min(460px, 100%); }
}
@media (max-width: 680px) {
  .topbar { height: 78px; padding: 0 16px; }.topbar .eyebrow { display: none; }.topbar h2 { margin: 0; font-size: 18px; }.avatar, .scan-indicator { display: none !important; }
  .main-content { padding: 20px 14px 32px; }
  .hero-card { min-height: 430px; padding: 30px 24px; }.hero-card h1 { font-size: 43px; }.hero-visual { right: -120px; bottom: -70px; top: auto; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { min-height: 126px; align-items: flex-start; flex-direction: column; gap: 12px; padding: 17px; }.metric-icon { width: 40px; height: 40px; border-radius: 13px; }.metric-card strong { font-size: 26px; }
  .health-chart { grid-template-columns: 1fr; justify-items: center; gap: 22px; }.legend { width: 100%; }
  .section-intro { align-items: flex-start; flex-direction: column; }.section-intro h1 { font-size: 44px; }.action-row { width: 100%; }.action-row .button { flex: 1; }
  .toolbar-card { align-items: stretch; flex-direction: column; }.filter-chips { overflow-x: auto; padding-bottom: 2px; }
  .proxy-grid { grid-template-columns: 1fr; }
  .bot-metrics { grid-template-columns: 1fr; }
  .bot-history-toolbar { grid-template-columns: 1fr; }.bot-filter-chips { grid-column: auto; grid-row: auto; }.copy-selection { width: 100%; }
  .form-grid { grid-template-columns: 1fr 110px; }.form-grid .field:first-child { grid-column: span 2; }.form-grid .field:nth-child(4), .form-grid .field:nth-child(5) { grid-column: span 2; }
  .dialog { padding: 23px 20px; border-radius: 24px; }
  .toast-region { left: 14px; right: 14px; bottom: 14px; }.toast { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
