/* Dorothy AI OS — visual recovery layer
   Presentation only: no auth, data, RLS, Realtime or operational logic changes. */

.dot{width:7px;height:7px;border-radius:999px;background:#697381;display:inline-block;flex:0 0 7px}
.dot.ok,.dot.cyan{background:var(--cyan);box-shadow:0 0 10px rgba(0,229,255,.5)}
.dot.warn{background:#FFC75A;box-shadow:0 0 8px rgba(255,199,90,.26)}
.dot.bad{background:var(--danger);box-shadow:0 0 8px rgba(255,69,103,.28)}

.badge,.flowTotal{display:inline-flex;align-items:center;justify-content:center;min-height:26px;border:1px solid #303844;border-radius:999px;padding:4px 9px;color:#97A1AE;background:#10151B;font-size:9px;font-weight:600;white-space:nowrap}
.liveDot{display:inline-flex;align-items:center;gap:6px;color:var(--cyan);font-size:8.5px;font-weight:700;letter-spacing:.08em;white-space:nowrap}
.liveDot:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--cyan);box-shadow:0 0 11px rgba(0,229,255,.65)}
.liveDot svg{display:none}

/* Departments */
.deptList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.deptRow{appearance:none;-webkit-appearance:none;width:100%;min-width:0;border:1px solid #222A34;border-radius:12px;background:linear-gradient(180deg,#0E141A,#0B1015);color:var(--text);padding:13px 14px;display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.6fr);align-items:center;gap:18px;text-align:left;transition:border-color .16s,background .16s,transform .16s,box-shadow .16s}
.deptRow:hover{border-color:#3A4653;background:#10171E;transform:translateY(-1px);box-shadow:0 10px 30px rgba(0,0,0,.16)}
.deptRow:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.deptName{display:flex;align-items:center;gap:11px;min-width:0}
.deptIcon{width:34px;height:34px;border-radius:9px;border:1px solid #29333D;background:linear-gradient(145deg,#171E26,#10151B);color:var(--cyan);display:grid;place-items:center;flex:0 0 34px;box-shadow:inset 0 0 18px rgba(0,229,255,.025)}
.deptName>div{min-width:0}
.deptName b{display:block;color:#F6F8FA;font-size:11.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deptName small{display:block;color:#6F7A87;font-size:8.7px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deptProgress{display:grid;grid-template-columns:minmax(70px,1fr) 38px;align-items:center;gap:10px;min-width:0}
.deptProgress>div{height:6px;background:#202731;border-radius:999px;overflow:hidden}
.deptProgress i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--magenta),var(--cyan));box-shadow:0 0 12px rgba(0,229,255,.12)}
.deptProgress strong{font:600 11px/1 Inter Tight,Inter,sans-serif;color:#D9DEE5;text-align:right}

/* Agent central */
.agentPanel{overflow:hidden}
.agentCore{display:flex;align-items:center;gap:11px;border:1px solid #232B35;background:linear-gradient(180deg,#0D1218,#0A0F14);border-radius:12px;padding:12px;margin-bottom:9px}
.agentAvatar{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 42px;border:1px solid rgba(0,229,255,.24);background:radial-gradient(circle at 25% 20%,rgba(0,229,255,.18),transparent 55%),#111820;color:var(--cyan);font:700 12px Inter Tight,Inter,sans-serif;box-shadow:inset 0 0 18px rgba(0,229,255,.04)}
.agentCore b{display:block;font:600 13px/1.1 Inter Tight,Inter,sans-serif}
.agentCore p{margin:4px 0 0;color:#7D8794;font-size:9px;line-height:1.35}
.agentStats{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:9px}
.agentStats>div{border:1px solid #222A34;background:#0B1015;border-radius:10px;padding:9px 10px}
.agentStats strong{display:block;font:600 17px/1 Inter Tight,Inter,sans-serif;color:#F5F7FA}
.agentStats small{display:block;color:#697481;font-size:8px;margin-top:4px}
.agentRow{display:grid;grid-template-columns:8px minmax(0,1fr);gap:9px;align-items:center;padding:9px 2px;border-top:1px solid #202731}
.agentRow b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agentRow small{display:block;color:#687381;font-size:8px;margin-top:2px}

/* Integrations */
.integrationGrid{align-items:stretch}
.integration{grid-template-columns:38px minmax(0,1fr) auto!important;padding:10px 11px!important;min-height:58px}
.integration>img{width:36px;height:36px;border-radius:9px;background:#F6F8FA;border:1px solid #D8DEE5;display:block;object-fit:contain;padding:7px;box-shadow:0 4px 14px rgba(0,0,0,.14)}
.integration>div{min-width:0}
.integration>div>b{display:block;color:#F2F5F8;font-size:10.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.integration>div>small{display:block;color:#6F7986;font-size:8.3px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.statusPill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 7px;border:1px solid #303943;background:#11171D;color:#8F99A6;font-size:8px;white-space:nowrap}
.statusPill.operational{color:var(--cyan);border-color:rgba(0,229,255,.24);background:rgba(0,229,255,.045)}
.statusPill.attention{color:#FFC75A;border-color:rgba(255,199,90,.24);background:rgba(255,199,90,.04)}
.statusPill.disconnected{color:#FF6D86;border-color:rgba(255,69,103,.26);background:rgba(255,69,103,.045)}
.statusPill.not_configured{color:#7A8592;border-color:#29323C;background:#10151A}

/* Human gates */
.gate{border:1px solid rgba(255,0,127,.18);background:rgba(255,0,127,.025);border-radius:11px;padding:0 10px;margin-bottom:7px;box-shadow:inset 2px 0 0 var(--magenta)}
.gate:last-child{margin-bottom:0}
.gate .line{border-bottom:0;padding:10px 0;display:grid;grid-template-columns:8px minmax(0,1fr);justify-content:stretch;align-items:start;gap:9px}
.gate .line>div{min-width:0}
.gate .line div b{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}
.gate .line div small{line-height:1.35}

/* Telemetry */
.telemetry{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.telemetry>div{border:1px solid #222A34;background:#0B1015;border-radius:12px;padding:12px 13px;min-width:0}
.telemetry h3{font:600 10.5px Inter Tight,Inter,sans-serif;color:#D9DEE5;margin:0 0 6px}
.teleRow{display:grid;grid-template-columns:8px minmax(0,1fr);align-items:center;gap:9px;padding:8px 0;border-top:1px solid #202731}
.teleRow:first-of-type{border-top:0}
.teleRow>div{min-width:0}
.teleRow b{display:block;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.teleRow small{display:block;color:#687381;font-size:8px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Operations */
.taskTable{display:grid;gap:7px}
.taskRow{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;border:1px solid #222A34;background:#0B1015;border-radius:11px;padding:11px 12px}
.taskRow>div{min-width:0}
.taskRow b{display:block;font-size:10.5px;color:#F2F5F8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.taskRow small{display:block;color:#6D7784;font-size:8.5px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stage{display:inline-flex;border:1px solid #303944;border-radius:999px;padding:5px 8px;font-size:8px;color:#8D97A4;white-space:nowrap}
.stage.completed,.stage.done{color:var(--cyan);border-color:rgba(0,229,255,.22)}
.stage.in_progress{color:#7DECF7;border-color:rgba(0,229,255,.2);background:rgba(0,229,255,.035)}
.stage.waiting_ricardo,.stage.awaiting_ricardo{color:#FF6DB7;border-color:rgba(255,0,127,.24);background:rgba(255,0,127,.035)}
.stage.blocked{color:#FF7189;border-color:rgba(255,69,103,.25);background:rgba(255,69,103,.04)}

/* Department detail */
.detailPanel{padding:20px}
.backBtn{appearance:none;border:0;background:transparent;color:#87929F;padding:0 0 13px;font-size:9.5px}
.backBtn:hover{color:#FFF}
.detailPanel .detailHero{margin-bottom:12px}
.detailPanel .detailHero>strong{font:600 34px/1 Inter Tight,Inter,sans-serif;color:#F5F7FA;justify-self:end}
.detailGrid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.detailGrid>div{border:1px solid #222A34;background:#0B1015;border-radius:12px;padding:13px}
.detailGrid h3{font:600 11px Inter Tight,Inter,sans-serif;color:#DDE2E8;margin:0 0 9px}
.criterion{display:grid;grid-template-columns:8px minmax(0,1fr);gap:9px;align-items:start;padding:8px 0;border-top:1px solid #202731}
.criterion:first-of-type{border-top:0}
.criterion>div{min-width:0}
.criterion b{display:block;font-size:9.5px;color:#E4E8ED;white-space:normal;overflow-wrap:anywhere}
.criterion small{display:block;color:#697481;font-size:8px;margin-top:3px}

/* Search + prepared modules */
.searchResults>button{appearance:none;width:100%;display:grid;grid-template-columns:20px minmax(0,1fr) 18px;align-items:center;gap:10px;border:1px solid #222A34;background:#0B1015;color:#FFF;border-radius:10px;padding:10px 11px;text-align:left;margin-top:7px}
.searchResults>button:hover{background:#10171E;border-color:#35414D}
.searchResults>button>div{min-width:0}
.searchResults>button b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.searchResults>button small{display:block;color:#6F7986;font-size:8px;margin-top:2px}
.emptyState{min-height:92px;border:1px dashed #29323C;border-radius:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#6F7A87;text-align:center;padding:18px}
.emptyState svg{color:#64707D}
.emptyState p{margin:0;font-size:9px}
.emptyPage{min-height:320px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:38px 42px;background:radial-gradient(560px 240px at 14% 25%,rgba(0,229,255,.055),transparent 70%),linear-gradient(180deg,#11161C,#0E1318)}
.emptyPage>svg{width:42px;height:42px;padding:10px;border:1px solid rgba(0,229,255,.18);border-radius:12px;background:rgba(0,229,255,.035);color:var(--cyan);margin-bottom:16px}
.emptyPage h2{font:600 24px/1.1 Inter Tight,Inter,sans-serif;margin:8px 0 7px}
.emptyPage p{color:#7C8794;font-size:11px;margin:0;max-width:560px}

/* Executive polish */
.primaryColumn,.railColumn{min-width:0}
.panel{box-shadow:0 10px 28px rgba(0,0,0,.08)}
.panelHead h2{color:#F3F5F8}
.decisionStrip b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flowTotal{font-weight:500;color:#85909D}

/* Scrollbars */
html,*{scrollbar-width:thin;scrollbar-color:#35404C #0B1015}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#0B1015;border-left:1px solid #151C24}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#394653,#2C3540);border:2px solid #0B1015;border-radius:999px}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#4A5A68,#394753)}
::-webkit-scrollbar-corner{background:#0B1015}
.sidebar::-webkit-scrollbar{width:7px}
.sidebar::-webkit-scrollbar-track{background:#0D1218;border-left:0}
.sidebar::-webkit-scrollbar-thumb{background:#2A333D;border:2px solid #0D1218;border-radius:999px}

/* Responsive */
@media(max-width:1280px){
  .deptRow{grid-template-columns:minmax(0,1fr) 130px;gap:12px}
  .integrationGrid.expanded{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1050px){
  .deptList{grid-template-columns:1fr}
  .telemetry{grid-template-columns:1fr}
}
@media(max-width:900px){
  .detailGrid{grid-template-columns:1fr}
  .integrationGrid.expanded{grid-template-columns:1fr}
  .detailPanel .detailHero>strong{justify-self:start}
}
@media(max-width:640px){
  .deptRow{grid-template-columns:1fr;padding:12px;gap:10px}
  .deptProgress{grid-template-columns:minmax(0,1fr) 36px}
  .taskRow{grid-template-columns:1fr}
  .taskRow .stage{justify-self:start}
  .emptyPage{padding:28px 22px;min-height:260px}
}


/* Global readability patch — mirrors the prior 100% zoom legibility standard */
.panelHead h2{font-size:17px;line-height:1.25}
.panelHead small{font-size:11px;line-height:1.45}
.sectionKicker,.eyebrow{font-size:10.5px}
.badge,.flowTotal{font-size:10.5px}
.deptName b{font-size:13px}
.deptName small{font-size:10.5px}
.deptProgress strong{font-size:12px}
.integration>div>b{font-size:12.5px}
.integration>div>small{font-size:10.5px;line-height:1.4}
.statusPill{font-size:9.5px}
.telemetry h3{font-size:12.5px}
.teleRow b{font-size:12px}
.teleRow small{font-size:10.5px;line-height:1.45}
.taskRow b{font-size:12px}
.taskRow small{font-size:10.5px}
.stage{font-size:9.5px}
.gate .line div b{font-size:11.5px}
.gate .line div small{font-size:10.5px}
.searchResults>button b{font-size:12px}
.searchResults>button small{font-size:10.5px}
.emptyState p{font-size:10.5px}
.liveDot{font-size:10px}
