:root {
    --bg: #f5f5f7;
    --bg-alt: #ffffff;
    --text: #111111;
    --text-muted: #666666;
    --primary: #007aff;
    --primary-soft: rgba(0, 122, 255, 0.08);
    --danger: #ff3b30;
    --border: #e5e5ea;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --bg-alt: #1c1c1e;
        --text: #f5f5f7;
        --text-muted: #a1a1aa;
        --primary: #0a84ff;
        --primary-soft: rgba(10, 132, 255, 0.22);
        --danger: #ff453a;
        --border: #2c2c2e;
        --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.8);
        --input-bg: #2c2c2e;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(circle at top, #e5f0ff 0, var(--bg) 40%);
    min-height: 100vh;
    color: var(--text);
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-shell {
    width: 100%;
    max-width: 1080px;
    min-height: 620px;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(245,245,247,0.9));
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    padding: 32px 40px;
    display: flex;
    gap: 32px;
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
        margin: 16px;
        padding: 24px 18px;
        border-radius: 24px;
    }
}

/* 左侧品牌区 */

.brand-panel {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 20px;
    border-right: 1px solid rgba(120,120,128,0.18);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 30%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #0a84ff);
    box-shadow: 0 10px 25px rgba(10,132,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.brand-text-main {
    font-size: 20px;
    font-weight: 650;
}

.brand-text-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.brand-hero-title {
    margin-top: 40px;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: .02em;
}

.brand-hero-desc {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.brand-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(120,120,128,0.18);
    font-size: 11px;
    color: var(--text-muted);
    backdrop-filter: blur(18px);
}

.brand-footer {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 40px;
}

/* 右侧内容区 */

.content-panel {
    flex: 1;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title {
    font-size: 20px;
    font-weight: 600;
}

.content-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.content-tabs {
    display: flex;
    gap: 8px;
}

.tab-link {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
}

.tab-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(0,122,255,0.25);
}

.card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* 表单 */

.form-group {
    margin-bottom: 14px;
}

.form-label {
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all .16s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 12px;
}

@media (max-width: 600px) {
    .brand-panel {
        border-right: none;
        padding-right: 0;
    }
    .content-panel {
        padding-left: 0;
    }
    .form-row {
        flex-direction: column;
    }
}

/* 按钮 */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .16s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0,122,255,0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0,122,255,0.55);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(120,120,128,0.06);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* 状态提示 */

.alert {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 10px;
}

.alert-info {
    background: rgba(0,122,255,0.06);
    color: var(--primary);
    border: 1px solid rgba(0,122,255,0.18);
}

.alert-error {
    background: rgba(255,59,48,0.06);
    color: var(--danger);
    border: 1px solid rgba(255,59,48,0.18);
}

.text-muted {
    color: var(--text-muted);
    font-size: 12px;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
}

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

/* 列表 & 表格，用于超管 */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
}

.table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.badge-pending {
    background: rgba(255,159,10,0.12);
    color: #ff9f0a;
}

.badge-approved {
    background: rgba(52,199,89,0.12);
    color: #34c759;
}

.badge-rejected {
    background: rgba(255,59,48,0.12);
    color: #ff3b30;
}