* {
    box-sizing: border-box;
}

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

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

.login-card,
.card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
}

.subtitle {
    margin-top: -4px;
    color: #6b7280;
}

.login-form,
.inline-form,
.actions,
.password-form {
    display: flex;
    gap: 12px;
}

.login-form,
.password-form {
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #111827;
    color: white;
}

.topbar h1,
.card h2 {
    margin: 0;
}

.card {
    padding: 20px;
    margin-bottom: 20px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.table-wrap {
    overflow-x: auto;
}

input,
button {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
}

button {
    padding: 10px 14px;
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

button:hover {
    opacity: 0.92;
}

.secondary-btn {
    background: #64748b;
}

.success-btn {
    background: #16a34a;
}

.danger-btn {
    background: #dc2626;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

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

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status.active {
    background: #dcfce7;
    color: #166534;
}

.status.disabled {
    background: #fee2e2;
    color: #991b1b;
}

.status.expired,
.status.invalid {
    background: #fef3c7;
    color: #92400e;
}

.actions {
    flex-wrap: wrap;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.flash {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

.empty-cell {
    text-align: center;
    color: #6b7280;
}

@media (max-width: 900px) {
    .topbar,
    .section-head,
    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}
