/* ── 全局 ────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

/* ── 登录页 ──────────────────────────── */
.login-wrapper {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 40px 36px;
    width: 400px; max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h1 {
    font-size: 22px; font-weight: 600;
    text-align: center; margin-bottom: 4px;
    color: #1a237e;
}

.login-card .subtitle {
    text-align: center; font-size: 13px;
    color: #888; margin-bottom: 32px;
}

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

.form-group label {
    display: block; font-size: 13px; font-weight: 500;
    color: #555; margin-bottom: 6px;
}

.form-group input, .form-group select {
    width: 100%; padding: 10px 14px;
    border: 1px solid #d9d9d9; border-radius: 6px;
    font-size: 14px; transition: border-color .2s;
    outline: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: #3949ab;
    box-shadow: 0 0 0 3px rgba(57,73,171,0.1);
}

.btn {
    display: inline-block; padding: 10px 24px;
    border: none; border-radius: 6px;
    font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .2s;
}

.btn-primary {
    width: 100%; padding: 12px;
    background: #3949ab; color: #fff;
    font-size: 15px;
}

.btn-primary:hover { background: #283593; }

.btn-danger {
    background: #e53935; color: #fff;
}

.btn-danger:hover { background: #c62828; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

.error-msg {
    color: #e53935; font-size: 13px;
    text-align: center; margin-top: 12px;
    display: none;
}

.error-msg.visible { display: block; }

/* ── 顶栏 ──────────────────────────── */
.topbar {
    background: #1a237e; color: #fff;
    padding: 0 24px; height: 56px;
    display: flex; align-items: center;
    justify-content: space-between;
}

.topbar .logo { font-size: 16px; font-weight: 600; }

.topbar .user-info {
    display: flex; align-items: center; gap: 16px;
    font-size: 13px;
}

.topbar .user-info .domain-badge {
    background: rgba(255,255,255,0.15);
    padding: 3px 10px; border-radius: 12px;
    font-size: 12px;
}

/* ── 主体 ──────────────────────────── */
.main { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

/* ── Dashboard ──────────────────────── */
.dashboard-title {
    font-size: 22px; font-weight: 600;
    margin-bottom: 8px; color: #1a237e;
}

.dashboard-desc { color: #888; font-size: 14px; margin-bottom: 28px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #fff; border-radius: 10px;
    padding: 28px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none; color: inherit;
    display: block;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.card .icon {
    font-size: 40px; margin-bottom: 16px;
}

.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }

.card p { font-size: 13px; color: #888; line-height: 1.5; }

.card.coming-soon {
    opacity: 0.5; cursor: default;
}

.card.coming-soon:hover { transform: none; }

.card .tag {
    display: inline-block; margin-top: 12px;
    padding: 4px 12px; border-radius: 12px;
    font-size: 12px;
}

.card .tag.active { background: #e8f5e9; color: #2e7d32; }
.card .tag.pending { background: #fff3e0; color: #e65100; }

/* ── 用户管理 ──────────────────────── */
.admin-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 24px;
}

.admin-header h2 { font-size: 20px; color: #1a237e; }

table {
    width: 100%; background: #fff;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-collapse: collapse;
}

th, td { padding: 12px 16px; text-align: left; font-size: 14px; }

th { background: #f5f5f5; font-weight: 600; color: #555; }

tr:not(:last-child) td { border-bottom: 1px solid #f0f0f0; }

tr:hover td { background: #fafafa; }

.domain-tag {
    display: inline-block; padding: 2px 10px;
    border-radius: 10px; font-size: 12px;
    background: #e3f2fd; color: #1565c0;
}
.domain-tag.admin-tag { background: #fce4ec; color: #c62828; }
.domain-tag.standard-tag { background: #e8f5e9; color: #2e7d32; }

.action-bar { display: flex; gap: 8px; }

/* ── 模态框 ──────────────────────────── */
.modal-overlay {
    display: none; position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 999;
    align-items: center; justify-content: center;
}

.modal-overlay.visible { display: flex; }

.modal {
    background: #fff; border-radius: 12px;
    padding: 32px; width: 420px; max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal h3 { font-size: 18px; margin-bottom: 20px; color: #1a237e; }

.modal .btn-row { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }

/* ── Toast ──────────────────────────── */
.toast {
    position: fixed; top: 20px; right: 20px;
    padding: 12px 24px; border-radius: 8px; color: #fff;
    font-size: 14px; z-index: 1000;
    transform: translateX(120%); transition: transform .3s;
}

.toast.show { transform: translateX(0); }
.toast.success { background: #2e7d32; }
.toast.error { background: #c62828; }

/* ── 提示页（AGA 占位） ──────────── */
.placeholder-page {
    text-align: center; padding: 80px 24px;
}

.placeholder-page h1 {
    font-size: 28px; color: #1a237e; margin-bottom: 12px;
}

.placeholder-page p { color: #888; font-size: 16px; margin-bottom: 24px; }

.back-link {
    display: inline-block; padding: 10px 24px;
    background: #3949ab; color: #fff;
    border-radius: 6px; text-decoration: none; font-size: 14px;
}

.back-link:hover { background: #283593; }
