*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
--navy:#012934;--navy-d:#011d26;--navy-l:#02394a;--navy-50:#f0f9f8;
--pri:#cef7a0;--pri-d:#b5f07d;--pri-l:#e2facc;--pri-50:#f4fde8;--pri-100:#e8fbce;--pri-200:#d4f7a8;
--accent:#cef7a0;--accent-d:#b5f07d;--accent-bg:#f4fde8;--accent-border:#d4f7a8;--accent-light:#e8fbce;
--bg:#f4f5f9;--surface:#ffffff;--elevated:#ffffff;--border:#e8eaef;--border-light:#f2f3f6;
--text-primary:#111827;--text-secondary:#4b5563;--text-muted:#6b7280;--text-faint:#9ca3af;
--green:#059669;--green-bg:#ecfdf5;--green-border:#a7f3d0;--green-light:#d1fae5;
--red:#dc2626;--red-bg:#fef2f2;--red-border:#fecaca;
--warning:#d97706;--warning-bg:#fffbeb;--warning-border:#fde68a;
--r:10px;--r-lg:16px;
--shadow:0 1px 2px rgba(0,0,0,.02),0 2px 8px rgba(0,0,0,.04);
--shadow-md:0 2px 4px rgba(0,0,0,.02),0 8px 24px rgba(0,0,0,.06);
--shadow-lg:0 4px 8px rgba(0,0,0,.02),0 16px 48px rgba(0,0,0,.09);
}
html,body{height:100%;overflow:hidden}
body{font-family:'Inter',system-ui,-apple-system,sans-serif;background:var(--bg);color:var(--text-primary);-webkit-font-smoothing:antialiased;font-size:13px}
::selection{background:var(--pri-100)}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:10px}
::-webkit-scrollbar-thumb:hover{background:#9ca3af}
button{cursor:pointer;font-family:inherit}
a{text-decoration:none;color:inherit}
input,select,textarea{font-family:inherit}

.loading-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.7);display:flex;align-items:center;justify-content:center;z-index:9999}
.loading-spinner{width:36px;height:36px;border:3px solid var(--border);border-top-color:var(--navy);border-radius:50%;animation:spin .6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.toast{position:fixed;bottom:24px;right:24px;padding:12px 20px;border-radius:8px;font-size:13px;font-weight:500;z-index:9999;box-shadow:var(--shadow-md);transition:opacity .3s}
.toast.success{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}
.toast.error{background:var(--red-bg);color:var(--red);border:1px solid var(--red-border)}

.wiz-error{color:var(--red);font-size:12px;font-weight:500;margin:8px 0;padding:8px 12px;background:var(--red-bg);border:1px solid var(--red-border);border-radius:6px}
.field-error{color:var(--red);font-size:11px;font-weight:500;margin-top:4px}
.form-input.input-error,.form-select.input-error{border-color:var(--red)}

.export-formats{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.export-format-opt{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--border);border-radius:8px;cursor:pointer;transition:all .15s}
.export-format-opt:hover{border-color:var(--pri);background:var(--pri-50)}
.export-format-opt input[type="radio"]{accent-color:var(--navy);width:16px;height:16px}
.export-format-opt input[type="radio"]:checked ~ .export-fmt-label strong{color:var(--navy)}
.export-fmt-label{display:flex;flex-direction:column;gap:1px}
.export-fmt-label strong{font-size:13px;font-weight:600}
.export-fmt-label small{font-size:11px;color:var(--text-muted)}

.app{display:flex;height:100vh}
html.sess #loginScreen{display:none!important}
html.sess #appScreen{display:flex!important}

/* ===== SIDEBAR ===== */
.sidebar{width:250px;height:100vh;background:#012934;border-right:1px solid rgba(255,255,255,.06);display:flex;flex-direction:column;flex-shrink:0}
.sidebar-brand{padding:22px 20px 18px;display:flex;align-items:center;gap:10px;border-bottom:1px solid rgba(255,255,255,.06)}
.sidebar-brand-logo{display:flex;align-items:center;gap:10px}
.sidebar-brand-logo .brand-icon{width:34px;height:34px;border-radius:var(--r);background:var(--pri);display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(206,247,160,.3)}
.sidebar-brand-logo .brand-icon svg{width:18px;height:18px}
.sidebar-brand h1{font-size:17px;font-weight:700;letter-spacing:-.3px;color:#fff}
.sidebar-brand small{font-size:10px;color:rgba(255,255,255,.45);display:block;margin-top:1px;letter-spacing:.3px;font-weight:500}
.sidebar-nav{flex:1;padding:16px 12px;overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.nav-section{font-size:10px;font-weight:600;letter-spacing:.8px;text-transform:uppercase;color:rgba(255,255,255,.3);padding:18px 12px 6px}
.nav-section:first-child{padding-top:4px}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:var(--r);color:rgba(255,255,255,.65);font-size:13.5px;font-weight:500;transition:all .2s ease;cursor:pointer}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-item.active{background:rgba(206,247,160,.15);color:#cef7a0;font-weight:600;box-shadow:none}
.nav-item svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.nav-item .chevron{margin-left:auto;width:14px;height:14px;color:rgba(255,255,255,.25);transition:transform .2s}
.nav-item .chevron.open{transform:rotate(90deg)}
.nav-sub{display:none;flex-direction:column;gap:2px;padding-left:20px;margin-top:2px}
.nav-sub.open{display:flex}
.nav-sub .nav-item{font-size:13px;padding:7px 12px;color:rgba(255,255,255,.45)}
.nav-sub .nav-item:hover{color:#fff;background:rgba(255,255,255,.06)}
.nav-sub .nav-item.active{color:#cef7a0;font-weight:600;background:transparent;box-shadow:none}
.sidebar-footer{padding:12px;border-top:1px solid rgba(255,255,255,.06)}
.sidebar-profile{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r);transition:all .2s ease}
.sidebar-profile:hover{background:rgba(255,255,255,.08)}
.profile-av{width:34px;height:34px;border-radius:50%;background:var(--pri);color:#012934;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;flex-shrink:0;box-shadow:0 2px 6px rgba(150,220,80,.2)}
.profile-info{flex:1;min-width:0}
.profile-name{font-size:13px;font-weight:600;color:#fff}
.profile-email{font-size:11px;color:rgba(255,255,255,.5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-action{color:rgba(255,255,255,.3);display:flex}
.profile-action svg{width:14px;height:14px}

/* ===== MAIN ===== */
.main{flex:1;display:grid;grid-template-rows:auto 1fr;min-width:0;overflow:hidden}
.breadcrumb-bar{display:flex;align-items:center;justify-content:space-between;padding:12px 28px;border-bottom:1px solid var(--border-light);background:var(--surface);flex-shrink:0}
.breadcrumbs{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted)}
.breadcrumbs span{transition:.12s}
.breadcrumbs span[onclick]{cursor:pointer}
.breadcrumbs span[onclick]:hover{color:var(--navy)}
.breadcrumbs span.sep{color:var(--text-faint)}
.breadcrumbs span.current{color:var(--text-primary);font-weight:600}
.breadcrumb-actions{display:flex;gap:8px}
.content-area{overflow:hidden;padding:24px 28px;display:flex;flex-direction:column;min-height:0}

/* ===== VIEWS (show/hide) ===== */
.view{display:none}
.view.active{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto}
#view-new-upload.active{overflow:hidden}

/* ===== SHARED: CARDS ===== */
.card{background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r-lg);overflow:hidden;box-shadow:var(--shadow)}
.page-header{padding:24px 28px 20px}
.page-header-row{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:4px}
.page-header h1{font-size:22px;font-weight:700;color:var(--text-primary);letter-spacing:-.3px}
.page-header p{font-size:13px;color:var(--text-muted);line-height:1.5;max-width:620px}

/* ===== SHARED: BUTTONS ===== */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border-radius:var(--r);font-size:13px;font-weight:600;transition:all .2s ease;border:none;background:#012934;color:#fff;box-shadow:0 1px 3px rgba(1,41,52,.15),0 2px 8px rgba(1,41,52,.1)}
.btn:hover{background:#02394a;box-shadow:0 2px 6px rgba(1,41,52,.2),0 4px 14px rgba(1,41,52,.15);transform:translateY(-0.5px)}
.btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.btn-primary{border:none;background:var(--pri);color:#012934;font-weight:600;box-shadow:0 1px 3px rgba(150,220,80,.2),0 4px 12px rgba(150,220,80,.15)}
.btn-primary:hover{background:var(--pri-d);box-shadow:0 2px 6px rgba(150,220,80,.25),0 8px 20px rgba(150,220,80,.18);transform:translateY(-0.5px)}
.btn-accent{border:none;background:var(--pri);color:#012934;font-weight:600;box-shadow:0 1px 3px rgba(150,220,80,.2),0 4px 12px rgba(150,220,80,.15)}
.btn-accent:hover{background:var(--pri-d);box-shadow:0 2px 6px rgba(150,220,80,.25),0 8px 20px rgba(150,220,80,.18);transform:translateY(-0.5px)}
.btn-sm{padding:6px 14px;font-size:12px}
.btn-sm svg{width:13px;height:13px}
.btn-icon{width:36px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:var(--surface);border-radius:var(--r);color:var(--text-muted);flex-shrink:0;transition:all .2s ease;box-shadow:none;transform:none}
.btn-icon:hover{background:var(--bg);color:var(--navy);border-color:#c9cdd4;box-shadow:0 1px 4px rgba(0,0,0,.04);transform:none}
.btn-icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ===== SHARED: SEARCH ===== */
.search-bar{padding:0 28px 16px}
.search-wrap{position:relative}
.search-wrap svg.search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;stroke:#9ca3af;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.search-input{width:100%;height:40px;padding:0 14px 0 38px;border:1px solid var(--border);border-radius:var(--r);font-size:13px;color:var(--text-primary);background:#f9fafb;outline:none;transition:all .2s ease}
.search-input:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(150,220,80,.08);background:var(--surface)}
.search-input::placeholder{color:#9ca3af}

/* ===== SHARED: FILTERS ===== */
.filters-row{display:flex;align-items:center;gap:8px;padding:0 28px 12px;flex-wrap:wrap}
.filter-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);font-size:12px;font-weight:500;color:var(--text-secondary);transition:all .2s ease;white-space:nowrap}
.filter-btn:hover{background:var(--bg);border-color:#c9cdd4}
.filter-btn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.filter-btn .fi{color:var(--text-faint)}
.filter-btn.active-filter{background:var(--pri-50);border-color:var(--pri-200);color:var(--navy)}
.filter-dd-wrap{position:relative}
.filter-dd{display:none;position:absolute;top:calc(100% + 4px);left:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow-lg);z-index:100;min-width:180px;max-height:260px;overflow-y:auto}
.filter-dd.open{display:block}
.filter-dd-opt{padding:8px 14px;font-size:12px;color:var(--text-secondary);cursor:pointer;transition:.12s}
.filter-dd-opt:hover{background:var(--bg);color:var(--text-primary)}
.filter-dd-opt.active{color:var(--navy);font-weight:600;background:var(--pri-50)}

/* ===== SHARED: COUNT BAR ===== */
.count-bar{display:flex;align-items:center;justify-content:space-between;padding:8px 28px 12px;font-size:12px;color:var(--text-muted)}
.count-bar strong{font-weight:600;color:var(--text-secondary)}

/* ===== SHARED: TABLE ===== */
.table-wrap{overflow-x:auto}
.tbl{width:100%;border-collapse:collapse;min-width:900px}
.tbl thead{position:sticky;top:0;z-index:2}
.tbl th{padding:0 16px;height:42px;font-size:10.5px;font-weight:600;color:#6b7280;background:#f8f9fb;text-align:left;white-space:nowrap;text-transform:uppercase;letter-spacing:.6px;border-bottom:1px solid var(--border-light)}
.tbl th:first-child{padding-left:28px}
.tbl th:last-child{padding-right:28px}
.tbl th .sort-w{display:inline-flex;align-items:center;gap:4px;cursor:pointer}
.tbl th .sort-w{cursor:pointer;user-select:none}
.tbl th .sort-w svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tbl th .sort-w svg path{opacity:.3}
.tbl th .sort-w:hover svg path{opacity:.65}
.tbl th .sort-w.sort-asc svg{color:var(--navy)}
.tbl th .sort-w.sort-asc svg path:first-child{opacity:.15}
.tbl th .sort-w.sort-asc svg path:last-child{opacity:1}
.tbl th .sort-w.sort-desc svg{color:var(--navy)}
.tbl th .sort-w.sort-desc svg path:first-child{opacity:1}
.tbl th .sort-w.sort-desc svg path:last-child{opacity:.15}
.tbl td{padding:0 16px;height:52px;font-size:13px;background:var(--surface);vertical-align:middle;border-bottom:1px solid var(--border-light);transition:all .15s ease}
.tbl td:first-child{padding-left:28px}
.tbl td:last-child{padding-right:28px}
.tbl tbody tr{transition:all .15s ease;cursor:pointer}
.tbl tbody tr:hover td{background:#f8f9fc}
.tbl tbody tr.selected td{background:var(--pri-50)}
.cell-name{font-weight:600;color:var(--navy)}
.cell-sub{color:var(--text-secondary);font-size:12.5px;max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cell-total{font-weight:700;color:var(--navy);font-variant-numeric:tabular-nums;text-align:right}
.cell-date{color:var(--text-muted);font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:5px}
.cell-date svg{width:13px;height:13px;stroke:var(--text-faint);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cell-mono{font-family:'SF Mono','Cascadia Code','Consolas',monospace;font-size:13px;font-weight:500;color:var(--text-primary);letter-spacing:.3px}
.cell-muted{color:var(--text-muted);font-size:12px}
.cell-count{font-weight:600;color:var(--text-primary);font-variant-numeric:tabular-nums}

/* ===== SHARED: CHECKBOX ===== */
.chk{width:16px;height:16px;border-radius:5px;border:1.5px solid #c9cdd6;background:var(--surface);cursor:pointer;appearance:none;-webkit-appearance:none;transition:all .2s ease;position:relative;vertical-align:middle}
.chk:checked{background:var(--pri);border-color:var(--pri);box-shadow:0 1px 4px rgba(150,220,80,.2)}
.chk:checked::after{content:'';position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #012934;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.chk:hover{border-color:var(--pri-l)}

/* ===== SHARED: BADGES ===== */
.badge{display:inline-flex;align-items:center;gap:4px;padding:4px 11px;border-radius:20px;font-size:11px;font-weight:500;white-space:nowrap;letter-spacing:.01em}
.badge svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.badge-green{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}
.badge-red{background:var(--red-bg);color:var(--red);border:1px solid var(--red-border)}
.badge-orange{background:var(--warning-bg);color:var(--warning);border:1px solid var(--warning-border)}
.badge-neutral{background:var(--bg);color:var(--text-muted);border:1px solid var(--border)}
.badge-blue{background:var(--pri-50);color:var(--navy);border:1px solid var(--pri-200)}
.badge-info svg{width:12px;height:12px;stroke:var(--text-faint);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ===== SHARED: PAGINATION ===== */
.pag{display:flex;align-items:center;justify-content:space-between;padding:14px 28px;border-top:1px solid var(--border-light)}
.pag-info{font-size:12px;color:var(--text-muted)}
.pag-ctrls{display:flex;align-items:center;gap:4px}
.pag-btn{min-width:32px;height:32px;padding:0 8px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);font-size:12px;font-weight:500;color:var(--text-secondary);display:flex;align-items:center;justify-content:center;transition:all .2s ease}
.pag-btn:hover{background:var(--bg);border-color:#c9cdd4}
.pag-btn.active{background:var(--pri);color:#012934;border-color:var(--pri);box-shadow:0 1px 4px rgba(150,220,80,.2)}
.pag-btn.disabled{opacity:.3;pointer-events:none}
.pag-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pag-pp{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted)}
.pag-pp select{height:30px;padding:0 8px;border:1px solid var(--border);border-radius:6px;font-size:12px;font-family:inherit;color:var(--text-primary);background:var(--surface);cursor:pointer;outline:none}

/* ===== SHARED: STAT CARDS ===== */
.stat-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}
.stat-card{background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r-lg);padding:20px 22px;position:relative;box-shadow:var(--shadow);transition:box-shadow .2s ease}
.stat-card-label{font-size:12px;color:var(--text-muted);font-weight:500;margin-bottom:10px}
.stat-card-value{font-size:18px;font-weight:700;color:var(--text-primary);letter-spacing:-.2px;display:flex;align-items:center;gap:5px}
.stat-card-value .total{font-size:14px;color:var(--text-faint);font-weight:400}
.stat-card-sub{font-size:11px;color:var(--text-muted);margin-top:4px}
.stat-card-icon{position:absolute;top:18px;right:18px;width:28px;height:28px;border-radius:50%;border:2px solid var(--border);display:flex;align-items:center;justify-content:center}
.stat-card-icon svg{width:14px;height:14px;stroke:var(--text-faint);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stat-card-link{font-size:12px;color:var(--text-muted);margin-top:10px;display:inline-flex;align-items:center;gap:4px;cursor:pointer;transition:.12s}
.stat-card-link:hover{color:var(--navy)}
.stat-card-link svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stat-card-detail{font-size:14px;font-weight:600;color:var(--text-primary);line-height:1.4;margin-top:2px}

/* ===== DETAIL: ORDER HEADER ===== */
.order-header{margin-bottom:24px}
.order-header h1{font-size:22px;font-weight:700;color:var(--text-primary);letter-spacing:-.3px}
.order-date{font-size:13px;color:var(--text-muted);margin-top:3px}

/* ===== DETAIL: SERIAL TOOLBAR ===== */
.serial-toolbar{display:flex;align-items:center;gap:12px;padding:12px 24px;border-bottom:1px solid var(--border-light)}
.serial-tabs{display:flex;align-items:center;gap:0;padding:0 24px;border-bottom:1px solid var(--border-light)}
.serial-tab{padding:11px 0;font-size:13px;font-weight:500;color:var(--text-muted);background:none;border:none;position:relative;transition:.12s;display:flex;align-items:center;gap:6px;margin-right:24px}
.serial-tab:hover{color:var(--text-primary)}
.serial-tab.active{color:var(--navy);font-weight:600}
.serial-tab.active::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--navy);border-radius:2px 2px 0 0}
.serial-tab svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.serial-tab .tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;font-size:10px;font-weight:600;background:var(--bg);color:var(--text-muted)}
.serial-tab.active .tab-count{background:#012934;color:#fff}

/* ===== DETAIL: LINEAGE PILLS ===== */
.lineage-pills{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.lineage-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:500;cursor:pointer;transition:.12s;white-space:nowrap}
.lineage-pill svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lineage-pill.green{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}
.lineage-pill.green:hover{background:var(--green-light)}
.lineage-pill.red{background:var(--red-bg);color:var(--red);border:1px solid var(--red-border)}
.lineage-pill.red:hover{background:#fecaca}
.lineage-pill.blue{background:var(--pri-50);color:var(--navy);border:1px solid var(--pri-200)}
.lineage-pill.blue:hover{background:var(--pri-100)}
.no-lineage{font-size:12px;color:var(--text-faint);font-style:italic}
.vat-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 10px;border-radius:20px;font-size:10px;font-weight:600;background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}
.vat-badge svg{width:10px;height:10px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* ===== DETAIL: ACTION MENU ===== */
.action-menu-wrap{position:relative;display:inline-flex}
.action-menu{position:absolute;top:calc(100% + 6px);right:0;background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);padding:6px;min-width:240px;z-index:100;display:none}
.action-menu.open{display:block}
.action-menu-section{font-size:10px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;padding:8px 12px 4px}
.action-menu-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:var(--r);font-size:13px;font-weight:500;color:var(--text-secondary);border:none;background:none;width:100%;text-align:left;transition:.1s;cursor:pointer}
.action-menu-item:hover{background:var(--navy-50);color:var(--navy)}
.action-menu-item svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.action-menu-divider{height:1px;background:var(--border-light);margin:4px 0}

/* ===== MODAL ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(17,24,39,.35);backdrop-filter:blur(4px);z-index:500;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .25s ease}
.modal-overlay.open{opacity:1;pointer-events:auto}
.modal{background:var(--surface);border-radius:var(--r-lg);width:500px;max-width:92vw;box-shadow:0 8px 16px rgba(0,0,0,.04),0 24px 64px rgba(0,0,0,.12);transform:scale(.97) translateY(4px);transition:transform .25s ease}
.modal-overlay.open .modal{transform:scale(1) translateY(0)}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 12px}
.modal-header h3{font-size:16px;font-weight:700;color:var(--navy)}
.modal-close{width:28px;height:28px;border-radius:6px;border:none;background:transparent;display:flex;align-items:center;justify-content:center;color:var(--text-muted);cursor:pointer;transition:.12s}
.modal-close:hover{background:var(--bg);color:var(--text-primary)}
.modal-close svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.modal-body{padding:0 24px 20px}
.modal-desc{font-size:13px;color:var(--text-muted);line-height:1.5;margin-bottom:16px}
.modal-field{padding:12px 16px;border:1px solid var(--border);border-radius:var(--r);margin-bottom:16px}
.modal-field-label{font-size:12px;font-weight:600;color:var(--text-primary)}
.modal-field-sub{font-size:12px;color:var(--text-muted);margin-top:2px}
.modal-section-title{font-size:12px;font-weight:600;color:var(--text-primary);margin-bottom:10px;border:1px solid var(--border);border-radius:var(--r);padding:12px 16px}
.check-option{display:flex;align-items:flex-start;gap:10px;padding:10px 0}
.check-option+.check-option{border-top:1px solid var(--border-light)}
.check-option-title{font-size:13px;font-weight:600;color:var(--text-primary)}
.check-option-desc{font-size:12px;color:var(--text-muted);margin-top:2px}
.check-inline{display:flex;align-items:center;gap:16px;padding:8px 0 0 28px}
.check-inline label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:var(--text-secondary);cursor:pointer}
.modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--border-light)}

/* ===== FORM ===== */
.form-group{margin-bottom:16px}
.form-label{display:block;font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:7px}
.form-label .req{color:var(--red)}
.form-input{width:100%;height:42px;padding:0 14px;border:1px solid var(--border);border-radius:var(--r);font-size:13px;color:var(--text-primary);background:#f9fafb;outline:none;transition:all .2s ease}
.form-input:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(150,220,80,.08);background:var(--surface)}
.form-input::placeholder{color:var(--text-faint)}
.form-textarea{width:100%;min-height:76px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r);font-size:13px;color:var(--text-primary);background:#f9fafb;outline:none;resize:vertical;transition:all .2s ease}
.form-textarea:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(150,220,80,.08);background:var(--surface)}
.form-textarea::placeholder{color:var(--text-faint)}
.form-select{width:100%;height:42px;padding:0 36px 0 14px;border:1px solid var(--border);border-radius:var(--r);font-size:13px;color:var(--text-primary);background:#f9fafb;outline:none;appearance:none;-webkit-appearance:none;cursor:pointer;transition:all .2s ease;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.form-select:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(150,220,80,.08);background:var(--surface)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* ===== WIZARD UNIFIED ===== */
.wizard-unified{background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r-lg);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow);flex:1;min-height:0;max-height:calc(100vh - 110px)}
.wiz-header{padding:24px 28px 20px;border-bottom:1px solid var(--border-light);display:flex;align-items:center;justify-content:space-between}
.wiz-steps-row{display:flex;align-items:center;gap:0;flex:1}
.wiz-step{display:flex;align-items:center;gap:10px;cursor:pointer;padding:4px 0;transition:.12s}
.wiz-step:hover .wiz-circle{border-color:var(--pri)}
.wiz-circle{width:32px;height:32px;border-radius:50%;border:2px solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;color:var(--text-muted);transition:all .2s;flex-shrink:0}
.wiz-step.active .wiz-circle{background:var(--pri);border-color:var(--pri);color:#012934}
.wiz-step.completed .wiz-circle{background:var(--pri);border-color:var(--pri);color:#012934}
.wiz-step-text{min-width:0}
.wiz-step-title{font-size:13px;font-weight:500;color:var(--text-muted);transition:.12s;white-space:nowrap}
.wiz-step.active .wiz-step-title{color:var(--text-primary);font-weight:600}
.wiz-step.completed .wiz-step-title{color:var(--navy);font-weight:600}
.wiz-step-sub{font-size:11px;color:var(--text-faint);white-space:nowrap;margin-top:1px}
.wiz-line{flex:1;height:2px;background:var(--border);margin:0 16px;border-radius:2px;overflow:hidden;min-width:20px}
.wiz-line-fill{height:100%;width:0;background:var(--pri);border-radius:2px;transition:width .4s ease}
.wiz-file-counter{font-size:13px;color:var(--text-muted);white-space:nowrap;margin-left:16px}
.wiz-body{flex:1;overflow-y:auto;min-height:0;display:flex;flex-direction:column}
.step-content{display:none}
.step-content.active{display:block;flex:1}
#wiz-step-3.active{display:flex;flex-direction:column}
#wiz-step-3 .config-section{flex:1;display:flex;flex-direction:column}
#wiz-step-3 .config-section form{flex:1;display:flex;flex-direction:column}
#wiz-step-3 .config-section .form-group:last-child{flex:1;display:flex;flex-direction:column}
#wiz-step-3 .config-section .form-textarea{flex:1;resize:none;min-height:76px}
.step-desc{font-size:13px;color:var(--text-muted);margin-bottom:20px;line-height:1.5}
.wiz-footer{display:flex;align-items:center;justify-content:space-between;padding:16px 28px;border-top:1px solid var(--border-light);background:#f8f9fb}

/* Dropzone */
.upload-section{padding:28px}
.upload-section h3{font-size:16px;font-weight:700;margin-bottom:20px}
.dropzone{border:2px dashed #d1d5db;border-radius:var(--r-lg);padding:60px 40px;display:flex;flex-direction:column;align-items:center;text-align:center;transition:all .25s ease;cursor:pointer;position:relative}
.dropzone:hover{border-color:var(--pri-l);background:var(--pri-50)}
.dropzone.dragover{border-color:var(--pri);background:var(--pri-50);box-shadow:0 0 0 4px rgba(150,220,80,.06)}
.dropzone input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}
.dropzone-icon{width:48px;height:48px;border-radius:50%;background:var(--pri-50);display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.dropzone-icon svg{width:22px;height:22px;stroke:var(--navy);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dropzone h4{font-size:15px;font-weight:700;margin-bottom:6px}
.dropzone p{font-size:13px;color:var(--text-muted)}
.file-preview{display:none;align-items:center;gap:14px;padding:16px 20px;background:var(--pri-50);border:1px solid var(--pri-200);border-radius:var(--r);margin-top:16px}
.file-preview.show{display:flex}
.file-preview-icon{width:40px;height:40px;border-radius:var(--r);background:var(--pri-100);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.file-preview-icon svg{width:20px;height:20px;stroke:var(--navy);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.file-preview-name{font-size:13px;font-weight:600}
.file-preview-size{font-size:12px;color:var(--text-muted)}
.file-preview-remove{width:28px;height:28px;border-radius:6px;border:none;background:transparent;display:flex;align-items:center;justify-content:center;color:var(--text-muted);transition:.12s;margin-left:auto}
.file-preview-remove:hover{background:var(--red-bg);color:var(--red)}
.file-preview-remove svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Select Serials */
.select-header{padding:24px 28px 0}
.select-header h3{font-size:16px;font-weight:700;margin-bottom:4px}
.select-header p{font-size:13px;color:var(--text-muted);margin-bottom:20px}
.select-modes{display:flex;background:var(--bg);border-radius:var(--r);padding:4px;gap:2px;margin-bottom:20px}
.select-mode{flex:1;padding:10px 16px;border-radius:6px;border:none;background:transparent;font-size:13px;font-weight:500;color:var(--text-muted);display:flex;align-items:center;justify-content:center;gap:8px;transition:.15s}
.select-mode:hover{color:var(--text-secondary)}
.select-mode.active{background:var(--surface);color:var(--navy);box-shadow:var(--shadow);font-weight:600}
.select-mode svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.select-toolbar{display:flex;align-items:center;justify-content:space-between;padding:0 28px 12px}
.select-toolbar-left{display:flex;align-items:center;gap:10px}
.extracted-label{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;font-weight:600}
.extracted-value{font-size:26px;font-weight:700;color:var(--navy);letter-spacing:-.5px}

/* Data table for serial selection */
.dtbl-wrap{overflow:auto;max-height:calc(100vh - 420px);border-top:1px solid var(--border-light)}
.dtbl-wrap::-webkit-scrollbar{width:8px;height:8px}
.dtbl-wrap::-webkit-scrollbar-track{background:#f1f5f9;border-radius:4px}
.dtbl-wrap::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:4px}
.dtbl-wrap::-webkit-scrollbar-thumb:hover{background:#64748b}
.dtbl-wrap::-webkit-scrollbar-corner{background:#f1f5f9}
.dtbl{width:100%;border-collapse:collapse;font-size:12px}
.dtbl th{padding:8px 12px;height:36px;font-size:11px;font-weight:600;color:#6b7280;background:#f8f9fb;text-align:left;white-space:nowrap;border-bottom:1px solid var(--border-light);position:sticky;top:0;z-index:2;cursor:pointer;user-select:none;transition:all .15s ease}
.dtbl th:hover{background:#eef0f4;color:var(--text-primary)}
.dtbl th.sel{background:var(--green-light);color:var(--green)}
.dtbl th.sel::after{content:' \2713';font-weight:700}
.dtbl th.rn{width:40px;text-align:center;cursor:default;background:var(--bg)!important;color:#9ca3af!important}
.dtbl th.rn::after{content:none!important}
.dtbl td{padding:6px 12px;height:32px;background:var(--surface);border-bottom:1px solid var(--border-light);white-space:nowrap;color:var(--text-secondary);font-variant-numeric:tabular-nums;transition:background .1s,color .1s}
.dtbl td.rn{text-align:center;color:var(--text-faint);background:var(--bg);font-weight:500;font-size:11px;cursor:pointer}
.dtbl td.rn:hover{background:var(--green-light);color:var(--green)}
.dtbl td.rn.sel{background:var(--green-light);color:var(--green);font-weight:700}
.dtbl td.sc{background:var(--green-bg);color:var(--green)}
.dtbl tr.row-sel td{background:var(--green-bg);color:var(--green)}
.dtbl tr.row-sel td.rn{background:var(--green-light);color:var(--green);font-weight:700}
.dtbl tbody tr:hover td{background:var(--navy-50)}
.dtbl tbody tr.row-sel:hover td{background:var(--green-light)}

/* Config section */
.config-section{padding:22px 28px}
.config-section .form-group{margin-bottom:20px}
.config-section form .form-group:last-child{margin-bottom:0}
.config-section h3{font-size:16px;font-weight:700;margin-bottom:6px}
.config-section>p{font-size:13px;color:var(--text-muted);margin-bottom:20px}

/* Product dropdown */
.product-dd-wrap{position:relative}
.product-dd{position:absolute;top:100%;left:0;right:0;background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r);box-shadow:var(--shadow-lg);z-index:50;display:none;flex-direction:column;max-height:280px}
.product-dd.open{display:flex}
.product-dd-search{padding:8px;border-bottom:1px solid var(--border-light);position:relative;flex-shrink:0}
.product-dd-search svg{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:14px;height:14px;stroke:var(--text-faint);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.product-dd-search input{width:100%;height:34px;padding:0 10px 0 30px;border:1px solid var(--border);border-radius:6px;font-size:12px;color:var(--text-primary);background:var(--bg);outline:none}
.product-dd-search input::placeholder{color:var(--text-faint)}
.product-dd-list{overflow-y:auto;flex:1;min-height:0;max-height:120px}
.product-dd-footer{flex-shrink:0;border-bottom:1px solid var(--border-light)}
.product-opt{padding:10px 14px;font-size:13px;color:var(--text-secondary);cursor:pointer;transition:.1s}
.product-opt:hover{background:var(--navy-50);color:var(--navy)}
.product-opt.new{color:var(--text-muted);border-top:1px solid var(--border-light);display:flex;align-items:center;gap:6px}
.product-opt.new svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Review section */
.review-section{padding:28px}
.review-section h3{font-size:16px;font-weight:700;margin-bottom:4px}
.review-section>p{font-size:13px;color:var(--text-muted);margin-bottom:20px}
.ready-banner{display:flex;align-items:center;gap:14px;padding:18px 22px;background:var(--green-bg);border:1px solid var(--green-border);border-radius:var(--r-lg);margin-bottom:24px}
.ready-icon{width:42px;height:42px;border-radius:50%;background:var(--green);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ready-icon svg{width:20px;height:20px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.ready-banner h4{font-size:15px;font-weight:700;color:var(--green)}
.ready-banner p{font-size:12px;color:var(--green);opacity:.8;margin-top:2px}
.review-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:24px}
.review-stat{background:var(--bg);border-radius:var(--r);padding:16px 18px;text-align:center}
.review-stat-num{font-size:22px;font-weight:700;color:var(--navy);letter-spacing:-.3px}
.review-stat-label{font-size:11px;color:var(--text-muted);font-weight:600;margin-top:4px;text-transform:uppercase;letter-spacing:.4px}
.review-card{border:1px solid var(--border-light);border-radius:var(--r-lg);overflow:hidden;margin-bottom:16px;box-shadow:var(--shadow)}
.review-card-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#f8f9fb;border-bottom:1px solid var(--border-light)}
.review-card-title{font-size:12px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;display:flex;align-items:center;gap:8px}
.review-card-title svg{width:14px;height:14px;stroke:var(--text-muted);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.review-card-edit{font-size:12px;font-weight:500;color:var(--navy);display:inline-flex;align-items:center;gap:4px;cursor:pointer;transition:.12s;background:none;border:none;padding:4px 8px;border-radius:6px}
.review-card-edit:hover{background:var(--pri-50);color:var(--navy)}
.review-card-edit svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.review-card-body{padding:18px}
.review-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 32px}
.review-field{padding:10px 14px;background:var(--bg);border-radius:var(--r);border:1px solid var(--border-light)}
.review-field-label{font-size:11px;color:var(--text-muted);margin-bottom:4px;font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.review-field-value{font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px;color:var(--text-primary)}
.review-field-value svg{width:15px;height:15px;stroke:var(--navy);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.review-field-value .empty{color:var(--text-faint);font-weight:400;font-style:italic}
.review-file-item{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--bg);border-radius:var(--r)}
.review-file-icon{width:40px;height:40px;border-radius:var(--r);background:var(--pri-50);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.review-file-icon svg{width:20px;height:20px;stroke:var(--navy);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.review-file-info{flex:1;min-width:0}
.review-file-name{font-size:14px;font-weight:600;color:var(--text-primary)}
.review-file-meta{font-size:12px;color:var(--text-muted);margin-top:2px}
.review-file-status{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:500;color:var(--green);padding:4px 12px;background:var(--green-bg);border-radius:20px;border:1px solid var(--green-border)}
.review-file-status svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* ===== PROFILE ===== */
.profile-header{display:flex;align-items:center;gap:20px;margin-bottom:28px}
.profile-avatar-lg{width:72px;height:72px;border-radius:50%;background:var(--pri);color:#012934;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;flex-shrink:0}
.profile-header-info h2{font-size:20px;font-weight:700;color:var(--text-primary);letter-spacing:-.2px}
.profile-header-info p{font-size:13px;color:var(--text-muted);margin-top:2px}
.profile-section{background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r-lg);margin-bottom:20px;box-shadow:var(--shadow)}
.profile-section-header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--border-light)}
.profile-section-header h3{font-size:14px;font-weight:700;color:var(--text-primary)}
.profile-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:0}
.profile-field{padding:16px 24px;border-bottom:1px solid var(--border-light)}
.profile-field:nth-last-child(-n+2){border-bottom:none}
.profile-field-label{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px;margin-bottom:4px}
.profile-field-value{font-size:14px;font-weight:500;color:var(--text-primary)}
.profile-field-full{grid-column:1/-1}
.profile-actions{padding:18px 24px;border-top:1px solid var(--border-light);display:flex;gap:10px}
.btn-danger{border:1px solid var(--red-border);background:var(--red-bg);color:var(--red);font-weight:600}
.btn-danger:hover{background:var(--red);color:#fff;border-color:var(--red)}
.password-wrap{position:relative}
.password-wrap .form-input{padding-right:44px}
.pass-eye{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.pass-eye:hover{color:var(--text-primary)}
.pass-eye svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.avatar-upload-wrap{position:relative;flex-shrink:0}
.avatar-edit-btn{position:absolute;bottom:0;right:0;width:26px;height:26px;border-radius:50%;background:var(--surface);border:2px solid var(--border);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-muted);transition:.12s}
.avatar-edit-btn:hover{background:var(--pri-50);color:var(--navy);border-color:var(--pri-200)}
.profile-avatar-lg img{width:100%;height:100%;object-fit:cover;border-radius:50%}

/* ===== LOGIN ===== */
.login-page{display:flex;height:100vh}
.login-left{flex:1;display:flex;align-items:center;justify-content:center;padding:40px}
.login-card{width:100%;max-width:420px}
.login-brand{display:flex;align-items:center;gap:10px;margin-bottom:36px}
.login-card h2{font-size:24px;font-weight:700;color:var(--text-primary);letter-spacing:-.3px;margin-bottom:6px}
.login-card .subtitle{font-size:14px;color:var(--text-muted);margin-bottom:32px}
.form-input.error{border-color:var(--red)}
.form-error{font-size:12px;color:var(--red);margin-top:6px;display:none}
.form-error.show{display:block}
.login-pw-wrap{position:relative}
.login-pw-wrap .form-input{padding-right:44px}
.login-pw-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.login-pw-toggle:hover{color:var(--text-primary)}
.login-pw-toggle svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.form-options{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.remember{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-secondary);cursor:pointer}
.remember input{width:16px;height:16px;border-radius:4px;border:1.5px solid var(--text-faint);background:var(--surface);cursor:pointer;appearance:none;-webkit-appearance:none;position:relative;vertical-align:middle}
.remember input:checked{background:var(--pri);border-color:var(--pri)}
.remember input:checked::after{content:'';position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #012934;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.forgot{font-size:13px;color:var(--navy);font-weight:500;cursor:pointer;background:none;border:none;font-family:inherit;transition:.12s}
.forgot:hover{color:var(--navy-l)}
.btn-login{width:100%;height:46px;border:none;border-radius:var(--r);background:var(--pri);color:#012934;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;transition:all .2s ease;box-shadow:0 1px 3px rgba(150,220,80,.2),0 4px 12px rgba(150,220,80,.15)}
.btn-login:hover{background:var(--pri-d);box-shadow:0 2px 6px rgba(150,220,80,.25),0 8px 20px rgba(150,220,80,.18);transform:translateY(-0.5px)}
.btn-login:active{transform:scale(.99)}
.login-footer{margin-top:32px;text-align:center;font-size:13px;color:var(--text-muted)}
.login-right{width:50%;background:linear-gradient(135deg,#012934 0%,#011d26 60%,#02394a 100%);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.login-right::before{content:'';position:absolute;width:600px;height:600px;border-radius:50%;background:rgba(255,255,255,.05);top:-100px;right:-150px}
.login-right::after{content:'';position:absolute;width:400px;height:400px;border-radius:50%;background:rgba(255,255,255,.04);bottom:-80px;left:-100px}
.right-content{position:relative;z-index:1;text-align:center;padding:60px;max-width:480px}
.right-content h2{font-size:28px;font-weight:700;color:#fff;letter-spacing:-.3px;margin-bottom:12px;line-height:1.3}
.right-content p{font-size:15px;color:rgba(255,255,255,.75);line-height:1.6}
.right-features{display:flex;flex-direction:column;gap:14px;margin-top:32px;text-align:left}
.right-feature{display:flex;align-items:center;gap:12px;font-size:14px;color:rgba(255,255,255,.85);font-weight:500}
.right-feature .feat-icon{width:32px;height:32px;border-radius:8px;background:rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.right-feature .feat-icon svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:900px){.login-right{display:none}.login-left{padding:24px}}

/* ===== EXCLUDE MODE ===== */
.exclude-toggle{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);font-size:12px;font-weight:500;color:var(--text-secondary);cursor:pointer;transition:.12s}
.exclude-toggle:hover{background:var(--bg)}
.exclude-toggle.active{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning)}
.exclude-toggle svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.excl-count-badge{font-size:12px;font-weight:600;color:var(--text-secondary);padding:4px 12px;background:var(--bg);border:1px solid var(--border);border-radius:20px}
.dtbl th:not(.rn),.dtbl td:not(.rn){min-width:140px}
.dtbl th.excl{background:var(--warning-bg) !important;color:var(--warning) !important}
.dtbl td.excl{background:#fefce8 !important;color:var(--warning) !important}
.dtbl tr.row-excl td:not(.rn){background:#fefce8 !important;color:var(--warning) !important}
.dtbl tr.row-excl td.rn{background:var(--warning-bg) !important;color:var(--warning) !important;font-weight:700}
.dtbl tr.row-header td{background:#f1f5f9 !important;color:#94a3b8 !important;font-style:italic}
.dtbl tr.row-header td.rn{background:#e2e8f0 !important;color:#94a3b8 !important;font-weight:700}
.header-row-toggle{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:var(--text-secondary);cursor:pointer;user-select:none}
.header-row-toggle input{cursor:pointer;width:14px;height:14px;accent-color:var(--primary)}
.dtbl td.cell-excl{background:#fefce8 !important;color:var(--warning) !important}

/* Floating exclude toolbar */
.excl-toolbar{display:none;position:sticky;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);padding:14px 24px;z-index:20;box-shadow:0 -4px 16px rgba(0,0,0,.08)}
.excl-toolbar.open{display:flex;align-items:center;gap:16px}
.excl-toolbar-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.excl-toolbar-hint{font-size:13px;color:var(--text-secondary);line-height:1.4}
.excl-toolbar-hint strong{color:var(--text-primary);font-weight:600}
.excl-toolbar-hint span{color:var(--text-muted);font-size:12px}
.excl-toolbar-btns{display:flex;align-items:center;gap:4px}
.excl-mode-btn{padding:7px 16px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);font-size:13px;font-weight:500;color:var(--text-secondary);cursor:pointer;transition:.12s}
.excl-mode-btn:hover{background:var(--bg);border-color:#cbd5e1}
.excl-mode-btn.active{background:var(--text-primary);color:#fff;border-color:var(--text-primary)}
.excl-mode-btn.clear{color:var(--text-muted)}
.excl-mode-btn.done{background:var(--text-primary);color:#fff;border-color:var(--text-primary)}

/* ===== ROW ACTIONS ===== */
.row-actions{display:flex;align-items:center;gap:2px;justify-content:flex-end}
.row-action{width:30px;height:30px;border-radius:8px;border:none;background:transparent;display:flex;align-items:center;justify-content:center;color:var(--text-muted);cursor:pointer;transition:all .2s ease}
.row-action:hover{background:var(--bg);color:var(--text-primary)}
.row-action.danger:hover{background:var(--red-bg);color:var(--red)}
.row-action svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ===== STATUS TOGGLE ===== */
.status-toggle{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);font-size:13px;font-weight:500;color:var(--text-secondary);cursor:pointer;transition:.15s}
.status-toggle:hover{border-color:var(--green-border);background:var(--green-bg);color:var(--green)}
.status-toggle.active{background:var(--green-bg);border-color:var(--green-border);color:var(--green)}
.status-toggle svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ===== SERIAL SELECTION BAR ===== */
.serial-sel-bar{display:none;position:fixed;bottom:24px;left:274px;right:24px;background:var(--pri);color:#012934;padding:14px 28px;z-index:100;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 8px 32px rgba(150,220,80,.3);border-radius:var(--r-lg)}
.serial-sel-bar.show{display:flex}
.serial-sel-bar-left{display:flex;align-items:center;gap:12px;font-size:13px;font-weight:500}
.serial-sel-bar-left strong{font-weight:700;font-size:15px}
.serial-sel-bar-right{display:flex;align-items:center;gap:8px}
.serial-sel-bar .bar-btn{padding:8px 20px;border-radius:var(--r);border:1px solid rgba(1,41,52,.25);background:rgba(1,41,52,.08);color:#012934;font-size:13px;font-weight:600;cursor:pointer;transition:.12s;display:flex;align-items:center;gap:6px}
.serial-sel-bar .bar-btn:hover{background:rgba(1,41,52,.15)}
.serial-sel-bar .bar-btn.primary{background:#012934;color:#fff;border-color:#012934}
.serial-sel-bar .bar-btn.primary:hover{background:#02394a;color:#fff}
.serial-sel-bar .bar-btn.danger{background:var(--red);color:#fff;border-color:var(--red)}
.serial-sel-bar .bar-btn.danger:hover{background:#b91c1c}
.serial-sel-bar .bar-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ===== CUSTOMER DROPDOWN IN MODAL ===== */
.cust-dd-wrap{position:relative}
.cust-dd{position:absolute;top:100%;left:0;right:0;background:var(--surface);border:1px solid var(--border-light);border-radius:var(--r);box-shadow:var(--shadow-lg);z-index:50;display:none;max-height:220px;overflow-y:auto}
.cust-dd.open{display:block}
.cust-dd-search{padding:8px;border-bottom:1px solid var(--border-light);position:relative}
.cust-dd-search svg{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:14px;height:14px;stroke:var(--text-faint);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.cust-dd-search input{width:100%;height:34px;padding:0 10px 0 30px;border:1px solid var(--border);border-radius:6px;font-size:12px;color:var(--text-primary);background:var(--bg);outline:none}
.cust-dd-search input::placeholder{color:var(--text-faint)}
.cust-opt{padding:10px 14px;font-size:13px;color:var(--text-secondary);cursor:pointer;transition:.1s;display:flex;flex-direction:column;gap:1px}
.cust-opt:hover{background:var(--navy-50);color:var(--navy)}
.cust-opt small{font-size:11px;color:var(--text-muted)}
.cust-opt.new{color:var(--navy);border-bottom:1px solid var(--border-light);flex-direction:row;align-items:center;gap:6px;font-weight:500}
.cust-opt.new svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}