:root {
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --primary-soft: #eaf2ff;
    --primary-pale: #f5f8ff;
    --indigo: #4f46e5;
    --success: #087a55;
    --success-soft: #e8f8f1;
    --warning: #a84f08;
    --warning-soft: #fff4df;
    --danger: #b42318;
    --danger-soft: #ffedeb;
    --text: #14213d;
    --text-secondary: #52627a;
    --text-muted: #64748b;
    --border: #dce5f1;
    --border-strong: #c8d5e6;
    --surface: #fff;
    --surface-subtle: #f8fafd;
    --page: #f3f7fc;
    --shadow-sm: 0 3px 12px rgba(32, 65, 113, .06);
    --shadow-md: 0 14px 36px rgba(32, 65, 113, .10);
    --shadow-lg: 0 28px 70px rgba(42, 74, 126, .16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --container: 1280px;
    --motion: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 98px; overflow-x: hidden; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--page);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
a { color: var(--primary); }
img, svg { display: block; max-width: 100%; }
code { font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace; font-size: .9em; overflow-wrap: anywhere; }
h1, h2, h3, p, dl, dd { margin-top: 0; }

.q-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.skip-link {
    position: fixed;
    z-index: 1000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    transform: translateY(-160%);
    transition: transform var(--motion);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .36); outline-offset: 2px; }

/* Shared shell */
.app-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid rgba(200, 213, 230, .85);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 18px rgba(46, 74, 114, .05);
    backdrop-filter: blur(14px);
}
.app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 48px), var(--container));
    min-height: 72px;
    margin: 0 auto;
    gap: 24px;
}
.app-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
.app-brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--primary);
    background: linear-gradient(145deg, #dbeafe, #eff6ff);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.app-brand__icon { width: 26px; height: 26px; }
.app-brand__copy { display: flex; flex-direction: column; min-width: 0; }
.app-brand__copy strong { font-size: 18px; line-height: 1.35; letter-spacing: .02em; }
.app-brand__copy small { color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.app-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.app-nav { display: flex; align-items: center; }
.app-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 700;
    text-decoration: none;
    transition: background var(--motion), color var(--motion);
}
.app-nav__link:hover, .app-nav__link.is-active { color: var(--primary-strong); background: var(--primary-soft); }
.readonly-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #cbdcf5;
    border-radius: 999px;
    color: #315b99;
    background: #f3f7fe;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.readonly-chip .q-icon { width: 15px; height: 15px; }
.readonly-chip--large { min-height: 38px; padding-inline: 13px; font-size: 13px; }
.user-menu { display: flex; align-items: center; min-width: 0; gap: 9px; padding-left: 14px; border-left: 1px solid var(--border); }
.user-menu__avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #4f46e5);
    font-weight: 800;
}
.user-menu__copy { display: flex; flex-direction: column; min-width: 0; max-width: 130px; }
.user-menu__copy strong, .user-menu__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__copy strong { font-size: 13px; }
.user-menu__copy small { color: var(--text-muted); font-size: 11px; }
.logout-form { display: flex; margin: 0; }
.icon-button, .header-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--motion), border-color var(--motion), color var(--motion);
}
.icon-button:hover { color: var(--primary); border-color: var(--border); background: var(--surface-subtle); }
.header-menu-button { display: none; gap: 7px; font-weight: 700; }
.page-main { width: min(calc(100% - 48px), var(--container)); margin: 0 auto; padding: 26px 0 48px; }
.app-footer { margin-top: auto; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .78); }
.app-footer__inner { display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 48px), var(--container)); min-height: 62px; margin: 0 auto; gap: 24px; color: var(--text-muted); font-size: 12px; }
.app-footer p { display: flex; align-items: center; gap: 7px; margin: 0; }
.app-footer .q-icon { width: 16px; height: 16px; color: var(--primary); }
.flash-wrap { width: min(calc(100% - 48px), var(--container)); margin: 18px auto 0; }
.flash-message { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.flash-message.success { color: var(--success); border-color: #a7e4ce; background: var(--success-soft); }
.flash-message.error { color: var(--danger); border-color: #f3b6b1; background: var(--danger-soft); }

/* Buttons and common content */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--motion), background var(--motion), border-color var(--motion), box-shadow var(--motion), opacity var(--motion);
}
.button .q-icon { width: 18px; height: 18px; }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--indigo)); box-shadow: 0 8px 18px rgba(37, 99, 235, .20); }
.button--primary:hover { color: #fff; background: linear-gradient(135deg, var(--primary-strong), #4338ca); box-shadow: 0 10px 24px rgba(37, 99, 235, .26); }
.button--secondary { color: #31588f; border-color: #c9d8ed; background: #fff; }
.button--secondary:hover { color: var(--primary-strong); border-color: #9ebbe3; background: var(--primary-pale); }
.button--full { width: 100%; }
.button--disabled { color: #8b98aa; border-color: #d9e1eb; background: #edf1f6; cursor: not-allowed; box-shadow: none; }
.button[aria-busy="true"] { opacity: .72; cursor: wait; }
.section-eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--primary-strong); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.section-eyebrow .q-icon { width: 17px; height: 17px; }
.content-section, .overview-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 0; color: var(--text-muted); font-size: 12px; }
.section-heading__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.section-heading__icon .q-icon { width: 18px; height: 18px; }
.section-heading--spaced { margin-bottom: 22px; }
.breadcrumbs { display: flex; align-items: center; min-height: 36px; gap: 5px; margin-bottom: 16px; color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumbs .q-icon { width: 14px; height: 14px; }
.status-badge, .source-badge, .data-tag, .domain-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}
.status-success { color: var(--success); background: var(--success-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }
.status-danger { color: var(--danger); background: var(--danger-soft); }
.status-neutral { color: #546276; background: #edf1f6; }
.source-badge { color: #365c94; border: 1px solid #d4e1f3; background: #f4f7fc; }
.source-badge .q-icon, .data-tag .q-icon { width: 14px; height: 14px; }
.data-tag { color: #345689; background: #edf3fc; }
.data-tag--muted { color: var(--text-muted); background: #f1f4f8; }
.domain-tag { color: #31558d; border: 1px solid #d4e1f3; background: #f7faff; font-family: Consolas, monospace; }
.field-help { margin: 9px 0 0; color: var(--text-muted); font-size: 12px; }
.query-error { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 10px 12px; border: 1px solid #f0b8b3; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 12px; font-weight: 700; }
.query-error .q-icon { width: 16px; height: 16px; margin-top: 1px; }

/* Login */
.auth-page {
    background:
        radial-gradient(circle at 74% 42%, rgba(157, 195, 255, .34), transparent 34%),
        radial-gradient(circle at 22% 48%, rgba(196, 210, 255, .32), transparent 35%),
        linear-gradient(135deg, #edf4ff 0%, #f7fbff 55%, #e8f2ff 100%);
}
.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: .55;
    background-image:
        linear-gradient(rgba(84, 131, 207, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(84, 131, 207, .08) 1px, transparent 1px),
        radial-gradient(circle, rgba(77, 124, 204, .25) 1px, transparent 1.5px);
    background-size: 80px 80px, 80px 80px, 40px 40px;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
    pointer-events: none;
}
.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, .72fr);
    align-items: center;
    width: min(calc(100% - 64px), 1400px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    gap: clamp(48px, 8vw, 128px);
    padding: 48px 0;
}
.login-intro { position: relative; min-width: 0; padding: 28px 0 230px; }
.login-intro__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: #315b9f; font-size: 14px; font-weight: 800; }
.login-intro__eyebrow .q-icon { width: 18px; height: 18px; }
.login-intro h1 { margin: 0; color: #263655; font-size: clamp(52px, 5.4vw, 82px); line-height: 1.08; letter-spacing: -.05em; }
.login-intro__english { margin: 11px 0 22px; color: #3f69bc; font-size: clamp(18px, 1.8vw, 25px); font-weight: 800; letter-spacing: .02em; }
.login-intro__lead { margin: 0 0 8px; color: #586b89; font-size: clamp(22px, 2.3vw, 32px); font-weight: 800; }
.login-intro__desc { max-width: 710px; margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.8; }
.login-benefits { display: flex; align-items: stretch; width: fit-content; max-width: 100%; margin: 28px 0 0; padding: 8px; gap: 4px; border: 1px solid rgba(147, 169, 207, .35); border-radius: 999px; background: rgba(255, 255, 255, .72); box-shadow: 0 9px 26px rgba(54, 84, 133, .08); list-style: none; }
.login-benefits li { display: flex; align-items: center; min-width: 0; gap: 8px; padding: 5px 15px; color: #486180; }
.login-benefits li + li { border-left: 1px solid #dbe4f1; }
.login-benefits .q-icon { width: 20px; height: 20px; color: #4c86ec; }
.login-benefits span { display: flex; flex-direction: column; line-height: 1.35; }
.login-benefits strong { font-size: 13px; }
.login-benefits small { color: var(--text-muted); font-size: 10px; }
.login-visual { position: absolute; left: 6%; bottom: 4px; width: min(78%, 610px); height: 188px; opacity: .62; }
.login-visual::before, .login-visual::after { content: ""; position: absolute; height: 2px; border-radius: 99px; background: linear-gradient(90deg, #5b8ddd, transparent); transform: rotate(-8deg); }
.login-visual::before { right: 0; top: 78px; width: 48%; }
.login-visual::after { right: 4%; bottom: 24px; width: 57%; transform: rotate(10deg); }
.login-visual__card { position: absolute; display: block; border: 1px solid rgba(130, 165, 220, .28); background: rgba(255, 255, 255, .66); box-shadow: 0 18px 48px rgba(57, 91, 143, .08); }
.login-visual__card--main { left: 2%; top: 10px; width: 60%; height: 140px; padding: 28px; border-radius: 18px; }
.login-visual__card--main i { display: block; width: 76%; height: 10px; margin-bottom: 22px; border-radius: 99px; background: linear-gradient(90deg, rgba(68, 126, 224, .65), rgba(151, 174, 229, .18)); }
.login-visual__card--main i:nth-child(2) { width: 58%; }
.login-visual__card--main i:nth-child(3) { width: 42%; }
.login-visual__card--small { right: 9%; bottom: 3px; width: 39%; height: 102px; border-radius: 16px; }
.login-visual__card--accent { right: 23%; top: 58px; display: grid; place-items: center; width: 86px; height: 76px; border-radius: 14px; color: #4d82de; }
.login-card { position: relative; width: 100%; max-width: 520px; margin-left: auto; padding: clamp(34px, 4vw, 56px); border: 1px solid rgba(255, 255, 255, .82); border-radius: var(--radius-xl); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-lg); text-align: center; }
.login-card__brand { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #1784f8, #315cf1); box-shadow: 0 12px 26px rgba(37, 99, 235, .25); }
.login-card__brand .q-icon { width: 40px; height: 40px; }
.login-card h2 { margin-bottom: 2px; font-size: 32px; line-height: 1.3; }
.login-card__subtitle { margin-bottom: 24px; color: var(--text-secondary); font-size: 15px; font-weight: 700; }
.login-divider { display: flex; align-items: center; gap: 15px; margin: 22px 0; color: #6592db; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #cedaeb); }
.login-divider::after { background: linear-gradient(90deg, #cedaeb, transparent); }
.login-divider span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f3f7fe; }
.login-divider .q-icon { width: 16px; height: 16px; }
.button--wecom { min-height: 60px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #2179ed, #5758ed); box-shadow: 0 14px 30px rgba(50, 93, 224, .22); font-size: 18px; }
.button--wecom:hover { color: #fff; background: linear-gradient(135deg, #1769da, #4847db); box-shadow: 0 16px 34px rgba(50, 93, 224, .30); }
.button--wecom .q-icon { width: 23px; height: 23px; }
.login-qr { margin: 24px auto 0; }
.login-qr img { width: 220px; height: 220px; margin: 0 auto; padding: 10px; border: 1px solid #cfe0f5; border-radius: 18px; background: #fff; box-shadow: 0 10px 26px rgba(38, 78, 139, .10); object-fit: contain; }
.login-qr p { margin: 14px 0 0; color: #375b91; font-weight: 800; }
.login-qr small { color: var(--text-muted); }
.login-auth-hint, .auth-config-state, .auth-alert { display: flex; align-items: flex-start; gap: 11px; margin: 20px 0 0; padding: 14px; border: 1px solid #d4e2f4; border-radius: 12px; color: #365783; background: #f4f8fe; text-align: left; }
.login-auth-hint .q-icon, .auth-alert .q-icon { margin-top: 2px; }
.login-auth-hint p, .auth-config-state p { margin: 0; }
.login-auth-hint strong, .login-auth-hint span { display: block; }
.login-auth-hint span, .auth-config-state p { color: var(--text-muted); font-size: 12px; }
.auth-alert--error { margin-top: 0; margin-bottom: 16px; color: var(--danger); border-color: #f3b6b1; background: var(--danger-soft); }
.auth-config-state { margin: 0 0 18px; color: #7d4a0c; border-color: #f2d09b; background: #fff8e9; }
.auth-config-state__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; background: #fff1cf; }
.auth-config-state strong { display: block; margin-bottom: 3px; }
.login-disabled-reason { margin: 9px 0 0; color: var(--text-muted); font-size: 12px; }
.login-security-note { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin-top: 24px; color: #3663ae; font-size: 12px; font-weight: 700; }
.login-security-note .q-icon { width: 17px; height: 17px; margin-top: 1px; }
.login-card__footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 11px; }
.login-card__footer p { margin-bottom: 3px; }

/* Search home */
.search-page { padding-top: 38px; }
.search-hero { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 62px); border: 1px solid #d7e3f2; border-radius: var(--radius-xl); background: radial-gradient(circle at 84% 12%, rgba(142, 183, 255, .24), transparent 27%), linear-gradient(145deg, #fff 0%, #f4f8ff 100%); box-shadow: var(--shadow-md); }
.search-hero::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(104, 145, 205, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(104, 145, 205, .08) 1px, transparent 1px); background-size: 42px 42px; pointer-events: none; }
.search-hero > * { position: relative; }
.search-hero__content { max-width: 760px; }
.search-hero h1 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 50px); line-height: 1.2; letter-spacing: -.035em; }
.search-hero__content > p { max-width: 680px; margin: 0; color: var(--text-secondary); font-size: 17px; }
.readonly-notice { position: absolute; top: 36px; right: 40px; display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #cbdcf5; border-radius: 12px; color: #315b99; background: rgba(245, 249, 255, .88); }
.readonly-notice .q-icon { width: 19px; height: 19px; }
.readonly-notice div { display: flex; flex-direction: column; }
.readonly-notice strong { font-size: 12px; }
.readonly-notice span { color: var(--text-muted); font-size: 10px; }
.unified-search { max-width: 980px; margin: 36px auto 0; }
.search-type-picker { display: flex; width: fit-content; max-width: 100%; margin: 0 0 10px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255, 255, 255, .86); }
.search-type-picker legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.search-type-picker label { cursor: pointer; }
.search-type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.search-type-picker span { display: grid; place-items: center; min-height: 36px; padding: 0 13px; border-radius: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 800; transition: color var(--motion), background var(--motion), box-shadow var(--motion); }
.search-type-picker input:checked + span { color: var(--primary-strong); background: var(--primary-soft); box-shadow: 0 2px 7px rgba(37, 99, 235, .08); }
.search-type-picker input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .30); outline-offset: 2px; }
.search-control > label { display: block; margin-bottom: 7px; color: var(--text); font-size: 13px; font-weight: 800; }
.search-control__row { display: flex; align-items: center; min-width: 0; min-height: 64px; padding: 6px 6px 6px 18px; border: 2px solid #b9ccec; border-radius: 15px; background: #fff; box-shadow: 0 13px 32px rgba(55, 89, 139, .10); transition: border-color var(--motion), box-shadow var(--motion); }
.search-control__row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .10), 0 14px 34px rgba(55, 89, 139, .12); }
.search-control__icon { color: #5b7eaf; }
.search-control__icon .q-icon { width: 22px; height: 22px; }
.search-control input { min-width: 0; flex: 1; height: 48px; padding: 0 14px; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-control input::placeholder { color: #66758b; }
.search-clear { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 9px; color: var(--text-muted); background: transparent; cursor: pointer; }
.search-clear:hover { color: var(--text); background: #eef2f7; }
.search-clear .q-icon { width: 18px; height: 18px; }
.search-submit { min-width: 132px; min-height: 50px; }
.search-scope { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px auto 0; }
.search-scope > span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; border: 1px solid #dce5f1; border-radius: 999px; color: #587092; background: rgba(255, 255, 255, .74); font-size: 12px; font-weight: 700; }
.search-scope .q-icon { width: 15px; height: 15px; color: var(--primary); }
.recent-section, .search-guidance { margin-top: 22px; padding: 22px; }
.recent-searches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.recent-search-form { min-width: min(240px, 100%); margin: 0; }
.recent-search-chip { display: flex; align-items: center; width: 100%; min-width: min(240px, 100%); min-height: 52px; gap: 9px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: #fff; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color var(--motion), background var(--motion), box-shadow var(--motion); }
.recent-search-chip:hover { border-color: #adc3e2; background: var(--primary-pale); box-shadow: var(--shadow-sm); }
.recent-search-chip > .q-icon { color: var(--primary); }
.recent-search-chip span { display: flex; flex-direction: column; min-width: 0; }
.recent-search-chip strong, .recent-search-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-search-chip strong { font-size: 13px; }
.recent-search-chip small { color: var(--text-muted); font-size: 11px; }
.guidance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.guidance-grid article { display: flex; gap: 12px; padding: 16px; border: 1px solid #e4eaf2; border-radius: 12px; background: var(--surface-subtle); }
.guidance-grid article > span { color: #7293c5; font-size: 18px; font-weight: 900; }
.guidance-grid h3 { margin: 0 0 4px; font-size: 14px; }
.guidance-grid p { margin: 0; color: var(--text-secondary); font-size: 12px; }

/* Results */
.results-search-panel { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.results-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.results-title-row h1 { margin-bottom: 6px; font-size: 27px; }
.results-title-row p { margin: 0; color: var(--text-secondary); }
.results-title-row p strong { color: var(--text); }
.query-duration { margin-left: 8px; color: var(--text-muted); font-size: 12px; }
.compact-search { display: flex; align-items: center; min-height: 52px; max-width: 860px; margin-top: 20px; padding: 4px 4px 4px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-subtle); }
.compact-search > span { color: #6482ad; }
.compact-search input { min-width: 0; flex: 1; height: 42px; padding: 0 11px; border: 0; outline: 0; background: transparent; font-size: 16px; }
.compact-search .button { min-height: 44px; }
.domain-resolution { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border: 1px solid #cfe0f6; border-radius: 11px; color: #345b91; background: #f2f7fe; }
.domain-resolution > .q-icon { color: var(--primary); }
.domain-resolution div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.domain-resolution code { padding: 2px 6px; border-radius: 5px; background: #e5eefc; }
.domain-resolution small { color: var(--text-muted); }
.result-list { display: grid; gap: 16px; margin-top: 18px; }
.result-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); transition: border-color var(--motion), box-shadow var(--motion); }
.result-card:hover { border-color: #b6cae6; box-shadow: var(--shadow-md); }
.result-card__main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px; }
.result-card__identity { display: flex; align-items: center; min-width: 0; gap: 14px; }
.result-card__avatar { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #3b82f6, #4f46e5); font-size: 18px; font-weight: 900; }
.result-card__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.result-card__title-row h2 { margin: 0; font-size: 19px; }
.result-card__identity p { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 5px 0 0; color: var(--text-muted); font-size: 12px; }
.result-match { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; max-width: 45%; gap: 8px; }
.result-match__label { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 12px; }
.result-match__label .q-icon { width: 15px; height: 15px; }
.result-match strong { color: #365d95; font-size: 13px; }
.result-match code { padding: 4px 7px; border: 1px solid #d6e2f2; border-radius: 7px; color: #31558d; background: #f4f8fe; }
.result-card__details { padding: 18px 22px; border-top: 1px solid #edf1f6; border-bottom: 1px solid #edf1f6; background: #fafcff; }
.result-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 14px; }
.result-metrics > div { padding: 2px 16px; border-left: 1px solid #e1e8f2; }
.result-metrics > div:first-child { padding-left: 0; border-left: 0; }
.result-metrics dt { color: var(--text-muted); font-size: 11px; }
.result-metrics dd { margin: 2px 0 0; font-size: 15px; font-weight: 900; }
.result-associations { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: start; gap: 10px; margin-top: 9px; }
.result-associations > span { padding-top: 4px; color: var(--text-muted); font-size: 12px; }
.result-associations > div { display: flex; flex-wrap: wrap; gap: 6px; }
.result-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; }
.result-card__footer > span { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 11px; }
.result-card__footer > span .q-icon { width: 14px; height: 14px; }
.empty-state { display: flex; flex-direction: column; align-items: center; max-width: 720px; margin: 28px auto; padding: 48px 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 18px; border-radius: 50%; color: #6c8fbe; background: var(--primary-soft); }
.empty-state__icon .q-icon { width: 34px; height: 34px; }
.empty-state h2 { margin-bottom: 5px; font-size: 22px; }
.empty-state > p { color: var(--text-secondary); }
.empty-state ul { margin: 3px 0 24px; padding-left: 22px; color: var(--text-secondary); text-align: left; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; color: var(--text-muted); font-size: 12px; }
.pagination > div { display: flex; gap: 8px; }
.pagination a, .pagination .is-disabled { display: inline-flex; align-items: center; min-height: 44px; gap: 5px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; color: var(--text-secondary); background: #fff; font-weight: 700; text-decoration: none; }
.pagination a:hover { color: var(--primary); border-color: #adc3e2; }
.pagination .is-disabled { opacity: .5; }
.pagination .q-icon { width: 15px; height: 15px; }

/* Customer detail */
.customer-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: radial-gradient(circle at 92% 12%, rgba(135, 177, 245, .18), transparent 30%), #fff; box-shadow: var(--shadow-sm); }
.customer-hero__identity { display: flex; align-items: center; min-width: 0; gap: 16px; }
.customer-hero__avatar { display: grid; place-items: center; width: 62px; height: 62px; flex: 0 0 auto; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #3283f6, #4f46e5); font-size: 24px; font-weight: 900; box-shadow: 0 9px 22px rgba(49, 103, 218, .20); }
.customer-hero__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.customer-hero h1 { margin: 0; font-size: 27px; }
.customer-hero__identity p { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 6px 0 0; color: var(--text-muted); font-size: 12px; }
.customer-hero__actions { display: flex; align-items: center; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.metric-card { display: flex; align-items: center; min-width: 0; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.metric-card > span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.metric-card > span .q-icon { width: 19px; height: 19px; }
.metric-card div { min-width: 0; }
.metric-card p { margin: 0; color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.metric-card strong { display: block; overflow: hidden; margin-top: 1px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-card small { margin-left: 2px; font-size: 10px; font-weight: 700; }
.detail-nav { position: sticky; z-index: 50; top: 81px; display: flex; align-items: center; gap: 4px; margin: 18px 0 14px; padding: 5px; overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.detail-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: max-content; min-height: 44px; padding: 0 13px; border-radius: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 800; text-decoration: none; }
.detail-nav a:hover, .detail-nav a.is-active { color: var(--primary-strong); background: var(--primary-soft); }
.detail-sections { display: grid; gap: 13px; }
.overview-section { scroll-margin-top: 142px; padding: 24px; }
.info-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.info-grid > div { min-width: 0; min-height: 86px; padding: 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fcfdff; }
.info-grid > div:nth-child(5n) { border-right: 0; }
.info-grid > div:nth-last-child(-n+5) { border-bottom: 0; }
.info-grid dt { color: var(--text-muted); font-size: 11px; font-weight: 700; }
.info-grid dd { margin: 6px 0 0; color: var(--text); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.invoice-info-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.invoice-info-grid > div { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--border); background: #fcfdff; }
.invoice-info-grid > div:last-child { border-right: 0; }
.invoice-info-grid dt { color: var(--text-muted); font-size: 11px; }
.invoice-info-grid dd { margin: 5px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: 12px; font-weight: 800; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.subsection-heading > div { display: flex; align-items: center; gap: 8px; }
.subsection-heading h3 { margin: 0; font-size: 15px; }
.subsection-heading > div span { padding: 2px 8px; border-radius: 999px; color: #486890; background: #eef3fa; font-size: 11px; font-weight: 800; }
.subsection-heading p { margin: 0; color: var(--text-muted); font-size: 11px; }
.asset-subsection-heading { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.contact-card { min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.contact-card__title { display: flex; align-items: center; gap: 9px; }
.contact-card__title > span { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; color: #3f66a0; background: #eaf1fc; font-weight: 900; }
.contact-card__title > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.contact-card__title strong, .contact-card__title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card__title strong { font-size: 13px; }
.contact-card__title small { color: var(--text-muted); font-size: 10px; }
.contact-card__title em { padding: 2px 6px; border-radius: 999px; color: var(--success); background: var(--success-soft); font-size: 10px; font-style: normal; font-weight: 800; }
.contact-card dl { display: grid; gap: 6px; margin: 12px 0 0; }
.contact-card dl > div { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 6px; }
.contact-card dt { color: var(--text-muted); font-size: 11px; }
.contact-card dd { overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.data-section { scroll-margin-top: 142px; overflow: clip; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.data-section > summary { display: flex; align-items: center; min-height: 74px; gap: 12px; padding: 12px 20px; cursor: pointer; list-style: none; user-select: none; }
.data-section > summary::-webkit-details-marker { display: none; }
.data-section > summary:hover { background: #fbfdff; }
.data-section__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.data-section__icon .q-icon { width: 20px; height: 20px; }
.data-section__icon--green { color: #087a55; background: #e8f8f1; }
.data-section__icon--purple { color: #5b4bc4; background: #f0edff; }
.data-section__icon--slate { color: #47566c; background: #edf1f5; }
.data-section__icon--amber { color: #a84f08; background: #fff4df; }
.data-section__icon--cyan { color: #087c94; background: #e6f8fb; }
.data-section__icon--rose { color: #a73a60; background: #fdeef3; }
.data-section__title { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.data-section__title strong { font-size: 16px; }
.data-section__title small { color: var(--text-muted); font-size: 11px; font-weight: 500; }
.data-section__count { display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 999px; color: #4b6384; background: #eef3fa; font-size: 11px; font-weight: 900; }
.data-section__chevron { color: var(--text-muted); transition: transform var(--motion); }
.data-section[open] .data-section__chevron { transform: rotate(180deg); }
.data-section__body { padding: 0 20px 20px; border-top: 1px solid #edf1f6; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #b9c8da transparent; }
.table-scroll:focus-visible { outline-offset: 1px; }
.data-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.data-table--renewals { min-width: 1180px; }
.data-table th { padding: 13px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); background: #f8fafd; text-align: left; font-size: 11px; white-space: nowrap; }
.data-table td { max-width: 260px; padding: 14px 12px; border-bottom: 1px solid #edf1f6; vertical-align: top; color: var(--text-secondary); overflow-wrap: anywhere; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fbfdff; }
.data-table td strong { display: block; color: var(--text); font-size: 12px; }
.data-table td small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.data-table td code { color: #31558d; }
.domain-list { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.domain-list code { display: inline-block; max-width: 250px; padding: 2px 6px; border-radius: 5px; background: #f0f5fc; }
.date-range { display: flex; flex-direction: column; white-space: nowrap; }
.date-range i { color: var(--text-muted); font-size: 9px; font-style: normal; }
.date-emphasis { color: #315e9e !important; font-variant-numeric: tabular-nums; }
.money-cell { color: #1a5e4a !important; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-note { min-width: 150px; white-space: normal; }
.table-domains { display: inline-block; max-width: 250px; font-family: Consolas, monospace; overflow-wrap: anywhere; }
.inline-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; gap: 9px; color: var(--text-muted); }
.inline-empty .q-icon { width: 25px; height: 25px; color: #9aabc1; }
.section-note { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0; padding: 10px 12px; border: 1px solid #d3e2f5; border-radius: 9px; color: #3e6599; background: #f3f8fe; font-size: 11px; }
.section-note .q-icon { width: 16px; height: 16px; margin-top: 1px; }
.section-note--secure { color: #27634f; border-color: #bde4d5; background: #edf9f4; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 5px; }
.attachment-list a, .attachment-file-readonly { display: inline-flex; align-items: center; max-width: 220px; min-height: 30px; gap: 5px; padding: 4px 8px; border: 1px solid #d1e0f2; border-radius: 7px; color: #315e9e; background: #f6f9fe; text-decoration: none; }
.attachment-list a:hover { border-color: #9dbce3; background: #eef5ff; }
.attachment-list a span, .attachment-file-readonly span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file-readonly span { display: flex; flex-direction: column; }
.attachment-file-readonly small { color: var(--text-muted); font-size: 9px; line-height: 1.2; }
.attachment-file-readonly { color: var(--text-secondary); border-color: var(--border); background: #f5f7fa; }
.attachment-list .q-icon, .attachment-file-readonly .q-icon { width: 14px; height: 14px; }
.timeline { max-width: 1000px; margin: 18px auto 0; padding: 0; list-style: none; }
.timeline > li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-bottom: 15px; }
.timeline > li::before { content: ""; position: absolute; top: 20px; bottom: -4px; left: 12px; width: 1px; background: #cddced; }
.timeline > li:last-child::before { display: none; }
.timeline__marker { position: relative; z-index: 1; width: 13px; height: 13px; margin: 5px auto 0; border: 3px solid #b9d1f2; border-radius: 50%; background: #fff; }
.timeline article { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdff; }
.timeline__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.timeline__head > div { display: flex; flex-direction: column; }
.timeline__head strong { font-size: 13px; }
.timeline__head div span { color: var(--text-muted); font-size: 10px; }
.timeline article > p { margin: 11px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.75; }
.timeline__next { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 4px 8px; border-radius: 7px; color: #8b4c0c; background: #fff3df; font-size: 11px; font-weight: 800; }
.timeline__next .q-icon { width: 14px; height: 14px; }
.attachment-list--timeline { margin-top: 9px; }
.remark-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 16px; }
.remark-card { display: flex; flex-direction: column; min-width: 0; min-height: 150px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdff; }
.remark-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.remark-card__head time { color: var(--text-muted); font-size: 10px; }
.remark-card > p { flex: 1; margin: 13px 0; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.remark-card footer { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 10px; }
.remark-card footer .q-icon { width: 13px; height: 13px; }
.audit-reminder { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 13px 15px; border: 1px solid #c8d9ee; border-radius: 12px; color: #345a91; background: #f2f7fe; }
.audit-reminder > .q-icon { margin-top: 2px; }
.audit-reminder strong { display: block; font-size: 12px; }
.audit-reminder p { margin: 0; color: var(--text-secondary); font-size: 11px; }

/* Error / access states */
.status-page { display: grid; place-items: center; width: min(calc(100% - 40px), 880px); min-height: calc(100vh - 160px); min-height: calc(100dvh - 160px); margin: 0 auto; padding: 40px 0; }
.layout-auth .status-page { min-height: 100vh; min-height: 100dvh; }
.status-card { position: relative; overflow: hidden; width: 100%; padding: clamp(36px, 6vw, 64px); border: 1px solid var(--border); border-radius: var(--radius-xl); background: radial-gradient(circle at 90% 10%, rgba(137, 178, 244, .20), transparent 30%), #fff; box-shadow: var(--shadow-md); text-align: center; }
.status-card__code { position: absolute; top: -42px; right: 22px; color: rgba(54, 99, 164, .055); font-size: 180px; font-weight: 900; line-height: 1; pointer-events: none; }
.status-card__icon { position: relative; display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 20px; border-radius: 22px; color: #466d9f; background: #eaf2fc; }
.status-card__icon .q-icon { width: 38px; height: 38px; }
.status-card__icon--403 { color: #a84f08; background: var(--warning-soft); }
.status-card__icon--500 { color: var(--danger); background: var(--danger-soft); }
.status-card h1 { position: relative; margin-bottom: 8px; font-size: 29px; }
.status-card > p { position: relative; max-width: 580px; margin: 0 auto; color: var(--text-secondary); }
.status-help { display: flex; align-items: flex-start; max-width: 620px; gap: 9px; margin: 22px auto 0; padding: 12px 14px; border: 1px solid #ecd3a9; border-radius: 11px; color: #855018; background: #fff8eb; text-align: left; }
.status-help .q-icon { margin-top: 2px; }
.status-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.request-id { margin-top: 24px !important; color: var(--text-muted) !important; font-size: 11px; }

@media (max-width: 1180px) {
    .login-shell { grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 48px; }
    .login-intro { padding-bottom: 180px; }
    .login-visual { height: 150px; }
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .invoice-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .info-grid > div:nth-child(5n) { border-right: 1px solid var(--border); }
    .info-grid > div:nth-child(3n) { border-right: 0; }
    .info-grid > div:nth-last-child(-n+5) { border-bottom: 1px solid var(--border); }
    .info-grid > div:nth-last-child(-n+1) { border-bottom: 0; }
}

@media (max-width: 900px) {
    .app-header__inner { width: min(calc(100% - 32px), var(--container)); min-height: 66px; }
    .header-menu-button { display: inline-flex; }
    .app-header__actions { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; align-items: stretch; flex-direction: column; gap: 8px; padding: 14px 16px 18px; border-bottom: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-md); }
    .app-header__actions.is-open { display: flex; }
    .app-nav, .app-nav__link { width: 100%; }
    .readonly-chip { align-self: flex-start; }
    .user-menu { padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
    .user-menu__copy { max-width: none; flex: 1; }
    .login-shell { grid-template-columns: 1fr; max-width: 680px; gap: 30px; padding: 42px 0; }
    .login-intro { padding: 0; text-align: center; }
    .login-intro__eyebrow { justify-content: center; }
    .login-intro h1 { font-size: clamp(42px, 10vw, 68px); }
    .login-intro__desc { margin-inline: auto; }
    .login-benefits { margin-inline: auto; }
    .login-visual { display: none; }
    .login-card { margin: 0 auto; }
    .readonly-notice { position: relative; top: auto; right: auto; width: fit-content; margin-top: 18px; }
    .guidance-grid { grid-template-columns: 1fr; }
    .domain-resolution { grid-template-columns: auto 1fr; }
    .domain-resolution small { grid-column: 2; }
    .customer-hero { align-items: flex-start; flex-direction: column; }
    .customer-hero__actions { width: 100%; justify-content: space-between; }
    .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .remark-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    body { font-size: 15px; }
    .page-main { width: min(calc(100% - 28px), var(--container)); padding-top: 18px; }
    .app-header__inner, .app-footer__inner, .flash-wrap { width: min(calc(100% - 28px), var(--container)); }
    .app-brand__copy small { display: none; }
    .app-footer__inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 15px 0; gap: 6px; }
    .app-footer p { align-items: flex-start; }
    .login-shell { width: min(calc(100% - 28px), 680px); padding: 28px 0; }
    .login-intro__eyebrow { margin-bottom: 13px; font-size: 12px; }
    .login-intro h1 { font-size: clamp(38px, 13vw, 56px); }
    .login-intro__english { margin: 7px 0 13px; font-size: 16px; }
    .login-intro__lead { font-size: 20px; }
    .login-intro__desc { font-size: 14px; }
    .login-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-radius: 16px; }
    .login-benefits li { justify-content: center; flex-direction: column; padding: 8px 3px; gap: 4px; text-align: center; }
    .login-benefits li + li { border-left: 1px solid #dbe4f1; }
    .login-benefits small { display: none; }
    .login-card { padding: 28px 20px; border-radius: 20px; }
    .login-card__brand { width: 62px; height: 62px; margin-bottom: 14px; border-radius: 18px; }
    .login-card__brand .q-icon { width: 32px; height: 32px; }
    .login-card h2 { font-size: 26px; }
    .button--wecom { min-height: 54px; font-size: 16px; }
    .search-page { padding-top: 18px; }
    .search-hero { padding: 24px 18px; border-radius: 18px; }
    .search-hero h1 { font-size: 29px; }
    .search-hero__content > p { font-size: 15px; }
    .unified-search { margin-top: 26px; }
    .search-type-picker { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
    .search-control__row { min-height: 58px; padding-left: 13px; }
    .search-control input { font-size: 16px; }
    .search-submit { min-width: 52px; width: 52px; padding: 0; }
    .search-submit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .search-scope { justify-content: flex-start; }
    .recent-section, .search-guidance { padding: 18px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .recent-search-chip { width: 100%; }
    .results-search-panel { padding: 20px 16px; }
    .results-title-row { flex-direction: column; }
    .results-title-row h1 { font-size: 23px; }
    .compact-search { padding-left: 10px; }
    .compact-search .button { min-width: 48px; padding-inline: 10px; font-size: 0; }
    .compact-search .button::after { content: "查询"; font-size: 13px; }
    .domain-resolution { grid-template-columns: 1fr; }
    .domain-resolution > .q-icon { display: none; }
    .domain-resolution div { align-items: flex-start; flex-direction: column; }
    .domain-resolution small { grid-column: auto; }
    .result-card__main { align-items: flex-start; flex-direction: column; padding: 17px; }
    .result-card__identity { align-items: flex-start; }
    .result-card__avatar { width: 42px; height: 42px; border-radius: 12px; }
    .result-match { justify-content: flex-start; max-width: none; }
    .result-card__details { padding: 16px 17px; }
    .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
    .result-metrics > div:nth-child(3), .result-metrics > div:nth-child(5) { padding-left: 0; border-left: 0; }
    .result-associations { grid-template-columns: 1fr; gap: 4px; }
    .result-card__footer { align-items: flex-start; flex-direction: column; padding: 14px 17px; }
    .result-card__footer .button { width: 100%; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .customer-hero { padding: 19px 16px; }
    .customer-hero__identity { align-items: flex-start; }
    .customer-hero__avatar { width: 48px; height: 48px; border-radius: 13px; font-size: 19px; }
    .customer-hero h1 { font-size: 22px; overflow-wrap: anywhere; }
    .customer-hero__actions { align-items: stretch; flex-direction: column; }
    .customer-hero__actions .readonly-chip { align-self: flex-start; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card { padding: 11px; }
    .detail-nav { top: 74px; margin-inline: -2px; }
    .overview-section { padding: 18px 15px; scroll-margin-top: 132px; }
    .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-info-grid > div { border-bottom: 1px solid var(--border); }
    .invoice-info-grid > div:nth-child(2n) { border-right: 0; }
    .invoice-info-grid > div:last-child { border-bottom: 0; }
    .info-grid > div:nth-child(3n) { border-right: 1px solid var(--border); }
    .info-grid > div:nth-child(2n) { border-right: 0; }
    .info-grid > div:nth-last-child(-n+1) { border-bottom: 1px solid var(--border); }
    .info-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
    .subsection-heading { align-items: flex-start; flex-direction: column; }
    .contact-grid, .remark-grid { grid-template-columns: 1fr; }
    .data-section { scroll-margin-top: 132px; }
    .data-section > summary { min-height: 68px; padding: 10px 14px; }
    .data-section__icon { width: 36px; height: 36px; }
    .data-section__title strong { font-size: 14px; }
    .data-section__title small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .data-section__body { padding: 0 14px 14px; }
    .timeline__head { flex-direction: column; }
    .status-card { padding: 36px 20px; }
    .status-card__code { top: -12px; right: 4px; font-size: 110px; }
}

@media (max-width: 390px) {
    .app-brand__mark { width: 38px; height: 38px; }
    .app-brand__copy strong { font-size: 16px; }
    .header-menu-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .login-benefits strong { font-size: 11px; }
    .search-type-picker span { padding-inline: 8px; }
    .search-control__row { padding-left: 10px; }
    .search-control input { padding-inline: 9px; }
    .search-clear { width: 38px; }
    .search-scope > span { padding-inline: 8px; }
    .customer-hero__identity { gap: 10px; }
    .metric-card > span { width: 34px; height: 34px; }
    .metric-card strong { font-size: 13px; }
    .info-grid { grid-template-columns: 1fr; }
    .invoice-info-grid { grid-template-columns: 1fr; }
    .invoice-info-grid > div { border-right: 0; }
    .info-grid > div, .info-grid > div:nth-child(2n), .info-grid > div:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--border); }
    .info-grid > div:last-child { border-bottom: 0; }
    .data-section__count { display: none; }
}

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

@media (forced-colors: active) {
    .status-badge, .source-badge, .data-tag, .domain-tag, .readonly-chip { border: 1px solid currentColor; }
}
