*{box-sizing:border-box}:root{--navy:#102b59;--blue:#155eef;--line:#e2e8f0;--muted:#64748b;--ink:#0f172a}body{margin:0;background:#f8fafc;color:var(--ink);font-family:Arial,Helvetica,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}.topbar{background:var(--navy);color:white}.topbar-inner{max-width:1440px;margin:auto;padding:17px 28px;justify-content:space-between}.brand,.topbar-inner{display:flex;align-items:center}.brand{gap:13px}.brand-icon{padding:10px;border-radius:12px;background:#ffffff1c;display:flex}.brand-title{font-size:15px;font-weight:800;letter-spacing:.7px}.brand-subtitle{font-size:12px;color:#dbeafe;margin-top:3px}.topbar-status{font-size:12px;color:#dbeafe;display:flex;align-items:center;gap:8px}.topbar-status span{width:8px;height:8px;border-radius:50%;background:#34d399}.page-shell{max-width:1440px;margin:0 auto;padding:27px 24px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:23px}.eyebrow{font-size:13px;color:#1d4ed8;font-weight:700}.page-heading h1{font-size:29px;line-height:1.2;margin:5px 0;color:#0f172a}.page-heading p{font-size:13px;color:var(--muted);margin:7px 0 0}.tab,.tabs{display:flex;gap:8px}.tab{border:1px solid #dbe3ee;border-radius:9px;background:white;padding:10px 14px;color:#334155;font-size:13px;font-weight:700;align-items:center}.tab.active{background:#155eef;color:white;border-color:#155eef}.count{border-radius:20px;padding:2px 7px;background:#ffffff2b}.main-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-gap:20px;gap:20px;align-items:start}.panel{background:white;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 2px 8px #0f172a08}.form-panel{padding:22px 23px}.section-title{display:flex;align-items:center;gap:9px;color:#1d4ed8;margin-bottom:19px}.section-title h2,.section-title h3{font-size:17px;color:#172033;margin:0;font-weight:800}.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:17px 18px;gap:17px 18px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field label{font-size:12px;color:#475569;font-weight:700}.field label b{color:#e11d48}.control{width:100%;min-width:0;border:1px solid #d7deea;border-radius:8px;background:white;padding:10px 11px;outline:none;color:#172033;font-size:13px;min-height:40px}.control:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb18}.control::placeholder{color:#94a3b8}.control.read-only{background:#f8fafc;font-weight:800}.choice-group{min-height:40px;gap:19px;padding:4px 2px}.choice,.choice-group{display:flex;align-items:center}.choice{gap:7px;font-size:13px;color:#334155;cursor:pointer}.choice input{width:16px;height:16px;accent-color:#155eef;margin:0}.section-divider{height:1px;background:#edf0f5;margin:22px 0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.section-head h2{font-size:18px;margin:0;font-weight:800}.section-head p{font-size:12px;color:var(--muted);margin:5px 0 0}.item-count{background:#eff6ff;color:#1d4ed8;border-radius:8px;padding:8px 11px;font-size:11px;font-weight:800;white-space:nowrap}.item-list{display:flex;flex-direction:column;gap:13px}.item-card{border:1px solid #e2e8f0;border-radius:12px;padding:15px;background:#fff}.item-card-head{justify-content:space-between;margin-bottom:14px}.item-card-head,.item-heading{display:flex;align-items:center}.item-heading{gap:10px}.item-number{width:30px;height:30px;border-radius:8px;background:#dbeafe;color:#1d4ed8;font-size:13px;font-weight:800;display:grid;place-items:center}.item-heading h3{font-size:14px;margin:0;font-weight:800}.remove-item{border:0;background:transparent;color:#e11d48;font-size:11px;font-weight:700;display:flex;align-items:center;gap:5px;padding:7px 9px;border-radius:7px}.remove-item:hover{background:#fff1f2}.item-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:13px 15px;gap:13px 15px}.part-input{display:flex;align-items:center;gap:6px}.part-input>span{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:11px 9px;font-family:monospace;font-size:11px;font-weight:800;white-space:nowrap;color:#334155}.mono{font-family:monospace;font-weight:700;text-transform:uppercase}.field small{font-size:10px;color:#94a3b8;margin-top:-2px}.detail-field{grid-column:1/-1}.detail-area{min-height:58px;resize:vertical}.add-item{margin-top:14px;border:1px dashed #93c5fd;color:#1d4ed8;background:#eff6ff;border-radius:10px;padding:11px 16px;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px}.add-item:hover{background:#dbeafe}.total-summary{margin-top:17px;padding:15px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc}.total-summary h3{font-size:13px;margin:0 0 12px;font-weight:800}.summary-metrics{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:12px;gap:12px}.summary-metrics div{display:flex;flex-direction:column;gap:5px}.summary-metrics span{font-size:11px;color:#64748b}.summary-metrics strong{font-size:21px}.blue{color:#1e40af}.green,.green-text{color:#047857}.red,.red-text{color:#be123c}.preserved-sections{border:1px solid #e2e8f0;border-radius:10px;padding:14px;background:#fafcff}.preserved-sections h3{font-size:13px;margin:0 0 4px}.preserved-sections p{font-size:11px;color:#64748b;margin:0 0 13px}.preserved-sections p:last-child{margin-bottom:0}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.btn{border:1px solid transparent;border-radius:9px;padding:10px 13px;font-size:12px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn-primary{background:#155eef;color:white}.btn-primary:hover{background:#124dcc}.btn-secondary{background:white;border-color:#dbe3ee;color:#334155}.btn-secondary:hover{background:#f8fafc}.btn-danger{background:#fff1f2;color:#be123c;border-color:#ffe4e6}.btn-danger:hover{background:#ffe4e6}.full{width:100%}.sidebar{display:flex;flex-direction:column;gap:15px}.side-card{padding:17px}.side-card .section-title{margin-bottom:14px}.side-card .section-title h3{font-size:15px}.mini-metrics{display:grid;grid-template-columns:1fr 1fr;grid-gap:9px;gap:9px}.metric{padding:12px;border-radius:10px;display:flex;flex-direction:column;gap:5px}.metric span{font-size:10px}.metric strong{font-size:24px}.green-bg{background:#ecfdf3;color:#047857}.red-bg{background:#fff1f2;color:#be123c}.blue-bg{background:#eff6ff;color:#1e40af}.total-metric{margin-top:9px}.side-foot{font-size:11px;color:#64748b;margin-top:13px}.side-foot b{color:#334155}.side-heading{font-size:14px;font-weight:800;margin:0 0 15px}.config-list{display:flex;flex-direction:column;gap:13px}.config-list div{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;font-size:11px}.config-list span{color:#64748b}.config-list b{color:#334155;text-align:right}.autosave{display:flex;align-items:flex-start;gap:9px;color:#059669;font-size:12px}.autosave div{display:flex;flex-direction:column;gap:4px}.autosave span{font-size:11px;color:#64748b}.alert{border-radius:10px;padding:11px 13px;margin-bottom:14px;font-size:12px;display:flex;align-items:flex-start;gap:9px}.alert button{margin-left:auto;border:0;background:transparent;color:inherit}.warning{border:1px solid #fde68a;background:#fffbeb;color:#92400e}.danger-alert{border:1px solid #fecaca;background:#fef2f2;color:#991b1b;white-space:pre-wrap}.success-alert{border:1px solid #a7f3d0;background:#ecfdf5;color:#065f46}.history-panel{padding:21px}.history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.history-head h2{font-size:18px;margin:0;font-weight:800}.history-head p{font-size:12px;color:#64748b;margin:5px 0 0}.filters{border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc;padding:15px;margin-bottom:16px}.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-gap:12px;gap:12px}.search-row{display:flex;gap:9px;margin-top:13px}.searchbox{position:relative;flex:1 1;min-width:0}.searchbox svg{position:absolute;left:12px;top:12px;color:#94a3b8}.searchbox input{padding-left:37px}.filter-count{font-size:11px;color:#64748b;margin:13px 0 0}.table-wrap{overflow-x:auto}.history-table{width:100%;border-collapse:collapse;min-width:900px;font-size:12px}.history-table th{text-align:left;font-size:10px;letter-spacing:.35px;color:#64748b;font-weight:800;border-bottom:1px solid #e2e8f0;padding:12px 10px}.history-table td{vertical-align:top;border-bottom:1px solid #edf0f5;padding:14px 10px}.history-table td:first-child{min-width:160px}.file-link{display:flex;align-items:center;gap:4px;color:#1d4ed8;font-size:10px;margin:5px 0;cursor:pointer}.history-table td small{display:block;color:#94a3b8;font-size:10px}.history-items{gap:7px}.history-items,.history-items div{display:flex;flex-direction:column}.history-items div{gap:3px}.history-items b{font-size:11px}.history-items span{font-family:monospace;font-size:10px;color:#64748b}.action-buttons{display:flex;gap:5px}.action-buttons button{width:29px;height:29px;border:1px solid #e2e8f0;border-radius:7px;background:white;color:#475569;display:grid;place-items:center}.action-buttons button:hover{background:#f8fafc}.action-buttons button:disabled{opacity:.3}.action-buttons .whatsapp-action{color:#059669}.action-buttons .delete-action{color:#be123c}.muted-sep{color:#cbd5e1}.empty-state{padding:48px 15px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;font-size:12px}.empty-state,.footer{text-align:center;color:#94a3b8}.footer{font-size:10px;padding:25px 0 10px}.modal-backdrop{position:fixed;inset:0;z-index:60;background:#02061780;display:flex;align-items:center;justify-content:center;padding:16px}.modal{width:100%;max-width:430px;background:white;border-radius:17px;padding:25px;box-shadow:0 25px 70px #0f172a40;text-align:center}.modal h2{font-size:20px;margin:12px 0 7px}.modal p{font-size:12px;line-height:1.6;color:#64748b}.success-icon{width:62px;height:62px;border-radius:50%;background:#dcfce7;color:#059669;display:grid;place-items:center;margin:auto}.filename{margin:15px 0;background:#f8fafc;border-radius:8px;padding:11px;text-align:left;display:flex;flex-direction:column;gap:5px}.filename span{font-size:10px;color:#64748b}.filename b{font-size:12px;overflow-wrap:anywhere}.modal-hint{font-size:11px!important}.modal .full{margin-top:12px}.confirm-modal{text-align:left}.modal-top{display:flex;justify-content:space-between;align-items:center}.modal-top h2{margin:0;font-size:17px}.modal-top button{border:0;background:transparent;color:#64748b}.confirm-modal p{margin:14px 0}.modal-actions{display:flex;justify-content:flex-end;gap:8px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}@media(max-width:1000px){.main-layout{grid-template-columns:minmax(0,1fr) 260px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.page-shell{padding:22px 15px}.topbar-inner{padding:15px}.main-layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar .side-card:last-child{grid-column:1/-1}.page-heading{align-items:flex-start;flex-direction:column}.tabs{width:100%}.tab{flex:1 1;justify-content:center}}@media(max-width:520px){.page-heading h1{font-size:24px}.form-panel,.history-panel{padding:15px}.info-grid,.item-fields{grid-template-columns:1fr}.detail-field{grid-column:auto}.sidebar{grid-template-columns:1fr}.sidebar .side-card:last-child{grid-column:auto}.filter-grid{grid-template-columns:1fr 1fr}.search-row{flex-direction:column}.search-row .btn{width:100%}.form-actions{flex-direction:column-reverse}.form-actions .btn{width:100%}.summary-metrics{gap:7px}.summary-metrics strong{font-size:19px}.item-card{padding:12px}.part-input>span{font-size:10px;padding:11px 7px}.section-head{align-items:flex-start}.topbar-status{display:none}}.error-icon{width:58px;height:58px;border-radius:50%;background:#fee2e2;color:#dc2626;display:grid;place-items:center;margin:auto}.error-modal .error-message{white-space:pre-line;text-align:left;background:#fff7f7;border:1px solid #fecaca;border-radius:9px;padding:12px;margin:14px 0;color:#991b1b;max-height:45vh;overflow:auto}.error-modal .full{margin-top:4px}