:root {
  --navy-950: #061428;
  --navy-900: #081b34;
  --navy-850: #0c2341;
  --navy-800: #102b4d;
  --navy-700: #193d64;
  --red-700: #a90e28;
  --red-600: #c41230;
  --red-500: #d8233f;
  --red-100: #fde8ec;
  --red-50: #fff2f4;
  --ink: #17263a;
  --muted: #718096;
  --muted-dark: #526177;
  --line: #e6eaf0;
  --surface: #ffffff;
  --canvas: #f4f6f9;
  --green: #16845b;
  --green-bg: #eaf8f1;
  --amber: #b56a08;
  --amber-bg: #fff5df;
  --blue: #2c66b1;
  --blue-bg: #edf4fd;
  --shadow-sm: 0 2px 10px rgba(15, 35, 60, .04);
  --shadow-md: 0 14px 40px rgba(15, 35, 60, .10);
  --radius: 12px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { background: rgba(196, 18, 48, .16); }
:focus-visible { outline: 3px solid rgba(44, 102, 177, .28); outline-offset: 2px; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.03fr) minmax(520px, .97fr); background: #fff; }
.auth-brand { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 82% 26%, rgba(36, 77, 127, .48), transparent 35%), radial-gradient(circle at 0 100%, rgba(137, 16, 44, .24), transparent 37%), linear-gradient(135deg, #061428 0%, #0a1e39 58%, #0b2647 100%); }
.auth-brand::before { content: ""; position: absolute; width: 460px; height: 460px; border: 1px solid rgba(255, 255, 255, .045); border-radius: 50%; right: -160px; top: 10%; box-shadow: 0 0 0 75px rgba(255, 255, 255, .018), 0 0 0 150px rgba(255, 255, 255, .012); }
.auth-brand::after { content: "BF"; position: absolute; right: -18px; bottom: 20px; color: rgba(255, 255, 255, .018); font: 700 300px/1 "Barlow", sans-serif; letter-spacing: -20px; }
.auth-grid { position: absolute; inset: 0; opacity: .32; background-image: linear-gradient(rgba(126, 156, 191, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 156, 191, .10) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.auth-brand-inner { position: relative; z-index: 1; min-height: 100vh; padding: 42px 56px 30px; display: flex; flex-direction: column; }
.auth-logo { width: 204px; padding: 10px 14px; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.auth-logo img { width: 100%; height: 45px; object-fit: contain; }
.auth-brand-copy { margin: auto 0; padding: 54px 0 40px; }
.brand-kicker { display: flex; align-items: center; gap: 12px; color: #a8bad0; font: 600 11px/1.2 "Barlow", sans-serif; letter-spacing: 2.6px; }
.brand-kicker span { width: 27px; height: 2px; background: var(--red-500); }
.auth-brand h1 { margin-top: 26px; font-size: clamp(42px, 4.2vw, 64px); font-weight: 600; line-height: 1.32; letter-spacing: 3px; }
.auth-brand h1 span { color: #fff; position: relative; }
.auth-brand h1 span::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: -9px; height: 4px; border-radius: 2px; background: var(--red-500); }
.auth-brand-copy > p { margin-top: 34px; color: #a9b9cb; font-size: 15px; line-height: 2; letter-spacing: .5px; }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 50px; max-width: 540px; }
.auth-features > div { padding: 19px 16px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 9px; background: rgba(255, 255, 255, .035); backdrop-filter: blur(8px); }
.auth-features svg { width: 22px; height: 22px; color: #e65269; margin-bottom: 13px; }
.auth-features strong, .auth-features small { display: block; }
.auth-features strong { font-size: 14px; font-weight: 500; letter-spacing: .5px; }
.auth-features small { color: #8298b1; font-size: 11px; margin-top: 7px; }
.auth-brand-footer { display: flex; justify-content: space-between; align-items: center; color: #6f859e; font-size: 11px; letter-spacing: .7px; }
.auth-brand-footer span:last-child { font: 600 11px "Barlow", sans-serif; letter-spacing: 2px; }
.auth-panel { position: relative; min-height: 100vh; padding: 60px 40px 76px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 100% 0, #f7f9fc, transparent 38%), #fff; }
.login-wrap { width: 100%; max-width: 420px; }
.login-heading { margin-bottom: 30px; }
.login-eyebrow { display: block; margin-bottom: 15px; color: var(--red-600); font: 600 10px "Barlow", sans-serif; letter-spacing: 2px; }
.login-heading h2 { font-size: 32px; font-weight: 600; letter-spacing: 1px; }
.login-heading p { color: var(--muted); margin-top: 11px; line-height: 1.7; }
.portal-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f1f3f7; border-radius: 9px; margin-bottom: 27px; }
.portal-switch button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; padding: 11px 12px; border-radius: 7px; color: var(--muted-dark); transition: .2s ease; }
.portal-switch button svg { width: 17px; height: 17px; }
.portal-switch button.active { background: #fff; color: var(--red-600); box-shadow: 0 2px 9px rgba(16, 35, 60, .08); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span, .field-label { color: #3e4b5e; font-size: 13px; font-weight: 500; }
.field b { color: var(--red-600); font-weight: 400; }
.field input, .field select, .field textarea, .filter-control input, .filter-control select, .input-with-icon { width: 100%; border: 1px solid #dfe4eb; border-radius: 7px; background: #fff; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.field input, .field select { height: 43px; padding: 0 13px; }
.field textarea { resize: vertical; min-height: 92px; padding: 11px 13px; line-height: 1.65; }
.field input::placeholder, .field textarea::placeholder, .input-with-icon input::placeholder, .filter-control input::placeholder { color: #abb4c0; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-control input:focus, .filter-control select:focus, .input-with-icon:focus-within { border-color: #809ab9; box-shadow: 0 0 0 3px rgba(44, 102, 177, .08); }
.field input:disabled { background: #f4f6f8; color: #8a95a3; cursor: not-allowed; }
.group-select:has(option[value=""]:checked) { color: #a9b2be; }
.group-select option { color: var(--ink); }
.group-select option[value=""] { color: #a9b2be; }
.input-with-icon { display: flex; align-items: center; height: 47px; padding: 0 13px; }
.input-with-icon > svg { color: #8793a3; width: 18px; height: 18px; }
.input-with-icon input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 11px; color: var(--ink); background: transparent; }
.password-toggle { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: #8c98a7; }
.password-toggle svg { width: 18px; height: 18px; }
.btn { border: 0; border-radius: 7px; min-height: 39px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; font-size: 13px; transition: transform .16s, background .16s, box-shadow .16s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--red-600); color: #fff; box-shadow: 0 5px 13px rgba(196, 18, 48, .16); }
.btn-primary:hover { background: var(--red-700); box-shadow: 0 7px 18px rgba(196, 18, 48, .22); }
.btn-secondary { background: #fff; border: 1px solid #dce2e9; color: #3c4b60; }
.btn-secondary:hover { background: #f7f9fb; border-color: #c6d0dc; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger-ghost { color: var(--red-600); background: var(--red-50); border: 1px solid #f8d6dd; }
.btn-text { min-height: 32px; padding: 0 8px; color: var(--blue); background: transparent; }
.btn-text:hover { background: var(--blue-bg); }
.btn-sm { min-height: 33px; padding: 0 12px; font-size: 12px; }
.btn-login { width: 100%; height: 47px; margin-top: 3px; justify-content: space-between; padding: 0 20px; letter-spacing: 2px; }
.btn-login svg { width: 19px; height: 19px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }
.auth-switch button { border: 0; background: transparent; color: var(--red-600); padding: 0 3px; font-weight: 500; }
.auth-support { display: flex; align-items: center; gap: 13px; margin-top: 34px; color: #b0b7c1; font-size: 10px; white-space: nowrap; }
.auth-support span { height: 1px; background: #edf0f3; flex: 1; }
.auth-support p { font-size: 10px; }
.auth-footer { position: absolute; bottom: 24px; left: 20px; right: 20px; color: #a4adb8; text-align: center; font-size: 10px; }
.auth-mobile-logo { display: none; }
.admin-hint { display: flex; align-items: center; gap: 8px; margin-top: -5px; padding: 10px 12px; color: #6b5a3f; background: #fff8e9; border: 1px solid #f5e6c6; border-radius: 6px; font-size: 11px; }
.admin-hint svg { width: 15px; height: 15px; color: #b98528; }
.admin-hint strong { font-family: "Barlow", sans-serif; font-weight: 600; }
.admin-hint i { font-style: normal; margin: 0 7px; color: #c9bca5; }
.form-row { display: grid; gap: 16px; }
.form-row.two { grid-template-columns: 1fr 1fr; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; background: linear-gradient(180deg, var(--navy-950), #091c34 70%, #08192e); color: #fff; box-shadow: 4px 0 20px rgba(9, 25, 46, .05); }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(126, 156, 191, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 156, 191, .08) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to bottom, #000, transparent 50%); }
.sidebar-brand { position: relative; padding: 22px 20px 24px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sidebar-logo { background: #fff; border-radius: 7px; padding: 8px 12px; }
.sidebar-logo img { width: 100%; height: 38px; object-fit: contain; }
.sidebar-system { margin-top: 14px; text-align: center; }
.sidebar-system span { display: block; font-size: 13px; letter-spacing: 2px; color: #d7e1eb; }
.sidebar-system small { display: block; margin-top: 5px; font: 500 8px "Barlow", sans-serif; letter-spacing: 1.45px; color: #58718e; }
.main-nav { position: relative; flex: 1; padding: 23px 13px; overflow-y: auto; }
.nav-section-label { margin: 3px 12px 10px; color: #506b88; font-size: 10px; letter-spacing: 1.5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 45px; padding: 0 14px; margin: 4px 0; border: 0; border-radius: 7px; background: transparent; color: #9aadc2; text-align: left; transition: .18s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item span { flex: 1; font-size: 13px; letter-spacing: .5px; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .045); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(196, 18, 48, .24), rgba(196, 18, 48, .09)); }
.nav-item.active::before { content: ""; position: absolute; left: -13px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--red-500); }
.nav-item.active svg { color: #f15b71; }
.nav-badge { flex: none !important; min-width: 21px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .09); color: #bac8d8; font: 600 10px "Barlow", sans-serif; }
.nav-item.active .nav-badge { background: var(--red-600); color: #fff; }
.sidebar-bottom { position: relative; padding: 14px 13px 16px; }
.service-card { display: flex; align-items: center; gap: 9px; margin: 0 2px 15px; padding: 12px 10px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .025); }
.service-card svg { width: 18px; color: #6f8ba9; }
.service-card div { flex: 1; min-width: 0; }
.service-card strong, .service-card span { display: block; }
.service-card strong { color: #9fb1c5; font-size: 10px; font-weight: 500; }
.service-card span { margin-top: 4px; color: #526e8b; font-size: 9px; }
.service-card i { width: 5px; height: 5px; border-radius: 50%; background: #42b98b; box-shadow: 0 0 0 3px rgba(66, 185, 139, .1); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 7px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.avatar { width: 35px; height: 35px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, #d72b44, #a70e28); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(196, 18, 48, .18); }
.avatar.small { width: 31px; height: 31px; border-radius: 7px; font-size: 12px; }
.user-meta { flex: 1; min-width: 0; }
.user-meta strong, .user-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: 12px; font-weight: 500; color: #d7e0e9; }
.user-meta span { font-size: 10px; color: #657e99; margin-top: 4px; }
.icon-btn { width: 35px; height: 35px; padding: 0; border: 0; border-radius: 7px; background: transparent; display: grid; place-items: center; color: #65748a; }
.icon-btn:hover { background: #f0f3f7; color: var(--ink); }
.icon-btn.dark { color: #617b97; width: 30px; height: 30px; }
.icon-btn.dark:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.icon-btn svg { width: 18px; height: 18px; }
.app-main { min-height: 100vh; margin-left: var(--sidebar); display: flex; flex-direction: column; }
.topbar { height: 82px; flex-shrink: 0; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.topbar-left { display: flex; align-items: center; gap: 13px; }
.breadcrumb { display: flex; align-items: center; gap: 4px; color: #96a0ae; font-size: 10px; margin-bottom: 6px; }
.breadcrumb svg { width: 11px; height: 11px; }
.breadcrumb span:last-child { color: #6d7a8c; }
.topbar h2 { font-size: 19px; font-weight: 600; letter-spacing: .5px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.today { display: flex; align-items: center; gap: 8px; color: #718095; font-size: 12px; }
.today svg { width: 16px; height: 16px; color: #8f9bab; }
.topbar-divider { width: 1px; height: 25px; background: var(--line); }
.topbar-user { display: flex; align-items: center; gap: 9px; color: #445267; font-size: 12px; }
.mobile-menu { display: none; }
.page-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 27px 30px 36px; flex: 1; outline: none; }
.app-footer { padding: 15px 30px 20px; display: flex; justify-content: space-between; color: #9ba5b2; font-size: 10px; }
.sidebar-overlay { display: none; }

.welcome-banner { position: relative; overflow: hidden; min-height: 175px; padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: var(--radius); color: #fff; background: radial-gradient(circle at 75% 0, rgba(53, 96, 148, .42), transparent 35%), linear-gradient(110deg, #0a1c34, #102e50); box-shadow: 0 8px 24px rgba(10, 30, 53, .10); }
.welcome-banner::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(126, 156, 191, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 156, 191, .09) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent 20%, #000); }
.welcome-banner::after { content: "BAOFA"; position: absolute; right: 25%; bottom: -15px; font: 700 102px "Barlow", sans-serif; letter-spacing: 4px; color: rgba(255, 255, 255, .025); }
.welcome-copy, .welcome-action { position: relative; z-index: 1; }
.welcome-eyebrow { display: flex; align-items: center; gap: 8px; color: #92a8bf; font-size: 11px; letter-spacing: 1px; }
.welcome-eyebrow span { width: 18px; height: 2px; background: var(--red-500); }
.welcome-copy h1 { margin-top: 12px; font-size: 25px; font-weight: 500; letter-spacing: 1px; }
.welcome-copy h1 strong { font-weight: 600; }
.welcome-copy p { color: #9fb1c4; margin-top: 12px; font-size: 12px; line-height: 1.7; }
.welcome-action { display: flex; align-items: center; gap: 12px; }
.welcome-action .btn { min-height: 43px; padding: 0 20px; }
.btn-white { background: #fff; color: var(--navy-800); }
.btn-white:hover { background: #f0f4f8; }
.banner-date { text-align: right; padding-right: 4px; }
.banner-date strong { display: block; font: 600 36px "Barlow", sans-serif; }
.banner-date span { color: #8ea4bb; font-size: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-top: 20px; }
.stat-card { position: relative; padding: 20px 21px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 65px; height: 65px; right: -24px; bottom: -26px; border-radius: 50%; background: var(--stat-bg, #f2f5f9); opacity: .65; }
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-label { color: #68778b; font-size: 12px; }
.stat-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 8px; background: var(--stat-bg, #eff3f8); color: var(--stat-color, var(--navy-700)); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { margin-top: 8px; display: flex; align-items: baseline; gap: 5px; }
.stat-value strong { font: 600 30px "Barlow", sans-serif; color: #152942; }
.stat-value span { color: #8b96a5; font-size: 11px; }
.stat-note { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: #9aa4b1; font-size: 10px; }
.stat-note.positive { color: var(--green); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, .8fr); gap: 20px; margin-top: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); }
.panel-header { min-height: 59px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #edf0f4; }
.panel-title { display: flex; align-items: center; gap: 9px; }
.panel-title h3 { font-size: 14px; font-weight: 600; }
.panel-title span { color: #9aa5b2; font-size: 10px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: #75859a; font-size: 11px; }
.panel-link:hover { color: var(--red-600); }
.panel-link svg { width: 13px; height: 13px; }
.panel-body { padding: 20px; }
.urgent-list { padding: 5px 19px 10px; }
.urgent-item { display: flex; gap: 11px; padding: 15px 0; border-bottom: 1px solid #eef1f4; }
.urgent-item:last-child { border-bottom: 0; }
.urgent-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--red-500); box-shadow: 0 0 0 4px var(--red-50); flex-shrink: 0; }
.urgent-dot.warning { background: #d98c22; box-shadow: 0 0 0 4px #fff6e7; }
.urgent-info { min-width: 0; flex: 1; }
.urgent-info button { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; color: #334258; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-info button:hover { color: var(--red-600); }
.urgent-info span { display: block; margin-top: 6px; color: #97a1af; font-size: 10px; }
.urgent-days { color: var(--red-600); font-size: 10px; white-space: nowrap; }
.urgent-days.warning { color: var(--amber); }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { font-size: 22px; font-weight: 600; letter-spacing: .5px; }
.page-heading p { color: #8591a0; font-size: 12px; line-height: 1.7; margin-top: 7px; }
.heading-actions { display: flex; gap: 10px; }
.filter-panel { padding: 17px 19px; margin-bottom: 19px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.filter-row { display: flex; align-items: flex-end; gap: 13px; flex-wrap: wrap; }
.filter-control { min-width: 145px; flex: 1; }
.filter-control.search-control { flex: 1.6; min-width: 220px; }
.filter-control > label { display: block; color: #788598; font-size: 10px; margin-bottom: 7px; }
.filter-control.status-filter-control { flex: .8; min-width: 250px; }
.status-checks { height: 38px; display: flex; align-items: center; gap: 15px; }
.status-checks label { display: flex; align-items: center; gap: 6px; color: #536377; font-size: 11px; cursor: pointer; white-space: nowrap; }
.filter-control .status-checks input { width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--red-600); }
.filter-control input, .filter-control select { height: 38px; padding: 0 11px; font-size: 12px; }
.filter-control input[type="date"] { color: #58677b; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 11px; top: 10px; width: 17px; height: 17px; color: #98a3b1; }
.search-wrap input { padding-left: 35px; }
.filter-actions { display: flex; gap: 8px; }
.filter-divider { height: 1px; background: #edf0f4; margin: 15px 0; }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.sort-label { display: flex; align-items: center; gap: 7px; color: #6f7d90; font-size: 11px; }
.sort-label svg { width: 15px; height: 15px; }
.segmented { display: inline-flex; padding: 3px; background: #f1f3f6; border-radius: 6px; }
.segmented button { height: 29px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: #718095; font-size: 11px; }
.segmented button.active { background: #fff; color: var(--red-600); font-weight: 500; box-shadow: 0 1px 5px rgba(20, 35, 55, .08); }
.result-count { color: #8a96a5; font-size: 11px; }
.result-count strong { color: var(--red-600); font: 600 14px "Barlow", sans-serif; margin: 0 3px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 17px; margin: 0 0 15px; color: #778598; font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; background: #fff; border: 1px solid #dce2ea; }
.legend .critical i { background: #e65a6e; border-color: #e65a6e; }
.legend .warning i { background: #edc47c; border-color: #edc47c; }
.orders-grid { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 17px; }
.order-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 300px; border: 1px solid #e1e6ed; border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.order-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(17, 35, 58, .08); }
.order-card.urgency-critical { background: linear-gradient(145deg, #fff5f6, #fde9ed); border-color: #eaa1ae; box-shadow: 0 4px 16px rgba(180, 25, 51, .08); }
.order-card.urgency-warning { background: linear-gradient(145deg, #fffdf8, #fff3de); border-color: #ebcf99; }
.order-card.urgency-normal { background: linear-gradient(145deg, #fff, #f6f9fc); border-color: #dfe6ee; }
.order-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #c6d2df; }
.order-card.urgency-critical::before { background: var(--red-600); }
.order-card.urgency-warning::before { background: #d99730; }
.order-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 19px 19px 13px; }
.order-number { color: #8b98a8; font: 500 10px "Barlow", sans-serif; letter-spacing: .5px; }
.order-card-header h3 { margin-top: 6px; font-size: 15px; font-weight: 600; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 5px; font-size: 10px; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pending { background: #fff0e3; color: #bd6714; }
.status-shipped { background: var(--green-bg); color: var(--green); }
.status-active { background: var(--green-bg); color: var(--green); }
.status-disabled { background: #eef0f3; color: #7e8895; }
.urgency-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 4px; font-size: 9px; }
.urgency-badge svg { width: 11px; height: 11px; }
.urgency-badge.critical { background: #f7ccd4; color: #ad1830; }
.urgency-badge.warning { background: #f6e2b9; color: #9c6411; }
.urgency-badge.normal { background: #e7eef6; color: #53718f; }
.order-card-body { flex: 1; padding: 0 19px 15px; }
.order-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 10px; }
.order-meta > div.full { grid-column: 1 / -1; }
.meta-label { display: flex; align-items: center; gap: 5px; color: #8995a4; font-size: 9px; margin-bottom: 5px; }
.meta-label svg { width: 12px; height: 12px; }
.meta-value { display: block; color: #34445a; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deadline-box { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 11px 12px; border-radius: 6px; background: rgba(255, 255, 255, .65); border: 1px solid rgba(130, 145, 160, .13); }
.deadline-box span { color: #7b899b; font-size: 10px; }
.deadline-box strong { color: #35465a; font: 600 12px "Barlow", "PingFang SC", sans-serif; }
.order-card-footer { display: flex; align-items: center; gap: 5px; min-height: 51px; padding: 9px 13px; border-top: 1px solid rgba(125, 140, 160, .14); background: rgba(255, 255, 255, .32); }
.card-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 31px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: #617187; font-size: 10px; }
.card-action svg { width: 14px; height: 14px; }
.card-action:hover { color: var(--navy-800); background: rgba(255, 255, 255, .85); }
.card-action.ship { margin-left: auto; padding: 0 12px; color: #fff; background: var(--red-600); }
.card-action.ship:hover { background: var(--red-700); }
.card-action.danger { color: #c0273e; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { height: 43px; padding: 0 15px; text-align: left; color: #8793a3; background: #f8f9fb; border-bottom: 1px solid #e9edf1; font-size: 10px; font-weight: 500; }
.data-table td { height: 59px; padding: 10px 15px; color: #49596d; border-bottom: 1px solid #edf0f3; font-size: 11px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table .order-id { color: #7b8a9e; font: 500 10px "Barlow", sans-serif; }
.data-table .primary-cell { color: #26374c; font-weight: 500; }
.data-table .sub-cell { display: block; color: #99a3af; font-size: 9px; margin-top: 4px; font-weight: 400; }
.table-actions { display: flex; align-items: center; gap: 4px; }
.table-actions button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #718399; }
.table-actions button:hover { background: var(--blue-bg); color: var(--blue); }
.table-actions button.danger:hover { background: var(--red-50); color: var(--red-600); }
.table-actions svg { width: 15px; height: 15px; }
.table-footer { min-height: 48px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf0f3; color: #95a0ae; font-size: 10px; }
.compact-table th:first-child, .compact-table td:first-child { padding-left: 20px; }
.compact-table th:last-child, .compact-table td:last-child { padding-right: 20px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 20px; align-items: start; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-section .panel-header { min-height: 57px; }
.section-number { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; background: var(--red-50); color: var(--red-600); font: 600 11px "Barlow", sans-serif; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field-hint { color: #9aa4b0; font-size: 9px; margin-top: -2px; }
.items-header, .item-row { display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(80px, .6fr) minmax(75px, .55fr) minmax(130px, 1fr) 32px; gap: 10px; align-items: center; }
.items-header { padding: 0 0 8px; color: #8b96a4; font-size: 10px; }
.item-list { display: flex; flex-direction: column; gap: 11px; }
.item-row input { height: 38px; font-size: 11px; }
.item-remove { width: 30px; height: 30px; border: 0; border-radius: 5px; background: #f6f7f9; color: #9aa5b2; display: grid; place-items: center; }
.item-remove:hover { color: var(--red-600); background: var(--red-50); }
.item-remove svg { width: 14px; height: 14px; }
.add-item-btn { margin-top: 14px; width: 100%; height: 37px; border: 1px dashed #cfd7e1; border-radius: 6px; background: #fafbfc; color: #6d7f94; font-size: 11px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.add-item-btn:hover { color: var(--red-600); border-color: #e6a4af; background: var(--red-50); }
.add-item-btn svg { width: 14px; height: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.form-actions .btn { min-height: 42px; min-width: 100px; }
.form-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 16px; }
.tips-panel { padding: 20px; background: linear-gradient(145deg, #0c223e, #123454); color: #fff; border-radius: 10px; }
.tips-panel > svg { color: #e3556a; width: 23px; height: 23px; }
.tips-panel h3 { margin-top: 14px; font-size: 14px; font-weight: 500; }
.tips-panel ul { margin: 15px 0 0; padding: 0; list-style: none; }
.tips-panel li { position: relative; padding-left: 13px; margin: 11px 0; color: #9db1c6; font-size: 10px; line-height: 1.7; }
.tips-panel li::before { content: ""; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: #6685a4; }
.form-side-info { padding: 17px; }
.form-side-info h4 { font-size: 12px; margin-bottom: 12px; }
.color-guide { display: flex; flex-direction: column; gap: 10px; }
.color-guide > div { display: flex; align-items: center; gap: 9px; color: #778598; font-size: 10px; }
.color-guide i { width: 20px; height: 20px; border-radius: 4px; border: 1px solid; }
.color-guide .critical i { background: #fde9ed; border-color: #eaa1ae; }
.color-guide .warning i { background: #fff3de; border-color: #ebcf99; }
.color-guide .normal i { background: #f6f9fc; border-color: #dfe6ee; }

.empty-state { min-height: 260px; padding: 38px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px; background: #f0f4f8; color: #93a4b7; margin-bottom: 17px; transform: rotate(-4deg); }
.empty-icon svg { width: 29px; height: 29px; }
.empty-state h3 { font-size: 14px; font-weight: 500; color: #526176; }
.empty-state p { max-width: 340px; color: #9ba5b1; font-size: 11px; line-height: 1.8; margin-top: 8px; }
.empty-state .btn { margin-top: 18px; }
.loading-state { min-height: 350px; display: grid; place-items: center; color: #8b98a9; }
.spinner { width: 25px; height: 25px; border: 2px solid #e1e6ed; border-top-color: var(--red-600); border-radius: 50%; animation: spin .7s linear infinite; }
.loading-state div { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4, 16, 32, .56); backdrop-filter: blur(3px); animation: fadeIn .16s ease; }
.modal { width: 100%; max-width: 500px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: 12px; background: #fff; box-shadow: 0 25px 80px rgba(0, 0, 0, .24); animation: modalIn .2s ease; overflow: hidden; }
.modal.modal-lg { max-width: 780px; }
.modal.modal-xl { max-width: 900px; }
.modal-header { min-height: 66px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-title h3 { font-size: 16px; font-weight: 600; }
.modal-title p { margin-top: 5px; color: #8a96a5; font-size: 10px; }
.modal-close { width: 31px; height: 31px; border: 0; border-radius: 6px; background: #f4f6f8; color: #7f8b9a; display: grid; place-items: center; }
.modal-close:hover { background: #e9edf2; color: var(--ink); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-footer { min-height: 66px; padding: 12px 22px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: #fafbfc; }
.confirm-content { text-align: center; padding: 7px 5px 3px; }
.confirm-icon { width: 58px; height: 58px; margin: 0 auto 17px; border-radius: 50%; display: grid; place-items: center; background: var(--red-50); color: var(--red-600); }
.confirm-icon.warning { background: var(--amber-bg); color: var(--amber); }
.confirm-icon svg { width: 27px; height: 27px; }
.confirm-content h3 { font-size: 18px; font-weight: 600; }
.confirm-content > p { margin: 11px auto 0; max-width: 390px; color: #7c899a; font-size: 12px; line-height: 1.8; }
.confirm-summary { margin-top: 18px; padding: 14px; text-align: left; border-radius: 7px; background: #f6f8fa; }
.confirm-summary > div { display: flex; justify-content: space-between; gap: 20px; margin: 7px 0; font-size: 11px; }
.confirm-summary span { color: #8a96a4; }
.confirm-summary strong { color: #3b4b60; font-weight: 500; text-align: right; }
.driver-fields { margin-top: 18px; text-align: left; }
.detail-hero { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-radius: 8px; background: linear-gradient(120deg, #0b213d, #153c62); color: #fff; }
.detail-hero .order-number { color: #8fa7c0; }
.detail-hero h3 { font-size: 18px; margin-top: 6px; font-weight: 500; }
.detail-hero-right { text-align: right; }
.detail-hero-right .status-badge { margin-bottom: 8px; }
.detail-hero-right span { display: block; color: #91a8bf; font-size: 10px; }
.detail-section { margin-top: 23px; }
.detail-section-title { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #34455a; font-size: 12px; font-weight: 600; }
.detail-section-title svg { width: 15px; height: 15px; color: #8798aa; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; padding: 16px; border: 1px solid #e8ecf1; border-radius: 7px; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: #939eac; font-size: 9px; margin-bottom: 6px; }
.detail-item strong { color: #425267; font-size: 11px; font-weight: 500; line-height: 1.6; word-break: break-word; }
.detail-item.full { grid-column: 1 / -1; }
.detail-items { border: 1px solid #e7ecf1; border-radius: 7px; overflow: hidden; }
.detail-item-row { display: grid; grid-template-columns: 1.4fr .5fr .5fr 1fr; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #edf0f3; font-size: 10px; color: #526176; }
.detail-item-row:last-child { border-bottom: 0; }
.detail-item-row.header { background: #f7f9fb; color: #8c98a6; font-size: 9px; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; top: 7px; bottom: 8px; left: 5px; width: 1px; background: #dfe5eb; }
.timeline-item { position: relative; padding-bottom: 19px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -21px; top: 5px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #9aabbd; box-shadow: 0 0 0 1px #c7d1dc; }
.timeline-item:first-child::before { background: var(--red-600); box-shadow: 0 0 0 1px #e6a4b0; }
.timeline-item strong { display: block; font-size: 11px; font-weight: 500; color: #46566b; }
.timeline-item p { margin-top: 5px; color: #8b97a5; font-size: 10px; line-height: 1.6; }
.timeline-item time { display: block; margin-top: 5px; color: #a0a9b5; font: 500 9px "Barlow", sans-serif; }

.account-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 19px; }
.mini-stat { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.mini-stat .stat-icon { width: 40px; height: 40px; }
.mini-stat strong { display: block; font: 600 23px "Barlow", sans-serif; }
.mini-stat span { display: block; color: #8a96a5; font-size: 10px; margin-top: 3px; }
.account-user { display: flex; align-items: center; gap: 9px; }
.account-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 6px; background: #eaf0f7; color: #426483; font-size: 11px; }
.switch { position: relative; width: 34px; height: 19px; display: inline-block; }
.switch input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: #cbd3dc; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:focus-visible + span { outline: 3px solid rgba(44, 102, 177, .25); }

.backup-banner { position: relative; overflow: hidden; padding: 25px 27px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-radius: 11px; color: #fff; background: linear-gradient(115deg, #0b203a, #123b61); margin-bottom: 19px; }
.backup-banner::after { content: ""; position: absolute; width: 240px; height: 240px; right: -70px; top: -100px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255, 255, 255, .025), 0 0 0 90px rgba(255, 255, 255, .015); }
.backup-banner-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 17px; }
.backup-banner-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 10px; color: #ee6479; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); }
.backup-banner-icon svg { width: 25px; height: 25px; }
.backup-banner h3 { font-size: 16px; font-weight: 500; }
.backup-banner p { color: #96adc4; margin-top: 7px; font-size: 10px; line-height: 1.6; }
.backup-next { position: relative; z-index: 1; text-align: right; }
.backup-next span { display: block; color: #829db9; font-size: 9px; }
.backup-next strong { display: block; margin-top: 6px; font: 500 16px "Barlow", "PingFang SC", sans-serif; }
.backup-policy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 19px; }
.policy-card { display: flex; align-items: center; gap: 13px; padding: 17px 19px; }
.policy-card > svg { width: 21px; height: 21px; color: #728ca8; }
.policy-card strong, .policy-card span { display: block; }
.policy-card strong { font-size: 11px; font-weight: 500; }
.policy-card span { margin-top: 5px; color: #96a1af; font-size: 9px; }
.backup-name { display: flex; align-items: center; gap: 9px; }
.backup-name > svg { width: 18px; height: 18px; color: #6c86a2; }
.backup-name strong { display: block; color: #37495f; font: 500 10px "Barlow", sans-serif; }
.backup-name span { display: block; margin-top: 4px; color: #9aa5b2; font-size: 9px; }
.backup-empty { min-height: 200px; }
.restore-warning { margin-top: 17px; padding: 12px 13px; display: flex; gap: 9px; border-radius: 6px; background: var(--red-50); color: #9f3444; font-size: 10px; line-height: 1.7; text-align: left; }
.restore-warning svg { width: 17px; height: 17px; margin-top: 1px; }

.toast-root { position: fixed; z-index: 200; right: 24px; top: 22px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { min-width: 270px; max-width: 390px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; border: 1px solid #dfe6e2; border-radius: 8px; background: #fff; box-shadow: 0 12px 35px rgba(14, 31, 52, .14); color: #425267; font-size: 12px; animation: toastIn .2s ease; }
.toast svg { width: 18px; height: 18px; color: var(--green); }
.toast.error { border-color: #f0d4d9; }
.toast.error svg { color: var(--red-600); }
.toast.removing { opacity: 0; transform: translateX(15px); transition: .2s; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(15px); } }

.sync-status { display: flex; align-items: center; gap: 6px; color: #6f837c; font-size: 10px; white-space: nowrap; }
.sync-status i { width: 6px; height: 6px; border-radius: 50%; background: #24a477; box-shadow: 0 0 0 3px #e8f6f0; }
.order-card.shipped-card { background: linear-gradient(145deg, #fff, #f0f9f5); border-color: #cee4d9; }
.order-card.shipped-card::before { background: #26906a; }
.dashboard-grid { align-items: start; }
.orders-grid.dashboard-orders { grid-template-columns: repeat(2, minmax(250px, 1fr)); padding: 18px; }
.pagination { min-height: 66px; margin-top: 20px; padding: 12px 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #8b97a5; font-size: 10px; }
.page-buttons { display: flex; align-items: center; gap: 5px; }
.page-buttons button { min-width: 31px; height: 31px; padding: 0 9px; border: 1px solid #e0e5eb; border-radius: 5px; background: #fff; color: #65758a; font-size: 11px; }
.page-buttons button:hover:not(:disabled) { border-color: #d68b99; color: var(--red-600); }
.page-buttons button.active { border-color: var(--red-600); background: var(--red-600); color: #fff; }
.page-buttons button:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { padding: 0 2px; color: #a0aab6; }
.group-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; }
.group-card { min-height: 112px; padding: 19px; display: flex; align-items: flex-start; gap: 13px; }
.group-card-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 8px; background: #edf3fa; color: #426889; }
.group-card-icon svg { width: 18px; height: 18px; }
.group-card-main { flex: 1; min-width: 0; }
.group-card-main h3 { font-size: 13px; font-weight: 600; line-height: 1.6; word-break: break-word; }
.group-card-main p { margin-top: 7px; color: #718298; font-size: 10px; }
.group-card-main span { display: block; margin-top: 6px; color: #a0aab6; font-size: 9px; }
.group-card-actions { display: flex; gap: 2px; }
.group-card .icon-btn:disabled { opacity: .25; cursor: not-allowed; }

@media (min-width: 1500px) {
  .orders-grid { grid-template-columns: repeat(4, minmax(280px, 1fr)); }
  .page-content { padding-left: 36px; padding-right: 36px; }
}
@media (max-width: 1180px) {
  .orders-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
  .group-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .urgent-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .auth-brand-inner { padding-left: 40px; padding-right: 40px; }
  .auth-features { gap: 9px; }
  .auth-features > div { padding: 16px 12px; }
}
@media (max-width: 980px) {
  :root { --sidebar: 228px; }
  .auth-screen { grid-template-columns: minmax(380px, .85fr) minmax(460px, 1.15fr); }
  .auth-brand-inner { padding: 32px; }
  .auth-brand h1 { font-size: 42px; }
  .auth-features { grid-template-columns: 1fr; max-width: 240px; margin-top: 35px; }
  .auth-features > div { display: grid; grid-template-columns: 25px 1fr; column-gap: 10px; padding: 11px 13px; }
  .auth-features svg { grid-row: 1 / 3; margin: 0; }
  .auth-features small { margin-top: 3px; }
  .form-layout { grid-template-columns: 1fr; }
  .form-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .backup-policy { grid-template-columns: 1fr; }
  .policy-card { padding: 13px 17px; }
}
@media (max-width: 760px) {
  .auth-screen { display: block; background: #f5f7fa; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; padding: 105px 24px 70px; align-items: flex-start; background: radial-gradient(circle at 100% 0, #eaf0f7, transparent 42%), #fff; }
  .auth-mobile-logo { position: absolute; display: flex; align-items: center; gap: 14px; top: 25px; left: 24px; right: 24px; }
  .auth-mobile-logo img { width: 142px; height: 38px; object-fit: contain; }
  .auth-mobile-logo span { padding-left: 13px; border-left: 1px solid #e0e5eb; color: #788699; font-size: 10px; }
  .login-wrap { max-width: 460px; }
  .login-heading h2 { font-size: 28px; }
  .auth-footer { font-size: 9px; }
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 10px 0 35px rgba(4, 16, 32, .2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 35; inset: 0; background: rgba(5, 17, 32, .45); backdrop-filter: blur(2px); }
  .sidebar-overlay.show { display: block; }
  .app-main { margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { height: 72px; padding: 0 18px; }
  .topbar h2 { font-size: 17px; }
  .breadcrumb { display: none; }
  .today, .topbar-divider, .sync-status { display: none; }
  .topbar-user > span { display: none; }
  .page-content { padding: 20px 17px 30px; }
  .app-footer { padding: 12px 18px 18px; }
  .app-footer span:last-child { display: none; }
  .welcome-banner { padding: 25px; min-height: 190px; align-items: flex-start; flex-direction: column; }
  .welcome-action { width: 100%; }
  .welcome-copy h1 { font-size: 22px; }
  .welcome-action .btn { flex: 1; }
  .banner-date { display: none; }
  .stats-grid { gap: 12px; margin-top: 14px; }
  .stat-card { padding: 16px; }
  .stat-value strong { font-size: 26px; }
  .dashboard-grid { margin-top: 14px; gap: 14px; }
  .urgent-list { display: block; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 20px; }
  .page-heading p { font-size: 11px; }
  .heading-actions .btn .btn-label-optional { display: none; }
  .filter-panel { padding: 15px; }
  .filter-control, .filter-control.search-control { min-width: calc(50% - 8px); }
  .filter-control.search-control { min-width: 100%; }
  .sort-row { align-items: flex-start; flex-direction: column; }
  .orders-grid { grid-template-columns: 1fr; }
  .orders-grid.dashboard-orders { grid-template-columns: 1fr; padding: 13px; }
  .group-grid { grid-template-columns: 1fr; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .page-buttons { width: 100%; justify-content: center; flex-wrap: wrap; }
  .order-card { min-height: 280px; }
  .form-side { grid-template-columns: 1fr; }
  .items-header { display: none; }
  .item-row { grid-template-columns: 1fr 1fr 32px; gap: 9px; padding: 12px; border: 1px solid #e7ebf0; border-radius: 7px; background: #fafbfc; }
  .item-row .item-model { grid-column: 1 / 3; }
  .item-row .item-notes { grid-column: 1 / 3; }
  .item-row .item-remove { grid-column: 3; grid-row: 1; }
  .item-row input { background: #fff; }
  .account-summary { grid-template-columns: 1fr; gap: 10px; }
  .mini-stat { padding: 13px 17px; }
  .backup-banner { align-items: flex-start; flex-direction: column; padding: 21px; }
  .backup-next { text-align: left; padding-left: 66px; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-item-row { grid-template-columns: 1.2fr .5fr .5fr; }
  .detail-item-row > :last-child { display: none; }
  .modal-backdrop { padding: 14px; }
  .modal { max-height: calc(100vh - 28px); }
  .modal-header { padding: 0 17px; }
  .modal-body { padding: 17px; }
  .modal-footer { padding: 11px 17px; }
  .toast-root { left: 16px; right: 16px; top: 15px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
}
@media (max-width: 480px) {
  .auth-panel { padding-left: 20px; padding-right: 20px; }
  .auth-mobile-logo { left: 20px; right: 20px; gap: 10px; }
  .auth-mobile-logo img { width: 125px; }
  .auth-mobile-logo span { font-size: 9px; padding-left: 10px; }
  .form-row.two { grid-template-columns: 1fr; }
  .login-heading { margin-bottom: 24px; }
  .auth-form { gap: 17px; }
  .admin-hint { align-items: flex-start; line-height: 1.7; }
  .admin-hint i { margin: 0 4px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 14px; }
  .stat-icon { width: 30px; height: 30px; }
  .stat-label { font-size: 10px; }
  .stat-note { font-size: 9px; }
  .welcome-banner { padding: 22px; }
  .welcome-copy h1 { font-size: 20px; }
  .welcome-copy p { font-size: 11px; }
  .page-heading { flex-direction: column; gap: 13px; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .filter-control { min-width: 100%; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 0 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .panel-body { padding: 16px; }
  .form-actions .btn { flex: 1; min-width: 0; }
  .detail-grid { grid-template-columns: 1fr 1fr; padding: 13px; gap: 14px; }
  .detail-hero { align-items: flex-start; }
  .detail-hero h3 { font-size: 15px; }
  .backup-banner-main { align-items: flex-start; }
  .backup-next { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
