@import url("./app.css");
@import url("./corporate.css");

/* OS Repair Design System 2026
   Única entrada visual. Los imports mantienen compatibilidad mientras las
   vistas heredadas se migran hacia estos componentes. */
:root{
  --os-font:"Poppins","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --os-navy-950:#0a1220;--os-navy-900:#00489a;--os-navy-800:#0057ad;
  --os-blue-600:#0062c7;--os-blue-50:#edf5ff;--os-teal-500:#168a7b;
  --os-bg:#f5f7fb;--os-surface:#fff;--os-surface-soft:#f8faff;
  --os-text:#172334;--os-muted:#66758a;--os-line:#dfe6f1;
  --os-on-brand:#eef3f8;--os-on-brand-muted:#c7d2df;
  --os-success:#087f5b;--os-warning:#a15c08;--os-danger:#b4233c;
  --corp-navy:#00489a;--corp-navy-2:#0a1220;--corp-blue:#0062c7;
  --corp-teal:#168a7b;--corp-bg:#f5f7fb;--corp-line:#dfe6f1;
  --font-sans:"Poppins","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --os-space-1:4px;--os-space-2:8px;--os-space-3:12px;--os-space-4:16px;
  --os-space-5:20px;--os-space-6:24px;--os-space-8:32px;--os-space-10:40px;
  --os-radius-sm:8px;--os-radius-md:12px;--os-radius-lg:16px;--os-radius-xl:22px;
  --os-shadow-sm:0 1px 2px rgba(16,42,67,.05);
  --os-shadow-md:0 10px 30px rgba(16,42,67,.08);
  --os-touch:44px;
}
html{font-size:16px;scroll-behavior:smooth}
body,button,input,select,textarea{font-family:var(--os-font)!important}
body{background:var(--os-bg);color:var(--os-text);font-size:.94rem;line-height:1.5}
h1,h2,h3,h4{color:var(--os-text);font-weight:750;letter-spacing:-.035em}
p{line-height:1.65}.muted{color:var(--os-muted)!important}
.page-stack{gap:var(--os-space-5)}
.content-shell{max-width:1420px}
.card,.microcard,.stat-card,.operations-kpi,.admin-kpi,.module-card{
  border:1px solid var(--os-line)!important;border-radius:var(--os-radius-lg)!important;
  background:var(--os-surface);box-shadow:var(--os-shadow-sm)!important
}
.card{padding:var(--os-space-6)}
.microcard{padding:var(--os-space-5)}
.page-heading,.page-header,.section-heading,.dashboard-section-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:var(--os-space-4);flex-wrap:wrap
}
.eyebrow,.caption,.sidebar-label,.account-strip-kicker{
  color:var(--os-muted);font-size:.72rem;font-weight:750;letter-spacing:.08em;text-transform:uppercase
}
.btn{
  min-height:var(--os-touch);padding:9px 15px;border-radius:var(--os-radius-sm)!important;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--os-line);
  font-size:.88rem;font-weight:700;box-shadow:none!important
}
.btn-primary{border-color:var(--os-blue-600)!important;background:var(--os-blue-600)!important;color:#fff!important}
.btn-primary:hover{border-color:#00489a!important;background:#00489a!important}
.btn-danger{border-color:#f4c7d0!important;background:#fff5f6!important;color:var(--os-danger)!important}
.input,.select,.textarea,.form-control,.form-select{
  min-height:var(--os-touch);padding:10px 12px;border:1px solid #ccd7e3!important;
  border-radius:var(--os-radius-sm)!important;background:#fff!important;color:var(--os-text)!important;
  font-size:1rem!important;box-shadow:none!important
}
.textarea,textarea.form-control{min-height:108px}
.input:focus,.select:focus,.textarea:focus,.form-control:focus,.form-select:focus{
  border-color:var(--os-blue-600)!important;box-shadow:0 0 0 3px rgba(0,98,199,.12)!important
}
.label,label.label{display:block;margin-bottom:6px;color:#35455a;font-size:.82rem;font-weight:700}
.form-grid{gap:var(--os-space-4)}
.form-stack,.stack-sm{display:grid;gap:var(--os-space-4)}
.button-row{gap:var(--os-space-3)}
.table-wrap,.table-responsive{border:1px solid var(--os-line);border-radius:var(--os-radius-md);overflow:auto;background:#fff}
table{margin:0!important}thead th{padding:12px 14px!important;background:#f3f6fa!important;color:#526176!important;border-bottom:1px solid var(--os-line)!important}
tbody td{padding:13px 14px!important;vertical-align:middle;border-color:#e8edf3!important}
.badge,.dashboard-status{border-radius:999px!important;padding:6px 9px!important;font-weight:750}
.inline-form{display:inline-flex!important;margin:0!important}.inline-form>*{margin:0!important}
.u-m-0{margin:0!important}.u-mt-2{margin-top:8px!important}.u-mt-3{margin-top:12px!important}.u-mt-4{margin-top:16px!important}
.alert-link{margin-left:8px;color:inherit;font-weight:750}
.delivery-close-form{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto auto;gap:10px;align-items:end}.check-inline{min-height:44px;display:flex;align-items:center;gap:8px;font-weight:700}.check-inline input{width:20px;height:20px}
.order-journey{position:sticky;top:76px;z-index:15;padding:8px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;border:1px solid var(--os-line);border-radius:12px;background:rgba(255,255,255,.95);box-shadow:var(--os-shadow-sm);backdrop-filter:blur(10px)}.order-journey a{min-height:42px;padding:6px;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:8px;color:var(--os-muted);text-decoration:none;font-size:.72rem;font-weight:750}.order-journey a:hover{background:var(--os-blue-50);color:var(--os-blue-600)}.order-journey span{width:23px;height:23px;display:grid;place-items:center;border-radius:50%;background:#e9eef5;color:var(--os-text)}
.u-between{justify-content:space-between!important}.u-end{justify-content:flex-end!important}.u-clickable{cursor:pointer}
.os-header{
  position:sticky;top:0;z-index:1030;min-height:68px;padding:8px clamp(12px,2vw,28px);
  display:flex;align-items:center;gap:16px;background:#fff;border-bottom:1px solid var(--os-line);
  box-shadow:0 4px 18px rgba(16,42,67,.06)
}
.superadmin-home .os-header{background:var(--os-navy-950);border-color:rgba(255,255,255,.08)}
.os-brand{min-width:max-content;display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--os-navy-900)}
.superadmin-home .os-brand{color:#fff}
.os-brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:var(--tenant-primary,var(--os-blue-600));color:#fff;font-weight:850}
.superadmin-home .os-brand-mark{background:#fff;color:#0062c7}
.os-brand-logo{width:38px;height:38px;object-fit:contain;border-radius:10px}
.os-brand-copy{display:grid;line-height:1.1}.os-brand-copy strong{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem}.os-brand-copy small{margin-top:4px;color:var(--os-muted);font-size:.65rem}
.superadmin-home .os-brand-copy small{color:#91a7bb}

/* Contraste global sobre superficies corporativas azules. */
.client-workspace .operations-hero h1,
.client-workspace .operations-hero h2,
.client-workspace .operations-hero h3,
.superadmin-home .admin-dashboard-head h1,
.superadmin-home .admin-dashboard-head h2,
.superadmin-home .admin-dashboard-head h3,
.superadmin-home .os-header .os-brand,
.superadmin-home .os-header .os-nav-link:not(.is-active){
  color:var(--os-on-brand)!important
}
.client-workspace .operations-hero p,
.client-workspace .operations-hero small,
.superadmin-home .admin-dashboard-head p,
.superadmin-home .admin-dashboard-head small,
.superadmin-home .os-header .os-brand-copy small{
  color:var(--os-on-brand-muted)!important
}

/* Jerarquía de lectura sobre fondos claros: grafito para títulos, azul para acciones. */
.client-workspace .section-title,
.client-workspace .form-section-title,
.client-workspace .order-section-heading,
.client-workspace .order-section-heading .title-md,
.client-workspace .sale-section-heading,
.client-workspace .sale-block-title,
.client-workspace .order-photo-stage-head strong,
.client-workspace .checklist-quickbar strong{
  color:#263548!important
}
.client-workspace .form-section-note,
.client-workspace .order-caption,
.client-workspace .field-help{
  color:#66758a!important
}

/* Atajos visuales de motivo de ingreso. */
.client-workspace .order-quick-actions .order-shortcut{
  min-height:72px!important;
  border:1px solid #cbd7e6!important;
  background:#fff!important;
  color:#263548!important;
  box-shadow:0 1px 2px rgba(10,18,32,.04)!important
}
.client-workspace .order-quick-actions .order-shortcut svg{
  width:32px!important;height:32px!important;padding:7px;
  border-radius:9px;background:#eaf3ff;
  color:#0057ad!important;stroke:currentColor!important
}
.client-workspace .order-quick-actions .order-shortcut:hover{
  border-color:#7fa9d8!important;background:#f7faff!important;color:#00489a!important
}
.client-workspace .order-quick-actions .order-shortcut.is-selected{
  border-color:#0062c7!important;background:#edf5ff!important;color:#00489a!important;
  box-shadow:inset 0 0 0 1px #0062c7!important
}
.client-workspace .order-quick-actions .order-shortcut.is-selected svg{
  background:#0062c7;color:#eef3f8!important
}
.os-nav{display:flex;align-items:center;gap:4px;min-width:0;flex:1;overflow-x:auto;scrollbar-width:none}.os-nav::-webkit-scrollbar{display:none}
.os-nav-link{
  min-height:48px;min-width:max-content;padding:7px 10px;display:flex;align-items:center;gap:7px;
  border:1px solid transparent;border-radius:10px;color:#526176;text-decoration:none;font-size:.76rem;font-weight:700
}
.os-nav-link svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.os-nav-link:hover{background:#f4f7fb;color:var(--os-navy-900)}
.os-nav-link.is-active{background:var(--os-blue-50);border-color:#dbeafe;color:var(--os-blue-600)}
.superadmin-home .os-nav-link{color:#b8c7d5}.superadmin-home .os-nav-link:hover{background:rgba(255,255,255,.07);color:#fff}
.superadmin-home .os-nav-link.is-active{background:#fff;color:var(--os-navy-950);border-color:#fff}
.os-admin-accent{width:5px;align-self:stretch;border-radius:999px;background:#43d8c5}
.os-account{display:flex;align-items:center;gap:8px;min-width:max-content}
.os-plan-chip{min-height:44px;padding:7px 10px;display:flex;align-items:center;gap:8px;border:1px solid var(--os-line);border-radius:10px;background:#fff;color:var(--os-text);text-decoration:none}
.os-plan-chip small{display:block;color:var(--os-muted);font-size:.62rem}.os-plan-chip strong{display:block;font-size:.72rem}
.os-user{min-height:44px;padding:5px 8px;display:flex;align-items:center;gap:8px;border-radius:10px;background:var(--os-surface-soft)}
.superadmin-home .os-user{background:rgba(255,255,255,.08);color:#fff}.os-user small{display:block;color:var(--os-muted);font-size:.65rem}
.superadmin-home .os-user small{color:#91a7bb}.os-avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:var(--os-navy-900);color:#fff;font-weight:800}
.os-user-menu{position:relative}.os-user-menu summary{list-style:none;cursor:pointer}.os-user-menu summary::-webkit-details-marker{display:none}.os-user-menu summary>b{color:var(--os-muted);font-size:.78rem}
.os-user-popover{position:absolute;right:0;top:calc(100% + 10px);z-index:1050;width:220px;padding:8px;display:grid;gap:4px;border:1px solid var(--os-line);border-radius:12px;background:#fff;box-shadow:0 20px 50px rgba(16,42,67,.18);color:var(--os-text)}
.os-user-popover>div{padding:9px 10px;border-bottom:1px solid var(--os-line)}.os-user-popover small{display:block;margin-top:3px;color:var(--os-muted)}
.os-user-popover a,.os-user-popover button{width:100%;min-height:40px;padding:8px 10px;display:flex;align-items:center;border:0;border-radius:8px;background:transparent;color:var(--os-text);text-decoration:none;text-align:left;font-size:.82rem;font-weight:650}
.os-user-popover a:hover,.os-user-popover button:hover{background:var(--os-surface-soft)}.os-user-popover button{color:var(--os-danger)}
.os-menu-toggle{display:none;width:44px;height:44px;border:1px solid var(--os-line);border-radius:10px;background:#fff;color:var(--os-navy-900)}
.os-menu-toggle svg{width:22px;height:22px;stroke:currentColor}
.header-shell>.main-shell{padding:22px clamp(12px,2.2vw,30px) 46px}
.header-shell .topbar{display:none!important}
.os-mobile-actions{display:none}
.form-save-bar{position:sticky;bottom:10px;z-index:20;margin-top:20px;padding:12px;display:flex;justify-content:flex-end;gap:10px;border:1px solid var(--os-line);border-radius:var(--os-radius-md);background:rgba(255,255,255,.94);box-shadow:0 12px 40px rgba(16,42,67,.15);backdrop-filter:blur(12px)}
.form-save-bar .btn-primary{min-width:160px}
.superadmin-home{--os-blue-600:#0f766e}.superadmin-home .saas-kicker{background:#d9fbf5!important;color:#087567!important}
.operations-status-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.repair-workflow{display:grid;gap:20px}.repair-timeline{margin:0;padding:0;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));list-style:none}.repair-timeline li{position:relative;display:grid;justify-items:center;gap:7px;color:var(--os-muted);text-align:center;font-size:.7rem}.repair-timeline li:not(:last-child)::after{content:"";position:absolute;top:15px;left:calc(50% + 18px);right:calc(-50% + 18px);height:2px;background:var(--os-line)}.repair-timeline li span{position:relative;z-index:1;width:32px;height:32px;display:grid;place-items:center;border:2px solid var(--os-line);border-radius:50%;background:#fff;font-weight:800}.repair-timeline li.is-complete span{border-color:var(--os-success);background:#e7f8f1;color:var(--os-success)}.repair-timeline li.is-complete::after{background:var(--os-success)}.repair-timeline li.is-current span{border-color:var(--os-blue-600);background:var(--os-blue-600);color:#fff}.repair-timeline li.is-current strong{color:var(--os-blue-600)}.workflow-actions{padding:16px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-radius:12px;background:var(--os-surface-soft)}.workflow-actions small{display:block;margin-top:4px;color:var(--os-muted)}
@media(max-width:1050px){.operations-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:820px){.repair-timeline{display:flex;overflow-x:auto;padding-bottom:8px}.repair-timeline li{min-width:92px}.repair-timeline li::after{display:none}.workflow-actions{align-items:stretch;flex-direction:column}}
@media(max-width:1100px){
  .os-brand-copy small,.os-nav-link span{display:none}.os-nav-link{min-width:46px;justify-content:center;padding:7px}
  .os-brand-copy strong{max-width:120px}.os-plan-chip small,.os-user>span:last-child{display:none}
}
@media(max-width:820px){
  body{padding-bottom:72px}.os-header{min-height:62px;padding:7px 10px}.os-brand-copy strong{max-width:130px}
  .os-nav{display:none;position:fixed;left:10px;right:10px;top:70px;z-index:1040;padding:10px;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;border:1px solid var(--os-line);border-radius:16px;background:#fff;box-shadow:0 22px 60px rgba(16,42,67,.2)}
  .os-nav.is-open{display:grid}.superadmin-home .os-nav{background:var(--os-navy-950);border-color:rgba(255,255,255,.12)}
  .os-nav-link{min-width:0;min-height:62px;display:grid;justify-items:center;align-content:center;gap:4px;text-align:center}.os-nav-link span{display:block;font-size:.62rem;line-height:1.1}
  .os-menu-toggle{display:grid;place-items:center}.os-account{margin-left:auto}.os-plan-chip{display:none}
  .header-shell>.main-shell{padding:14px 10px 32px}.card{padding:16px}.form-grid{grid-template-columns:1fr!important}.form-grid>.full{grid-column:auto!important}
  .os-mobile-actions{position:fixed;left:0;right:0;bottom:0;z-index:1020;height:64px;padding:6px 8px;display:grid;grid-template-columns:repeat(4,1fr);gap:5px;background:#fff;border-top:1px solid var(--os-line);box-shadow:0 -6px 20px rgba(16,42,67,.08)}
  .os-mobile-actions a{display:grid;place-items:center;align-content:center;gap:2px;border-radius:8px;color:#5b687a;text-decoration:none;font-size:.58rem;font-weight:700}.os-mobile-actions a.is-primary{background:var(--os-blue-600);color:#fff}.os-mobile-actions svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2}
  .form-save-bar{bottom:72px}.form-save-bar .btn-primary{flex:1}
  .order-journey{top:68px;display:flex;overflow-x:auto}.order-journey a{min-width:94px}
  .delivery-close-form{grid-template-columns:1fr}.delivery-close-form .btn{width:100%}
}
@media(max-width:520px){
  .os-brand-copy{display:none}.os-user{padding:5px}.os-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .page-heading,.page-header,.section-heading{display:grid}.btn{width:auto}.button-row{width:100%}
}
@media print{.os-header,.os-mobile-actions,.form-save-bar{display:none!important}.header-shell>.main-shell{padding:0}}

/* Business reports */
.billing-plan-grid{margin-top:18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.billing-plan-grid article{padding:18px;display:flex;flex-direction:column;border:1px solid var(--os-line);border-radius:13px;background:#fff}.billing-plan-grid article.current{border:2px solid var(--os-blue-600);background:var(--os-blue-50)}.billing-plan-grid article>span:first-child{color:var(--os-muted);font-size:.66rem;font-weight:750;text-transform:uppercase}.billing-plan-grid h3{margin:5px 0;font-size:1rem}.billing-plan-grid article>strong{color:var(--os-navy-900);font-size:1.5rem}.billing-plan-grid strong small{font-size:.65rem}.billing-plan-grid ul{min-height:120px;margin:14px 0;padding-left:18px;color:var(--os-muted);font-size:.72rem}.billing-plan-grid form{margin-top:auto}.billing-current-label{margin-top:auto;color:var(--os-success)!important;font-weight:750}.billing-plan-grid .btn{width:100%}@media(max-width:850px){.billing-plan-grid{grid-template-columns:1fr}}
.reports-filter{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.reports-filter label{display:grid;gap:4px;color:var(--os-muted);font-size:.7rem}.reports-filter .input{min-width:145px}.reports-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.report-rows{margin-top:16px}.report-rows p{margin:0;padding:11px 0;display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--os-line)}.report-rows p:last-child{border-bottom:0}.report-rows span{color:var(--os-muted)}.reports-inventory{margin-top:16px;display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.reports-inventory p{margin:0;padding:14px;display:grid;border:1px solid var(--os-line);border-radius:10px;background:var(--os-surface-soft)}.reports-inventory span{color:var(--os-muted);font-size:.7rem}.reports-inventory strong{margin-top:4px;font-size:1.1rem}@media(max-width:850px){.reports-kpis,.reports-inventory{grid-template-columns:repeat(2,1fr)}}

/* Inventory workflows */
.inventory-workflow{max-width:1180px;margin-inline:auto}.form-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.inventory-entry-list{display:grid;gap:10px}.inventory-entry-row{display:grid;grid-template-columns:minmax(260px,2fr) minmax(100px,.55fr) minmax(140px,.8fr) 44px;gap:10px;align-items:end;padding:12px;border:1px solid var(--os-line);border-radius:16px;background:var(--os-surface-soft)}.inventory-entry-row .entry-remove{margin-bottom:1px;font-size:1.3rem}
.inventory-count-head{display:grid;grid-template-columns:minmax(170px,.7fr) minmax(260px,1.4fr) minmax(220px,1fr);gap:12px;align-items:end}.inventory-count-list{display:grid;gap:8px}.count-row{display:grid;grid-template-columns:minmax(260px,1.5fr) 90px 130px 100px;gap:12px;align-items:center;padding:11px 12px;border:1px solid var(--os-line);border-radius:14px;background:var(--os-surface-soft)}.count-row>div:first-of-type{display:grid;gap:3px}.count-row small,.count-system span,.count-difference span{color:var(--os-muted);font-size:.74rem}.count-system,.count-difference{display:grid;gap:3px}
.labels-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.product-label{min-height:132px;padding:10px;border:1px dashed #9aa4b2;background:#fff;color:#111;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;overflow:hidden}.product-label>strong{max-width:100%;font-size:.8rem;line-height:1.15;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.product-label>span{font:600 .66rem/1.1 monospace;letter-spacing:.08em}.product-label>b{font-size:.9rem;margin-top:3px}.barcode{width:100%;height:42px;margin:5px 0 2px}.barcode svg{display:block;width:100%;height:100%;fill:#000}
@media(max-width:900px){.form-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-entry-row{grid-template-columns:minmax(220px,1.5fr) 100px 130px 44px}.count-row{grid-template-columns:minmax(180px,1.3fr) 70px 110px 85px}.labels-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.form-grid-4,.inventory-count-head{grid-template-columns:1fr}.inventory-entry-row{grid-template-columns:minmax(0,1fr) 1fr 1fr 42px}.entry-product{grid-column:1/-1}.count-row{grid-template-columns:minmax(0,1fr) 74px}.count-row label,.count-difference{grid-row:2}.labels-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.no-print,.flash-stack{display:none!important}.app-shell,.main-content{display:block!important;margin:0!important;padding:0!important}.labels-grid{grid-template-columns:repeat(4,1fr);gap:0}.product-label{break-inside:avoid;border:1px dashed #aaa}.label-page{display:block}}

.os-brand-mark.os-platform-logo{
  overflow:hidden;
  border:1px solid rgba(0,98,199,.14);
  background-color:#fff!important;
  background-image:url("../images/osrepair-logo-blue.png")!important;
  background-repeat:no-repeat!important;
  background-size:185%!important;
  background-position:50% 31%!important;
  box-shadow:0 5px 16px rgba(0,72,154,.16);
}
