
/* QUINCA+ v8 — redesign inspiré de la maquette visuelle */

:root{
  --bg:#f2f6fb;
  --panel:#ffffff;
  --ink:#10233f;
  --muted:#6e7f96;
  --line:#dfe7f1;
  --brand:#0878f9;
  --brand-2:#0b5fcd;
  --brand-soft:#eaf3ff;
  --dark:#0d2a50;
  --dark-2:#0a2140;
  --yellow:#f7c948;
  --ok:#15a46f;
  --warn:#ef9f25;
  --bad:#e14955;
  --shadow:0 10px 28px rgba(24,52,88,.09);
  --shadow-lg:0 18px 44px rgba(15,45,82,.14);
}

body{
  background:
    radial-gradient(circle at 10% 0%,rgba(8,120,249,.055),transparent 28%),
    linear-gradient(180deg,#f7faff 0,#f1f6fb 100%);
  color:var(--ink);
  letter-spacing:-.01em;
}
body.dark-ui{
  --bg:#0b1625;
  --panel:#101d2f;
  --ink:#eef6ff;
  --muted:#93a7c0;
  --line:#22324a;
  --brand-soft:#102b4f;
  --shadow:0 10px 28px rgba(0,0,0,.2);
  --shadow-lg:0 18px 44px rgba(0,0,0,.32);
  background:#0b1625;
}
body.dark-ui .top,
body.dark-ui .card,
body.dark-ui .pro-card,
body.dark-ui .modal-card,
body.dark-ui .input,
body.dark-ui .secondary,
body.dark-ui .pro-select-sm{background:#101d2f;color:var(--ink)}
body.dark-ui .table tr:hover td{background:#13243a}

.app{
  grid-template-columns:214px minmax(0,1fr);
  background:transparent;
}
.side{
  background:linear-gradient(180deg,var(--dark) 0%,var(--dark-2) 100%);
  padding:14px 10px;
  border-right:1px solid rgba(255,255,255,.05);
  box-shadow:12px 0 30px rgba(16,45,83,.08);
  overflow:hidden;
}
.brand-block{
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 9px 16px;
  color:white;
}
.brand-mark{
  width:40px;height:40px;border-radius:11px;
  background:linear-gradient(145deg,#ffd74c,#f2b900);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.35),0 5px 15px rgba(0,0,0,.2);
  position:relative;flex:0 0 40px
}
.brand-mark:before{
  content:"";
  position:absolute;
  left:9px;right:9px;bottom:8px;height:18px;
  border-radius:5px 5px 3px 3px;
  background:#0d2a50
}
.brand-mark:after{
  content:"⌂";
  position:absolute;inset:0;
  display:grid;place-items:center;
  font-size:24px;font-weight:900;color:#0d2a50;
  transform:translateY(-7px)
}
.brand-copy strong{display:block;font-size:18px;letter-spacing:.02em}
.brand-copy small{display:block;color:#b6c9df;font-size:9px;margin-top:2px}
.side .logo{display:none}
.nav{padding-top:2px}
.nav button{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  color:#c4d3e6;
  padding:9px 10px;
  margin:3px 0;
  border-radius:8px;
  font-size:12px;
  font-weight:720;
  transition:.16s ease;
}
.nav button:before{
  content:attr(data-icon);
  width:24px;height:24px;border-radius:7px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.06);
  font-size:12px;
  color:white;
  flex:0 0 24px;
}
.nav button:hover{
  background:rgba(255,255,255,.08);
  color:white;
  transform:translateX(2px);
}
.nav button.active{
  background:linear-gradient(135deg,#0980ff,#0869de);
  color:white;
  box-shadow:0 7px 18px rgba(0,119,255,.26);
}
.nav button.active:before{background:rgba(255,255,255,.18)}
.side-foot{
  color:#9fb4cc;
  border-top:1px solid rgba(255,255,255,.09);
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.08));
  padding:12px 6px 0;
  font-size:10px
}

.top{
  height:64px;
  padding:0 18px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid #e2e9f2;
  box-shadow:0 3px 12px rgba(31,58,91,.04);
  gap:16px
}
.top-left{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
  flex:1
}
.page-title-wrap{min-width:150px}
.page-title-wrap strong{font-size:15px;color:var(--ink)}
.page-title-wrap small{display:block;color:var(--muted);font-size:9px;margin-top:2px}
.global-search-wrap{
  position:relative;
  max-width:440px;
  flex:1
}
.global-search{
  width:100%;
  height:38px;
  padding:0 38px 0 34px;
  border-radius:9px;
  border:1px solid #dbe5f0;
  background:#f7fafd;
  outline:none;
  color:var(--ink);
  transition:.15s ease
}
.global-search:focus{
  border-color:#79b7ff;
  background:white;
  box-shadow:0 0 0 3px rgba(8,120,249,.09)
}
.global-search-icon{
  position:absolute;left:11px;top:50%;transform:translateY(-50%);
  color:#7c90a9;font-size:13px
}
.search-results{
  position:absolute;
  left:0;right:0;top:44px;
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow-lg);
  z-index:50;
  overflow:hidden
}
.search-result{
  width:100%;
  border:0;
  border-bottom:1px solid var(--line);
  background:white;
  text-align:left;
  padding:10px 12px;
  cursor:pointer;
  color:var(--ink)
}
.search-result:hover{background:#f1f7ff}
.search-result:last-child{border-bottom:0}
.search-result small{display:block;color:var(--muted);margin-top:2px}
.top-right{gap:7px}
.top .btn,.top .pro-select-sm{
  height:36px;
  border-radius:9px;
  padding:0 10px;
  font-size:11px
}
.user-chip{
  display:flex;align-items:center;gap:8px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:white
}
.user-avatar{
  width:28px;height:28px;border-radius:50%;
  background:linear-gradient(135deg,#173a68,#0878f9);
  color:white;display:grid;place-items:center;
  font-weight:900;font-size:11px
}
.user-meta{line-height:1.15}
.user-meta strong{display:block;font-size:10px}
.user-meta small{font-size:8px;color:var(--muted)}

.content{
  max-width:1600px;
  padding:18px 20px 28px;
}
.pagehead{
  margin-bottom:14px;
  align-items:center
}
.pagehead h1{
  font-size:22px;
  letter-spacing:-.025em
}
.pagehead p{font-size:11px;margin-top:3px}
.card,.pro-card{
  border-radius:12px;
  border:1px solid #e1e9f2;
  box-shadow:0 5px 18px rgba(25,56,92,.055)
}
.panel{padding:14px}
.grid,.pro-kpis{gap:10px}
.pro-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.kpi,.pro-metric{padding:14px 15px}
.kpi small,.pro-metric small{font-size:9px;text-transform:none;letter-spacing:0}
.kpi strong,.pro-metric strong{font-size:20px;letter-spacing:-.03em}
.metric-card{
  position:relative;
  overflow:hidden;
  min-height:88px
}
.metric-card:after{
  content:"";
  position:absolute;
  right:-16px;bottom:-20px;
  width:76px;height:76px;border-radius:50%;
  background:var(--metric-soft,#edf5ff)
}
.metric-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.metric-icon{
  width:30px;height:30px;border-radius:8px;
  display:grid;place-items:center;
  background:var(--metric-soft,#edf5ff);
  color:var(--metric-color,var(--brand));
  font-size:14px;
  font-weight:900
}
.metric-value{display:block;font-size:20px;font-weight:900;margin-top:8px}
.metric-foot{display:flex;align-items:center;justify-content:space-between;margin-top:4px;position:relative;z-index:1}
.metric-foot span{font-size:9px;color:var(--muted)}
.metric-foot b{font-size:9px;color:var(--ok)}

.dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(280px,.8fr);
  gap:12px;
  margin-top:12px
}
.chart-card{padding:15px}
.chart-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.chart-head h3{margin:0;font-size:13px}
.chart-head span{font-size:9px;color:var(--muted)}
.bar-chart{
  height:170px;
  display:flex;
  align-items:flex-end;
  gap:7px;
  padding:12px 4px 0;
  border-bottom:1px solid var(--line);
  background:
    repeating-linear-gradient(to top,transparent 0 41px,rgba(30,69,110,.06) 42px)
}
.bar-wrap{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:5px}
.bar{
  width:min(20px,76%);
  min-height:3px;
  border-radius:5px 5px 2px 2px;
  background:linear-gradient(180deg,#55a9ff,#0878f9);
  box-shadow:0 4px 10px rgba(8,120,249,.16)
}
.bar-label{font-size:8px;color:var(--muted)}
.donut-layout{display:grid;grid-template-columns:130px 1fr;gap:12px;align-items:center}
.donut{
  width:120px;height:120px;border-radius:50%;
  position:relative;margin:auto;
  background:var(--donut-bg)
}
.donut:after{
  content:"";
  position:absolute;inset:25px;border-radius:50%;background:var(--panel)
}
.donut-center{
  position:absolute;inset:0;z-index:2;
  display:grid;place-items:center;text-align:center;
  font-weight:900;font-size:15px;line-height:1.1
}
.donut-center small{display:block;font-size:8px;color:var(--muted);font-weight:700}
.legend{display:grid;gap:7px}
.legend-row{display:grid;grid-template-columns:9px 1fr auto;gap:7px;align-items:center;font-size:9px}
.legend-dot{width:7px;height:7px;border-radius:50%}
.legend-row span:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quick-actions{display:flex;gap:7px;flex-wrap:wrap}
.quick-actions .btn{font-size:10px;padding:8px 10px}

.table{border-collapse:separate;border-spacing:0}
.table thead th{
  background:#f5f8fc;
  color:#5c7089;
  font-size:9px;
  text-transform:none;
  letter-spacing:.01em;
  padding:9px 10px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line)
}
.table thead th:first-child{border-radius:8px 0 0 0;border-left:1px solid var(--line)}
.table thead th:last-child{border-radius:0 8px 0 0;border-right:1px solid var(--line)}
.table td{
  padding:9px 10px;
  font-size:10.5px;
  background:white;
  border-bottom:1px solid #e8eef5
}
.table tbody tr{transition:.14s ease}
.table tbody tr:hover td{background:#f8fbff}
.table td strong{font-weight:820}
.pro-pill,.badge{font-size:9px;padding:4px 7px}

.input,.pro-select-sm{
  border-color:#d9e3ee;
  border-radius:8px;
  padding:10px 11px;
  background:white;
  font-size:11px;
  transition:.15s ease
}
.input:hover{border-color:#a9c8ec}
.input:focus{
  border-color:#75b4ff;
  box-shadow:0 0 0 3px rgba(8,120,249,.08)
}
label{font-size:10px;margin:11px 0 5px}
.btn{
  border-radius:8px;
  padding:9px 12px;
  font-size:10px;
  letter-spacing:-.01em
}
.primary{background:linear-gradient(135deg,#0b84ff,#0868d6)}
.primary:hover:not(:disabled){box-shadow:0 8px 18px rgba(8,120,249,.25)}
.secondary{background:#f7fafd}
.danger{background:#fff1f2;border:1px solid #ffd9de}

.modal{background:rgba(5,18,38,.62);backdrop-filter:blur(6px)}
.modal-card{border-radius:15px;padding:18px;box-shadow:0 26px 70px rgba(0,0,0,.22)}
.modal-card h2{font-size:18px;margin:0 0 12px}

.sale-product-grid{
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:9px
}
.sale-product-card{
  min-height:290px;
  border-radius:11px;
  box-shadow:0 4px 14px rgba(24,52,88,.055)
}
.sale-product-card:hover{
  transform:translateY(-3px);
  border-color:#65aaff;
  box-shadow:0 13px 27px rgba(21,72,130,.16)
}
.sale-product-image{height:125px;background:#f5f8fc}
.sale-product-info{padding:10px 11px 5px}
.sale-product-info strong{font-size:12px;min-height:30px}
.sale-product-info small{font-size:9px}
.sale-product-info p{margin:8px 0 4px}
.sale-add-row{padding:8px 9px 10px;grid-template-columns:auto 55px 1fr}
.sale-add-row label{font-size:9px}
.sale-qty{padding:7px}
.product-add-btn{padding:8px}
.cash-panel{
  top:79px;
  border-radius:12px;
  border:1px solid #dce6f1;
  box-shadow:0 12px 30px rgba(14,48,88,.10)
}
.cash-panel h3{font-size:14px}
.cart-row-rich{padding:8px 0}
.cart-product-image{width:42px;height:42px;flex-basis:42px}
.cart-product-main strong{font-size:10px}
.cart-product-main small{font-size:8px}
.cart-qty-input{padding:6px}
.cart-line-total{font-size:10px}
.cash-grand-total{
  border-top:1px dashed #cfdbea;
  padding-top:12px;
  font-size:18px
}
.checkout-btn{
  background:linear-gradient(135deg,#18ac74,#0d9162);
  box-shadow:0 8px 16px rgba(16,153,105,.18)
}
.checkout-btn:hover:not(:disabled){box-shadow:0 12px 24px rgba(16,153,105,.24)}
.cash-change-box{font-weight:800;border-left:3px solid #1aa66f}

.product-image-preview{border-radius:12px}
.table-product-image{border-radius:8px}
.product-toolbar,.pos-filter-bar{margin-bottom:9px}
.pro-alert{border-radius:8px;font-size:10px}
.pro-titleline h3{font-size:13px}
.pro-card h3{font-size:13px}
.pro-section{margin-top:12px}
.pro-two{gap:12px}
.pro-form{gap:9px}
.pro-avatar{width:30px;height:30px;font-size:10px}

.login{
  background:#edf4fb;
}
.hero{
  background:
    linear-gradient(135deg,rgba(6,30,60,.93),rgba(13,58,103,.92)),
    radial-gradient(circle at 20% 20%,#24639e,transparent 36%),
    #0d2a50;
  position:relative;
  overflow:hidden
}
.hero:after{
  content:"";
  position:absolute;
  width:420px;height:420px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:50%;
  right:-160px;bottom:-180px
}
.hero h1{font-size:52px}
.hero h1 span{color:#78b9ff}
.login-card{border-radius:16px}
.login-card .logo{font-size:21px}

.theme-btn{
  width:36px;padding:0!important;
  display:grid;place-items:center
}
.mobile-menu-btn{display:none}

@media(max-width:1180px){
  .app{grid-template-columns:190px minmax(0,1fr)}
  .pro-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:1fr}
  .global-search-wrap{max-width:300px}
}
@media(max-width:950px){
  .app{grid-template-columns:1fr}
  .side{
    position:sticky;top:0;height:auto;z-index:25;
    padding:8px 10px;
    display:flex;align-items:center;gap:10px;
    overflow:visible
  }
  .brand-block{padding:0;min-width:150px}
  .brand-mark{width:34px;height:34px;flex-basis:34px}
  .brand-copy small{display:none}
  .nav{
    display:flex;
    overflow-x:auto;
    gap:3px;
    flex:1;
    padding:0
  }
  .nav button{white-space:nowrap;width:auto;margin:0;padding:7px 9px}
  .nav button:before{display:none}
  .side-foot{display:none}
  .top{top:50px}
  .cash-panel{top:124px}
}
@media(max-width:760px){
  .content{padding:12px}
  .top{height:auto;min-height:58px;padding:8px 10px;align-items:flex-start}
  .top-left{display:block}
  .page-title-wrap{margin-bottom:6px}
  .global-search-wrap{max-width:none}
  .global-search{height:34px}
  .top-right{flex-wrap:wrap;justify-content:flex-end}
  .user-meta{display:none}
  .pro-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .donut-layout{grid-template-columns:110px 1fr}
  .donut{width:100px;height:100px}
  .sale-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .brand-copy strong{font-size:14px}
  .nav button{font-size:10px}
  .pro-kpis{grid-template-columns:1fr 1fr}
  .metric-value{font-size:17px}
  .sale-product-grid{grid-template-columns:1fr 1fr}
  .sale-product-card{min-height:255px}
  .sale-product-image{height:105px}
  .sale-add-row{grid-template-columns:1fr 52px;gap:6px}
  .sale-add-row label{display:none}
  .sale-add-row .product-add-btn{grid-column:1/-1}
  .dashboard-grid{gap:8px}
  .donut-layout{grid-template-columns:1fr}
  .top .secondary:not(.theme-btn){display:none}
  .user-chip{display:none}
}
