:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --ink: #151525;
  --muted: #6f7285;
  --line: #e6e8f0;
  --primary: #6c4df6;
  --primary-dark: #5137cc;
  --accent: #16c4b8;
  --danger: #e8556d;
  --warning: #e9a73b;
  --success: #1caa72;
  --shadow: 0 18px 55px rgba(43, 35, 85, .09);
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, "Noto Sans Arabic", Tahoma, Arial, sans-serif; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 255px 1fr; min-height: 100vh; }
.sidebar { position: fixed; inset-block: 0; right: 0; width: 255px; padding: 25px 18px; background: #151426; color: #fff; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 25px; }
.brand-mark { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #8b6dff, #17c6b8); font-weight: 900; box-shadow: 0 9px 30px rgba(108,77,246,.35); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: -.3px; }
.brand small { color: #9ea0b6; font-size: 11px; margin-top: 3px; letter-spacing: 1.1px; text-transform: uppercase; }
.main-nav { display: grid; gap: 7px; }
.main-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 13px; color: #b9bbcb; transition: .2s ease; font-size: 14px; }
.main-nav a span { width: 22px; text-align: center; font-size: 18px; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.09); color: #fff; transform: translateX(-2px); }
.main-nav a.active { box-shadow: inset -3px 0 0 #8d75ff; }
.sidebar-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.05); border-radius: 16px; }
.sidebar-card .pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fe4ad; box-shadow: 0 0 0 5px rgba(63,228,173,.11); margin-left: 8px; }
.sidebar-card strong { font-size: 13px; }
.sidebar-card p { color: #aeb0c2; font-size: 11px; line-height: 1.7; margin: 9px 0; }
.sidebar-card a { color: #a993ff; font-size: 11px; }
.profile-mini { display: flex; gap: 10px; align-items: center; margin-top: 17px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 37px; height: 37px; border-radius: 12px; background: #2e2c45; display: grid; place-items: center; }
.profile-mini strong, .profile-mini small { display: block; }
.profile-mini strong { font-size: 12px; }
.profile-mini small { color: #8e90a6; font-size: 10px; margin-top: 3px; }
.main-content { grid-column: 2; min-width: 0; }
.topbar { height: 76px; background: rgba(255,255,255,.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; position: sticky; top: 0; z-index: 20; }
.top-search { width: min(430px, 42vw); position: relative; }
.top-search span { position: absolute; right: 14px; top: 10px; color: #8c8fa0; font-size: 20px; }
.top-search input { width: 100%; border: 1px solid transparent; background: var(--surface-2); border-radius: 12px; padding: 11px 43px 11px 14px; outline: none; transition: .2s; }
.top-search input:focus { background: #fff; border-color: #cfc5ff; box-shadow: 0 0 0 4px rgba(108,77,246,.08); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.mode-pill { padding: 7px 10px; border-radius: 999px; background: #eefaf6; color: #16885f; font-size: 10px; font-weight: 800; }
.icon-button { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 12px; background: #fff; position: relative; }
.icon-button i { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); position: absolute; top: 7px; right: 8px; }
.mobile-menu { display: none; }
.primary, .secondary, .ghost, .danger-btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .18s; }
.primary { color: #fff; background: linear-gradient(135deg, var(--primary), #8d6dff); box-shadow: 0 9px 24px rgba(108,77,246,.2); }
.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(108,77,246,.28); }
.primary.small { padding: 10px 14px; font-size: 12px; }
.secondary { background: #edf0f7; color: #3c3f51; }
.ghost { background: transparent; color: var(--primary); border: 1px solid #dcd5ff; }
.danger-btn { background: #fff0f3; color: #c63d57; }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.page { padding: 31px 34px 90px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(25px, 3vw, 34px); margin: 0; letter-spacing: -.8px; }
.page-head p { color: var(--muted); margin: 7px 0 0; font-size: 13px; }
.eyebrow { color: var(--primary); font-weight: 900; font-size: 11px; letter-spacing: .5px; margin-bottom: 8px; display: block; }
.hero { min-height: 275px; border-radius: 28px; padding: 34px; color: #fff; background: radial-gradient(circle at 15% 20%, rgba(23,198,184,.25), transparent 35%), radial-gradient(circle at 90% 20%, rgba(139,109,255,.35), transparent 38%), #19172d; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero:after { content: ''; position: absolute; width: 310px; height: 310px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; left: -70px; top: -60px; box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018); }
.hero-copy { position: relative; z-index: 2; }
.hero h2 { font-size: clamp(27px, 4vw, 45px); line-height: 1.2; margin: 0 0 13px; max-width: 680px; }
.hero p { color: #c6c5d5; line-height: 1.8; max-width: 630px; margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.hero-visual { display: grid; place-items: center; position: relative; z-index: 2; }
.orbit { width: 210px; height: 210px; border: 1px dashed rgba(255,255,255,.2); border-radius: 50%; display: grid; place-items: center; position: relative; animation: rotate 25s linear infinite; }
.orbit-core { width: 104px; height: 104px; border-radius: 32px; background: linear-gradient(135deg, #8c6eff, #15c3b7); display: grid; place-items: center; font-size: 32px; font-weight: 900; box-shadow: 0 22px 50px rgba(71,49,198,.45); transform: rotate(0); }
.orbit span:not(.orbit-core) { position: absolute; width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); display: grid; place-items: center; animation: counter 25s linear infinite; }
.orbit span:nth-child(2) { top: -8px; right: 80px; }
.orbit span:nth-child(3) { bottom: 10px; right: 2px; }
.orbit span:nth-child(4) { bottom: 16px; left: 7px; }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes counter { to { transform: rotate(-360deg); } }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin: 20px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 18px; display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 45px; height: 45px; border-radius: 14px; background: #f0edff; color: var(--primary); display: grid; place-items: center; font-size: 20px; }
.stat-card strong, .stat-card small { display: block; }
.stat-card strong { font-size: 23px; }
.stat-card small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin: 27px 0 14px; }
.section-row h2 { margin: 0; font-size: 19px; }
.section-row a { color: var(--primary); font-size: 12px; font-weight: 800; }
.agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.agent-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; transition: .2s; position: relative; overflow: hidden; }
.agent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d8d1fb; }
.agent-top { display: flex; justify-content: space-between; gap: 12px; }
.agent-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #f0edff, #e7faf7); color: var(--primary); font-size: 22px; font-weight: 900; }
.badge { border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 900; height: fit-content; }
.badge.published { background: #e9f8f2; color: #14845d; }
.badge.draft { background: #fff5df; color: #a87015; }
.agent-card h3 { font-size: 16px; margin: 16px 0 7px; }
.agent-card p { color: var(--muted); font-size: 12px; line-height: 1.7; min-height: 40px; }
.agent-meta { display: flex; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 13px 0; color: #7c7f90; font-size: 10px; }
.agent-meta strong { color: var(--ink); }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; padding: 9px 10px; font-size: 11px; }
.creator-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.form-card, .preview-card, .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 35px rgba(47,42,84,.04); }
.form-card { padding: 24px; }
.preview-card { position: sticky; top: 99px; min-height: 550px; overflow: hidden; }
.preview-head { padding: 21px 22px; color: #fff; background: linear-gradient(135deg, #211e3d, #302858); }
.preview-head small { color: #bcb9cf; }
.preview-body { padding: 22px; }
.steps-indicator { display: flex; gap: 6px; margin-bottom: 22px; }
.steps-indicator span { height: 5px; flex: 1; border-radius: 999px; background: #e5e6ee; }
.steps-indicator span.active { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.source-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 15px 0 21px; }
.source-tab { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 13px 8px; color: #676a7c; font-size: 11px; font-weight: 800; }
.source-tab.active { border-color: #bdb0ff; background: #f5f2ff; color: var(--primary); box-shadow: 0 0 0 3px rgba(108,77,246,.07); }
.field { margin: 15px 0; }
.field label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.field small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; line-height: 1.6; }
.field input, .field textarea, .field select { width: 100%; padding: 13px 14px; background: #fbfbfd; border: 1px solid var(--line); border-radius: 12px; outline: none; transition: .2s; }
.field textarea { min-height: 180px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { background: #fff; border-color: #b9aaff; box-shadow: 0 0 0 4px rgba(108,77,246,.07); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.checkbox-card { display: flex; align-items: flex-start; gap: 10px; padding: 13px; background: #fffaf1; border: 1px solid #f4dfb7; border-radius: 12px; margin: 17px 0; }
.checkbox-card input { margin-top: 3px; accent-color: var(--primary); }
.checkbox-card strong { font-size: 11px; display: block; }
.checkbox-card p { font-size: 10px; color: #806e4c; margin: 5px 0 0; line-height: 1.6; }
.wide { width: 100%; }
.empty-preview { padding: 55px 24px; text-align: center; color: var(--muted); }
.empty-preview .big-icon { width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 25px; background: #f0edff; color: var(--primary); font-size: 30px; }
.empty-preview h3 { color: var(--ink); margin-bottom: 7px; }
.preview-agent h2 { margin: 0 0 8px; }
.preview-agent > p { color: var(--muted); line-height: 1.7; font-size: 12px; }
.workflow-step { display: grid; grid-template-columns: 29px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.step-number { width: 27px; height: 27px; border-radius: 9px; background: #f0edff; color: var(--primary); display: grid; place-items: center; font-weight: 900; font-size: 11px; }
.workflow-step strong { font-size: 12px; }
.workflow-step p { font-size: 10px; color: var(--muted); line-height: 1.55; margin: 4px 0 0; }
.risk { font-size: 8px; border-radius: 999px; padding: 4px 7px; height: fit-content; }
.risk.low { background: #eaf8f3; color: #15865e; }
.risk.medium { background: #fff3da; color: #9a691b; }
.risk.high { background: #ffedf1; color: #c84059; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter { border: 1px solid var(--line); background: #fff; padding: 8px 13px; border-radius: 999px; font-size: 11px; }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px; text-align: right; border-bottom: 1px solid var(--line); font-size: 11px; }
th { color: var(--muted); background: #fafafd; font-weight: 800; }
td strong { font-size: 12px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: 19px; padding: 22px; }
.bar-chart { height: 230px; display: flex; align-items: end; gap: 13px; padding-top: 25px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; background: linear-gradient(180deg, #8b6dff, #6c4df6); border-radius: 9px 9px 0 0; min-width: 20px; position: relative; }
.bar span { position: absolute; top: -22px; width: 100%; text-align: center; font-size: 9px; color: var(--muted); }
.bar-labels { display: flex; gap: 13px; }
.bar-labels span { flex: 1; text-align: center; font-size: 9px; color: var(--muted); padding-top: 9px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setting-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 21px; }
.setting-card h3 { margin: 0 0 8px; }
.setting-card p { color: var(--muted); font-size: 11px; line-height: 1.7; }
.code { direction: ltr; text-align: left; background: #171625; color: #c9c8d8; border-radius: 12px; padding: 13px; font-family: ui-monospace, monospace; font-size: 10px; overflow: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(19,18,34,.6); backdrop-filter: blur(5px); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { width: min(690px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 23px; box-shadow: 0 30px 90px rgba(17,13,49,.35); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-close { border: 0; background: #f0f1f6; width: 34px; height: 34px; border-radius: 10px; }
.modal-body { padding: 22px; }
.run-timeline { margin: 18px 0; }
.run-item { position: relative; padding: 0 35px 18px 0; }
.run-item:before { content: ''; position: absolute; right: 12px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.run-item:last-child:before { display: none; }
.run-dot { position: absolute; right: 3px; top: 0; width: 20px; height: 20px; border-radius: 50%; background: #e9f7f2; color: var(--success); display: grid; place-items: center; font-size: 10px; }
.run-item.needs .run-dot { background: #fff3dc; color: #a8731c; }
.run-item strong { font-size: 12px; }
.run-item p { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 4px 0; }
.notice { padding: 13px; border-radius: 12px; background: #eef9f7; color: #187a68; font-size: 11px; line-height: 1.7; }
.notice.warning { background: #fff7e8; color: #8e681f; }
.loading { display: inline-flex; align-items: center; gap: 8px; }
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-root { position: fixed; left: 22px; bottom: 22px; z-index: 90; display: grid; gap: 8px; }
.toast { background: #1b1a2b; color: #fff; padding: 12px 15px; border-radius: 12px; font-size: 11px; box-shadow: var(--shadow); animation: toastIn .25s ease; }
.toast.error { background: #a92e45; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }
.bottom-nav { display: none; }
.skeleton { background: linear-gradient(90deg,#eee 25%,#f7f7f7 37%,#eee 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
@media (max-width: 1080px) {
  .agent-grid { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(110%); transition: .25s; width: 270px; box-shadow: -20px 0 55px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; }
  .topbar { height: 66px; padding: 0 14px; }
  .mobile-menu { display: block; }
  .top-search { display: none; }
  .mode-pill { display: none; }
  .top-actions .icon-button { display: none; }
  .page { padding: 22px 14px 95px; }
  .page-head { align-items: flex-start; }
  .creator-panel { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .settings-grid { grid-template-columns: 1fr; }
  .bottom-nav { position: fixed; bottom: 0; inset-inline: 0; height: 69px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 45; display: flex; align-items: center; justify-content: space-around; }
  .bottom-nav a { display: grid; place-items: center; gap: 3px; color: #777a8e; font-size: 18px; min-width: 50px; }
  .bottom-nav a span { font-size: 8px; }
  .bottom-nav .create-fab { width: 50px; height: 50px; border-radius: 17px; color: #fff; background: linear-gradient(135deg,var(--primary),#8b6dff); font-size: 27px; transform: translateY(-13px); box-shadow: 0 10px 25px rgba(108,77,246,.32); }
}
@media (max-width: 620px) {
  .hero { padding: 25px 20px; min-height: 310px; }
  .hero h2 { font-size: 29px; }
  .stats-grid, .agent-grid, .grid-2 { grid-template-columns: 1fr; }
  .source-tabs { grid-template-columns: 1fr; }
  .page-head { display: block; }
  .page-head .primary { margin-top: 14px; }
  .form-card { padding: 18px; }
}

/* Agent Runner 0.2 */
.runner-modal { width: min(820px, 100%); }
.runner-list { display: grid; gap: 12px; margin-top: 18px; }
.runner-step { border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: #fff; }
.runner-step.completed { border-color: #bfe9dc; background: #fbfffd; }
.runner-step.failed, .runner-step.blocked { border-color: #f0c4cc; background: #fffafb; }
.runner-step.running { border-color: #c8bbff; background: #fcfbff; }
.runner-step-head { display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; align-items: start; }
.runner-step-head strong { display: block; font-size: 13px; }
.runner-step-head small { display: block; color: var(--muted); margin-top: 3px; font-size: 9px; }
.runner-step > p { color: var(--muted); font-size: 11px; line-height: 1.75; margin: 10px 0; }
.grounding { font-size: 9px; line-height: 1.6; color: #69627f; background: #f6f4fb; border-radius: 9px; padding: 9px 10px; margin-bottom: 10px; }
.command-box { direction: ltr; text-align: left; background: #171625; color: #e9e8f3; border-radius: 11px; padding: 12px; overflow: auto; margin: 10px 0; }
.command-box code { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; }
.runner-output { direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; background: #0f1017; color: #c9f4db; border-radius: 11px; padding: 12px; font-size: 10px; line-height: 1.55; margin: 10px 0; }
.runner-execute { margin-top: 10px; }
.runner-execute:disabled { opacity: .45; cursor: not-allowed; }
.sandbox-banner { display: flex; gap: 10px; align-items: flex-start; background: #f2efff; color: #4e3da6; border: 1px solid #ddd6ff; border-radius: 12px; padding: 12px; margin: 14px 0; font-size: 10px; line-height: 1.6; }
.sandbox-banner strong { white-space: nowrap; }
.runner-footer { display: flex; gap: 9px; margin-top: 17px; }
.runner-footer button { flex: 1; }
@media (max-width: 620px) {
  .runner-step { padding: 12px; }
  .runner-step-head { grid-template-columns: 27px 1fr; }
  .runner-step-head .risk { grid-column: 2; width: fit-content; margin-top: -2px; }
  .runner-footer { flex-direction: column; }
  .sandbox-banner { display: grid; }
}

/* Video Vision 0.3 */
.source-tabs-four { grid-template-columns: repeat(4, 1fr); }
.vision-hint { display: grid; gap: 5px; padding: 13px 14px; margin: -7px 0 18px; border: 1px solid #d8d1ff; border-radius: 13px; background: linear-gradient(135deg,#f6f3ff,#effcf9); color: #4f43a0; font-size: 10px; line-height: 1.7; }
.vision-hint strong { font-size: 11px; }
.vision-proof { display: grid; gap: 8px; padding: 13px; margin: 15px 0; border: 1px solid #d8d1ff; border-radius: 14px; background: #f8f6ff; color: #544a87; font-size: 10px; line-height: 1.65; }
.vision-proof strong { color: #3d3374; font-size: 12px; }
.vision-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vision-chips span { padding: 5px 8px; border-radius: 999px; background: #ebe6ff; color: #5946b5; font-size: 9px; }
input[type="file"] { width: 100%; border: 1px dashed #cfc9e7; border-radius: 13px; padding: 12px; background: #faf9ff; color: #56596c; }
@media (max-width: 760px) {
  .source-tabs-four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .source-tabs-four { grid-template-columns: 1fr 1fr; }
  .source-tab { min-height: 48px; }
}

/* Tool Router + Calendar Runner 0.4 */
.tool-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.calendar-banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px; font-size: 10px; line-height: 1.6; }
.calendar-banner.ready { background: #eefaf5; color: #19775c; border: 1px solid #c9eadc; }
.calendar-banner.not-ready { background: #fff7e8; color: #8e681f; border: 1px solid #f1dfb9; }
.calendar-banner strong { white-space: nowrap; }
.calendar-payload { display: grid; gap: 5px; background: #f2fbf7; border: 1px solid #d2ecdf; color: #285f4e; border-radius: 11px; padding: 11px 12px; margin: 10px 0; font-size: 10px; direction: ltr; text-align: left; }
.calendar-payload strong { font-size: 11px; color: #174c3c; }
@media (max-width: 620px) { .tool-banners { grid-template-columns: 1fr; } .calendar-banner { display: grid; } }

/* Reception Settings 0.6 */
.booking-settings-card { background:#fff; border:1px solid var(--line); border-radius:22px; padding:24px; margin-bottom:26px; box-shadow:0 10px 35px rgba(26,23,57,.04); }
.booking-settings-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; padding-bottom:20px; border-bottom:1px solid var(--line); }
.booking-settings-head h2 { margin:5px 0 5px; font-size:22px; }
.booking-settings-head p, .compact-row p { margin:0; color:var(--muted); font-size:11px; line-height:1.65; }
.settings-section { padding:22px 0; border-bottom:1px solid var(--line); }
.settings-section:last-of-type { border-bottom:0; }
.settings-section h3 { margin:0 0 14px; font-size:15px; }
.booking-rules-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.field.compact { margin:0; }
.field.compact label { font-size:9px; }
.field.compact small { font-size:8px; color:var(--muted); }
.hours-list { display:grid; gap:9px; }
.hours-row { display:grid; grid-template-columns:minmax(120px,1fr) 120px 24px 120px 55px; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:13px; background:#fbfbfd; }
.day-toggle { display:flex; align-items:center; gap:9px; font-size:11px; font-weight:800; }
.day-toggle input { width:18px; height:18px; accent-color:var(--primary); }
.hours-row input[type="time"] { width:100%; border:1px solid var(--line); border-radius:9px; padding:9px; background:#fff; font:inherit; direction:ltr; }
.hours-arrow { text-align:center; color:var(--muted); }
.closed-label { color:#b95b6b; font-size:9px; opacity:.35; }
.hours-row:has(.day-toggle input:not(:checked)) input[type="time"] { opacity:.4; pointer-events:none; }
.hours-row:has(.day-toggle input:not(:checked)) .closed-label { opacity:1; }
.services-settings-list { display:grid; gap:10px; }
.service-setting-row { display:grid; grid-template-columns:80px minmax(160px,1fr) 110px 110px 36px; gap:10px; align-items:end; border:1px solid var(--line); border-radius:14px; padding:12px; background:#fbfbfd; }
.service-active { display:flex; align-items:center; gap:6px; height:42px; font-size:9px; font-weight:700; }
.service-active input { accent-color:var(--primary); }
.danger-soft { border:0; height:40px; border-radius:10px; background:#fff0f3; color:#bd4058; font-size:20px; cursor:pointer; }
.booking-settings-footer { display:flex; align-items:center; justify-content:space-between; gap:15px; padding-top:20px; }
.settings-live-note { display:flex; gap:9px; align-items:center; }
.settings-live-note div { display:grid; gap:2px; }
.settings-live-note strong { font-size:10px; }
.settings-live-note small { font-size:9px; color:var(--muted); }
.compact-row { margin:0 0 12px; align-items:center; }
.booking-summary-mini { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.booking-summary-mini span { background:#f3f1ff; color:#6650b6; border-radius:999px; padding:6px 9px; font-size:9px; }
@media (max-width: 900px) { .booking-rules-grid { grid-template-columns:1fr 1fr; } .service-setting-row { grid-template-columns:70px 1fr 90px 90px 34px; } }
@media (max-width: 620px) {
  .booking-settings-card { padding:17px; border-radius:18px; }
  .booking-settings-head { display:block; }
  .booking-settings-head .badge { display:inline-block; margin-top:10px; }
  .booking-rules-grid { grid-template-columns:1fr; }
  .hours-row { grid-template-columns:1fr 1fr 16px 1fr; gap:7px; }
  .hours-row .closed-label { grid-column:1/-1; }
  .service-setting-row { grid-template-columns:1fr 1fr; align-items:end; }
  .service-setting-row .service-active { grid-column:1; }
  .service-setting-row [data-service-name] { width:100%; }
  .service-setting-row .field:nth-of-type(1) { grid-column:1/-1; }
  .service-setting-row .danger-soft { grid-column:2; grid-row:1; justify-self:end; width:40px; }
  .booking-settings-footer { display:grid; }
  .booking-settings-footer .primary { width:100%; }
}


/* Public Booking 0.7 */
.public-booking-card{display:flex;justify-content:space-between;gap:20px;align-items:center;background:linear-gradient(135deg,#f2efff,#eefaf6);border:1px solid #ddd7ff;border-radius:20px;padding:20px;margin:0 0 26px}.public-booking-card h2{margin:4px 0 5px;font-size:18px}.public-booking-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.65;max-width:560px}.public-booking-actions{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:8px;min-width:min(470px,50%)}.public-booking-actions code{grid-column:1/-1;direction:ltr;text-align:left;background:#fff;border:1px solid var(--line);border-radius:11px;padding:11px;font-size:10px;overflow:auto}.public-booking-actions .secondary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}@media(max-width:760px){.public-booking-card{display:grid}.public-booking-actions{min-width:0;grid-template-columns:1fr}.public-booking-actions code{grid-column:1}}
