/* Identidad visual compartida · Autoapp / Autobase · 0.ESTILO.md.
   Se aplica al final, después de los CSS de cada módulo.
   No altera los colores semánticos de registros, gráficas ni categorías. */
:root{
  --auto-bg:#F8F7F3;--auto-surface:#FFFFFF;--auto-nav:#252623;
  --auto-text:#2C2D29;--auto-muted:#77736C;--auto-border:#ECE7DF;
  --auto-gold:#C6A465;--auto-gold-soft:#F7F0E1;
  --auto-nav-selected:#3B3B32;--auto-nav-selected-text:#F1D69B;
  --auto-positive:#2A834C;--auto-positive-bg:#E4F5E8;
  --auto-negative:#AE5244;--auto-negative-bg:#F9EAE8;
  --bg:var(--auto-bg);--paper:var(--auto-surface);--card:var(--auto-surface);
  --surface:var(--auto-surface);--white:var(--auto-surface);
  --ink:var(--auto-text);--text:var(--auto-text);--muted:var(--auto-muted);
  --line:var(--auto-border);--dark:var(--auto-nav);--deep:var(--auto-nav);
  --pine:var(--auto-nav);--dark2:var(--auto-nav-selected);
  --lime:#E7C88D;--mint:var(--auto-gold-soft);
  --green:#957849;--accent:#E7C88D;
}
body[data-autoapp-theme]{
  background:var(--auto-bg);color:var(--auto-text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body[data-autoapp-theme] :is(a,button,input,textarea,select,[tabindex]):focus-visible{
  outline:3px solid #C7AB72!important;outline-offset:2px!important;
}
body[data-autoapp-theme] :is(input,textarea,select):focus:not(:focus-visible){
  border-color:#C7AB72!important;
  box-shadow:0 0 0 3px #C7AB7226;
}
body[data-autoapp-theme] :is(input,textarea,select){
  accent-color:var(--auto-gold);
}
body[data-autoapp-theme] :is(.sidebar,.ss-mobile-shell,.mobile-dock){
  background:var(--auto-nav)!important;
}
body[data-autoapp-theme] :is(.sidebar,.ss-mobile-shell) :is(a,button){transition:background-color .16s,color .16s,border-color .16s}
body[data-autoapp-theme] :is(.sidebar,.ss-mobile-shell) :is(.active,[aria-current="page"],[aria-selected="true"]){
  background:var(--auto-nav-selected)!important;
  color:var(--auto-nav-selected-text)!important;
  border-left:2px solid var(--auto-gold)!important;
}
body[data-autoapp-theme] :is(.side-link.active,.nav-link.active,.nav-btn.active){
  background:var(--auto-nav-selected)!important;
  color:var(--auto-nav-selected-text)!important;
  border-left:2px solid var(--auto-gold)!important;
}
body[data-autoapp-theme] :is(.brand-mark,.workspace-icon){
  background:#E7C88D!important;color:#343127!important;
}
body[data-autoapp-theme] :is(.btn-primary,.btn.primary,button.primary,.primary-btn){
  background:#282A25!important;border-color:#282A25!important;color:#FFFFFF!important;
}
body[data-autoapp-theme] :is(.btn-primary,.btn.primary,button.primary,.primary-btn):hover:not(:disabled){
  background:#414237!important;
}
body[data-autoapp-theme] :is(.btn-lime,.btn-gold,.btn-accent){
  background:#E7C88D!important;color:#282A25!important;border-color:#C6A465!important;
}
body[data-autoapp-theme] :is(.cloud-status.error,.error-text,.status-error){
  color:var(--auto-negative);
}
body[data-autoapp-theme] :is(.cloud-status.success,.status-success){
  color:var(--auto-positive);
}
body[data-autoapp-theme] :is(.ss-mobile-shell .ss-mobile-return,.ss-mobile-shell .ss-mobile-wordmark){
  color:#F4F0E7;
}
@media(prefers-reduced-motion:reduce){
  body[data-autoapp-theme] *,body[data-autoapp-theme] *::before,body[data-autoapp-theme] *::after{
    transition-duration:.01ms!important;
  }
}

/* Portada: espacio marfil, tarjetas blancas, carbón y detalles dorados. */
html:has(body.ss-home){--sidebar:246px}
html.sidebar-collapsed:has(body.ss-home) .workspace{--sidebar:78px}
body.ss-home .sidebar{color:#ECE9E1!important}
body.ss-home .brand{letter-spacing:.02em;font-weight:800}
body.ss-home .brand-mark{background:var(--auto-gold-soft)!important;box-shadow:none}
body.ss-home .side-link{color:#D2CEC5;border-radius:9px;font-size:12px}
body.ss-home .side-link:hover,body.ss-home .quick-app:hover{background:#3B3B32;color:#F1D69B}
body.ss-home .side-link.active{background:#3B3B32;color:#F1D69B;border-left:2px solid #C6A465}
body.ss-home .side-icon{background:#3B3B32;color:#E7C88D}
body.ss-home .side-link.active .side-icon{background:#E7C88D;color:#252623}
body.ss-home .side-toggle{background:#3B3B32;border-color:#555349;color:#E7C88D}
body.ss-home .side-toggle:hover{background:#4A493D}
body.ss-home .topbar{padding:30px 37px 24px}
body.ss-home .top-eyebrow,body.ss-home .section-kicker{color:#A1824B}
body.ss-home .topbar p{color:var(--auto-muted)}
body.ss-home h1{font-size:clamp(29px,2.5vw,32px)}
body.ss-home .search{
  background:#FFFFFF;border-color:#E6DFD4;box-shadow:none;border-radius:9px;
}
body.ss-home .search:focus-within{border-color:#C7AB72;box-shadow:0 0 0 3px #C7AB7226}
body.ss-home .search svg{color:#9E8B6D}
body.ss-home .search input::placeholder{color:#9B958B}
body.ss-home .count-pill{
  background:var(--auto-gold-soft);border-color:#E9DBC1;color:#82693B;border-radius:9px;
}
body.ss-home .content{max-width:1460px;padding:0 37px 38px}
body.ss-home .apps-grid{gap:18px}
body.ss-home .app-card{
  background:#FFFFFF;border:1px solid var(--auto-border);border-radius:15px;
  box-shadow:0 3px 14px #25262308;
  transition:transform .17s,border-color .17s,box-shadow .17s;
}
body.ss-home .app-card:hover{
  transform:translateY(-2px);border-color:#D8C49D;box-shadow:0 8px 20px #25262313;
}
body.ss-home .app-card .app-icon{
  background:var(--auto-gold-soft)!important;color:#997848!important;
}
body.ss-home .app-card .app-category{color:#9C7E4B}
body.ss-home .app-card .app-index,body.ss-home .app-card p,body.ss-home .section-note{color:var(--auto-muted)}
body.ss-home .app-card h2{color:var(--auto-text);font-size:21px}
body.ss-home .app-card .preview{
  background:#F8F6F0!important;border-color:var(--auto-border);
}
body.ss-home .app-card .card-bottom{color:#8F7041;border-color:var(--auto-border)}
body.ss-home .app-card .card-bottom span:last-child{
  background:var(--auto-gold-soft);color:#8B713F;
}
body.ss-home .quick-launch{
  background:#FFFFFF;border:1px solid var(--auto-border);border-radius:15px;
  margin:20px 37px 4px;padding:19px 18px 13px;box-shadow:none;
}
body.ss-home .quick-app{transition:transform .16s,background .16s}
body.ss-home .quick-app:hover{background:var(--auto-gold-soft);color:var(--auto-text);transform:translateY(-2px)}
body.ss-home .quick-icon{
  background:linear-gradient(145deg,#FBF7ED,#E9D7B4)!important;
  color:#85693D!important;border-color:#F7F0E1;box-shadow:0 3px 10px #5F4E3510;
}
body.ss-home .quick-name{color:#615B51}
body.ss-home .streak-panel{
  background:#FFFFFF;border-color:var(--auto-border);box-shadow:none;border-radius:15px;
  color:var(--auto-text);
}
body.ss-home .streak-spark,body.ss-home .streak-metric-icon{
  background:var(--auto-gold-soft);color:#967743;border-color:#E8DAC3;
}
body.ss-home .streak-period,body.ss-home .streak-metric{
  background:#FAF8F2;border-color:var(--auto-border);
}
body.ss-home .streak-period button.active,body.ss-home .streak-filters button.active{
  background:var(--auto-gold-soft);color:#765D37;border-color:#DBC59D;
}
body.ss-home .streak-panel .level-0{background:#F1EEE7}
body.ss-home .streak-panel .level-1{background:#F0E4CD}
body.ss-home .streak-panel .level-2{background:#DEC79C}
body.ss-home .streak-panel .level-3{background:#C9A66B}
body.ss-home .streak-panel .level-4{background:#98743C}
body.ss-home .mobile-dock{border-color:#45453C;box-shadow:0 -7px 24px #2526231c}
body.ss-home .mobile-dock a{color:#D2CEC5}
body.ss-home .mobile-dock a:first-child{background:#3B3B32;color:#F1D69B}
body.ss-home .content-footer{color:#908A80}
@media(max-width:760px){
  body.ss-home .topbar{padding:22px 17px 17px}
  body.ss-home .content{padding:0 12px calc(102px + env(safe-area-inset-bottom))}
  body.ss-home .quick-launch{margin:14px 12px 2px;padding:13px 8px 10px}
  body.ss-home .apps-grid{gap:11px}
}

/* Autobase: el editor es un lienzo blanco, no una segunda pantalla de sistema. */
body[data-autoapp-theme="base"] header{
  background:#252623;color:#FFFFFF;border-color:#252623;
}
body[data-autoapp-theme="base"] header .logo{
  background:#E7C88D;color:#252623;
}
body[data-autoapp-theme="base"] header .brand small{color:#C9C4B8}
body[data-autoapp-theme="base"] header .status{
  color:#F1D69B;background:#3B3B32;
}
body[data-autoapp-theme="base"] header .secondary{
  background:#3B3B32;color:#F1D69B;border:1px solid #535247;
}
body[data-autoapp-theme="base"] header .secondary:hover{background:#48483D}
body[data-autoapp-theme="base"] main{max-width:1460px;padding-inline:clamp(16px,3vw,38px)}
body[data-autoapp-theme="base"] .panel{
  border-color:var(--auto-border);border-radius:15px;background:#FFFFFF;
  box-shadow:0 3px 14px #25262308;
}
body[data-autoapp-theme="base"] h1{font-size:30px;letter-spacing:-.045em}
body[data-autoapp-theme="base"] h2{color:var(--auto-text)}
body[data-autoapp-theme="base"] :is(button,.auto-navigation){
  border-radius:9px;font-size:12px;min-height:40px;
}
body[data-autoapp-theme="base"] button:not(.secondary):not(.danger):not(.file):not([data-tab]){
  background:#282A25;color:#FFFFFF;
}
body[data-autoapp-theme="base"] button:not(.secondary):not(.danger):not(.file):not([data-tab]):hover:not(:disabled){
  background:#414237;
}
body[data-autoapp-theme="base"] .secondary{
  background:#FFFFFF;color:#2C2D29;border:1px solid #ECE7DF;
}
body[data-autoapp-theme="base"] .auto-navigation{
  background:#FFFFFF;color:#2C2D29;border-color:#ECE7DF;
}
body[data-autoapp-theme="base"] .auto-navigation:hover{background:#F7F0E1;color:#806439}
body[data-autoapp-theme="base"] .tabs{
  gap:6px;border-bottom:1px solid #ECE7DF;padding-bottom:13px;flex-wrap:wrap;
}
body[data-autoapp-theme="base"] .tabs button{
  color:#77736C;background:transparent;
}
body[data-autoapp-theme="base"] .tabs button.active{
  background:#F7F0E1;color:#82693B;
}
body[data-autoapp-theme="base"] .file{
  color:#423E36;min-height:35px;background:transparent;
}
body[data-autoapp-theme="base"] .file.active{
  background:#F7F0E1;color:#7D6236;border-left:2px solid #C6A465;
}
body[data-autoapp-theme="base"] :is(input,textarea){
  background:#FFFFFF;border:1px solid #E6DFD4;color:#2C2D29;border-radius:9px;
}
body[data-autoapp-theme="base"] .editor textarea{
  background:#FFFFFF;border-color:#ECE7DF;font:16px/1.75 Arial,sans-serif;
}
body[data-autoapp-theme="base"] .muted,body[data-autoapp-theme="base"] small{color:#77736C}
body[data-autoapp-theme="base"] .danger{background:#F9EAE8;color:#AE5244}
body[data-autoapp-theme="base"] .taskrow{border-color:#ECE7DF}
body[data-autoapp-theme="base"] .taskrow.done span{color:#77736C}
body[data-autoapp-theme="base"] .conflict{border-color:#ECE7DF}
