/*
 * ZeroDupe Enterprise UI 2.2
 * Native Chinese enterprise administration theme.
 */
:root{
  --primary:#0756D8;
  --primary-dark:#0648B8;
  --primary-soft:#EDF4FF;
  --blue:#0756D8;
  --bg:#F4F6F8;
  --card:#FFFFFF;
  --text:#101828;
  --muted:#667085;
  --muted-2:#98A2B3;
  --border:#E4E7EC;
  --border-strong:#D0D5DD;
  --unique:#20B557;
  --unique-soft:#ECFDF3;
  --duplicate:#F59E0B;
  --duplicate-soft:#FFFAEB;
  --danger:#D92D20;
  --danger-soft:#FEF3F2;
  --info-soft:#EDF4FF;
  --sidebar:#071A2F;
  --sidebar-text:#AAB4C5;
  --shadow-sm:0 1px 2px rgba(16,24,40,.035);
  --shadow-md:0 8px 22px rgba(16,24,40,.08);
  --shadow-lg:0 20px 50px rgba(16,24,40,.14);
  --radius:10px;
  --radius-sm:7px;
  --sidebar-width:264px;
  --topbar-height:68px;
  --font:"Microsoft YaHei UI","PingFang SC","Noto Sans CJK SC","Segoe UI",Arial,sans-serif;
}

html,body{max-width:100%;overflow-x:hidden}
body{font-family:var(--font);background:var(--bg);font-size:14px;color:var(--text)}
button,input,select,textarea{font-family:var(--font)}
.app-main{min-width:0;background:var(--bg)}
.content{width:100%;max-width:1580px;padding:30px 32px 52px;min-width:0}

/* Sidebar and brand */
.sidebar{
  width:var(--sidebar-width);
  padding:18px 16px 16px;
  background:#071A2F;
  border-right:1px solid #1D2939;
  box-shadow:8px 0 28px rgba(16,24,40,.06);
}
.sidebar .brand{
  min-height:58px;height:auto;margin:0 0 16px;padding:5px 10px;
  gap:12px;border-bottom:1px solid rgba(255,255,255,.075);
  padding-bottom:18px;
}
.brand-mark,.brand-custom-logo{width:38px;height:38px;border-radius:10px}
.brand-mark{box-shadow:0 8px 18px rgba(79,70,229,.24)}
.brand-copy{display:flex;min-width:0;flex-direction:column;justify-content:center;line-height:1.2}
.brand-copy strong{color:#F8FAFC;font-size:17px;font-weight:700;letter-spacing:-.2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand-copy small{margin-top:5px;color:#7F8A9F;font-size:10px;font-weight:400;white-space:nowrap}
.sidebar-nav{padding:0 0 12px;gap:2px}
.nav-section{
  padding:18px 12px 8px;color:#667085;font-size:10px;font-weight:600;
  letter-spacing:.08em;text-transform:none;
}
.nav-item{
  min-height:42px;height:42px;padding:0 12px;border-radius:7px;gap:12px;
  color:#AAB4C5;font-size:13px;font-weight:500;
}
.nav-item .icon{width:18px;height:18px;color:#7F8A9F}
.nav-item:hover{background:rgba(255,255,255,.055);color:#F9FAFB}
.nav-item.active{
  color:#FFFFFF;background:#1D2939;box-shadow:inset 3px 0 #5EEB72;
}
.nav-item.active .icon{color:#69A1FA}
.nav-key{display:none}
.sidebar-status{
  display:flex;align-items:center;gap:10px;margin:auto 4px 12px;padding:12px;
  border:1px solid rgba(255,255,255,.08);border-radius:8px;background:rgba(255,255,255,.025);
}
.status-indicator{width:8px;height:8px;border-radius:50%;background:#5EEB72;box-shadow:0 0 0 4px rgba(50,213,131,.1)}
.sidebar-status strong,.sidebar-status span{display:block}
.sidebar-status strong{color:#E4E7EC;font-size:11px;font-weight:600}
.sidebar-status span{color:#7F8A9F;font-size:9.5px;margin-top:3px}
.sidebar-user{padding:14px 7px 0;grid-template-columns:36px 1fr 30px}
.sidebar-user strong{font-size:12px;color:#F2F4F7}
.sidebar-user a span{font-size:10px;color:#7F8A9F;margin-top:2px}
.avatar{border-radius:8px;box-shadow:none}

/* Top bar */
.topbar{
  height:var(--topbar-height);padding:0 32px;gap:24px;background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--border);backdrop-filter:blur(12px);
}
.topbar-context{display:flex;align-items:center;gap:12px;white-space:nowrap}
.topbar-context strong{font-size:13px;font-weight:650;color:#344054}
.topbar-context span{display:inline-flex;align-items:center;gap:6px;color:#667085;font-size:10px}
.topbar-context i{width:6px;height:6px;border-radius:50%;background:#20B557}
.global-search{
  width:min(480px,42vw);height:40px;margin-left:10px;border-color:#D0D5DD;
  border-radius:7px;background:#F9FAFB;padding:0 11px;
}
.global-search:focus-within{border-color:#72A1ED;box-shadow:0 0 0 3px rgba(21,94,239,.08)}
.global-search input{font-size:12px}
.shortcut{padding:2px 6px;border-radius:4px;font-size:9px;color:#98A2B3}
.topbar-profile{font-size:12px;color:#344054}
.icon-btn{border-radius:7px}
.icon-btn:hover{background:#F2F4F7}

/* Page hierarchy */
.page-header{margin-bottom:22px;align-items:flex-end}
.page-title{min-width:0}
.page-title h1{font-size:25px;line-height:1.3;letter-spacing:-.35px;font-weight:700;margin-bottom:5px}
.page-title p{font-size:13px;line-height:1.7;color:#667085}
.eyebrow{
  margin-bottom:7px;color:#0756D8;font-size:11px;font-weight:650;
  letter-spacing:.08em;text-transform:none;
}
.page-actions{gap:8px}
.section-kicker,.result-overline{
  display:block;margin-bottom:5px;color:#0756D8;font-size:10.5px;font-weight:700;
  letter-spacing:.08em;
}
.btn{
  height:40px;border-radius:7px;padding:0 14px;font-size:12px;font-weight:600;
  box-shadow:none;transition:background-color .15s,border-color .15s,color .15s;
}
.btn:hover{transform:none}
.btn-primary{background:#0756D8;box-shadow:0 1px 2px rgba(16,24,40,.08)}
.btn-primary:hover{background:#0648B8}
.btn-secondary{border-color:#D0D5DD;color:#344054}
.btn-secondary:hover{background:#F9FAFB;border-color:#98A2B3}
.btn-lg{height:46px;font-size:13px}
.btn-sm{height:32px;font-size:11px}
.text-link{color:#0756D8}

/* Cards and grids */
.card,.stat-card,.summary-tile{
  border-color:var(--border);border-radius:10px;box-shadow:var(--shadow-sm);
}
.card{min-width:0}
.card-header{padding:20px 22px 15px;border-bottom:1px solid #F2F4F7}
.card-header h2,.card-header h3{font-size:15px;font-weight:650}
.card-header p{font-size:12px;line-height:1.65}
.card-body{padding:20px 22px 22px}
.stat-grid{gap:12px;margin-bottom:18px}
.stat-card{padding:17px 16px;border-top:3px solid var(--accent,#0756D8);overflow:hidden}
.stat-card:after{display:none}
.stat-icon{width:30px;height:30px;border-radius:7px}
.stat-label{font-size:11.5px;margin-top:11px}
.stat-value{font-size:23px;font-weight:700}
.stat-trend{font-size:10.5px}
.metric-tag{
  display:inline-flex;align-items:center;height:22px;padding:0 7px;border:1px solid #EAECF0;
  border-radius:5px;background:#FCFCFD;color:#667085;font-size:10px;font-weight:600;
}
.dashboard-grid,.lower-grid,.chart-grid,.analytics-layout{gap:16px}
.chart-card{min-height:380px}
.segmented{padding:3px;border-radius:6px;background:#F2F4F7}
.segmented a,.segmented button{height:28px;border-radius:5px;font-size:10px}
.rate-ring:after{background:#fff}
.activity-list{padding-top:4px}

/* Forms */
.field label,.field-label{font-size:12px;font-weight:600;color:#344054;margin-bottom:7px}
.input,.select,.textarea,.country-trigger{
  border-color:#D0D5DD;border-radius:7px;font-size:12px;color:#101828;
}
.input,.select,.country-trigger{height:44px;padding:0 13px}
.textarea{padding:12px 13px}
.input:focus,.select:focus,.textarea:focus,.country-trigger:focus{
  border-color:#72A1ED;box-shadow:0 0 0 3px rgba(21,94,239,.08);
}
.field-hint{font-size:11px;line-height:1.65;color:#667085}
.form-grid{gap:18px}
.form-actions{border-top-color:#EAECF0}
.country-popover{
  width:100%;max-width:min(420px,calc(100vw - 32px));min-width:260px;
  border-radius:8px;padding:7px;box-shadow:0 16px 35px rgba(16,24,40,.15);
}
.country-search{border-radius:6px}
.country-options button{height:42px;border-radius:5px;font-size:12.5px}
.country-options button:hover,.country-options button[aria-selected=true]{background:#EDF4FF;color:#0756D8}

/* Quick check */
.quick-check-layout{
  width:100%;grid-template-columns:minmax(0,1.55fr) minmax(320px,.65fr);
  gap:16px;align-items:start;min-width:0;
}
.check-card,.result-card{min-width:0}
.check-card{padding:26px}
.check-intro{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #EAECF0}
.check-intro-icon{width:42px;height:42px;border-radius:8px;background:#EDF4FF;color:#0756D8}
.check-intro h2{font-size:15px;font-weight:650}
.check-intro p{font-size:12px}
.record-type-toggle{gap:10px}
.type-option label{height:48px;border-radius:7px;font-size:12px}
.type-option input:checked+label{border-color:#72A1ED;background:#EDF4FF;color:#0648B8;box-shadow:none}
.check-form-grid{grid-template-columns:minmax(220px,.9fr) minmax(0,1.35fr);gap:16px}
.check-security{font-size:10.5px}
.result-card{padding:25px;min-height:360px;top:88px}
.result-placeholder{height:300px}
.result-placeholder-icon{width:58px;height:58px;border-radius:12px;background:#F2F4F7}
.result-mark{width:58px;height:58px}
.match-details{border-radius:8px}
.detail-row{font-size:12px}
.result-state h2{margin-top:4px;font-size:20px;letter-spacing:-.25px}
.result-state>p{line-height:1.7}
.result-capabilities{
  width:100%;max-width:270px;margin:19px auto 0;padding:15px 17px;display:grid;gap:10px;
  border-top:1px solid #EAECF0;list-style:none;text-align:left;
}
.result-capabilities li{display:flex;align-items:center;gap:9px;color:#475467;font-size:10.5px}
.result-capabilities .icon{width:15px;height:15px;color:#0756D8}

/* Tables */
.table-card{min-width:0}
.table-wrap{max-width:100%;overflow:auto}
.data-table{min-width:760px}
.data-table th{
  height:44px;padding:0 14px;background:#F9FAFB;color:#667085;font-size:10.5px;
  letter-spacing:.04em;text-transform:none;border-bottom-color:#EAECF0;
}
.data-table thead{position:sticky;top:0;z-index:2}
.data-table td{height:62px;padding:10px 14px;font-size:12.5px}
.data-table tbody tr:hover{background:#F9FAFB}
.record-icon{border-radius:7px;background:#EDF4FF;color:#0756D8}
.status-badge{height:25px;border-radius:5px;font-size:10.5px;font-weight:600}
.dropdown-menu{border-radius:8px;padding:5px}
.table-toolbar{padding:14px 17px}

/* Upload, imports and management */
.upload-zone{border-radius:9px;background:#FCFCFD}
.upload-icon{border-radius:8px;background:#EDF4FF;color:#0756D8}
.summary-tile{padding:15px}
.summary-tile span{text-transform:none;letter-spacing:0}
.step:before{border-radius:6px}
.step.active:before{background:#0756D8;border-color:#0756D8}
.mapping-source,.policy-card label{border-radius:8px}
.policy-card input:checked+label{border-color:#72A1ED;box-shadow:0 0 0 2px rgba(21,94,239,.07)}
.profile-summary{border-top:3px solid #0756D8}
.settings-nav a{border-radius:6px}
.settings-nav a.active{background:#EDF4FF;color:#0756D8}
.settings-content{padding:24px}
.drawer-hero{background:#F8FAFC;border-color:#EAECF0;border-radius:8px}
.detail-drawer{box-shadow:-18px 0 45px rgba(16,24,40,.12)}
.modal,.confirm-dialog{border-radius:10px}
.modal-header,.modal-footer{background:#FCFCFD}
.toast{border-radius:8px}

/* Authentication */
.auth-page{background:#F4F6F8}
.auth-layout{grid-template-columns:minmax(430px,44%) 1fr}
.auth-brand-panel{background:#071A2F;padding:42px 54px}
.auth-brand-copy h1{font-size:clamp(38px,4.4vw,61px);line-height:1.08;letter-spacing:-1.8px;font-weight:650}
.auth-brand-copy h1 em{color:#69A1FA}
.eyebrow-light{color:#69A1FA}
.auth-form-panel{background:#FFF}
.auth-form-head h2{font-size:25px}
.data-card{border-radius:8px}
.auth-brand-panel .brand{align-items:center}
.auth-brand-panel .brand>span:last-child{display:flex;flex-direction:column}
.auth-brand-panel .brand-subtitle{margin-top:5px;color:#7F8A9F;font-size:10px;font-weight:400}
.auth-brand-copy{margin:auto 0 34px;max-width:540px}
.auth-brand-copy p{max-width:510px;color:#AAB4C5;font-size:13px;line-height:1.8}
.auth-assurance{position:relative;z-index:2;display:grid;gap:1px;border:1px solid #25324A;border-radius:10px;overflow:hidden;background:#25324A}
.auth-assurance>div{display:grid;grid-template-columns:38px 1fr;align-items:center;gap:12px;padding:13px 15px;background:#111A2B}
.auth-assurance>div>span{display:grid;place-items:center;width:34px;height:34px;border-radius:7px;background:#182640;color:#69A1FA}
.auth-assurance .icon{width:17px;height:17px}
.auth-assurance p,.auth-assurance strong,.auth-assurance small{display:block;margin:0}
.auth-assurance strong{color:#F2F4F7;font-size:12px;font-weight:600}
.auth-assurance small{margin-top:3px;color:#98A2B3;font-size:10.5px;line-height:1.55}
.auth-footnote{margin-top:20px}
.auth-form-wrap{width:min(420px,100%)}

/* Interaction detail and accessibility */
:where(a,button,input,select,textarea):focus-visible{outline:2px solid #72A1ED;outline-offset:2px}
.more-btn:hover,.icon-btn:hover{color:#0756D8}
.empty-state.compact{padding:22px 12px}
.empty-state.compact p{margin:0}
.record-primary strong{font-size:12.5px}
.record-primary span{font-size:10.5px}
.activity-copy{font-size:12px}
.activity-time{font-size:10.5px}
.mini-list-row{font-size:12px}
.mini-list-row span{font-size:10.5px}
.setting-label strong{font-size:12.5px}
.setting-label span{font-size:10.5px;line-height:1.6}
.settings-section-head p{font-size:11.5px}
.empty-state p{font-size:11.5px;line-height:1.65}
.table-footer{font-size:11.5px}

/* Local SVG flags: reliable on Windows Server where flag Emoji render as US/CN text */
.country-flag,.flag{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:1}
.country-flag-img{display:inline-block;width:24px;height:18px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(16,24,40,.14);vertical-align:middle;flex:0 0 auto}
.country-trigger .country-flag-img,.country-options .country-flag-img{width:24px;height:18px}
.country-cell .country-flag-img,.detail-row .country-flag-img{width:22px;height:16.5px}
.mini-list-row .country-flag-img{width:26px;height:19.5px}
.country-flag-all{display:grid;place-items:center;width:24px;height:18px;border-radius:3px;background:#EEF2F6;color:#475467;font-size:9px;font-weight:700;box-shadow:0 0 0 1px rgba(16,24,40,.1)}
.detail-row .country-cell{justify-content:flex-end}

/* Prevent generic/template-like visual noise */
.btn-primary,.progress-bar i{background-image:none}
.card,.stat-card,.btn,.input,.select,.textarea,.country-trigger{animation:none}

@media (max-width:1280px){
  .topbar-context span{display:none}
  .quick-check-layout{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr)}
}
@media (max-width:1100px){
  :root{--sidebar-width:82px}
  .sidebar{padding-left:10px;padding-right:10px}
  .sidebar .brand{justify-content:center;padding-left:0;padding-right:0}
  .brand-copy,.nav-item span,.sidebar-status,.sidebar-user>a,.sidebar-user>.icon-btn,.nav-section{display:none}
  .nav-item{justify-content:center;padding:0}
  .nav-item.active{box-shadow:none;background:#1D2939}
  .sidebar-user{grid-template-columns:1fr;justify-items:center;padding:14px 0 0}
  .topbar-context{display:none}
  .quick-check-layout{grid-template-columns:1fr}
  .result-card{position:static}
  .stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (max-width:768px){
  :root{--sidebar-width:280px;--topbar-height:62px}
  .sidebar{width:var(--sidebar-width);padding:16px 14px}
  .sidebar .brand{justify-content:flex-start}
  .brand-copy,.nav-item span,.sidebar-user>a,.sidebar-user>.icon-btn,.nav-section{display:flex}
  .brand-copy,.sidebar-user>a{display:block}
  .sidebar-status{display:flex}
  .nav-item{justify-content:flex-start;padding:0 12px}
  .app-main{margin-left:0}
  .topbar{padding:0 16px}
  .content{padding:22px 16px 42px}
  .page-header{align-items:flex-start}
  .quick-check-layout{gap:14px}
  .check-form-grid,.form-grid{grid-template-columns:1fr}
  .check-card,.result-card{padding:20px}
  .card-header{padding:18px}
  .card-body{padding:18px}
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .settings-layout,.lower-grid,.dashboard-grid,.analytics-layout,.chart-grid{grid-template-columns:1fr}
  .settings-nav{display:flex;overflow-x:auto;position:static}
  .settings-nav a{white-space:nowrap}
}
@media (max-width:480px){
  .page-title h1{font-size:21px}
  .page-title p{font-size:11px}
  .record-type-toggle{grid-template-columns:1fr 1fr}
  .country-popover{position:fixed;left:12px;right:12px;top:78px;width:auto;max-width:none}
  .country-options{max-height:55vh}
  .stat-grid{grid-template-columns:1fr!important}
  .page-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .page-actions .btn{justify-content:center}
}
