/* Coffee Rush STA v10.5.1 · integración real del mockup aprobado
   Objetivo: reproducir la composición simple/elegante manteniendo los datos didácticos en HTML. */
:root{
  --v1051-navy:#123557;
  --v1051-blue:#0768ab;
  --v1051-soft:#f3f7fa;
  --v1051-line:#d9e5ee;
  --v1051-text:#183654;
  --v1051-muted:#63788c;
  --v1051-yellow:#f5c400;
}
body[data-interface-phase="planning"]{background:#f0f5f8;color:var(--v1051-text)}
body[data-interface-phase="planning"] .workspace{max-width:1480px;padding:10px 14px 26px}
body[data-interface-phase="planning"] .appbar{
  grid-template-columns:minmax(285px,.95fr) auto minmax(350px,.92fr);
  padding:9px 16px;gap:14px;border-bottom:1px solid #dbe5ec;
  box-shadow:0 4px 16px rgba(22,53,84,.055)
}
body[data-interface-phase="planning"] .brand-block{gap:9px}
body[data-interface-phase="planning"] .brand-block .sta-brand-logo-img{width:52px;height:52px;padding:0;border:0;background:transparent}
body[data-interface-phase="planning"] .brand-block>div{display:block}
body[data-interface-phase="planning"] .brand-block>div strong{display:block;font-size:20px;letter-spacing:-.25px;color:#123557}
body[data-interface-phase="planning"] .brand-block>div>span{display:block;margin-top:2px;font-size:11px;color:#62798e}
body[data-interface-phase="planning"] .brand-wayoflife{display:none}
body[data-interface-phase="planning"] .app-status{gap:7px}
body[data-interface-phase="planning"] .app-status>div{min-width:86px;padding:7px 10px;border-radius:12px;background:#f8fbfd;border:1px solid #dae5ed;box-shadow:none}
body[data-interface-phase="planning"] .app-status span{font-size:8.5px;letter-spacing:.05em;color:#6d8093}
body[data-interface-phase="planning"] .app-status strong{font-size:14px;color:#152f4c}
body[data-interface-phase="planning"] .app-tools{gap:8px;justify-content:flex-end}
body[data-interface-phase="planning"] .platform-session-chip{min-width:252px;padding:0;border:1px solid #dbe6ed;border-radius:13px;background:#f8fbfd;overflow:hidden}
body[data-interface-phase="planning"] .platform-session-chip>div{display:grid;gap:1px;align-content:center;min-width:0;padding:7px 11px}
body[data-interface-phase="planning"] .platform-session-chip strong{font-size:12px;line-height:1.2;color:#173757;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-interface-phase="planning"] .platform-session-chip span{font-size:9.5px;line-height:1.2;color:#647b90;white-space:nowrap}
body[data-interface-phase="planning"] .platform-session-chip .platform-logout{align-self:stretch;padding:0 15px;border-left:1px solid #e1e9ef;border-radius:0;background:#edf4f8;color:#254866}
body[data-interface-phase="planning"] .tool-menu>summary{min-height:43px;padding:0 15px;border-radius:12px;background:#fff;border:1px solid #dbe5ed;color:#193857;font-size:12px;font-weight:800}

body[data-interface-phase="planning"] .v105-heading{margin:6px 0 8px;padding:0 2px}
body[data-interface-phase="planning"] .v105-heading h1{font-size:25px;line-height:1.05;color:#143452}
body[data-interface-phase="planning"] .v105-heading p{font-size:11px;line-height:1.35;color:#61778b}
body[data-interface-phase="planning"] .v105-heading .section-kicker{font-size:9px;color:#0864a4}
body[data-interface-phase="planning"] .v105-heading .team-pill{display:flex;gap:7px}
body[data-interface-phase="planning"] .v105-heading .team-pill span,
body[data-interface-phase="planning"] .v105-heading .team-pill strong{background:#fff;border:1px solid #dbe5ed;border-radius:999px;padding:6px 10px;font-size:10px}
body[data-interface-phase="planning"] .v105-heading .team-pill strong{color:#0765a5;background:#edf6fb}

body[data-interface-phase="planning"] .v105-learning-flow{height:39px;margin:0 0 9px;padding:3px;border-radius:12px;border-color:#d9e4ec;gap:0;overflow:hidden}
body[data-interface-phase="planning"] .v105-learning-flow span{display:flex;align-items:center;justify-content:center;padding:0 8px;border-radius:9px;font-size:9.5px;color:#7a8998;background:#fff}
body[data-interface-phase="planning"] .v105-learning-flow span.active{background:#0868aa;color:#fff;box-shadow:none}

body[data-interface-phase="planning"] .v105-planning-grid{
  grid-template-columns:minmax(325px,355px) minmax(520px,1fr) minmax(325px,355px);
  gap:12px;align-items:start
}
body[data-interface-phase="planning"] .v105-left-rail,
body[data-interface-phase="planning"] .v105-right-rail{gap:10px}
body[data-interface-phase="planning"] .v105-briefing,
body[data-interface-phase="planning"] .v105-decisions-panel,
body[data-interface-phase="planning"] .v105-scene-panel,
body[data-interface-phase="planning"] .v105-right-rail .plan-summary,
body[data-interface-phase="planning"] .v105-purchases-panel{
  border:1px solid var(--v1051-line);border-radius:15px;background:#fff;
  box-shadow:0 5px 18px rgba(19,52,82,.045)
}
body[data-interface-phase="planning"] .v105-briefing,
body[data-interface-phase="planning"] .v105-decisions-panel,
body[data-interface-phase="planning"] .v105-right-rail .plan-summary,
body[data-interface-phase="planning"] .v105-purchases-panel{padding:12px}

/* Contexto: legible y sin truncar la información clave */
body[data-interface-phase="planning"] .v105-briefing .briefing-title h2,
body[data-interface-phase="planning"] .v105-decisions-panel h2,
body[data-interface-phase="planning"] .v105-right-rail .plan-summary h2,
body[data-interface-phase="planning"] .v105-purchases-panel h2{font-size:15px;color:#153653}
body[data-interface-phase="planning"] .v105-briefing .compact-scenario-grid{gap:7px}
body[data-interface-phase="planning"] .v105-briefing .scenario-box{min-height:90px;padding:9px;grid-template-columns:30px 1fr;gap:7px;border-radius:11px;background:#fbfdfe}
body[data-interface-phase="planning"] .v105-briefing .scenario-box .brief-icon{width:29px;height:29px;border-radius:9px}
body[data-interface-phase="planning"] .v105-briefing .scenario-box small{font-size:8.5px}
body[data-interface-phase="planning"] .v105-briefing .scenario-box strong{display:block;font-size:11px;line-height:1.22;white-space:normal;overflow:visible;text-overflow:clip}
body[data-interface-phase="planning"] .v105-briefing .scenario-box p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:3px;font-size:9px;line-height:1.25;color:#637a8e}

/* Decisiones: números y sliders predominan sobre microtexto */
body[data-interface-phase="planning"] .v105-decisions-panel .section-heading-row{align-items:end;margin-bottom:8px}
body[data-interface-phase="planning"] .v105-decisions-panel .section-heading-row p{max-width:140px;font-size:9px;line-height:1.25;text-align:right;color:#6c8194}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-grid{gap:7px}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-card{grid-template-columns:46px 1fr;min-height:76px;padding:9px 11px;border:1px solid #e2eaf0;border-radius:12px;background:#fff}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-title .decision-icon-badge{width:38px;height:38px}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-title>span:not(.decision-icon-badge){font-size:8px;color:#6c8092}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-title strong{font-size:12px;color:#153653}
body[data-interface-phase="planning"] .v105-decisions-panel .compact-field select{min-height:36px;font-size:11px;background:#fbfdfe}
body[data-interface-phase="planning"] .v105-decisions-panel input[type=range]{height:24px}
body[data-interface-phase="planning"] .v105-decisions-panel .scale{font-size:9px;color:#718496}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-help{font-size:9px;line-height:1.28;color:#667d91}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-impact span{font-size:8.5px;padding:3px 5px}

/* Escena: usa la ilustración del mockup aprobado, no un SVG reconstruido. */
body[data-interface-phase="planning"] .v105-scene-panel{overflow:hidden;background:#fff}
body[data-interface-phase="planning"] .v105-scene-stage{aspect-ratio:626/594;min-height:0;background:#f6eee3}
body[data-interface-phase="planning"] .v105-scene-art{width:100%;height:100%;object-fit:cover;object-position:center;image-rendering:auto}
/* Branding real superpuesto de forma secundaria. */
body[data-interface-phase="planning"] .v105-scene-ista{left:15.5%;top:63%;width:8.5%;max-width:58px;padding:3px;border-radius:50%;background:#0a5f9e;box-shadow:0 2px 8px rgba(10,42,70,.16)}
body[data-interface-phase="planning"] .v105-scene-way{left:auto;right:3.8%;top:25.5%;width:25%;max-width:170px;padding:3px 7px;border-radius:8px;background:rgba(226,241,247,.84);backdrop-filter:blur(2px)}
body[data-interface-phase="planning"] .v105-scene-caption{left:12px;right:12px;bottom:10px;padding:7px 10px;border-radius:10px;background:rgba(15,55,89,.93)}
body[data-interface-phase="planning"] .v105-scene-caption strong{font-size:11px}
body[data-interface-phase="planning"] .v105-scene-caption span{font-size:9px}
body[data-interface-phase="planning"] .v105-market-strip{background:#fff}
body[data-interface-phase="planning"] .v105-market-strip .market-pill{min-height:59px;padding:9px 10px}
body[data-interface-phase="planning"] .v105-market-strip .market-pill>span{font-size:7.8px;color:#72869a}
body[data-interface-phase="planning"] .v105-market-strip .market-pill strong{font-size:10px;color:#1a3a57}

/* Plan financiero: lectura vertical inequívoca */
body[data-interface-phase="planning"] .v105-right-rail .plan-summary>div:first-child p{font-size:9.5px;color:#6a8093}
body[data-interface-phase="planning"] .v105-right-rail .plan-ledger{margin:8px 0}
body[data-interface-phase="planning"] .v105-right-rail .plan-ledger>div{min-height:31px;padding:6px 2px;border-bottom:1px solid #edf1f4}
body[data-interface-phase="planning"] .v105-right-rail .plan-ledger dt{font-size:9.5px;color:#62798d}
body[data-interface-phase="planning"] .v105-right-rail .plan-ledger dd{font-size:11px;color:#153553}
body[data-interface-phase="planning"] .v105-right-rail .plan-ledger .ledger-emphasis{margin-top:3px;padding:8px;border-radius:9px;background:#f1f6f9;border-bottom:0}
body[data-interface-phase="planning"] .v105-right-rail .plan-warning{font-size:9.5px;line-height:1.3}
body[data-interface-phase="planning"] .v105-right-rail .open-btn{min-height:48px;border-radius:10px;background:#0768ab;font-size:14px}

/* Inventario: exactamente cuatro existencias + cuatro compras manipulables. */
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-grid{gap:6px}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card{min-height:72px;padding:8px;border-radius:10px;background:#fbfdfe}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card .name{font-size:8.5px}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card .amount{font-size:12px}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card .note{font-size:8px;line-height:1.2}
body[data-interface-phase="planning"] .v105-purchases-panel .purchase-grid{gap:6px}
body[data-interface-phase="planning"] .v105-purchases-panel .purchase-row{grid-template-columns:66px 1fr 57px;min-height:48px;padding:6px 7px;background:#fbfdfe}

/* Navegación de Jugar / Empresa / Informe: disponible sin competir con los datos. */
body[data-interface-phase="planning"] .primary-nav{display:flex;position:static;max-width:470px;margin:12px auto 0;padding:3px;border:1px solid #dce6ed;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(20,52,80,.04)}
body[data-interface-phase="planning"] .primary-nav .nav-tab{min-height:36px;padding:0 16px;border-radius:10px;font-size:11px}

/* Firma institucional discreta. */
body[data-interface-phase="planning"] .workspace::after{
  content:"STA International School  ·  Coffee Rush STA  ·  #WayofLife";
  display:block;margin:11px auto 0;text-align:center;color:#8495a5;font-size:9px;font-weight:700;letter-spacing:.01em
}

@media(max-width:1320px){
  body[data-interface-phase="planning"] .v105-planning-grid{grid-template-columns:315px minmax(470px,1fr) 315px;gap:9px}
  body[data-interface-phase="planning"] .appbar{grid-template-columns:270px auto 1fr}
  body[data-interface-phase="planning"] .platform-session-chip{min-width:218px}
  body[data-interface-phase="planning"] .v105-briefing .scenario-box{min-height:84px}
}
@media(max-width:1120px){
  body[data-interface-phase="planning"] .v105-planning-grid{grid-template-columns:1fr 1.45fr}
  body[data-interface-phase="planning"] .v105-right-rail{grid-column:1/-1;grid-template-columns:1fr 1fr}
  body[data-interface-phase="planning"] .v105-left-rail{grid-template-columns:1fr}
}
@media(max-width:820px){
  body[data-interface-phase="planning"] .appbar{grid-template-columns:1fr;position:static}
  body[data-interface-phase="planning"] .app-status{justify-content:stretch}
  body[data-interface-phase="planning"] .app-tools{justify-content:stretch}
  body[data-interface-phase="planning"] .platform-session-chip{flex:1}
  body[data-interface-phase="planning"] .v105-planning-grid{grid-template-columns:1fr}
  body[data-interface-phase="planning"] .v105-right-rail{grid-column:auto;grid-template-columns:1fr}
  body[data-interface-phase="planning"] .v105-scene-panel{order:0}
  body[data-interface-phase="planning"] .v105-learning-flow{overflow-x:auto}
  body[data-interface-phase="planning"] .v105-learning-flow span{min-width:110px}
}
