:root {
    color-scheme: light;
    --ink: #20242b;
    --muted: #677180;
    --line: #d9dee6;
    --surface: #ffffff;
    --surface-soft: #f5f7fa;
    --accent: #1769aa;
    --accent-hover: #12598f;
    --success: #16834b;
    --warning: #a66700;
    --danger: #bb2e2e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface-soft);
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button, input { font: inherit; letter-spacing: 0; }

.admin-header {
    min-height: 56px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
    background: #252b33;
    color: #fff;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
    background: #2b82bd;
    color: #fff;
    font-weight: 800;
}

.admin-header nav a {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    padding: 0 12px;
    color: #dce6ee;
    text-decoration: none;
    border-bottom: 3px solid #4ea3d8;
}

.admin-main { min-width: 960px; }

.admin-toolbar {
    min-height: 62px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.search-form, .toolbar-actions, .row-actions, .row-actions form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.search-form input {
    width: 280px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #aeb7c2;
    border-radius: 3px;
}

button {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--accent);
    border-radius: 3px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

button:hover { background: var(--accent-hover); }
button.secondary { background: #fff; color: #374151; border-color: #aeb7c2; }
button.secondary:hover { background: #eef2f6; }

.operation-message {
    margin: 16px 24px 0;
    padding: 10px 12px;
    border-left: 4px solid var(--success);
    background: #edf8f2;
    color: #12643c;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.summary-strip div {
    min-height: 80px;
    padding: 16px 24px;
    border-right: 1px solid var(--line);
}

.summary-strip span { display: block; color: var(--muted); font-size: 13px; }
.summary-strip strong { display: block; margin-top: 4px; font-size: 24px; }

.table-section { margin-top: 16px; background: var(--surface); border-block: 1px solid var(--line); }
.section-heading { padding: 14px 24px; display: flex; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); }
.section-heading h1 { margin: 0; font-size: 18px; }
.section-heading span { color: var(--muted); font-size: 13px; }
.table-responsive { overflow-x: auto; }

.customer-table { width: 100%; border-collapse: collapse; }
.customer-table th, .customer-table td { padding: 10px 12px; border-bottom: 1px solid #e6e9ee; text-align: left; vertical-align: middle; }
.customer-table th { background: #f2f4f7; color: #4b5563; font-size: 13px; font-weight: 700; }
.customer-table td { font-size: 14px; }
.customer-table td:first-child, .customer-table th:first-child { padding-left: 24px; }
.customer-table small { display: block; margin-top: 2px; color: #8a94a3; font-size: 11px; }
.actions-column { min-width: 330px; }
.days-input { width: 62px; height: 34px; padding: 0 6px; border: 1px solid #aeb7c2; border-radius: 3px; }

.status { display: inline-block; min-width: 86px; font-weight: 700; }
.status.active { color: var(--success); }
.status.expired { color: var(--warning); }
.status.disabled { color: var(--danger); }

.login-page { min-height: 100vh; display: grid; place-items: center; background: #eef2f6; }
.login-shell { width: min(400px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 32px rgb(25 35 45 / 12%); }
.login-header { padding: 24px 26px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.login-header h1 { margin: 0; font-size: 20px; }
.login-header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.login-form { padding: 22px 26px 26px; display: grid; gap: 8px; }
.login-form label { margin-top: 4px; font-size: 13px; font-weight: 700; }
.login-form input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #aeb7c2; border-radius: 3px; }
.login-form button { margin-top: 12px; min-height: 40px; }
.validation-summary:empty { display: none; }

@media (max-width: 720px) {
    .login-page { place-items: start center; padding-top: 48px; }
}
