/* =========================================================
   GARCIA IMPORTS — PREMIUM REBUILD
   foco: legibilidade, proporção, consistência e alto padrão
   ========================================================= */

/* ---------- shell ---------- */
.app-shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);background:transparent}
.sidebar{position:sticky;top:0;height:100vh;background:
  radial-gradient(circle at 50% 5%,rgba(211,144,118,.08),transparent 30%),
  linear-gradient(160deg,var(--sidebar) 0%,var(--sidebar-2) 65%,#141210 100%);
  color:#f6efea;border-right:1px solid rgba(225,188,171,.26);padding:18px 12px 14px;display:flex;flex-direction:column;z-index:50;box-shadow:16px 0 38px rgba(23,18,15,.09)}
.brand-zone{height:166px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid rgba(228,190,174,.17);margin:0 5px 10px;position:relative}
.brand-zone img{width:138px;height:138px;object-fit:contain;display:block;filter:drop-shadow(0 12px 24px rgba(0,0,0,.24))}
.sidebar-close{display:none;position:absolute;right:0;top:0;width:34px;height:34px;border:0;border-radius:9px;background:rgba(255,255,255,.06);color:#fff}
.side-nav{display:flex;flex-direction:column;gap:4px;overflow:auto;padding:2px 0 8px;scrollbar-width:none}.side-nav::-webkit-scrollbar{display:none}
.side-nav button{min-height:41px;border:1px solid transparent;border-radius:11px;background:transparent;color:#e7dfd9;display:flex;align-items:center;gap:11px;padding:0 12px;text-align:left;font-size:13px;font-weight:550;transition:background .17s ease,border-color .17s ease,color .17s ease,transform .17s ease}
.side-nav button svg{opacity:.92;stroke-width:1.8}.side-nav button:hover{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.045);transform:translateX(1px)}
.side-nav button.active{color:#241915;background:linear-gradient(135deg,#f0d8cd 0%,#d59a82 100%);border-color:#e8c3b4;box-shadow:0 8px 24px rgba(197,126,98,.24)}
.sidebar-spacer{flex:1;min-height:8px}.sidebar-tagline{font-size:8.5px;letter-spacing:.30em;text-align:center;line-height:1.9;color:#d6c4ba;border-top:1px solid rgba(228,190,174,.19);padding:14px 0 10px}
.sidebar-user{display:flex;align-items:center;gap:9px;padding:9px 6px}.sidebar-user strong,.topbar-user-copy strong{font-size:12.5px}.sidebar-user span,.topbar-user-copy span{display:block;font-size:9px;color:#bdb2ac;margin-top:2px;text-transform:uppercase;letter-spacing:.06em}
.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#292522;border:1px solid rgba(232,196,180,.26);font-weight:750;font-size:11px}.avatar.dark{background:#1f1b19;color:#fff;border-color:#b9836d}
.sidebar-logout{height:40px;border:1px solid rgba(226,189,172,.23);background:rgba(255,255,255,.02);color:#eee6e1;border-radius:10px;display:flex;gap:8px;align-items:center;justify-content:center;font-size:12px;font-weight:650}.sidebar-logout:hover{background:rgba(255,255,255,.06)}

.app-main{min-width:0}.topbar{height:var(--topbar-h);position:sticky;top:0;z-index:35;background:rgba(241,240,238,.96);backdrop-filter:blur(18px);border-bottom:1px solid #cbc5c0;display:flex;align-items:center;gap:16px;padding:0 clamp(18px,2vw,30px);box-shadow:0 4px 14px rgba(49,39,33,.035)}
.mobile-menu{display:none;width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.global-search{position:relative;display:flex;align-items:center;gap:10px;width:min(680px,60vw);height:40px;border:1px solid #c9c2bd;background:#f8f7f5;border-radius:12px;padding:0 13px;color:#81766f;box-shadow:0 1px 0 rgba(255,255,255,.8) inset}
.global-search:focus-within{border-color:#b77c68;box-shadow:0 0 0 3px rgba(183,124,104,.10)}
.global-search input{border:0;outline:0;background:transparent;flex:1;min-width:0;color:var(--ink);font-size:13px;height:auto;padding:0}.global-search>button{border:0;background:transparent;color:var(--muted);display:grid;place-items:center}
.search-popover{position:absolute;top:48px;left:0;width:min(640px,82vw);background:#f8f7f5;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:6px;z-index:80}.search-popover button{width:100%;border:0;background:transparent;border-radius:10px;padding:10px 12px;text-align:left;display:flex;flex-direction:column;gap:3px}.search-popover button:hover{background:var(--surface-2)}.search-popover span{font-size:11px;color:var(--muted)}.search-message{display:block;padding:12px}
.topbar-user{margin-left:auto;display:flex;align-items:center;gap:10px}.notification-button{position:relative;width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:#f7f5f2;color:#352c28;display:grid;place-items:center}.notification-button span{position:absolute;top:-5px;right:-4px;min-width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:#a85d4d;color:#fff;font-size:9px;border:2px solid var(--bg-soft)}
.page-content{max-width:var(--content-max);margin:0 auto;padding:26px clamp(18px,2vw,30px) 44px;width:100%}

/* ---------- typography / headers ---------- */
.page-title{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:17px}.page-title h1{font-family:var(--serif);font-size:clamp(32px,2.65vw,44px);line-height:1;margin:4px 0 7px;letter-spacing:-.03em;color:#171311}.page-title p{margin:0;color:#56514d;font-size:13px;line-height:1.45}.eyebrow{font-size:8.5px;letter-spacing:.30em;font-weight:800;color:#8b5849}.page-actions{display:flex;gap:8px;align-items:center}

/* ---------- controls ---------- */
.btn{border-radius:10px;height:39px;padding:0 14px;border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700;font-size:12px;transition:.16s ease;white-space:nowrap}.btn-primary{background:linear-gradient(135deg,#c98a72,#a96854);color:#fff;border-color:#b77763;box-shadow:0 7px 18px rgba(163,97,77,.16)}.btn-primary:hover{transform:translateY(-1px);filter:brightness(.985)}.btn-secondary{background:#f6f3ef;color:#352b27;border-color:#cabfb7}.btn-secondary:hover{background:#eee9e4}.btn-danger{background:#f7e4e3;color:#a93434;border-color:#e5bcbc}.btn-ghost{background:transparent;color:var(--ink);border-color:transparent}.icon-button{width:36px;height:36px;border:1px solid #c9c0b9;border-radius:10px;background:#f5f2ee;color:#4d413a;display:grid;place-items:center}.icon-button:hover{background:#ece7e2}
input,select,textarea{width:100%;border:1px solid #c9c1bb;background:#f8f6f3;color:var(--ink);border-radius:10px;outline:0;transition:.15s;box-shadow:0 1px 0 rgba(255,255,255,.78) inset;font-size:12.5px}input,select{height:40px;padding:0 12px}textarea{min-height:82px;padding:10px 12px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#b77b67;box-shadow:0 0 0 3px rgba(183,123,103,.10)}
.field{display:flex;flex-direction:column;gap:6px}.field-label{font-size:10.5px;font-weight:750;color:#514943}.field-hint{font-size:9.5px;color:var(--muted)}.field-error{font-size:10px;color:var(--red)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid .wide{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}

/* ---------- cards / KPI ---------- */
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 16px}.kpi-card{min-width:0;min-height:104px;background:linear-gradient(180deg,#f6f4f1 0%,#f1efec 100%);border:1px solid #cdc5bf;border-radius:15px;padding:15px;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow-card);overflow:visible}.kpi-icon{flex:0 0 44px;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:#7c4438;background:linear-gradient(135deg,#f0d8cf,#dfb29f);box-shadow:0 1px 0 rgba(255,255,255,.6) inset}.kpi-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.kpi-copy>span{font-size:10px;color:#5f5752;font-weight:550}.kpi-copy strong{font-family:var(--serif);font-size:clamp(19px,1.45vw,25px);line-height:1.05;white-space:nowrap;color:#191514;letter-spacing:-.018em}.kpi-copy small{font-size:9.5px;line-height:1.3;color:#6d655f}.tone-green .kpi-copy strong{color:var(--green)}.tone-red .kpi-copy strong{color:var(--red)}.tone-amber .kpi-copy strong{color:var(--amber)}

/* ---------- panels ---------- */
.panel{background:#f6f4f1;border:1px solid #ccc4bd;border-radius:16px;box-shadow:var(--shadow-card);overflow:hidden}.panel-head{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid #d6cec7;background:linear-gradient(180deg,#f8f6f3,#f3f0ed)}.panel-head h3{font-family:var(--serif);font-size:17px;margin:0;color:#1a1614}.panel-head p{margin:3px 0 0;font-size:10px;color:#665f5a}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.82fr);gap:13px;margin-bottom:13px}.chart-wrap{height:292px;padding:10px 12px 12px}.summary-stack{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px}.summary-total{padding:12px 13px;background:#e9e5e1;border:1px solid #cfc6bf;border-radius:11px;display:flex;justify-content:space-between;align-items:center}.summary-total strong{font-family:var(--serif);font-size:21px}.summary-line{display:flex;justify-content:space-between;gap:20px;border-bottom:1px dashed #d0c6bf;padding:8px 2px;font-size:11.5px}.summary-line:last-child{border-bottom:0}.summary-line span{color:#5e5752}

/* ---------- period ---------- */
.period-bar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:3px}.period-filter{display:flex;align-items:center;gap:7px;background:#dcd8d4;border:1px solid #c8c0ba;border-radius:13px;padding:6px;box-shadow:0 4px 14px rgba(48,38,32,.04)}.period-tabs{display:flex;gap:4px}.period-tabs button{height:32px;border-radius:8px;border:1px solid transparent;padding:0 12px;background:#f6f3ef;color:#2d2825;font-size:10px;font-weight:750}.period-tabs button:hover{background:#eee9e5}.period-tabs button.active{color:#fff;background:linear-gradient(135deg,#c98c75,#a96855);border-color:#ad6d59}.period-range{min-width:190px;height:32px;background:#f6f3ef;border:1px solid #cfc6bf;border-radius:8px;display:flex;align-items:center;gap:7px;padding:0 10px;color:#2e2926;font-size:10px}.period-range input{height:24px;border:0;background:transparent;padding:0;font-size:10px}.brand-slogan{font-size:8.5px;letter-spacing:.30em;color:#734739;font-weight:800;white-space:nowrap;padding-right:3px}

/* ---------- tables ---------- */
.table-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:10px}.table-search{position:relative;flex:1;min-width:260px}.table-search svg{position:absolute;left:12px;top:11px;color:#7b7069}.table-search input{padding-left:37px;background:#f6f4f1}.segmented{display:flex;gap:5px;flex-wrap:wrap}.segmented button{height:34px;padding:0 12px;border-radius:9px;border:1px solid #c9c1bb;background:#f5f2ee;color:#4a403b;font-size:10.5px;font-weight:700}.segmented button.active{background:linear-gradient(135deg,#c98d77,#aa6955);color:#fff;border-color:#ad705d}.table-card{background:#f7f5f2;border:1px solid #c9c1bb;border-radius:15px;box-shadow:var(--shadow-card);overflow:hidden}.table-scroll{overflow:auto;width:100%;scrollbar-width:thin}.table-card table,.mini-table table{width:100%;border-collapse:separate;border-spacing:0;min-width:960px;color:#28221f}.table-card thead th,.mini-table thead th{height:39px;background:#e6e1dc;color:#4f4742;text-transform:uppercase;letter-spacing:.055em;font-size:8.5px;font-weight:800;text-align:left;padding:0 11px;border-bottom:1px solid #c9c0ba;white-space:nowrap}.table-card tbody td,.mini-table tbody td{height:48px;padding:8px 11px;border-bottom:1px solid #ddd6d0;font-size:11.5px;vertical-align:middle;background:#f8f6f3}.table-card tbody tr:nth-child(even) td,.mini-table tbody tr:nth-child(even) td{background:#f3f0ed}.table-card tbody tr:hover td,.mini-table tbody tr:hover td{background:#eee8e3}.table-card tbody tr:last-child td,.mini-table tbody tr:last-child td{border-bottom:0}.table-card td strong,.mini-table td strong{font-weight:750;color:#211c19}.cell-sub{display:block;font-size:9px;color:#716963;margin-top:2px;line-height:1.25}.cell-money{font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}.cell-green{color:#13764f!important;font-weight:750}.cell-red{color:#c13d3d!important;font-weight:750}.table-footer{min-height:45px;border-top:1px solid #d1c8c1;background:#eeebe8;display:flex;align-items:center;justify-content:space-between;padding:0 13px;font-size:10px;color:#665f5a}
.badge{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:4px 9px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap;border:1px solid transparent}.badge-neutral{background:#e4e0dc;color:#58504b;border-color:#d2cac4}.badge-green{background:var(--green-soft);color:#16704d;border-color:#c3dfd1}.badge-red{background:var(--red-soft);color:#ae3737;border-color:#e8c4c4}.badge-amber{background:var(--amber-soft);color:#925c1c;border-color:#e3cfb6}.badge-rose{background:var(--rose-pale);color:#8b4e3c;border-color:#ddc1b5}.badge-blue{background:#dfe7f0;color:#456489;border-color:#c9d5e2}

/* sales table guarantees lucro/status never disappear */
.sales-table{min-width:1010px!important}.sales-table th:nth-child(1){width:86px}.sales-table th:nth-child(2){width:145px}.sales-table th:nth-child(3){width:230px}.sales-table th:nth-child(4){width:82px}.sales-table th:nth-child(5),.sales-table th:nth-child(6),.sales-table th:nth-child(7){width:105px}.sales-table th:nth-child(8){width:116px}.sales-table th:nth-child(9){width:58px}.sales-table td:nth-child(5),.sales-table td:nth-child(6),.sales-table td:nth-child(7){text-align:right;font-variant-numeric:tabular-nums}.sales-table td:nth-child(7){color:#146f4c;font-weight:800}.sales-table td:nth-child(8){white-space:nowrap}
.payments-table{min-width:1130px!important}.payments-table th:nth-child(1){width:165px}.payments-table th:nth-child(2),.payments-table th:nth-child(3),.payments-table th:nth-child(4),.payments-table th:nth-child(5){width:112px}.payments-table th:nth-child(6){width:105px}.payments-table th:nth-child(7){width:96px}.payments-table th:nth-child(8){width:175px}.payments-table th:nth-child(9){width:86px}.payments-table td:nth-child(2),.payments-table td:nth-child(3),.payments-table td:nth-child(4),.payments-table td:nth-child(5){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}

/* ---------- clients ---------- */
.client-layout{display:grid;grid-template-columns:315px minmax(0,1fr);gap:13px;align-items:start}.client-list{height:680px;display:flex;flex-direction:column}.client-list .panel-head{min-height:57px}.client-list-body{overflow:auto;padding:6px 8px 9px}.client-list-item{width:100%;border:0;border-bottom:1px solid #d9d1cb;background:transparent;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 8px;text-align:left;border-radius:10px;color:var(--ink)}.client-list-item:hover{background:#ece7e2}.client-list-item.active{background:linear-gradient(90deg,#ead1c5,#f0e6e0);box-shadow:inset 3px 0 #b66f58}.mini-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#e9c2b1,#d5967d);color:#2c1d18;font-weight:800;font-size:11px}.client-list-item b{display:block;font-size:11.5px}.client-list-item span{display:block;color:#6d655f;font-size:9px;margin-top:2px}.client-list-item .balance{font-size:10.5px;font-weight:800;color:#b53c3c;white-space:nowrap}.client-detail{padding:16px}.client-hero{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:13px;border-bottom:1px solid #d5ccc5}.client-main{display:flex;gap:11px;align-items:center}.client-main .large-avatar{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ecc9b9,#cd8b72);font-family:var(--serif);font-size:24px}.client-main h2{font-family:var(--serif);font-size:29px;margin:0 0 4px;color:#1b1614}.client-main p{margin:0;color:#625b56;font-size:10px}.client-actions{display:flex;gap:7px}.client-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0}.client-kpi{padding:11px;border:1px solid #d0c6bf;background:#eeeae6;border-radius:11px;min-width:0}.client-kpi span{font-size:8.7px;color:#67605b}.client-kpi strong{display:block;margin-top:4px;font-family:var(--serif);font-size:17px;white-space:nowrap;color:#1c1715}.status-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:10px;padding:9px 11px;margin-bottom:11px;background:#f2dddd;border:1px solid #e5c1c1;color:#a53b3b;font-size:10.5px}.status-strip.ok{background:#dfeee5;color:#19704d;border-color:#c7dfd1}.client-columns{display:grid;grid-template-columns:1fr 1fr;gap:9px}.mini-table{border:1px solid #cfc6bf;border-radius:12px;overflow:hidden;background:#f6f3ef}.mini-table .mini-head{height:38px;background:#e7e2dd;display:flex;align-items:center;justify-content:space-between;padding:0 11px;border-bottom:1px solid #cec5be}.mini-table .mini-head strong{font-family:var(--serif);font-size:14px}.mini-table .mini-head span{font-size:9px;color:#6b635e}.mini-table table{min-width:520px}.mini-table th{font-size:8px}.mini-table td{height:40px;padding:7px 8px;font-size:9.5px}

/* ---------- modal ---------- */
.modal-overlay{position:fixed;inset:0;background:rgba(18,14,12,.58);backdrop-filter:blur(6px);z-index:100;display:grid;place-items:center;padding:18px}.modal{width:min(680px,96vw);max-height:92vh;background:#efedeb;border:1px solid #bfaea3;border-radius:18px;box-shadow:0 30px 90px rgba(0,0,0,.34);overflow:hidden}.modal-lg{width:min(920px,96vw)}.modal-xl{width:min(1160px,97vw)}.modal-header{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 19px;background:#e9e5e1;border-bottom:1px solid #c9c0b9}.modal-header h2{font-family:var(--serif);font-size:25px;margin:0}.modal-header p{margin:4px 0 0;color:#625b56;font-size:10px}.modal-content{padding:17px 19px 21px;overflow:auto;max-height:calc(92vh - 72px)}

/* ---------- sales detail ---------- */
.sale-detail-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:11px}.detail-box{background:#f5f2ee;border:1px solid #cdc4bd;border-radius:11px;padding:12px}.detail-box h4{font-family:var(--serif);font-size:15px;margin:0 0 9px}.detail-list{display:flex;flex-direction:column;gap:7px}.detail-row{display:flex;justify-content:space-between;align-items:center;gap:18px;border-bottom:1px dashed #d4cac3;padding-bottom:7px;font-size:10.5px}.detail-row:last-child{border:0}.detail-row span{color:#625b56}.detail-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:11px}.detail-actions .wide{grid-column:1/-1}

/* ---------- states ---------- */
.loading-state,.empty-state{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#655e59}.empty-state strong{font-family:var(--serif);font-size:20px;color:var(--ink)}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.inline-error{padding:9px 11px;border-radius:10px;background:#f1dddd;border:1px solid #dfbbbb;color:#a53a3a;font-size:10.5px;margin-bottom:10px}.inline-success{padding:9px 11px;border-radius:10px;background:#dcece3;border:1px solid #bfdcca;color:#176c4b;font-size:10.5px;margin-bottom:10px}

/* ---------- overdue ---------- */
.overdue-row{display:grid;grid-template-columns:minmax(180px,1.45fr) 100px 108px 94px 105px 110px 104px;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #d7d0ca;background:#f7f5f2;color:#28221f}.overdue-row:nth-child(odd):not(.header){background:#f2efec}.overdue-row:hover:not(.header){background:#ebe6e1}.overdue-row.header{background:#e3ded9;text-transform:uppercase;font-size:8px;letter-spacing:.06em;color:#554d48;font-weight:800}.overdue-row .days{display:inline-flex;padding:6px 9px;border-radius:9px;background:var(--red-soft);color:#ad3838;font-weight:800;justify-self:start;white-space:nowrap}.overdue-name{display:flex;align-items:center;gap:8px}.overdue-name .mini-avatar{width:34px;height:34px}.overdue-row>span,.overdue-row>strong{font-size:10.5px}.overdue-row>.btn{height:34px;font-size:10.5px;padding:0 10px}

/* ---------- trade ---------- */
.trade-shell{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:13px}.trade-form{padding:16px;background:#f5f3f0}.trade-step{border:1px solid #cbc2bb;background:#ece9e6;border-radius:13px;padding:14px;margin-bottom:11px}.trade-step h3{font-family:var(--serif);font-size:19px;margin:0 0 3px}.trade-step p{font-size:10px;line-height:1.45;color:#625b56;margin:0 0 12px}.trade-result{position:sticky;top:86px;background:linear-gradient(150deg,#1b1816,#2b2420 70%,#30251f);color:#fff;border-radius:16px;padding:17px;box-shadow:0 18px 45px rgba(31,22,18,.18);border:1px solid rgba(214,157,134,.36)}.trade-result .label{font-size:8.5px;letter-spacing:.16em;color:#dbc4ba}.trade-result .big{font-family:var(--serif);font-size:36px;color:#efc3b1;margin:7px 0 14px}.trade-result .line{display:flex;justify-content:space-between;align-items:center;gap:14px;border-top:1px solid rgba(255,255,255,.11);padding:9px 0;font-size:10px}.trade-result .line span{color:#cec3bd;display:flex;align-items:center;gap:5px}.trade-result .profit{color:#7edbad;font-weight:800}

/* ---------- documents / AI ---------- */
.document-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.document-card{border:1px solid #cfc6bf;background:#f5f2ee;border-radius:13px;padding:14px;display:flex;flex-direction:column;gap:7px}.document-card h3{font-family:var(--serif);font-size:17px;margin:0}.document-card p{font-size:10px;color:#625b56;margin:0}.document-card .doc-actions{display:flex;gap:7px;margin-top:auto}.ai-shell{display:grid;grid-template-rows:1fr auto;height:calc(100vh - 150px);min-height:540px}.ai-messages{overflow:auto;padding:13px;background:#e9e6e3;border:1px solid #cac1bb;border-radius:15px}.ai-msg{max-width:78%;padding:10px 12px;border-radius:12px;margin:8px 0;font-size:12px;line-height:1.5;white-space:pre-wrap}.ai-msg.user{margin-left:auto;background:#2b2521;color:#fff}.ai-msg.assistant{background:#f7f5f2;border:1px solid #cac2bc}.ai-input{display:flex;gap:8px;padding-top:9px}.ai-input input{height:44px}

/* ---------- responsive ---------- */
@media(max-width:1280px){
  :root{--sidebar-w:210px}.brand-zone{height:154px}.brand-zone img{width:126px;height:126px}.side-nav button{font-size:12.5px;padding:0 10px}.page-content{padding-left:20px;padding-right:20px}.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.kpi-card{padding:13px;gap:10px}.kpi-icon{width:40px;height:40px;flex-basis:40px}.kpi-copy strong{font-size:20px}.dashboard-grid{grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr)}.client-layout{grid-template-columns:285px minmax(0,1fr)}
}
@media(max-width:1080px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}.client-layout{grid-template-columns:1fr}.client-list{height:390px}.client-kpis{grid-template-columns:repeat(2,1fr)}.trade-shell{grid-template-columns:1fr}.trade-result{position:static}.document-grid{grid-template-columns:repeat(2,1fr)}.brand-slogan{display:none}}
@media(max-width:980px){:root{--sidebar-w:0px}.app-shell{display:block}.sidebar{position:fixed;left:-232px;width:220px;transition:.2s}.sidebar.open{left:0}.sidebar-close,.mobile-menu{display:grid;place-items:center}.topbar{padding:0 14px}.global-search{width:min(660px,calc(100vw - 160px))}.page-content{padding:22px 14px 34px}.page-title{align-items:flex-start}.page-title h1{font-size:36px}.overdue-row{grid-template-columns:1.4fr 100px 100px 90px}.overdue-row>*:nth-child(2),.overdue-row>*:nth-child(5),.overdue-row>*:nth-child(6){display:none}}
@media(max-width:680px){.topbar-user-copy{display:none}.global-search{width:calc(100vw - 124px)}.page-title{display:block}.page-actions{margin-top:10px}.period-bar{align-items:flex-start}.period-filter{width:100%;flex-direction:column;align-items:stretch}.period-tabs{display:grid;grid-template-columns:repeat(3,1fr)}.period-tabs button{padding:0 7px}.period-range{width:100%}.kpi-grid{grid-template-columns:1fr}.kpi-card{min-height:94px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.client-columns{grid-template-columns:1fr}.client-hero{align-items:flex-start;flex-direction:column}.client-actions{width:100%;flex-wrap:wrap}.client-kpis{grid-template-columns:1fr 1fr}.sale-detail-grid{grid-template-columns:1fr}.detail-actions{grid-template-columns:1fr}.detail-actions .wide{grid-column:auto}.overdue-row{grid-template-columns:1fr 82px}.overdue-row>*:not(:first-child):not(.days){display:none}.trade-result .big{font-size:30px}.page-title h1{font-size:32px}.modal-overlay{padding:7px}.modal{max-height:96vh}.modal-content{max-height:calc(96vh - 72px)}.document-grid{grid-template-columns:1fr}}

/* tables embedded directly in panels (dashboard / reports) */
.panel>.table-scroll table{width:100%;border-collapse:separate;border-spacing:0;min-width:540px}
.panel>.table-scroll thead th{height:36px;background:#e6e1dc;color:#514943;text-transform:uppercase;letter-spacing:.05em;font-size:8px;font-weight:800;text-align:left;padding:0 10px;border-bottom:1px solid #cbc2bb;white-space:nowrap}
.panel>.table-scroll tbody td{height:42px;padding:7px 10px;border-bottom:1px solid #ddd5cf;background:#f7f5f2;font-size:10.5px;vertical-align:middle}
.panel>.table-scroll tbody tr:nth-child(even) td{background:#f1eeeb}
.panel>.table-scroll tbody tr:hover td{background:#eae5e0}
.panel>.table-scroll tbody tr:last-child td{border-bottom:0}

/* final fit refinements after 1366px visual QA */
.trade-shell{align-items:start}
.payments-table{min-width:1000px!important;table-layout:fixed}
.payments-table th:nth-child(1){width:145px}.payments-table th:nth-child(2){width:98px}.payments-table th:nth-child(3){width:98px}.payments-table th:nth-child(4){width:104px}.payments-table th:nth-child(5){width:98px}.payments-table th:nth-child(6){width:102px}.payments-table th:nth-child(7){width:90px}.payments-table th:nth-child(8){width:155px}.payments-table th:nth-child(9){width:82px}
.payments-table tbody td{padding-left:9px;padding-right:9px;font-size:10.5px}.payments-table .btn{height:33px;padding:0 10px;font-size:10px}

/* ---------- correction / audit actions ---------- */
.section-block{margin-top:18px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 2px 9px}.section-heading h2{font-family:var(--serif);font-size:19px;margin:0;color:#1a1614}.section-heading p{margin:4px 0 0;font-size:10.5px;color:#655e59}.section-heading>svg{color:var(--rose-deep)}
.row-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}.icon-button.danger{color:#a93434;border-color:#debcbc;background:#f7e9e8}.icon-button.danger:hover{background:#f2dedd}.inline-warning{padding:10px 12px;border-radius:10px;background:#f2e8d8;border:1px solid #ddc9a5;color:#7b5a25;font-size:10.5px;line-height:1.45}.delete-summary{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px;border:1px solid #d0c7c0;background:#f5f2ee;border-radius:11px;margin-bottom:11px}.delete-summary strong{font-family:var(--serif);font-size:16px}.delete-summary span{font-size:11px;color:#655e59}
.recent-receipts-table{min-width:900px!important;table-layout:fixed}.recent-receipts-table th:nth-child(1){width:90px}.recent-receipts-table th:nth-child(2){width:170px}.recent-receipts-table th:nth-child(3){width:115px}.recent-receipts-table th:nth-child(4){width:105px}.recent-receipts-table th:nth-child(5){width:110px}.recent-receipts-table th:nth-child(6){width:230px}.recent-receipts-table th:nth-child(7){width:86px}.receipt-note{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:210px}
.sales-table .row-actions{justify-content:flex-start}
@media(max-width:680px){.section-heading{align-items:flex-start}.delete-summary{align-items:flex-start;flex-direction:column}.row-actions{gap:4px}}

/* ---------- Base Final V11: catálogo + venda multi-itens ---------- */
.inline-field-actions{display:flex;gap:8px;align-items:stretch}.inline-field-actions>select,.inline-field-actions>input{flex:1;min-width:0}
.product-source-tabs{margin:10px 0 12px}.product-source-tabs button{display:inline-flex;align-items:center;gap:6px}
.product-entry-panel{position:relative;background:#f6f3ef;border:1px solid #d5ccc5;border-radius:11px;padding:12px;margin-top:8px}
.catalog-autocomplete{position:relative}.catalog-autocomplete>input{position:relative;z-index:2}.catalog-suggestions{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:40;max-height:280px;overflow:auto;background:#fff;border:1px solid #c9c0ba;border-radius:11px;box-shadow:0 16px 38px rgba(31,23,19,.17);padding:5px}.catalog-suggestions button{width:100%;border:0;background:transparent;border-radius:8px;padding:9px 10px;display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:left;color:var(--ink)}.catalog-suggestions button:hover{background:#f2ece8}.catalog-suggestions button span{display:flex;flex-direction:column;gap:2px;min-width:0}.catalog-suggestions button strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.catalog-suggestions button small{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.catalog-suggestions button b{font-size:10px;color:var(--rose-deep);white-space:nowrap}.catalog-empty{padding:13px;color:var(--muted);font-size:10.5px;text-align:center}
.sale-items-editor{margin-top:13px;border:1px solid #cec5be;border-radius:11px;overflow:hidden;background:#f9f7f4}.sale-items-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 12px;background:#e9e4df;border-bottom:1px solid #cec5be;font-size:10px}.sale-items-head span{color:var(--muted)}.sale-item-row{display:grid;grid-template-columns:minmax(210px,1fr) 55px 95px 105px 36px;align-items:center;gap:9px;padding:9px 11px;border-bottom:1px solid #ddd5cf;font-size:10.5px}.sale-item-row:last-child{border-bottom:0}.sale-item-row>div{min-width:0}.sale-item-row>div strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sale-item-row>div small{display:block;margin-top:2px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sale-item-row>b,.sale-item-row>span{text-align:right;font-variant-numeric:tabular-nums}.sale-total-box{margin-top:12px}.confirm-check{display:flex;gap:9px;align-items:flex-start;margin-top:14px;font-size:10.5px;line-height:1.5;color:#4b443f}.confirm-check input{width:18px;height:18px;flex:0 0 auto;margin-top:1px}
@media(max-width:680px){.inline-field-actions{flex-direction:column}.sale-item-row{grid-template-columns:minmax(0,1fr) 42px 78px 34px}.sale-item-row>span:nth-of-type(2){display:none}.catalog-suggestions{position:static;margin-top:5px;max-height:230px}.product-entry-panel{padding:10px}}

/* ===== GARCIA IMPORTS — atualização catálogo / pagamentos / orçamento ===== */
.client-search-box{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:0 10px}.client-search-box input{border:0!important;background:transparent!important;padding-left:0!important;box-shadow:none!important;width:100%}.client-suggestions{position:relative;margin-top:6px;border:1px solid var(--line);border-radius:10px;background:var(--paper);max-height:220px;overflow:auto;box-shadow:0 14px 30px rgba(24,19,17,.08);z-index:5}.client-suggestions button{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:10px 12px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer}.client-suggestions button:last-child{border-bottom:0}.client-suggestions button:hover{background:var(--rose-soft)}.client-suggestions span{display:flex;flex-direction:column;gap:2px}.client-suggestions small{color:var(--muted);font-size:10px}.client-suggestions b{font-size:10px;color:var(--rose-deep)}.client-no-result{padding:12px;color:var(--muted);font-size:11px}.selected-client-card{display:grid;grid-template-columns:auto 1fr auto auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);background:var(--rose-soft);border-radius:12px;margin:8px 0 14px}.selected-client-card>div{display:flex;flex-direction:column}.selected-client-card span,.selected-client-card small{font-size:10px;color:var(--muted)}.selected-client-balance{text-align:right}.selected-client-balance b{font-size:13px}.selected-client-card>button{border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:7px 10px;font-size:10px;cursor:pointer}.payment-client-picker{margin-bottom:8px}
.catalog-admin-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px 190px auto auto;gap:8px;align-items:center;margin:12px 0}.catalog-admin-toolbar select{min-height:38px;border:1px solid var(--line);border-radius:9px;background:var(--paper);padding:0 10px;color:var(--ink)}.check-col{width:42px}.table-check{border:0;background:transparent;color:var(--ink);cursor:pointer;padding:3px}.table-check:hover{color:var(--rose-deep)}
.maintenance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.maintenance-empty{display:flex;gap:9px;align-items:center;border:1px dashed var(--line-strong);border-radius:10px;padding:13px;color:var(--muted);font-size:11px}.maintenance-row{position:relative;display:grid;grid-template-columns:140px 1fr 120px 120px 165px 34px;gap:8px;align-items:end;padding:10px;margin-top:9px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.maintenance-row .field{margin:0}.maintenance-check{display:flex;align-items:center;gap:7px;min-height:38px;padding:0 8px;font-size:10px;color:var(--muted)}.maintenance-check input{accent-color:var(--rose-deep)}.maintenance-remove{align-self:center}.maintenance-total{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--rose-soft);font-size:11px}.maintenance-total strong{font-size:14px;color:var(--rose-deep)}
@media(max-width:1100px){.catalog-admin-toolbar{grid-template-columns:1fr 1fr}.catalog-admin-toolbar .table-search{grid-column:1/-1}.maintenance-row{grid-template-columns:1fr 1fr}.maintenance-check{min-height:auto;padding:5px 0}.maintenance-remove{position:absolute;right:8px;top:8px}}
@media(max-width:700px){.catalog-admin-toolbar{grid-template-columns:1fr}.catalog-admin-toolbar .table-search{grid-column:auto}.selected-client-card{grid-template-columns:auto 1fr}.selected-client-balance{grid-column:2}.selected-client-card>button{grid-column:2;width:max-content}.maintenance-head{flex-direction:column}.maintenance-row{grid-template-columns:1fr}.maintenance-remove{position:absolute;right:8px;top:8px}}
