:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172033;background:#f5f7fb}*{box-sizing:border-box}body{margin:0}.topbar{height:64px;background:#121a2c;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px}.brand{color:#fff;text-decoration:none;font-weight:750;font-size:18px}.top-actions{display:flex;align-items:center;gap:16px}.top-actions form{margin:0}.link-btn{background:none;border:0;color:#cdd7ed;cursor:pointer}.container{max-width:1180px;margin:34px auto;padding:0 20px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.page-head h1{margin:4px 0 6px}.page-head p{margin:0;color:#657087}.back{font-size:14px;color:#64748b;text-decoration:none}.grid,.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:18px}.card{background:#fff;border:1px solid #e3e8f1;border-radius:14px;padding:22px;box-shadow:0 2px 12px rgba(18,26,44,.04)}.account-card{text-decoration:none;color:inherit;transition:.15s}.account-card:hover{transform:translateY(-1px);box-shadow:0 7px 22px rgba(18,26,44,.08)}.row{display:flex;justify-content:space-between;align-items:center;gap:10px}.row h2{margin:0}.meta{display:flex;justify-content:space-between;gap:10px;color:#667085;font-size:13px}.badge{display:inline-block;padding:5px 9px;border-radius:999px;background:#e8edf6;font-size:12px;white-space:nowrap}.badge.big{font-size:14px;padding:7px 11px}.state-running{background:#dcfce7;color:#166534}.state-error,.state-reauth_required{background:#fee2e2;color:#991b1b}.state-starting{background:#fef3c7;color:#92400e}.state-stopped{background:#e5e7eb;color:#374151}.button,button{display:inline-block;border:1px solid #cfd7e6;background:#fff;color:#172033;border-radius:8px;padding:9px 13px;text-decoration:none;font:inherit;cursor:pointer}.primary{background:#2457d6;border-color:#2457d6;color:#fff}.danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}.actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}.actions form{margin:0}.stack{display:flex;flex-direction:column;gap:8px}.form-card{max-width:850px}.form-card p{margin:0 0 18px}.form-card label{display:block;font-weight:650;margin-bottom:6px}.form-card input[type=text],.form-card input[type=password],.form-card input[type=number],.form-card textarea,.form-card select,.login-card input{width:100%;padding:10px 11px;border:1px solid #cfd7e6;border-radius:8px;background:#fff;font:inherit}.helptext{display:block;color:#657087;font-size:12px;margin-top:5px}.errorlist{color:#b42318}.messages{margin-bottom:18px}.msg{padding:11px 14px;border-radius:8px;background:#e8edf6;margin-bottom:8px}.msg.success{background:#dcfce7;color:#166534}.msg.error{background:#fee2e2;color:#991b1b}.login-card{max-width:420px;margin:90px auto}.errorbox{margin:18px 0;border-color:#fecaca}.errorbox pre{white-space:pre-wrap;overflow-wrap:anywhere}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:9px 8px;border-bottom:1px solid #eef1f5;font-size:14px}h3{margin-top:0}@media(max-width:700px){.topbar{padding:0 16px}.page-head{flex-direction:column}.meta{flex-direction:column}}
.protocol-grid .card p{color:#657087;line-height:1.55}.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px}.stage-box{border:1px solid #dfe5ef;background:#fafbfe;border-radius:12px;padding:16px;margin:18px 0}.wide-form{max-width:1050px}.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:8px 18px;margin-bottom:22px}.check-row{display:flex!important;gap:8px;align-items:flex-start;font-weight:500!important;border-bottom:1px solid #eef1f5;padding:8px 0}.prompt-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:70vh;overflow:auto;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:16px;direction:auto}
.warning-card { border-left: 4px solid currentColor; }
.warning-card ul { margin: .6rem 0 1rem 1.3rem; }

.top-link{color:#dbe5fb;text-decoration:none;font-size:14px}.top-link:hover{color:#fff}.log-filter-grid{display:grid;grid-template-columns:1.2fr .8fr 1.8fr .7fr auto;gap:12px;align-items:end}.log-filter-grid label{display:block;font-weight:650;font-size:13px;margin-bottom:5px}.log-filter-grid input,.log-filter-grid select{width:100%;padding:9px 10px;border:1px solid #cfd7e6;border-radius:8px;background:#fff;font:inherit}.log-viewer{white-space:pre-wrap;overflow-wrap:anywhere;max-height:72vh;overflow:auto;background:#0f172a;color:#e2e8f0;border-radius:10px;padding:16px;font-size:12px;line-height:1.5;margin:12px 0 0}.log-filter-action{padding-bottom:1px}@media(max-width:900px){.log-filter-grid{grid-template-columns:1fr 1fr}.log-filter-action{grid-column:1/-1}.top-actions{gap:10px;flex-wrap:wrap}}

/* v1.3.5 Persian/RTL control plane */
html[dir="rtl"] body{direction:rtl;text-align:right}
html[dir="rtl"] th,html[dir="rtl"] td{text-align:right}
html[dir="rtl"] .warning-card{border-left:1px solid #e3e8f1;border-right:4px solid currentColor}
html[dir="rtl"] .warning-card ul{margin:.6rem 1.3rem 1rem 0}
html[dir="rtl"] input[dir="ltr"],html[dir="rtl"] textarea[dir="ltr"],html[dir="rtl"] code,html[dir="rtl"] pre{direction:ltr;text-align:left}
html[dir="rtl"] .prompt-preview{direction:auto;text-align:start}
.settings-form{display:flex;flex-direction:column;gap:18px}.settings-section{max-width:1050px}.settings-section-head{margin-bottom:18px}.settings-section-head h3{margin-bottom:6px}.settings-section-head p{margin:0;color:#657087;line-height:1.65}.settings-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.setting-field{min-width:0}.setting-field>label:not(.check-row){display:block;font-weight:650;margin-bottom:6px}.setting-field input[type=text],.setting-field input[type=password],.setting-field input[type=number],.setting-field textarea,.setting-field select{width:100%;padding:10px 11px;border:1px solid #cfd7e6;border-radius:8px;background:#fff;font:inherit}.setting-field textarea{min-height:86px}.setting-field .check-row{border:1px solid #e6eaf2;border-radius:9px;padding:11px;background:#fafbfe}.field-errors .errorlist{margin:6px 0 0;padding-right:18px}.settings-save-bar{position:sticky;bottom:12px;background:rgba(245,247,251,.94);backdrop-filter:blur(8px);padding:12px;border-radius:12px;z-index:4}.boundary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.boundary-grid>div{border:1px solid #e8ecf3;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:5px}.boundary-grid span{color:#657087;font-size:13px;line-height:1.55}
