:root {
    --bg: #eef4f6;
    --panel: #ffffff;
    --line: #d6e0e7;
    --text: #1b2b34;
    --muted: #617887;
    --brand: #0e7490;
    --brand-dark: #155e75;
    --danger: #b42318;
    --success: #087443;
    --shadow: 0 18px 48px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 116, 144, 0.12), transparent 28%),
        linear-gradient(180deg, #f6fbfc 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.topbar,
.panel,
.notice,
.toast {
    box-shadow: var(--shadow);
}

.topbar,
.panel {
    background: var(--panel);
    border: 1px solid rgba(214, 224, 231, 0.8);
    border-radius: 20px;
}

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

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

.subtitle,
.panel p {
    color: var(--muted);
}

.topbar-actions,
.actions,
.inline-actions,
.form-actions,
.panel-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.panel {
    padding: 24px;
}

.panel-head {
    justify-content: space-between;
    margin-bottom: 20px;
}

.auth-panel {
    max-width: 560px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar input,
input,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fbfdff;
    color: var(--text);
    font-size: 14px;
}

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

input:focus,
textarea:focus {
    outline: 2px solid rgba(14, 116, 144, 0.16);
    border-color: var(--brand);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.button:hover {
    background: var(--brand-dark);
}

.button-secondary {
    background: #e8f2f5;
    color: var(--text);
}

.button-secondary:hover {
    background: #d7e7ec;
}

.button-danger {
    background: var(--danger);
}

.button-danger:hover {
    background: #8f1b13;
}

.notice {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    background: #fff;
}

.notice-success {
    border-left: 4px solid var(--success);
}

.notice-error {
    border-left: 4px solid var(--danger);
}

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

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
}

.full-width,
.form-actions {
    grid-column: 1 / -1;
}

.form-actions {
    margin-top: 8px;
}

.input-with-action {
    display: flex;
    gap: 10px;
}

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

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

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.empty {
    text-align: center;
    color: var(--muted);
}

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

.site-summary {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: var(--muted);
}

.account-list {
    display: grid;
    gap: 18px;
}

.account-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.account-card h3 {
    margin: 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f9fcfd;
}

.detail-item-block {
    grid-column: 1 / -1;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #102a43;
    color: #fff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 22px;
}

@media (max-width: 768px) {
    .topbar,
    .panel-head,
    .search-bar,
    .topbar-actions,
    .actions,
    .input-with-action,
    .inline-actions,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
