:root{
 --navy:#0b2d55;--navy2:#0a3c76;--blue:#2583f7;--sky:#e9f4ff;--green:#18b875;
 --orange:#f7a623;--purple:#7657dd;--red:#ef5d62;--ink:#18324c;--muted:#718096;
 --line:#e5edf5;--bg:#f3f7fb;--white:#fff;--shadow:0 8px 24px rgba(20,59,91,.08);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg)}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
.app-shell{min-height:100vh;display:flex}
.sidebar{width:238px;background:linear-gradient(180deg,#0a315d 0%,#0a2749 70%,#071d36 100%);color:#fff;position:fixed;left:0;top:0;bottom:0;z-index:30;display:flex;flex-direction:column;box-shadow:4px 0 18px rgba(6,31,58,.16)}
.sidebar-brand{background:#fff;padding:16px 15px 13px;min-height:130px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid rgba(255,255,255,.12)}
.sidebar-brand img{max-width:190px;max-height:105px;width:100%;object-fit:contain}
.side-nav{padding:16px 10px;display:grid;gap:5px}
.side-nav a{display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:11px;color:#eaf4ff;font-size:14px;transition:.15s}
.side-nav a:hover{background:rgba(255,255,255,.09)}
.side-nav a.active{background:linear-gradient(90deg,#197cf0,#3497ff);box-shadow:0 8px 18px rgba(22,122,240,.28);font-weight:700}
.side-nav a.disabled{opacity:.55;cursor:default}
.side-nav small{margin-left:auto;background:rgba(255,255,255,.14);padding:2px 6px;border-radius:20px;font-size:9px;text-transform:uppercase}
.nav-icon{width:24px;text-align:center;font-size:18px}
.sidebar-quote{margin:auto 16px 22px;padding:17px;border-radius:14px;background:linear-gradient(135deg,rgba(61,143,227,.24),rgba(244,166,33,.16));border:1px solid rgba(255,255,255,.12);display:grid;gap:4px}
.sidebar-quote strong{font-size:19px}.sidebar-quote span{font-size:13px;color:#cde4fb}
.main-area{margin-left:238px;min-width:0;flex:1}
.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);padding:0 25px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:20}
.menu-btn{display:none;border:0;background:#eef5fb;border-radius:9px;width:42px;height:42px;font-size:20px;color:var(--navy)}
.top-title{display:grid;gap:2px}.top-title strong{font-size:17px;color:var(--navy)}.top-title span{font-size:12px;color:var(--muted)}
.user-menu{display:flex;align-items:center;gap:10px}.user-avatar,.mini-avatar{display:grid;place-items:center;border-radius:50%;font-weight:800}
.user-avatar{width:40px;height:40px;color:#fff;background:linear-gradient(135deg,var(--orange),#f16b4d)}
.user-copy{display:grid;min-width:100px}.user-copy strong{font-size:13px}.user-copy span{font-size:11px;color:var(--muted)}
.logout{padding:8px 11px;border-radius:8px;color:#d94c52;font-size:12px;font-weight:700;background:#fff0f1}
.container{max-width:1440px;margin:auto;padding:24px}
.hero{min-height:152px;border-radius:20px;padding:25px 30px;color:#fff;display:flex;align-items:center;justify-content:space-between;overflow:hidden;position:relative;background:
 radial-gradient(circle at 75% 10%,rgba(255,255,255,.2),transparent 28%),
 linear-gradient(120deg,#087ab8,#0d9dba 48%,#18b875)}
.hero:after{content:"";position:absolute;width:260px;height:260px;border:38px solid rgba(255,255,255,.08);border-radius:50%;right:-45px;top:-85px}
.hero .eyebrow{color:#dff8ff}.hero h1{font-size:34px;margin:6px 0}.hero p{margin:0;color:#ecfbff}
.hero-mark{font-size:72px;transform:rotate(-12deg);opacity:.8;margin-right:55px;z-index:1}
.eyebrow{font-size:11px;letter-spacing:.14em;font-weight:800;color:#4381b6}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-top:18px}
.stat-card{border-radius:17px;padding:18px;display:flex;gap:14px;align-items:center;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.8)}
.stat-card .stat-icon{width:50px;height:50px;border-radius:14px;display:grid;place-items:center;font-size:22px;background:rgba(255,255,255,.68)}
.stat-card span{font-size:12px;font-weight:700;color:#415b71}.stat-card strong{font-size:30px;line-height:1.05;display:block;margin:3px 0;color:#122d49}.stat-card small{font-size:10px;color:#698097}
.stat-blue{background:linear-gradient(135deg,#dff0ff,#bfe2ff)}.stat-green{background:linear-gradient(135deg,#dff9ed,#bff1d7)}
.stat-orange{background:linear-gradient(135deg,#fff2d4,#ffe0a1)}.stat-purple{background:linear-gradient(135deg,#eee8ff,#d8c9ff)}
.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}
.quick-card{min-height:92px;border-radius:16px;padding:16px;display:grid;grid-template-columns:40px 1fr;column-gap:10px;align-items:center;border:1px solid rgba(255,255,255,.8);box-shadow:var(--shadow)}
.quick-card b{grid-row:1/3;width:40px;height:40px;border-radius:12px;background:#fff;display:grid;place-items:center;font-size:20px}
.quick-card span{font-weight:800;font-size:14px;align-self:end}.quick-card small{font-size:10px;color:#62788e;align-self:start}
.qc-blue{background:#e4f2ff}.qc-green{background:#e2f9ef}.qc-orange{background:#fff0dc}.qc-purple{background:#efe9ff}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(290px,.9fr);gap:18px}
.panel{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.panel-head{padding:18px 19px 10px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.panel-head h2{margin:0;font-size:17px;color:var(--navy)}.panel-head p{margin:4px 0 0;font-size:11px;color:var(--muted)}
.text-link{font-size:12px;font-weight:800;color:var(--blue)}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;min-width:720px}
th{padding:12px 14px;text-align:left;background:#f5f9fd;color:#647d92;font-size:10px;text-transform:uppercase;letter-spacing:.05em}
td{padding:13px 14px;border-top:1px solid #edf2f7;font-size:12px;vertical-align:middle}
tbody tr:hover{background:#fbfdff}
.code-chip{display:inline-block;padding:5px 7px;border-radius:7px;background:#e7f2ff;color:#176fc5;font-size:10px;font-weight:800}
.customer-code{background:#fff0d9;color:#b86900}
.name-cell{display:flex;align-items:center;gap:9px}.mini-avatar{width:30px;height:30px;background:#e4f1ff;color:#1674cf;font-size:12px}
.phone-link{color:#1479cb;font-weight:650}.destination-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#1fb17e;margin-right:7px}
.badge{display:inline-block;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}
.status-new{background:#e1efff;color:#1475d5}.status-contacted{background:#fff0d2;color:#b66d00}.status-quotation_sent{background:#e2f7ed;color:#087d4d}
.status-followup{background:#efe8ff;color:#6843c7}.status-confirmed{background:#dff6e8;color:#087839}.status-lost{background:#ffe4e5;color:#bb383e}.status-cancelled{background:#edf0f3;color:#5f6b76}
.status-panel{padding-bottom:12px}.status-row{display:block;padding:8px 18px}.status-label{display:flex;align-items:center;font-size:11px;color:#516b81}
.status-label b{margin-left:auto;color:#233c52}.status-dot{width:9px;height:9px;border-radius:50%;margin-right:8px}.progress{height:5px;background:#eef3f7;border-radius:20px;margin-top:7px;overflow:hidden}.progress i{display:block;height:100%;border-radius:20px}
.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin:2px 0 18px}.page-heading.compact{align-items:center}
.page-heading h1{font-size:29px;margin:4px 0;color:var(--navy)}.page-heading p{margin:0;color:var(--muted);font-size:12px}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:6px;padding:10px 14px;border-radius:10px;border:1px solid #d7e2ec;background:#fff;color:#36536d;font-size:12px;font-weight:800;cursor:pointer}
.btn:hover{transform:translateY(-1px)}.btn.primary{background:linear-gradient(135deg,#167de8,#2469d8);border-color:#1678df;color:#fff;box-shadow:0 7px 14px rgba(31,116,221,.18)}
.btn.ghost{background:#f7fafc}
.filter-bar{display:flex;align-items:center;gap:9px;margin-bottom:15px;background:#fff;border:1px solid var(--line);padding:11px;border-radius:14px;box-shadow:0 4px 12px rgba(30,74,108,.04)}
.filter-bar select{max-width:220px}.search-box{max-width:430px;flex:1;display:flex;align-items:center;border:1px solid #d8e3ed;border-radius:10px;background:#fbfdff;padding-left:12px}.search-box input{border:0;background:transparent;outline:none}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d5e1ec;border-radius:10px;background:#fff;color:#203a53;font-size:13px;outline:none;transition:.15s}
input:focus,select:focus,textarea:focus{border-color:#4b9cf0;box-shadow:0 0 0 3px rgba(66,153,238,.1)}
.table-panel{overflow:hidden}.color-table thead th:nth-child(1){border-left:4px solid #2583f7}
.form-panel{padding:22px;max-width:980px}.form-panel label,.login-card label{display:block;font-weight:750;font-size:11px;margin:11px 0 6px;color:#435d73}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.form-section-title{font-size:14px;font-weight:850;color:var(--navy);padding-bottom:10px;border-bottom:1px solid #edf2f7;margin-bottom:5px}.form-section-title.second{margin-top:22px}
.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;padding-top:17px;border-top:1px solid #edf2f7}.field-help{display:block;font-size:10px;color:var(--muted);margin-top:5px}.field-help a{color:var(--blue);font-weight:700}
.alert{padding:11px 13px;border-radius:10px;margin:12px 0;font-size:12px}.alert.error{background:#ffe8e8;color:#a82e35}.alert.success{background:#e0f7e9;color:#146f3d}
.empty{text-align:center;padding:30px;color:#7f91a1}.empty a{color:var(--blue);font-weight:800}
.footer{max-width:1440px;margin:auto;padding:22px 24px 28px;display:flex;justify-content:space-between;color:#8393a3;font-size:10px}
.login-body{background:#eaf2f8;min-height:100vh}.login-layout{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr}
.login-visual{position:relative;padding:55px;display:flex;flex-direction:column;justify-content:space-between;color:#fff;background:
 radial-gradient(circle at 20% 20%,rgba(255,255,255,.22),transparent 22%),
 linear-gradient(145deg,#064e8d,#0796b5 58%,#17ad72)}
.login-visual:after{content:"✈";position:absolute;right:8%;top:15%;font-size:130px;opacity:.12;transform:rotate(-16deg)}
.login-visual>img{width:245px;background:#fff;border-radius:18px;padding:10px}.login-message{position:relative;z-index:1;max-width:560px}
.login-message span{font-size:11px;font-weight:900;letter-spacing:.18em;color:#d8f6ff}.login-message h1{font-size:50px;line-height:1.03;margin:12px 0}.login-message p{font-size:15px;color:#ddf5f8}
.login-card{width:min(420px,calc(100% - 36px));margin:auto;background:#fff;padding:35px;border-radius:20px;box-shadow:0 20px 50px rgba(16,65,99,.16)}
.login-card h2{font-size:25px;margin:5px 0 2px;color:var(--navy)}.login-card .sub{color:var(--muted);font-size:12px;margin-bottom:18px}.login-btn{width:100%;margin-top:18px;padding:12px}
.login-logo-mobile{display:none}.secure-note{display:block;text-align:center;margin-top:18px;color:#8797a6}
@media(max-width:1050px){
 .cards,.quick-grid{grid-template-columns:repeat(2,1fr)}
 .dashboard-grid{grid-template-columns:1fr}.status-panel{order:-1}
 .grid4{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:780px){
 .sidebar{transform:translateX(-102%);transition:.2s;width:250px}.menu-open .sidebar{transform:translateX(0)}
 .menu-open:after{content:"";position:fixed;inset:0;background:rgba(3,21,39,.45);z-index:25}
 .main-area{margin-left:0}.menu-btn{display:block}.topbar{height:64px;padding:0 13px;gap:10px}
 .top-title{margin-right:auto}.user-copy{display:none}.logout{padding:7px 9px}.container{padding:14px}
 .hero{min-height:130px;padding:20px}.hero h1{font-size:26px}.hero-mark{font-size:45px;margin-right:5px}
 .cards,.quick-grid{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:13px}.stat-card strong{font-size:24px}.stat-card .stat-icon{width:42px;height:42px}
 .page-heading{align-items:center}.page-heading h1{font-size:24px}.page-heading p{display:none}
 .grid2,.grid4{grid-template-columns:1fr}.form-panel{padding:15px}.filter-bar{flex-wrap:wrap}.search-box{max-width:none;min-width:100%}
 .footer{padding:15px;display:block;text-align:center}.footer span:last-child{display:none}
}
@media(max-width:480px){
 .cards,.quick-grid{grid-template-columns:1fr}.hero p{font-size:12px}.hero-mark{display:none}
 .user-avatar{width:34px;height:34px}.page-heading{flex-wrap:wrap}.page-heading .btn{width:100%}
}

/* v3 modules */
.module-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}
.module-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px;box-shadow:var(--shadow)}
.module-card h3{margin:5px 0;color:var(--navy);font-size:15px}.module-card p{font-size:11px;color:var(--muted);margin:0 0 10px}.module-card .num{font-size:28px;font-weight:850;color:#173b5c}
.action-link{font-size:11px;font-weight:800;color:var(--blue)}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.detail-box{background:#f7fafc;border:1px solid #e6edf4;border-radius:12px;padding:12px}.detail-box small{display:block;color:#7d90a1;font-size:9px;text-transform:uppercase}.detail-box strong{font-size:13px;color:#213b53}
.print-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #e7edf3;padding-bottom:14px;margin-bottom:18px}.print-logo{max-width:190px;max-height:80px}
.day-card{border-left:4px solid var(--blue);background:#fbfdff;border-radius:10px;padding:13px;margin:9px 0}.day-card h4{margin:0 0 6px;color:var(--navy)}
.money{font-weight:850;color:#0d7d50}.balance{font-weight:850;color:#c25132}
@media(max-width:1000px){.module-grid{grid-template-columns:repeat(2,1fr)}.detail-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.module-grid,.two-col,.detail-grid{grid-template-columns:1fr}}
@media print{
 .sidebar,.topbar,.footer,.no-print{display:none!important}.main-area{margin-left:0!important}.container{padding:0!important}.panel{box-shadow:none!important;border:0!important}
 body{background:#fff!important}.print-area{padding:10mm}.table-wrap{overflow:visible}table{min-width:0;font-size:10px}
}
