/* Cloud-console theme tokens. Keep colors centralized so brand/theme changes do not require scanning every component. */
:root {
    --bg: #f4f7fb;
    --panel: #fff;
    --panel-soft: #f8fbff;
    --ink: #172033;
    --muted: #697586;
    --line: #d8e0ea;
    --line-soft: #e8eef6;
    --accent: #1677ff;
    --accent-dark: #0f4c9a;
    --accent-soft: #edf5ff;
    --accent-2: #ff8a00;
    --danger: #d92d20;
    --success: #12945a;
    --shadow: 0 12px 30px rgba(20, 33, 61, .07);
    --soft-shadow: 0 5px 16px rgba(20, 33, 61, .055);
    --focus: 0 0 0 3px rgba(22, 119, 255, .14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, #f7faff 0, #f4f7fb 260px),
        var(--bg);
}

body::selection {
    background: rgba(22, 119, 255, .18);
}

button, input, select, textarea {
    font: inherit;
}

button {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    min-height: 36px;
    padding: 0 12px;
    cursor: pointer;
    font-weight: 650;
    transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}

button:hover {
    border-color: #8bbcff;
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(22, 119, 255, .10);
}

.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(22, 119, 255, .20);
}

.primary:hover {
    background: #0f6eea;
    color: #fff;
    box-shadow: 0 10px 22px rgba(22, 119, 255, .25);
}

/* ---------- Shell / navigation ---------- */
.app {
    display: grid;
    grid-template-columns: 256px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f1b2d 0%, #14243a 100%);
    color: #fff;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 10px 0 28px rgba(15, 27, 45, .18);
}

.brand strong {
    display: block;
    font-size: 23px;
    letter-spacing: .2px;
}

.brand {
    border-bottom: 1px solid rgba(255,255,255,.12);
    padding-bottom: 18px;
}

.brand span, .userbox span {
    color: #b8c7d9;
    line-height: 1.45;
    font-size: 12px;
}

nav {
    display: grid;
    gap: 8px;
}

nav button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    background: transparent;
    color: #d8e5f5;
    border-color: rgba(255,255,255,.14);
    min-height: 42px;
    padding: 0 12px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

nav button::before {
    content: "";
    width: 3px;
    height: 18px;
    border-radius: 3px;
    background: transparent;
    margin-right: 9px;
    transition: background .15s ease;
}

nav button.active {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
    box-shadow: 0 8px 20px rgba(22, 119, 255, .28);
}

nav button.active::before {
    background: #fff;
}

nav button:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.24);
}

.userbox {
    margin-top: auto;
    display: grid;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,.14);
    padding-top: 16px;
}

.userbox button {
    background: rgba(255,255,255,.06);
    color: #fff;
    border-color: rgba(255,255,255,.18);
}

.content {
    padding: 28px 32px 38px;
    min-width: 0;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* ---------- Login dashboard ---------- */
.login {
    max-width: 1180px;
    margin: 3vh auto 0;
}

.login h1 {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 1.12;
    max-width: 780px;
    letter-spacing: 0;
}

.login p, .page-head p {
    color: var(--muted);
}

.login-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: end;
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(22, 119, 255, .22);
    border-radius: 4px;
    padding: 0 10px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

.login-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.login-status div {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 12px;
    min-height: 76px;
    box-shadow: var(--soft-shadow);
}

.login-status span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.login-status strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: stretch;
}

.login-panel,
.login-overview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-panel {
    padding: 18px;
}

.login-overview {
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 16px;
}

.login-overview h2 {
    margin: 0;
    font-size: 18px;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.login-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.login-card {
    background: #fff;
    min-height: 150px;
    text-align: left;
    display: grid;
    align-content: space-between;
    gap: 8px;
    padding: 18px;
    border-color: #d7e2ef;
    border-radius: 8px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.login-card:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(22, 119, 255, .14);
    transform: translateY(-1px);
}

.login-card strong {
    font-size: 20px;
}

.login-card span {
    color: var(--muted);
}

.role-tag {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    border-radius: 4px;
    padding: 0 9px;
    background: var(--accent-soft);
    color: var(--accent) !important;
    font-size: 12px;
    font-weight: 800;
}

.country-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.country-strip span {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f8fbff;
    padding: 8px 9px;
    font-size: 13px;
    color: var(--ink);
}

.flow-steps {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.flow-steps div {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
}

.flow-steps strong {
    color: var(--accent-2);
    font-size: 13px;
}

.flow-steps span {
    color: var(--muted);
    font-size: 13px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--soft-shadow);
}

.page-head h1 {
    margin: 0 0 5px;
    font-size: 26px;
    letter-spacing: 0;
}

.page-head button {
    background: #fff;
    border-color: #bfd7f5;
    color: var(--accent);
}

/* ---------- Common page panels and forms ---------- */
.submit-head {
    align-items: center;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(22, 119, 255, .10), rgba(255, 138, 0, .08)),
        #fff;
    padding: 18px;
    box-shadow: var(--soft-shadow);
}

.submit-metrics {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-width: 170px;
}

.submit-metrics span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.quote {
    color: var(--accent);
    font-size: 28px;
}

.layout {
    display: grid;
    gap: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.summary-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 14px;
    box-shadow: var(--soft-shadow);
    border-top: 3px solid var(--accent);
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.summary-card strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.submit-section {
    position: relative;
    overflow: hidden;
}

.submit-section > .section-title h2 {
    margin-bottom: 4px;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px 170px;
    gap: 12px;
    margin-bottom: 16px;
    box-shadow: var(--soft-shadow);
    align-items: end;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    margin-bottom: 14px;
}

.section-title.compact {
    margin-bottom: 10px;
}

.section-title h2 {
    margin-bottom: 4px;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.hint {
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.hint.secondary {
    color: var(--accent);
    background: var(--accent-soft);
}

.required-hint,
.required-mark {
    color: var(--danger);
    background: #fff1f0;
    border: 1px solid #ffccc7;
}

.country-picker {
    display: grid;
    grid-template-columns: minmax(460px, 1fr) 300px;
    gap: 16px;
    align-items: stretch;
}

/* ---------- Customer country picker ---------- */
.country-list {
    display: grid;
    gap: 10px;
}

.country-card {
    display: grid;
    grid-template-columns: 86px minmax(220px, 1.2fr) 128px minmax(210px, 1.2fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 12px 14px 12px 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.customer-country-card {
    border-left: 5px solid rgba(22, 119, 255, .75);
}

.customer-country-card.accent-red {
    border-left-color: #c94b4b;
}

.customer-country-card.accent-blue {
    border-left-color: #3f6fa8;
}

.customer-country-card.accent-gold {
    border-left-color: #d29b28;
}

.customer-country-card.accent-slate {
    border-left-color: #404b5a;
}

.customer-country-card.accent-green {
    border-left-color: #2f8f67;
}

.country-card:hover {
    background: #fbfdff;
    border-color: rgba(22, 119, 255, .45);
    box-shadow: 0 8px 18px rgba(20, 33, 61, .07);
}

.country-card.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(22, 119, 255, .16);
}

.country-card.selected .country-name {
    color: var(--accent-dark);
}

.country-card label {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: center;
    font-weight: 800;
    color: var(--ink);
    cursor: pointer;
}

.country-card input {
    width: 16px;
    min-height: 16px;
    padding: 0;
}

.flag {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.flag-img {
    display: block;
    width: 46px;
    height: 31px;
    border: 1px solid rgba(22, 54, 64, .16);
    border-radius: 4px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 4px 10px rgba(24, 33, 43, .08);
}

.flag-img.inline {
    display: inline-block;
    width: 24px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}

.country-flag-tile {
    display: grid;
    justify-items: center;
    gap: 2px;
    width: 56px;
    min-height: 56px;
    border: 1px solid rgba(22, 54, 64, .12);
    border-radius: 8px;
    background: #fff;
    padding: 7px 6px 5px;
    box-shadow: 0 8px 18px rgba(24, 33, 43, .05);
}

.country-flag-start {
    justify-self: start;
    width: 76px;
    min-height: 66px;
    padding: 8px 8px 6px;
}

.country-flag-start .flag {
    font-size: 36px;
}

.country-flag-start .flag-img {
    width: 56px;
    height: 37px;
}

.country-flag-tile.small {
    width: 52px;
    min-height: 52px;
    flex: 0 0 auto;
}

.country-code {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.country-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.country-name {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.country-region {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.country-card p {
    display: grid;
    gap: 4px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.country-card p strong {
    color: var(--ink);
    font-size: 13px;
}

.fee {
    display: block;
    color: var(--accent);
    font-size: 18px;
    font-weight: 900;
    text-align: right;
}

.fee-block {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.fee-block span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.quote-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfd;
}

.quote-panel h3 {
    margin: 0 0 12px;
}

.selected-summary {
    display: grid;
    gap: 8px;
    min-height: 220px;
}

.selected-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 9px;
}

.selected-chip b {
    font-size: 18px;
    margin-right: 4px;
}

.selected-chip em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    margin-left: 4px;
}

.quote-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 14px;
}

.quote-line strong {
    color: var(--accent);
    font-size: 24px;
}

.quote-panel p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 13px;
}

.fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fields.single {
    grid-template-columns: 1fr;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

label > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.required-mark {
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
    line-height: 1.5;
}

.form-note {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.form-message {
    color: var(--muted);
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    min-height: 40px;
    padding: 8px 10px;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus);
}

textarea {
    min-height: 78px;
    resize: vertical;
}

.details-stack {
    display: grid;
    gap: 12px;
}

.country-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdff;
}

.country-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.country-detail-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.country-detail-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.upload-section input[type=file] {
    border-style: dashed;
    background: #fff;
}

.actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.progress-layout,
.account-layout {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 16px;
}

.task-toolbar {
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 1fr));
}

/* ---------- Records, status labels, and detail views ---------- */
.case-row, .record-row {
    border: 1px solid #e0e7f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

.filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #bdd8ff;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 750;
}

.filter-banner button {
    background: #fff;
    color: var(--accent);
    border-color: #bdd8ff;
}

/* ---------- Staff dashboard ---------- */
.dashboard-head {
    align-items: center;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    box-shadow: var(--soft-shadow);
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -34px -42px auto;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: rgba(22, 119, 255, .10);
}

.metric-card span,
.metric-card em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.metric-card strong {
    display: block;
    margin: 8px 0 7px;
    font-size: 34px;
    line-height: 1;
}

.metric-card.accent-orange::after {
    background: rgba(255, 138, 0, .16);
}

.metric-card.accent-green::after {
    background: rgba(18, 148, 90, .14);
}

.metric-card.accent-slate::after {
    background: rgba(23, 32, 51, .10);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .95fr);
    gap: 16px;
}

.dashboard-panel {
    min-height: 420px;
}

.dashboard-panel .section-title {
    margin-bottom: 12px;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-task,
.dashboard-customer {
    display: grid;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 62px;
    border-color: #dce7f4;
    border-radius: 8px;
    background: linear-gradient(90deg, #fff, #fbfdff);
    text-align: left;
}

.dashboard-task {
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
}

.dashboard-customer {
    grid-template-columns: 42px minmax(0, 1fr) auto;
}

.dashboard-task:hover,
.dashboard-customer:hover {
    transform: translateY(-1px);
    border-color: #8bbcff;
    box-shadow: 0 8px 18px rgba(22, 119, 255, .11);
}

.dashboard-flag,
.customer-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent-soft);
}

.customer-avatar {
    color: var(--accent);
    font-weight: 900;
}

.dashboard-main {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.dashboard-main strong,
.dashboard-main em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-main em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.task-list {
    overflow-x: auto;
    padding: 0;
}

.task-list-head,
.task-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) minmax(220px, 1.5fr) minmax(190px, 1.3fr) minmax(110px, .8fr) minmax(120px, .8fr) minmax(170px, 1fr) 82px;
    gap: 10px;
    align-items: center;
    min-width: 1120px;
}

.task-list-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    border-bottom: 1px solid #e6edf5;
    background: #f8fbff;
}

.task-row {
    border-bottom: 1px solid #eef2f7;
    padding: 12px 14px;
    min-height: 56px;
    transition: background .15s ease, box-shadow .15s ease;
}

.task-row:hover {
    background: #fbfdff;
    box-shadow: inset 3px 0 0 var(--accent);
}

.task-row:last-child {
    border-bottom: 0;
}

.task-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-row em {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}

.priority.ok {
    background: #e9f8f0;
    color: var(--success);
}

.priority.warn {
    background: #fff4df;
    color: #9a5b00;
}

.priority.danger {
    background: #fdecec;
    color: var(--danger);
}

.priority.info {
    background: #eaf2ff;
    color: var(--accent);
}

.task-row button {
    background: var(--accent-soft);
    border-color: #bdd8ff;
    color: var(--accent);
}

.task-row button:hover {
    background: #fff;
}

.customer-manage-row {
    border: 1px solid #e0e7f0;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}

.customer-manage-row summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) minmax(140px, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    cursor: pointer;
    list-style: none;
}

.customer-manage-row:hover {
    border-color: #bdd8ff;
    box-shadow: var(--soft-shadow);
}

.customer-manage-row summary::-webkit-details-marker {
    display: none;
}

.customer-manage-row summary::before {
    content: "展开";
    justify-self: start;
    grid-column: 1 / -1;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.customer-manage-row[open] summary::before {
    content: "收起";
}

.customer-main {
    display: grid;
    gap: 4px;
}

.customer-main strong {
    color: var(--ink);
    font-size: 15px;
}

.customer-main em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.customer-subjects {
    display: grid;
    gap: 8px;
    border-top: 1px solid #eef2f7;
    padding: 12px 14px 14px;
    background: #fbfdff;
}

.customer-subjects button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    background: #fff;
    border-color: #d9e5f2;
    border-radius: 6px;
}

.customer-subjects button:hover {
    border-color: #8bbcff;
    box-shadow: 0 6px 14px rgba(22, 119, 255, .10);
}

.customer-subjects button strong {
    color: var(--ink);
}

.customer-subjects button span {
    color: var(--muted);
    font-size: 12px;
}

.case-row:last-child, .record-row:last-child {
    margin-bottom: 0;
}

.user-row p {
    line-height: 1.5;
}

.user-edit {
    display: grid;
    gap: 12px;
}

.user-edit-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 8px;
}

.user-edit-head span:last-child {
    color: var(--muted);
    font-size: 12px;
}

.user-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.user-edit-grid .user-note {
    grid-column: 1 / -1;
}

.user-edit .actions {
    margin: 0;
}

.case-row button {
    margin-top: 8px;
    background: var(--accent-soft);
    border-color: #bdd8ff;
    color: var(--accent);
}

.selectable {
    cursor: pointer;
}

.selectable:hover strong {
    color: var(--accent);
}

.status {
    display: inline-flex;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
}

.status.ok {
    background: #e9f8f0;
    color: var(--success);
}

.status.warn {
    background: #fff4df;
    color: #9a5b00;
}

.status.info {
    background: #eaf2ff;
    color: var(--accent);
}

.status.danger {
    background: #fdecec;
    color: var(--danger);
}

.status.muted {
    background: #eef2f6;
    color: var(--muted);
}

.danger {
    color: var(--danger);
}

.case-detail {
    display: grid;
    gap: 14px;
}

.case-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #bdd8ff;
    border-radius: 8px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(22, 119, 255, .10), rgba(255, 255, 255, .84) 58%),
        #fff;
}

.case-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.case-title h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.case-title p {
    margin: 0;
    color: var(--muted);
}

.detail-flag {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.case-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.detail-card {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.detail-card .detail-grid {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title h3 {
    margin: 0;
    font-size: 18px;
}

.section-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.detail-action {
    margin: 12px 0 0;
}

.requirement-card .staff-requirement-head {
    margin-top: 0;
}

.file-upload-bar {
    margin-top: 0;
}

.file-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.detail-grid > div {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 12px;
}

.detail-grid strong {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.detail-grid p {
    margin: 0;
    line-height: 1.55;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.detail-head h2 {
    margin: 0 0 5px;
}

.case-timeline {
    display: grid;
    gap: 10px;
    margin: 14px 0 18px;
}

.timeline-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
}

.timeline-item > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.timeline-item p {
    margin: 8px 0 0;
    color: var(--muted);
}

.requirement-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

/* ---------- Requirement checklist and files ---------- */
.requirement-summary {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px 12px;
    align-items: center;
    border: 1px solid rgba(22, 119, 255, .16);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
    margin: 12px 0;
}

.requirement-summary.compact {
    padding: 10px;
    margin: 10px 0;
}

.requirement-summary strong {
    display: block;
    color: var(--accent);
    font-size: 22px;
    line-height: 1;
}

.requirement-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.requirement-summary p {
    grid-column: 2;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.progress-track {
    height: 9px;
    border-radius: 999px;
    background: #e4eceb;
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #4da3ff);
}

.requirement-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.customer-requirement.required {
    border-left: 4px solid rgba(22, 119, 255, .45);
}

.requirement-row p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.requirement-upload {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 8px;
    margin-top: 10px;
}

.file-pill {
    display: inline-flex;
    width: fit-content;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent) !important;
    padding: 4px 8px;
    font-weight: 800;
}

.staff-requirement-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
}

.staff-requirement-head h3 {
    margin: 0 0 5px;
}

.staff-requirement-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.staff-requirement {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
}

.requirement-actions {
    display: grid;
    grid-template-columns: 115px minmax(180px, 1fr) minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.inline-check {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.inline-check input {
    width: 16px;
    min-height: 16px;
}

.file-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px;
    margin-top: 8px;
    background: #fff;
}

.file-row a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.file-row a:hover {
    text-decoration: underline;
}

/* ---------- Responsive layout ---------- */
@media (max-width: 1050px) {
    .app, .progress-layout, .account-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        min-height: auto;
        position: static;
        padding: 16px;
        gap: 14px;
    }
    nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    nav button {
        min-height: 38px;
        justify-content: center;
        padding: 0 8px;
        font-size: 13px;
    }
    nav button::before {
        display: none;
    }
    .content {
        padding: 18px 14px 26px;
    }
    .country-picker,
    .summary-grid,
    .toolbar,
    .detail-head,
    .login-hero,
    .login-status,
    .login-shell,
    .requirement-summary,
    .requirement-row,
    .dashboard-metrics,
    .dashboard-grid,
    .staff-requirement,
    .staff-requirement-head,
    .requirement-actions,
    .requirement-upload,
    .user-edit-grid,
    .fields,
    .login-grid {
        grid-template-columns: 1fr;
    }

    .login {
        margin-top: 0;
    }

    .login h1 {
        font-size: 30px;
    }

    .submit-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-head {
        flex-direction: column;
    }

    .case-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .submit-metrics {
        justify-items: start;
        min-width: 0;
    }

    .country-strip {
        grid-template-columns: 1fr;
    }

    .country-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .task-list {
        padding: 0;
    }

    .task-list-head,
    .task-row {
        min-width: 980px;
    }

    .country-card label {
        grid-template-columns: 18px 1fr;
    }

    .country-flag-start {
        justify-self: start;
        width: 68px;
        min-height: 60px;
    }

    .country-flag-start .flag {
        font-size: 32px;
    }

    .country-flag-start .flag-img {
        width: 50px;
        height: 33px;
    }

    .fee,
    .fee-block {
        text-align: left;
        justify-items: start;
    }

    .country-detail-head {
        align-items: flex-start;
    }

    .requirement-summary p {
        grid-column: 1;
    }
}

@media (max-width: 640px) {
    .brand strong {
        font-size: 20px;
    }

    nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login h1 {
        font-size: 26px;
    }

    .page-head h1 {
        font-size: 22px;
    }

    .panel {
        padding: 14px;
    }

    .customer-manage-row summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .customer-subjects button {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ---------- Desktop visual polish ---------- */
@media (min-width: 1051px) {
    body {
        background:
            radial-gradient(circle at 78% 0%, rgba(22, 119, 255, .13), transparent 34%),
            radial-gradient(circle at 42% 18%, rgba(255, 138, 0, .09), transparent 28%),
            linear-gradient(180deg, #f7faff 0, #f3f7fc 340px),
            var(--bg);
    }

    .sidebar {
        background:
            linear-gradient(180deg, rgba(22, 119, 255, .12), transparent 32%),
            linear-gradient(180deg, #0c1728 0%, #14243a 56%, #101d30 100%);
    }

    .brand strong::before {
        content: "";
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 2px;
        margin-right: 8px;
        background: linear-gradient(135deg, #35a6ff, #ff9f2d);
        box-shadow: 0 0 16px rgba(53, 166, 255, .45);
        vertical-align: 2px;
    }

    nav button {
        min-height: 44px;
        background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
    }

    nav button::before {
        width: 25px;
        height: 25px;
        min-width: 25px;
        display: inline-grid;
        place-items: center;
        border-radius: 6px;
        margin-right: 10px;
        color: #9fc7ff;
        background: rgba(255,255,255,.08);
        font-size: 12px;
        font-weight: 900;
        line-height: 1;
    }

    nav button[data-view="dashboardView"]::before { content: "台"; }
    nav button[data-view="customerView"]::before { content: "提"; }
    nav button[data-view="progressView"]::before { content: "进"; }
    nav button[data-view="staffView"]::before { content: "办"; }
    nav button[data-view="customerManageView"]::before { content: "客"; }
    nav button[data-view="accountView"]::before { content: "账"; }
    nav button[data-view="auditView"]::before { content: "审"; }

    nav button.active {
        background: linear-gradient(135deg, #1677ff, #0f5ed7);
    }

    nav button.active::before {
        color: var(--accent);
        background: #fff;
    }

    .page-head,
    .panel,
    .metric-card,
    .detail-card,
    .login-panel,
    .login-overview {
        backdrop-filter: blur(4px);
    }

    .page-head {
        background:
            linear-gradient(135deg, rgba(255,255,255,.92), rgba(248, 251, 255, .82)),
            #fff;
    }

    .page-head h1 {
        width: fit-content;
        background: linear-gradient(90deg, #172033, #0f5ed7);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .panel {
        background:
            linear-gradient(180deg, rgba(255,255,255,.96), rgba(251,253,255,.96)),
            #fff;
    }

    .metric-card {
        background:
            linear-gradient(135deg, rgba(22,119,255,.05), rgba(255,255,255,.96) 48%),
            #fff;
    }

    .detail-card {
        background:
            linear-gradient(180deg, rgba(255,255,255,.97), rgba(251,253,255,.96)),
            #fff;
    }

    .panel::before,
    .login-panel::before,
    .login-overview::before {
        content: "";
        display: block;
        height: 3px;
        margin: -18px -18px 15px;
        border-radius: 8px 8px 0 0;
        background: linear-gradient(90deg, rgba(22,119,255,.75), rgba(255,138,0,.55), rgba(18,148,90,.52));
    }

    .toolbar::before,
    .task-list::before,
    .list::before,
    .case-detail::before {
        display: none;
    }

    .summary-card {
        background:
            linear-gradient(135deg, rgba(22,119,255,.055), rgba(255,255,255,.88) 48%),
            #fff;
    }

    .summary-card:nth-child(2) {
        border-top-color: #12b76a;
        background: linear-gradient(135deg, rgba(18,183,106,.075), rgba(255,255,255,.9) 48%), #fff;
    }

    .summary-card:nth-child(3) {
        border-top-color: #f79009;
        background: linear-gradient(135deg, rgba(247,144,9,.08), rgba(255,255,255,.9) 48%), #fff;
    }

    .summary-card:nth-child(4) {
        border-top-color: #7a5af8;
        background: linear-gradient(135deg, rgba(122,90,248,.075), rgba(255,255,255,.9) 48%), #fff;
    }

    .login-card {
        background:
            linear-gradient(135deg, rgba(22,119,255,.06), transparent 44%),
            #fff;
    }

    .login-card:nth-child(2) {
        background:
            linear-gradient(135deg, rgba(18,148,90,.07), transparent 44%),
            #fff;
    }

    .login-card:nth-child(3) {
        background:
            linear-gradient(135deg, rgba(255,138,0,.08), transparent 44%),
            #fff;
    }

    .login-card .role-tag::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        margin-right: 6px;
        background: currentColor;
    }

    .page-head button,
    .actions button,
    .task-row button,
    .customer-subjects button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }

    .page-head button::before,
    .actions button::before,
    .task-row button::before,
    .customer-subjects button::before {
        display: inline-grid;
        place-items: center;
        width: 18px;
        height: 18px;
        border-radius: 5px;
        background: rgba(22,119,255,.12);
        color: var(--accent);
        font-size: 12px;
        font-weight: 900;
        line-height: 1;
    }

    #refreshProgress::before,
    #refreshDashboard::before,
    #refreshCases::before,
    #refreshCustomers::before,
    #refreshUsers::before,
    #refreshAudit::before {
        content: "↻";
    }

    #backToCases::before {
        content: "←";
    }

    .actions .primary::before {
        content: "✓";
        color: #fff;
        background: rgba(255,255,255,.20);
    }

    .task-row button::before {
        content: "›";
    }

    .customer-subjects button::before {
        content: "→";
        flex: 0 0 auto;
    }

    .task-list-head {
        background:
            linear-gradient(180deg, #f8fbff, #f2f7ff);
    }

    .task-row:nth-child(even) {
        background: #fcfdff;
    }

    .task-row:hover {
        background: linear-gradient(90deg, rgba(22,119,255,.075), #fff 18%);
    }

    .country-card {
        background:
            linear-gradient(90deg, rgba(248,251,255,.92), #fff 42%),
            #fff;
    }

    .country-card.selected {
        background:
            linear-gradient(90deg, rgba(22,119,255,.12), rgba(237,245,255,.76) 48%, #fff),
            var(--accent-soft);
    }

    input:hover,
    select:hover,
    textarea:hover {
        border-color: #b8d4f6;
    }

    .status {
        border: 1px solid rgba(22,119,255,.12);
    }

    .status.ok {
        border-color: rgba(18,148,90,.18);
    }

    .status.warn {
        border-color: rgba(154,91,0,.18);
    }

    .status.info {
        border-color: rgba(22,119,255,.18);
    }

    .status.danger {
        border-color: rgba(217,45,32,.18);
    }
}
