* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #090d13;
    color: #ecf3ff;
}

a {
    color: inherit;
}

.page-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(0, 255, 136, 0.08), transparent 35%),
        radial-gradient(circle at bottom right, rgba(0, 200, 255, 0.08), transparent 35%),
        #090d13;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

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

.brand {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #00ff88;
}

.top-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.card {
    background: rgba(16, 22, 34, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.hero {
    padding: 28px;
    margin-bottom: 24px;
}

.hero h1,
.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.hero p,
.muted {
    color: #94a3b8;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel {
    padding: 24px;
}

.stat {
    padding: 20px;
}

.stat-label {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88, #00c8ff);
    color: #081018;
    font-weight: 700;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #fb7185);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #fb7185);
    color: #fff;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    color: #cbd5e1;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(8, 12, 20, 0.9);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    font-size: 14px;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

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

.notice-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
}

.notice-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.notice-info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

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

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

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    color: #9fb6cf;
    font-weight: 600;
}

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

.badge-green {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
}

.badge-red {
    background: rgba(239, 68, 68, 0.12);
    color: #fda4af;
}

.codebox {
    background: #05080f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 13px;
    line-height: 1.6;
}

.login-shell {
    max-width: 440px;
    margin: 0 auto;
    padding-top: 72px;
}

.login-card {
    padding: 28px;
}

.footer-note {
    margin-top: 20px;
    color: #64748b;
    font-size: 13px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-steps li {
    margin-bottom: 8px;
}

.config-preview {
    max-height: 320px;
    overflow: auto;
}

.qr-box img {
    width: 260px;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

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

    .container {
        padding: 20px 14px 40px;
    }
}

