:root {
  --ink: #321b1d;
  --ink-soft: #786468;
  --forest: #751f2b;
  --forest-2: #972e3d;
  --mint: #f3dadd;
  --mint-light: #fff1f2;
  --lime: #ff6b70;
  --lime-deep: #f45259;
  --paper: #fffdfc;
  --canvas: #f7f1f1;
  --white: #fff;
  --line: #eadfe0;
  --danger: #a52c35;
  --warning: #8b631b;
  --shadow-sm: 0 8px 24px rgba(74, 23, 30, .07);
  --shadow-lg: 0 24px 64px rgba(86, 21, 30, .15);
  --ease: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", sans-serif; font-size: 15px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; background: var(--lime); color: #fff; box-shadow: inset 0 0 0 1px rgba(117,31,43,.08); }
.brand-mark .icon { width: 23px; height: 23px; stroke-width: 2.3; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { color: inherit; font: 800 21px/1 "Manrope", sans-serif; letter-spacing: -.7px; }
.brand-copy strong span { color: var(--lime-deep); }
.brand-copy small { margin-top: 6px; color: inherit; opacity: .56; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; }

.auth-shell { display: grid; grid-template-columns: minmax(390px, .95fr) minmax(480px, 1.05fr); min-height: 100vh; background: var(--paper); }
.auth-panel { min-height: 100vh; padding: 50px clamp(42px, 7vw, 110px); }
.auth-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: var(--forest); }
.auth-intro::before, .auth-intro::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-intro::before { width: 560px; height: 560px; right: -300px; top: -170px; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 0 0 95px rgba(255,255,255,.025), 0 0 0 190px rgba(255,255,255,.018); }
.auth-intro::after { width: 270px; height: 270px; left: -180px; bottom: -100px; background: rgba(255,107,112,.09); }
.auth-brand { display: flex; gap: 13px; align-items: center; position: relative; z-index: 1; }
.auth-brand .brand-copy strong span { color: var(--lime); }
.intro-content { position: relative; z-index: 1; max-width: 570px; }
.eyebrow { display: inline-flex; color: var(--lime); font: 700 11px/1 "Manrope", sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--forest-2); }
.intro-content h1 { max-width: 520px; margin: 23px 0 19px; font: 700 clamp(42px, 5.4vw, 72px)/1.03 "Manrope", sans-serif; letter-spacing: -3.2px; }
.intro-content > p { max-width: 510px; margin: 0; color: rgba(255,255,255,.68); font-size: 18px; line-height: 1.65; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.feature-chips span { display: inline-flex; gap: 9px; align-items: center; padding: 10px 13px; color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.14); border-radius: 99px; background: rgba(255,255,255,.04); font-size: 12px; }
.feature-chips .icon { width: 16px; }
.security-note { display: flex; gap: 13px; align-items: center; margin-top: 35px; padding: 17px 18px; max-width: 460px; color: var(--forest); background: var(--lime); border-radius: 15px; }
.security-note .icon { width: 26px; height: 26px; }
.security-note div { display: flex; flex-direction: column; }
.security-note span { margin-top: 2px; font-size: 12px; opacity: .7; }
.auth-footnote { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.38); font-size: 12px; }
.auth-form-panel { display: grid; place-items: center; background: var(--paper); }
.auth-form-wrap { width: min(430px, 100%); }
.step-label { display: block; color: var(--forest-2); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.auth-form-wrap h2, .modal-dialog h2 { margin: 12px 0 8px; font: 700 34px/1.15 "Manrope", sans-serif; letter-spacing: -1.2px; }
.auth-form-wrap > p, .modal-dialog > p { margin: 0 0 31px; color: var(--ink-soft); }
.stack-form { display: grid; gap: 18px; }
.stack-form label, .mapping-form label { display: grid; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
input, select { width: 100%; min-height: 49px; padding: 0 15px; color: var(--ink); background: #fff; border: 1px solid #d7dfdb; border-radius: 10px; outline: none; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
input::placeholder { color: #a1afac; }
input:focus, select:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(151,46,61,.12); }
.password-field { position: relative; }
.password-field input { padding-right: 49px; }
.password-toggle { position: absolute; right: 7px; top: 7px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: #70817e; }
.password-toggle:hover { background: var(--mint-light); color: var(--forest); }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 13px; transition: transform 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.button:active { transform: scale(.97); }
.button:disabled { opacity: .62; cursor: wait; }
.button-wide { width: 100%; }
.button-primary { min-height: 49px; color: #fff; background: var(--forest); box-shadow: 0 8px 20px rgba(117,31,43,.2); }
.button-primary:hover { background: var(--forest-2); box-shadow: 0 10px 25px rgba(117,31,43,.25); }
.button-accent { height: 51px; color: #fff; background: var(--lime); }
.button-accent:hover { background: var(--lime-deep); }
.button-secondary { color: var(--forest); border: 1px solid #d4ddda; background: #fff; }
.button-secondary:hover { border-color: #aebdba; background: var(--mint-light); }
.button-ghost { color: var(--ink-soft); background: #eef2ef; }
.button-ghost:hover { color: var(--ink); background: #e4ebe7; }
.privacy-caption { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 25px 0 0; color: #82908e; font-size: 11px; }
.privacy-caption .icon { width: 15px; }
.portal-message { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.portal-message > section { width: min(460px, 100%); display: grid; justify-items: center; padding: 42px; text-align: center; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); }
.portal-icon { width: 60px; height: 60px; display: grid; place-items: center; margin-bottom: 20px; color: var(--forest); background: var(--mint-light); border-radius: 17px; }
.portal-icon .icon { width: 28px; height: 28px; }
.portal-message h1 { margin: 12px 0 8px; font: 700 28px/1.2 "Manrope", sans-serif; }
.portal-message p { margin: 0 0 23px; color: var(--ink-soft); }
.portal-message form { width: 100%; margin-top: 9px; }

.flash { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 13px 14px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-sm); }
.flash-success { color: #185b45; background: #e4f7ee; border: 1px solid #bde9d4; }
.flash-error { color: #8d332f; background: #fff0ef; border: 1px solid #f3c7c4; }
.flash .icon { width: 18px; }
.flash-close { margin-left: auto; padding: 2px; border: 0; background: none; cursor: pointer; opacity: .65; }
.flash-close .icon { width: 15px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 252px; display: flex; flex-direction: column; color: #fff; background: var(--forest); }
.sidebar-brand { height: 90px; display: flex; align-items: center; gap: 12px; padding: 0 26px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand-copy strong span { color: var(--lime); }
.sidebar-close { display: none; margin-left: auto; color: #fff; border: 0; background: none; }
.nav-list { display: grid; gap: 5px; padding: 25px 15px; }
.nav-item { position: relative; height: 48px; display: flex; align-items: center; gap: 13px; padding: 0 14px; color: rgba(255,255,255,.62); border-radius: 9px; font-weight: 600; font-size: 13px; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--lime); }
.nav-item.active i { position: absolute; right: 12px; width: 5px; height: 5px; background: #fff; border-radius: 50%; }
.nav-item .icon { width: 18px; }
.sidebar-status { display: flex; align-items: center; gap: 11px; margin: auto 21px 17px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.04); }
.sidebar-status div, .sidebar-user > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.sidebar-status strong, .sidebar-user strong { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-status small, .sidebar-user small { margin-top: 2px; color: rgba(255,255,255,.46); font-size: 10px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #ff8e92; box-shadow: 0 0 0 4px rgba(255,142,146,.12); }
.status-dot.off { background: #9aa4a1; box-shadow: none; }
.sidebar-user { min-height: 76px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 12px 17px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; color: var(--forest); background: var(--mint); border-radius: 10px; font: 800 14px "Manrope", sans-serif; }
.avatar.large { width: 49px; height: 49px; font-size: 17px; border-radius: 13px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; color: rgba(255,255,255,.55); border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.icon-button:hover { color: #fff; background: rgba(255,255,255,.07); }
.icon-button .icon { width: 17px; }
.sidebar-overlay { display: none; }
.main { min-width: 0; width: calc(100% - 252px); margin-left: 252px; }
.topbar { height: 76px; display: flex; align-items: center; padding: 0 clamp(24px, 4vw, 58px); background: rgba(251,252,250,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.topbar > div:first-of-type { display: flex; gap: 7px; align-items: center; font-size: 12px; }
.breadcrumb { color: #91a09d; }
.topbar-meta { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.status-pill { display: flex; align-items: center; gap: 7px; color: #53706a; font-size: 11px; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #ff8e92; }
.date-caption { color: #91a09d; font-size: 11px; }
.menu-button { display: none; margin-right: 13px; padding: 5px; border: 0; background: transparent; }
.content { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.page-heading h1 { margin: 9px 0 5px; font: 700 clamp(29px, 3.2vw, 40px)/1.15 "Manrope", sans-serif; letter-spacing: -1.5px; }
.page-heading p { margin: 0; color: var(--ink-soft); }
.heading-stat { min-width: 190px; display: flex; align-items: center; gap: 13px; padding: 15px 18px; background: var(--mint); border-radius: 12px; }
.heading-stat > .icon { width: 25px; height: 25px; color: var(--forest); }
.heading-stat div { display: flex; flex-direction: column; }
.heading-stat span { color: #56736e; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.heading-stat strong { font: 800 20px "Manrope", sans-serif; }

.search-card { padding: 22px 24px; background: var(--forest); border-radius: 16px; box-shadow: var(--shadow-lg); }
.search-form > label { display: block; margin-bottom: 10px; color: rgba(255,255,255,.65); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.search-control { position: relative; display: flex; gap: 10px; }
.search-control > .icon { position: absolute; left: 17px; top: 16px; z-index: 1; color: #78928e; }
.search-control input { height: 51px; padding-left: 50px; border: 0; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.search-control input:focus { box-shadow: 0 0 0 3px rgba(255,107,112,.35); }
.search-control .button { min-width: 145px; }
.input-hint { margin: 9px 0 0; color: rgba(255,255,255,.45); font-size: 10px; }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr 1.22fr; gap: 15px; margin-top: 22px; }
.tip-card, .activity-card { min-height: 115px; display: flex; gap: 17px; padding: 22px; background: #fff; border: 1px solid rgba(223,230,226,.75); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tip-index { color: #a2b0ad; font: 700 11px "Manrope", sans-serif; }
.tip-card h3 { margin: 0 0 7px; font: 700 14px "Manrope", sans-serif; }
.tip-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.activity-card { align-items: center; color: #fff; background: var(--forest-2); border: 0; }
.activity-card > .icon { width: 28px; height: 28px; color: var(--lime); }
.activity-card div { display: flex; flex-direction: column; min-width: 0; }
.activity-card span { color: rgba(255,255,255,.48); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.activity-card strong { overflow: hidden; margin-top: 5px; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.activity-card small { margin-top: 3px; color: rgba(255,255,255,.5); font-size: 10px; }

.result-card { margin-top: 22px; overflow: hidden; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); }
.result-header { display: flex; justify-content: space-between; gap: 20px; padding: 27px 28px 24px; border-bottom: 1px solid var(--line); }
.customer-identity { display: flex; align-items: center; gap: 17px; }
.customer-avatar { width: 57px; height: 57px; display: grid; place-items: center; color: var(--forest); background: var(--lime); border-radius: 16px; font: 800 21px "Manrope", sans-serif; }
.match-badge { display: inline-flex; align-items: center; gap: 5px; color: #34725f; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.match-badge .icon { width: 13px; }
.customer-identity h2 { margin: 4px 0 1px; font: 700 23px "Manrope", sans-serif; letter-spacing: -.6px; }
.customer-identity p { margin: 0; color: #899894; font-size: 10px; }
.result-actions { display: flex; align-items: center; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 28px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.quick-item { display: flex; gap: 12px; align-items: center; padding: 0 22px; border-right: 1px solid var(--line); }
.quick-item:first-child { padding-left: 0; }
.quick-item:last-child { border-right: 0; }
.quick-item > .icon { width: 21px; color: var(--forest-2); }
.quick-item div { display: flex; flex-direction: column; min-width: 0; }
.quick-item span { color: #8b9a97; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.quick-item strong { overflow: hidden; margin-top: 3px; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.details-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 11px; }
.details-heading h3 { margin: 0; font: 700 14px "Manrope", sans-serif; }
.details-heading span { color: #8d9b98; font-size: 10px; }
.details-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0; padding: 0 28px 28px; background: var(--line); background-clip: content-box; }
.detail-item { min-height: 74px; padding: 16px; background: #fff; }
.detail-item dt { color: #8a9996; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.detail-item dd { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.detail-item.is-empty dd { color: #b0bab8; font-weight: 400; }
.result-footer { min-height: 49px; display: flex; align-items: center; gap: 9px; padding: 0 28px; color: #7d8b88; background: #f8faf8; border-top: 1px solid var(--line); font-size: 10px; }
.result-footer .icon { width: 14px; }
.separator { width: 3px; height: 3px; margin: 0 3px; background: #bac3c1; border-radius: 50%; }
.result-enter { animation: result-in 280ms var(--ease) both; }
@keyframes result-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.empty-state { display: grid; place-items: center; margin-top: 22px; padding: 57px 25px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.empty-icon { width: 61px; height: 61px; display: grid; place-items: center; color: var(--forest); background: var(--mint-light); border-radius: 18px; }
.empty-icon .icon { width: 27px; height: 27px; }
.empty-state h1, .empty-state h2 { margin: 17px 0 7px; font: 700 22px "Manrope", sans-serif; }
.empty-state p { max-width: 490px; margin: 0 0 22px; color: var(--ink-soft); }

.upload-card { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); overflow: hidden; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); }
.upload-card > form { padding: 28px; }
.dropzone { min-height: 285px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; border: 1.5px dashed #bdcbc7; border-radius: 13px; background: #fafcfb; text-align: center; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.dropzone.dragover, .dropzone:hover { border-color: var(--forest-2); background: var(--mint-light); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 17px; color: var(--forest); background: var(--lime); border-radius: 16px; }
.drop-icon .icon { width: 25px; height: 25px; }
.dropzone strong { font: 700 16px "Manrope", sans-serif; }
.dropzone > span:not(.drop-icon) { margin-top: 4px; color: var(--ink-soft); font-size: 12px; }
.dropzone small { margin-top: 13px; color: #95a39f; font-size: 10px; }
.dropzone em { margin-top: 10px; color: var(--forest-2); font-size: 11px; font-style: normal; font-weight: 700; }
.upload-card > form > .button { float: right; margin-top: 17px; }
.format-help { padding: 29px; color: #fff; background: var(--forest); }
.format-help h3 { margin: 0 0 23px; font: 700 16px "Manrope", sans-serif; }
.format-help ul { display: grid; gap: 19px; margin: 0; padding: 0; list-style: none; }
.format-help li { display: flex; gap: 12px; }
.format-help li > span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; color: var(--forest); background: var(--lime); border-radius: 8px; font-size: 9px; font-weight: 800; }
.format-help p { margin: 2px 0 0; color: rgba(255,255,255,.67); font-size: 11px; }
.privacy-box { display: flex; gap: 12px; align-items: center; margin-top: 28px; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(255,255,255,.04); }
.privacy-box .icon { color: var(--lime); }
.privacy-box p { display: flex; flex-direction: column; margin: 0; font-size: 10px; }
.privacy-box strong { margin-bottom: 2px; color: #fff; font-size: 11px; }
.panel-card { overflow: hidden; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); }
.panel-title { display: flex; gap: 13px; align-items: center; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.panel-title-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; }
.panel-title-icon.success { color: #237255; background: #dff6eb; }
.panel-title-icon .icon { width: 19px; }
.panel-title > div:last-child { display: flex; flex-direction: column; }
.panel-title span { color: #82918e; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.panel-title h2 { margin: 3px 0 0; font: 700 15px "Manrope", sans-serif; }
.preview-wrap, .table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { padding: 12px 16px; color: #778784; background: #f5f8f6; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.data-table th small, .data-table td small { display: block; margin-top: 2px; color: #9ba8a5; font-size: 8px; text-transform: none; letter-spacing: 0; }
.data-table td { max-width: 240px; overflow: hidden; padding: 13px 16px; border-bottom: 1px solid #edf1ef; font-size: 11px; text-overflow: ellipsis; }
.preview-table { min-width: 1200px; }
.mapping-form { padding: 25px; }
.mapping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mapping-form label > span { color: #97a49f; font-size: 9px; font-weight: 500; }
.mapping-form select { min-height: 45px; font-size: 12px; }
.mode-field { display: flex; gap: 12px; margin: 22px 0 0; padding: 0; border: 0; }
.mode-field legend { width: 100%; margin-bottom: 8px; font-size: 11px; font-weight: 700; }
.radio-card { grid-template-columns: 18px 1fr !important; align-items: start; width: 255px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio-card input { width: 16px; min-height: 16px; margin: 2px 0 0; accent-color: var(--forest); }
.radio-card > span { display: flex; flex-direction: column; color: inherit !important; }
.radio-card strong { font-size: 11px; }
.radio-card small { margin-top: 2px; color: #81908d; font-size: 9px; font-weight: 400; }
.radio-card:has(input:checked) { border-color: var(--forest-2); background: var(--mint-light); }
.radio-card.warning:has(input:checked) { border-color: #d0a95e; background: #fff8e9; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.history-section { margin-top: 29px; }
.section-title { display: flex; justify-content: space-between; margin-bottom: 13px; }
.section-title h2 { margin: 0; font: 700 17px "Manrope", sans-serif; }
.section-title p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }
.history-section .table-wrap { background: #fff; border-radius: 13px; box-shadow: var(--shadow-sm); }
.table-badge { display: inline-flex; padding: 4px 8px; color: #476963; background: var(--mint-light); border-radius: 99px; font-size: 9px; font-weight: 700; }
.table-empty { display: grid; place-items: center; padding: 30px; color: #8c9997; background: #fff; border-radius: 13px; }
.table-empty .icon { width: 25px; }
.table-empty p { margin: 7px 0 0; font-size: 11px; }

.users-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.user-card { padding: 21px; background: #fff; border: 1px solid transparent; border-radius: 14px; box-shadow: var(--shadow-sm); }
.user-card.inactive { opacity: .62; box-shadow: none; border-color: var(--line); }
.user-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.role-badge { padding: 5px 9px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.role-badge.admin { color: #765b12; background: #f7edbd; }
.role-badge.operator { color: #286651; background: var(--mint); }
.user-card h2 { margin: 17px 0 0; font: 700 16px "Manrope", sans-serif; }
.user-card > p { margin: 2px 0 17px; color: #8d9a98; font-size: 11px; }
.user-card-meta { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); }
.user-card-meta span { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.user-card-meta small { color: #95a19f; font-size: 9px; }
.user-card .button { margin-top: 7px; min-height: 39px; font-size: 11px; }
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,31,28,.55); backdrop-filter: blur(5px); }
.modal-dialog { position: relative; z-index: 1; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 31px; background: #fff; border-radius: 17px; box-shadow: var(--shadow-lg); animation: modal-in 220ms var(--ease) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-dialog h2 { font-size: 26px; }
.modal-dialog > p { margin-bottom: 23px; font-size: 12px; }
.modal-close { position: absolute; right: 20px; top: 20px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--canvas); cursor: pointer; }
.modal-close .icon { width: 17px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; padding: 10px 16px; color: #fff; background: var(--forest); border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 11px; font-weight: 700; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  .auth-shell { grid-template-columns: .85fr 1.15fr; }
  .auth-panel { padding: 42px; }
  .intro-content h1 { font-size: 46px; letter-spacing: -2px; }
  .details-grid { grid-template-columns: repeat(3, 1fr); }
  .welcome-grid { grid-template-columns: 1fr 1fr; }
  .activity-card { grid-column: 1 / -1; }
  .users-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .auth-shell { display: block; background: var(--paper); }
  .auth-panel { min-height: auto; padding: 32px 24px; }
  .auth-intro { min-height: 330px; }
  .auth-intro .intro-content { margin: 50px 0 30px; }
  .intro-content h1 { margin: 15px 0 12px; font-size: 38px; }
  .intro-content > p { font-size: 14px; }
  .auth-footnote { display: none; }
  .auth-form-panel { min-height: calc(100vh - 330px); padding-top: 42px; padding-bottom: 50px; }
  .sidebar { transform: translateX(-100%); transition: transform 240ms var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid; place-items: center; }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 19; background: rgba(7,30,27,.45); }
  .sidebar-overlay.open { display: block; }
  .main { width: 100%; margin-left: 0; }
  .menu-button { display: grid; place-items: center; }
  .topbar { padding: 0 18px; }
  .topbar-meta .status-pill, .breadcrumb { display: none; }
  .content { width: min(100% - 30px, 650px); padding-top: 31px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .heading-stat { width: 100%; }
  .search-control { display: grid; }
  .search-control .button { width: 100%; }
  .search-control > .icon { top: 16px; }
  .welcome-grid, .quick-grid, .upload-card, .mapping-grid, .users-grid { grid-template-columns: 1fr; }
  .quick-grid { gap: 0; }
  .quick-item { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .quick-item:last-child { border-bottom: 0; }
  .result-header { align-items: flex-start; flex-direction: column; }
  .result-actions, .result-actions .button { width: 100%; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-field { flex-direction: column; }
  .radio-card { width: 100%; }
  .format-help { order: -1; }
  .upload-card > form > .button { float: none; width: 100%; }
}

@media (max-width: 480px) {
  .auth-panel { padding-left: 19px; padding-right: 19px; }
  .feature-chips { display: none; }
  .content { width: calc(100% - 22px); }
  .topbar-meta { gap: 7px; }
  .page-heading h1 { font-size: 29px; }
  .search-card { padding: 18px; }
  .result-header, .details-heading { padding-left: 18px; padding-right: 18px; }
  .quick-grid { margin-left: 18px; margin-right: 18px; }
  .details-grid { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
  .result-footer { align-items: flex-start; flex-direction: column; gap: 3px; padding: 13px 18px; }
  .separator { display: none; }
  .customer-avatar { width: 47px; height: 47px; }
  .customer-identity h2 { font-size: 19px; }
  .portal-message > section { padding: 31px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
