/*
 * Aurora Standards · UI refinement 2026-10-07
 * Visual-only layer. No routes, data, permissions, forms or business logic.
 */

:root{
  --sidebar:240px;
  --topbar:62px;
  --radius:14px;
  --ui-shadow-soft:0 6px 20px rgba(15,31,63,.055);
  --ui-shadow-hover:0 10px 28px rgba(15,31,63,.085);
}

html{font-size:15px}

.app-shell{
  font-size:1rem;
}

/* Top navigation: more compact and quieter */
.topbar{
  gap:14px;
  padding:0 16px;
  border-bottom-color:#e5eaf1;
  box-shadow:0 2px 12px rgba(15,31,63,.035);
}
.topbar .brand-lockup{
  gap:10px;
}
.topbar .brand-lockup img{
  width:38px;
  height:38px;
  border-radius:10px;
}
.topbar .brand-lockup strong{
  font-size:.93rem;
  letter-spacing:.055em;
}
.topbar .brand-lockup span{
  font-size:.68rem;
}
.topbar-context strong{
  font-size:.8rem;
}
.topbar-context small{
  font-size:.7rem;
}
.avatar-button,.icon-btn{
  width:38px;
  height:38px;
}
.icon-btn{
  border-radius:10px;
}

/* Sidebar: denser, clearer hierarchy, easier scanning */
.sidebar{
  padding:12px 10px 18px;
  background:linear-gradient(180deg,#071f46 0%,#0a2958 58%,#10235a 100%);
  border-right:1px solid rgba(255,255,255,.055);
  box-shadow:8px 0 26px rgba(7,31,70,.055);
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar{width:6px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.18);
  border-radius:999px;
}
.workspace-card{
  padding:10px 11px;
  border-radius:12px;
  margin-bottom:12px;
  background:rgba(255,255,255,.065);
  border-color:rgba(255,255,255,.085);
}
.workspace-card strong{
  font-size:.82rem;
  line-height:1.25;
}
.workspace-card span{
  font-size:.69rem;
  line-height:1.35;
}
.sidebar .nav{
  display:flex;
  flex-direction:column;
  gap:1px;
}
.nav-label,
.av-nav-label{
  color:#91a8c8;
  font-size:.59rem;
  line-height:1.2;
  letter-spacing:.105em;
  padding:11px 9px 5px;
  margin-top:2px;
}
.nav-link,
.sidebar .nav>a,
.av-nav-group a{
  min-height:34px;
  display:flex;
  align-items:center;
  gap:8px;
  margin:1px 0;
  padding:8px 9px;
  border-radius:9px;
  color:#d9e7fb;
  font-size:.76rem;
  line-height:1.25;
  font-weight:650;
  transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.nav-link:hover,
.sidebar .nav>a:hover,
.av-nav-group a:hover{
  background:rgba(255,255,255,.075);
  color:#fff;
}
.nav-link.active,
.sidebar .nav>a.active,
.av-nav-group a.active{
  background:rgba(255,255,255,.12);
  color:#fff;
  box-shadow:inset 3px 0 #83e949,0 4px 14px rgba(0,0,0,.06);
}
.nav-icon,
.av-nav-group a>span:first-child{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:rgba(255,255,255,.07);
  color:#cfe2ff;
  font-size:.72rem;
  line-height:1;
}
.nav-link.active .nav-icon,
.sidebar .nav>a.active .nav-icon,
.av-nav-group a.active>span:first-child{
  background:rgba(131,233,73,.14);
  color:#dffff0;
}
.nav-badge{
  padding:2px 6px;
  font-size:.58rem;
}
.av-nav-group{
  gap:1px;
  margin-top:8px;
  padding-top:2px;
  border-top:1px solid rgba(255,255,255,.055);
}
.sidebar-footer{
  margin-top:14px;
  padding:12px 8px;
  font-size:.66rem;
  line-height:1.4;
  color:#91a8c8;
}

/* Main canvas: less oversized typography and tighter rhythm */
.main{
  padding:calc(var(--topbar) + 22px) 22px 34px;
}
.page-head{
  gap:14px;
  margin-bottom:17px;
}
.eyebrow{
  font-size:.62rem;
  letter-spacing:.1em;
}
.page-head h1{
  margin:4px 0 5px;
  font-size:clamp(1.45rem,2.3vw,2.05rem);
  line-height:1.12;
}
.page-head p{
  max-width:880px;
  font-size:.85rem;
  line-height:1.5;
}
.pilot-banner{
  gap:9px;
  padding:10px 13px;
  margin-bottom:16px;
  border-radius:12px;
  font-size:.81rem;
}

/* Cards and modules: cleaner density without removing information */
.grid{gap:14px}
.card{
  padding:16px;
  border-radius:14px;
  box-shadow:var(--ui-shadow-soft);
}
.card:hover{
  box-shadow:var(--ui-shadow-hover);
}
.card h2{
  font-size:1.04rem;
  margin-bottom:11px;
}
.card h3{
  font-size:.96rem;
  margin-bottom:10px;
}
.card-header{
  gap:10px;
  margin-bottom:12px;
}
.card-header p{
  font-size:.78rem;
}
.metric-label{
  font-size:.73rem;
}
.metric-value{
  margin:6px 0;
  font-size:1.7rem;
}
.metric-foot{
  font-size:.71rem;
}
.quick-action{
  gap:11px;
  padding:12px;
  border-radius:12px;
  margin:8px 0;
}
.quick-action-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  font-size:1rem;
}
.quick-action span{
  font-size:.75rem;
}
.module-grid{
  gap:12px;
}
.module-card{
  min-height:250px;
  padding:15px;
  border-radius:15px;
  box-shadow:var(--ui-shadow-soft);
}
.module-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--ui-shadow-hover);
}
.module-glyph{
  width:36px;
  height:36px;
  border-radius:10px;
}
.module-card h3{
  margin:12px 0 4px;
  font-size:.94rem;
}
.module-category{
  font-size:.62rem;
}
.module-card p{
  font-size:.76rem;
  line-height:1.48;
}
.capability-tags{
  gap:5px;
}
.capability-tags span{
  padding:4px 6px;
  font-size:.59rem;
}
.module-open{
  margin-top:11px;
  font-size:.73rem;
}
.template-grid{
  gap:11px;
}
.template-card{
  grid-template-columns:46px 1fr auto;
  gap:12px;
  padding:14px;
  border-radius:14px;
}
.template-icon{
  width:44px;
  height:44px;
  border-radius:11px;
  font-size:1.15rem;
}
.template-copy h3{
  font-size:.92rem;
}
.template-copy p{
  font-size:.73rem;
}
.template-copy small{
  font-size:.65rem;
}

/* Tables and forms: more information visible without feeling cramped */
.table-wrap{
  border-radius:11px;
}
.data-table th{
  padding:9px 10px;
  font-size:.65rem;
  letter-spacing:.05em;
}
.data-table td{
  padding:10px;
  font-size:.79rem;
}
.mono{
  font-size:.74rem;
}
.badge{
  padding:4px 7px;
  font-size:.64rem;
}
.filter-bar{
  gap:8px;
  margin-bottom:12px;
}
.filter-bar .input{
  min-width:170px;
}
.field{
  gap:6px;
  margin:13px 0;
}
.field label,.field-label{
  font-size:.77rem;
}
.field input,.field select,.field textarea,.input{
  padding:10px 11px;
  border-radius:10px;
  font-size:.84rem;
}
.field small,.help{
  font-size:.72rem;
}
.btn{
  min-height:36px;
  padding:9px 12px;
  border-radius:10px;
  gap:6px;
  font-size:.79rem;
  font-weight:750;
}
.form-section{
  padding:18px;
}
.section-title{
  margin-bottom:13px;
}
.section-title h2{
  font-size:.96rem;
}
.section-number{
  width:25px;
  height:25px;
  border-radius:7px;
  font-size:.75rem;
}
.sticky-actions{
  padding:11px 18px;
}
.modal{
  padding:20px;
  border-radius:18px;
}
.modal-head h2{
  font-size:1.1rem;
}
.close-btn{
  width:34px;
  height:34px;
}

/* Aurora visible modules: align with the refined core UI */
.av-home-banner{
  margin-bottom:14px;
  padding:14px 16px;
  border-radius:14px;
  gap:14px;
  box-shadow:0 10px 26px rgba(7,31,70,.11);
}
.av-home-banner span,.av-kicker{
  font-size:.64rem;
  letter-spacing:.1em;
}
.av-home-banner strong{
  font-size:1rem;
  margin:4px 0;
}
.av-home-banner p{
  font-size:.79rem;
  line-height:1.45;
}
.av-page{
  gap:14px;
}
.av-hero{
  padding:22px;
  border-radius:17px;
  gap:18px;
  box-shadow:0 13px 34px rgba(7,31,70,.14);
}
.av-hero h1{
  margin:6px 0 8px;
  font-size:clamp(1.5rem,2.55vw,2.35rem);
}
.av-hero p{
  font-size:.87rem;
  line-height:1.5;
}
.av-actions{
  margin-top:14px;
}
.av-release{
  width:128px;
  height:128px;
}
.av-release strong{
  font-size:1.2rem;
}
.av-section{
  padding:17px;
  border-radius:15px;
}
.av-section-head{
  margin-bottom:12px;
}
.av-section-head h2{
  font-size:1.05rem;
}
.av-count{
  padding:5px 8px;
  font-size:.7rem;
}
.av-grid{
  gap:11px;
}
.av-card{
  padding:14px;
  border-radius:13px;
}
.av-card h3{
  margin:8px 0 6px;
  font-size:.94rem;
}
.av-card p{
  margin-bottom:11px;
  font-size:.77rem;
  line-height:1.48;
}
.av-card a{
  font-size:.76rem;
}
.av-status{
  font-size:.63rem;
}
.av-file-grid{
  gap:8px;
}
.av-file{
  padding:10px;
  border-radius:10px;
}
.av-file strong{
  font-size:.8rem;
}
.av-file small,.av-note{
  font-size:.72rem;
}

/* Large landing components */
.aurora-hero{
  gap:22px;
  margin-bottom:16px;
  padding:24px;
  border-radius:20px;
}
.aurora-hero h2{
  font-size:clamp(1.45rem,2.55vw,2.25rem);
}
.aurora-hero p{
  font-size:.84rem;
  line-height:1.52;
}
.suite-overview{
  gap:18px;
  margin-bottom:14px;
  padding:18px;
  border-radius:17px;
}
.suite-overview h2{
  font-size:clamp(1.2rem,2.25vw,1.8rem);
}
.suite-overview p{
  font-size:.82rem;
}
.suite-score{
  min-width:125px;
  padding:16px;
  border-radius:16px;
}
.suite-score strong{
  font-size:2.4rem;
}

/* Keyboard accessibility remains visible after the visual tightening */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:2px solid #6366f1;
  outline-offset:2px;
}

/* Tablet and mobile keep the existing behavior, only refine density */
@media(max-width:1050px){
  :root{--sidebar:242px}
}
@media(max-width:820px){
  :root{--topbar:60px}
  .app-shell{font-size:15px}
  .sidebar{
    width:min(292px,88vw);
    padding:11px 9px 18px;
  }
  .main{
    padding:calc(var(--topbar) + 16px) 13px 84px;
  }
  .page-head{
    margin-bottom:14px;
  }
  .bottom-nav{
    padding-top:5px;
  }
  .bottom-nav a{
    font-size:.58rem;
    padding:4px 2px;
  }
  .av-home-banner{
    padding:13px;
  }
  .av-hero{
    padding:18px;
  }
  .av-section{
    padding:14px;
  }
}
@media(max-width:520px){
  .topbar{
    padding:0 10px;
    gap:8px;
  }
  .topbar .brand-lockup strong{
    font-size:.8rem;
  }
  .avatar-button,.icon-btn{
    width:36px;
    height:36px;
  }
  .card{
    padding:14px;
  }
  .form-section{
    padding:15px 13px;
  }
  .main{
    padding-left:10px;
    padding-right:10px;
  }
  .page-head h1{
    font-size:1.38rem;
  }
}

@media(prefers-reduced-motion:reduce){
  .nav-link,
  .sidebar .nav>a,
  .av-nav-group a,
  .module-card,
  .btn{
    transition:none!important;
  }
}


/* v42 - production-priority refinements */
.global-search{
  min-height:38px;
  border-radius:10px;
}
.global-search input{
  font-size:.78rem;
}
.global-search button{
  font-size:.72rem;
  padding-left:10px;
  padding-right:10px;
}
.sidebar .nav-link{
  letter-spacing:-.005em;
}
.sidebar .nav-link>span:nth-child(2){
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebar .nav-link.active{
  background:linear-gradient(90deg,rgba(131,233,73,.14),rgba(255,255,255,.09));
}
.sidebar .nav-label{
  opacity:.9;
}
.main>.page-head:first-child,
.main>.av-page:first-child{
  scroll-margin-top:calc(var(--topbar) + 10px);
}
@media(max-width:820px){
  html{font-size:15px}
}


/* AURORA_UI_V43_DESIGN_SYSTEM
   Global visual refinement only. No routes, data or application logic.
*/
:root{
  --ui-canvas:#f4f7fb;
  --ui-canvas-2:#f8fafc;
  --ui-card:#ffffff;
  --ui-card-soft:#fbfcfe;
  --ui-border:#dbe4ef;
  --ui-border-strong:#cad6e5;
  --ui-text:#18283f;
  --ui-muted:#69778b;
  --ui-navy:#0b2c57;
  --ui-indigo:#5b4cf0;
  --ui-violet:#7336df;
  --ui-green:#83e949;
  --ui-shadow-card:0 12px 34px rgba(24,40,63,.065);
  --ui-shadow-float:0 16px 42px rgba(24,40,63,.10);
}

body{
  background:var(--ui-canvas);
  color:var(--ui-text);
}
.app-shell{
  background:
    radial-gradient(circle at 92% 6%,rgba(91,76,240,.055),transparent 22rem),
    linear-gradient(180deg,var(--ui-canvas-2) 0%,var(--ui-canvas) 100%);
}

/* Header: more deliberate product chrome */
.topbar{
  background:rgba(255,255,255,.965);
  border-bottom:1px solid rgba(202,214,229,.88);
  box-shadow:0 5px 24px rgba(22,42,74,.055);
}
.topbar .brand-lockup strong{
  color:var(--ui-navy);
  font-weight:900;
}
.global-search{
  background:#f8fafc;
  border:1px solid #d7e0ec;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.global-search:focus-within{
  background:#fff;
  border-color:#a7a7ff;
  box-shadow:0 0 0 4px rgba(91,76,240,.09),0 6px 18px rgba(35,44,92,.06);
}
.global-search input{
  color:#26364c;
  font-weight:550;
}
.global-search input::placeholder{
  color:#8b97a7;
}
.global-search button{
  border-radius:8px;
  background:linear-gradient(135deg,#eeecff,#e7e4ff);
  color:#362b96;
  font-weight:850;
}
.topbar-context{
  max-width:360px;
  padding:7px 10px 7px 12px;
  border:1px solid #e0e7f0;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#f9fbfd);
}
.topbar-context strong{
  color:#1b2b43;
  line-height:1.24;
}
.avatar-button{
  box-shadow:0 5px 14px rgba(54,43,150,.18);
}

/* Sidebar: stronger product identity without changing navigation */
.sidebar{
  background:
    radial-gradient(circle at 10% 0%,rgba(76,112,188,.20),transparent 16rem),
    linear-gradient(180deg,#061d42 0%,#082753 52%,#102356 100%);
}
.workspace-card{
  position:relative;
  overflow:hidden;
  background:linear-gradient(145deg,rgba(255,255,255,.105),rgba(255,255,255,.052));
  border:1px solid rgba(190,214,249,.13);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 9px 24px rgba(0,0,0,.08);
}
.workspace-card::after{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  background:linear-gradient(180deg,var(--ui-green),#4fb5ff);
}
.workspace-card strong{
  padding-left:3px;
  letter-spacing:-.01em;
}
.nav-link,
.sidebar .nav>a,
.av-nav-group a{
  border:1px solid transparent;
}
.nav-link:hover,
.sidebar .nav>a:hover,
.av-nav-group a:hover{
  border-color:rgba(255,255,255,.055);
  background:rgba(255,255,255,.07);
}
.nav-link.active,
.sidebar .nav>a.active,
.av-nav-group a.active{
  border-color:rgba(184,218,255,.10);
  background:linear-gradient(90deg,rgba(131,233,73,.12),rgba(255,255,255,.105));
  box-shadow:inset 3px 0 var(--ui-green),0 7px 18px rgba(0,0,0,.10);
}
.nav-link.active .nav-icon,
.sidebar .nav>a.active .nav-icon,
.av-nav-group a.active>span:first-child{
  box-shadow:0 0 0 1px rgba(131,233,73,.12);
}

/* Canvas + sections */
.main{
  background:
    radial-gradient(circle at 96% 0%,rgba(115,54,223,.045),transparent 23rem),
    linear-gradient(180deg,#f7f9fc 0%,#f3f6fa 100%);
}
.page-head{
  position:relative;
  padding-bottom:12px;
  border-bottom:1px solid rgba(215,224,236,.72);
}
.page-head h1{
  color:var(--ui-navy);
  letter-spacing:-.025em;
}
.page-head p{
  color:var(--ui-muted);
}
.eyebrow{
  color:#5b4cf0;
}
.card{
  border-color:var(--ui-border);
  background:linear-gradient(180deg,#fff 0%,#fff 80%,#fbfcfe 100%);
  box-shadow:var(--ui-shadow-card);
}
.card:hover{
  border-color:#d1ddeb;
  box-shadow:var(--ui-shadow-float);
}
.main>.card{
  border-color:#d7e1ed;
  box-shadow:0 14px 38px rgba(17,38,70,.072);
}
.card-header{
  padding-bottom:10px;
  border-bottom:1px solid #edf1f5;
}
.card-header h2,.card-header h3{
  letter-spacing:-.015em;
}

/* Tables: turn flat spreadsheets into professional operational surfaces */
.table-wrap{
  padding:0 10px 10px;
  border:1px solid #d7e1ec;
  border-radius:16px;
  background:linear-gradient(180deg,#f7f9fc 0%,#f4f7fb 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.data-table{
  border-collapse:separate;
  border-spacing:0 7px;
  background:transparent;
}
.data-table thead th{
  background:transparent;
  border-bottom:0;
  padding:13px 14px 7px;
  color:#43536b;
  font-size:.64rem;
  font-weight:900;
  letter-spacing:.075em;
}
.data-table tbody td{
  position:relative;
  padding:12px 14px;
  background:#fff;
  border-top:1px solid #e3eaf2;
  border-bottom:1px solid #e3eaf2;
  color:#33445b;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.data-table tbody td:first-child{
  border-left:1px solid #e3eaf2;
  border-radius:12px 0 0 12px;
}
.data-table tbody td:last-child{
  border-right:1px solid #e3eaf2;
  border-radius:0 12px 12px 0;
}
.data-table tbody tr:hover td{
  background:#fbfcff;
  border-color:#cfd9ea;
  box-shadow:0 5px 15px rgba(25,47,82,.045);
}
.data-table tbody tr:hover td:first-child{
  box-shadow:inset 3px 0 #7367f4,0 5px 15px rgba(25,47,82,.045);
}
.data-table td strong{
  color:#34445b;
  font-weight:780;
}
.data-table td small{
  display:inline-block;
  margin-top:3px;
  color:#7b8798;
  font-size:.7rem;
  line-height:1.35;
}
.data-table .mono,
.data-table a.mono,
.data-table .link-button.mono{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:4px 7px;
  border:1px solid #dddafa;
  border-radius:7px;
  background:#f6f4ff;
  color:#4736bd;
  font-weight:850;
  letter-spacing:.015em;
  text-decoration:none;
}
.data-table a.link-button:not(.mono){
  color:#4c3ed0;
  font-weight:800;
}
.data-table td:last-child .button-row{
  gap:6px;
}
.data-table td:last-child .btn{
  min-width:68px;
  min-height:32px;
  padding:7px 10px;
  border-radius:9px;
  font-size:.72rem;
}

/* Buttons: more refined and less visually heavy */
.btn{
  box-shadow:none;
  letter-spacing:-.005em;
}
.btn-primary{
  background:linear-gradient(135deg,#6250ee 0%,#7336df 100%);
  box-shadow:0 7px 17px rgba(91,76,240,.18);
}
.btn-primary:hover{
  box-shadow:0 10px 22px rgba(91,76,240,.24);
}
.btn-light{
  border-color:#d6dfeb;
  background:linear-gradient(180deg,#fff,#fafbfd);
  color:#273850;
}
.btn-light:hover{
  border-color:#bdcadd;
  background:#fff;
}
.link-button{
  text-decoration:none;
}

/* Forms / operational panels */
.field input,.field select,.field textarea,.input{
  border-color:#d5deea;
  background:#fbfcfe;
}
.field input:hover,.field select:hover,.field textarea:hover,.input:hover{
  border-color:#c3cfdf;
}
.field input:focus,.field select:focus,.field textarea:focus,.input:focus{
  background:#fff;
  border-color:#8e83ef;
  box-shadow:0 0 0 4px rgba(91,76,240,.09);
}
.form-section{
  background:linear-gradient(180deg,#fff,#fcfdff);
}
.section-number{
  background:linear-gradient(135deg,#efedff,#e7e4ff);
  color:#4436b9;
  box-shadow:inset 0 0 0 1px rgba(91,76,240,.08);
}
.quick-action{
  border-color:#dce4ef;
  background:linear-gradient(135deg,#fff,#f8faff);
}
.quick-action:hover{
  border-color:#cbd8e8;
  box-shadow:0 8px 20px rgba(20,44,78,.055);
}

/* Statuses */
.badge{
  border:1px solid transparent;
  letter-spacing:.015em;
}
.badge-draft{border-color:#dde3ea}
.badge-completed{border-color:#bde7cd}
.badge-deviation,.badge-open{border-color:#f4d79b}
.badge-closed{border-color:#bde7cd}

/* Desktop planilla/list pages benefit from a stronger access column */
@media(min-width:821px){
  .data-table td:last-child{
    min-width:92px;
  }
  .data-table td:last-child>.btn,
  .data-table td:last-child>a.btn{
    display:flex;
    width:100%;
    margin:0 0 6px;
  }
  .data-table td:last-child>.btn:last-child,
  .data-table td:last-child>a.btn:last-child{
    margin-bottom:0;
  }
}

/* Mobile keeps the richer treatment without horizontal pressure */
@media(max-width:820px){
  .topbar-context{
    padding:0;
    border:0;
    background:transparent;
  }
  .page-head{
    padding-bottom:9px;
  }
  .table-wrap{
    padding:0;
    border-radius:13px;
  }
  .data-table{
    border-spacing:0 5px;
  }
}
