* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f7f9;
    color: #1f2937;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

a {
    color: inherit;
}

.page-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-box {
    width: min(420px, 100%);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.auth-box h1,
.topbar h1 {
    margin: 0;
    font-size: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.topbar p {
    margin: 6px 0 0;
    color: #6b7280;
}

.topbar nav {
    display: flex;
    gap: 10px;
}

.container {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.container.narrow {
    width: min(820px, 100%);
}

.panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 18px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

label span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    color: #111827;
    background: #ffffff;
    font: inherit;
}

select {
    min-width: 112px;
}

textarea {
    min-width: 180px;
    resize: vertical;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px auto auto;
    gap: 10px;
    margin-bottom: 16px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
}

.button.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.button.small {
    min-height: 34px;
    padding: 7px 12px;
}

.notice {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.notice.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.notice.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.muted {
    color: #6b7280;
}

.table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
}

th,
td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th:nth-child(1),
td:nth-child(1) {
    width: 72px;
    text-align: center;
    white-space: nowrap;
}

th:nth-child(5),
td:nth-child(5) {
    width: 132px;
    white-space: nowrap;
}

th:nth-child(7),
td:nth-child(7) {
    width: 88px;
    white-space: nowrap;
}

th {
    background: #f9fafb;
    font-weight: 700;
}

.empty {
    text-align: center;
    color: #6b7280;
    padding: 36px;
}

.phone-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.phone-link:hover {
    text-decoration: underline;
}

.row-number {
    color: #6b7280;
    font-weight: 600;
}

.result-list {
    max-height: 280px;
    overflow: auto;
    padding-left: 22px;
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .container {
        padding: 16px;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }
}
