/* User Redeem Page - Dark Commercial Grid */
:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-soft: rgb(59 130 246 / 0.18);
    --secondary: #111827;
    --secondary-soft: #1f2937;
    --accent: #22d3ee;

    --bg-main: #04070d;
    --bg-panel: #0b1220;
    --bg-surface: #111827;
    --bg-muted: #0f172a;

    --text-main: #e5e7eb;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #dbe2ee;

    --border-base: #243247;
    --border-dark: #334155;

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #f87171;

    --shadow-sm: 0 8px 24px rgb(2 6 23 / 0.35);
    --shadow-md: 0 20px 48px rgb(2 6 23 / 0.46);
    --shadow-lg: 0 34px 72px rgb(2 6 23 / 0.55);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --transition-base: 0.22s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans SC", "Space Grotesk", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at 12% 0%, #0f1a2d 0%, #070b14 42%, #03050b 100%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 28px;
    overflow-x: hidden;
    position: relative;
}

.mesh-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgb(34 211 238 / 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgb(59 130 246 / 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at 28% 18%, #000 20%, transparent 78%);
    opacity: 0.8;
    z-index: 0;
}

.page-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 22px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.brand-panel {
    background:
        linear-gradient(160deg, rgb(59 130 246 / 0.24), transparent 48%),
        radial-gradient(circle at 88% 4%, rgb(34 211 238 / 0.18), transparent 32%),
        #0b1220;
    border: 1px solid #334155;
    border-radius: var(--radius-lg);
    color: #f8fafc;
    padding: 26px;
    box-shadow: var(--shadow-lg);
    min-height: 600px;
    position: sticky;
    top: 18px;
}

.brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgb(148 163 184 / 0.13);
    border: 1px solid rgb(148 163 184 / 0.22);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.brand-panel h1 {
    font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-light);
}

.stats-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stat-card {
    background: rgb(15 23 42 / 0.7);
    border: 1px solid rgb(100 116 139 / 0.35);
    border-radius: var(--radius-md);
    padding: 12px;
}

.stat-label {
    font-size: 12px;
    color: #9fb0c7;
}

.stat-value {
    margin-top: 6px;
    font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
}

.feature-list {
    margin-top: 24px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.cta-panel {
    margin-top: 24px;
    border-top: 1px dashed rgb(100 116 139 / 0.4);
    padding-top: 18px;
}

.order-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 1px solid #22c55e;
    color: #04110a;
    font-weight: 800;
    border-radius: 12px;
    padding: 12px 14px;
    transition: var(--transition-base);
}

.order-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgb(34 197 94 / 0.3);
}

.cta-panel p {
    margin-top: 9px;
    font-size: 12px;
    color: #9fb0c7;
}

.workflow-panel {
    background: rgb(11 18 32 / 0.92);
    border: 1px solid #243247;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(4px);
}

.panel-header {
    border-bottom: 1px solid var(--border-base);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.panel-header h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.panel-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.card {
    background: rgb(15 23 42 / 0.78);
    border: 1px solid #2f3f56;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 7px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    border: 1px solid #35465f;
    background: linear-gradient(180deg, #0f172a, #0b1424);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition-base);
    outline: none;
}

.form-input::placeholder {
    color: #7690b0;
}

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

.form-help {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.6;
}

.warranty-section {
    margin-top: 24px;
    border-top: 1px dashed #384962;
    padding-top: 20px;
}

.warranty-section h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-base);
    font-weight: 700;
    font-size: 14px;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #f8fafc;
    border-color: #3b82f6;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgb(37 99 235 / 0.32);
}

.btn-secondary {
    background: #111b2f;
    color: #d7e2f1;
    border-color: #364a67;
}

.btn-secondary:hover:not(:disabled) {
    background: #17233b;
    border-color: #466089;
}

.btn-xs {
    width: auto;
    min-width: 0;
}

.actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.result-success,
.result-error {
    text-align: center;
}

.result-icon {
    margin-bottom: 14px;
}

.result-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.result-message {
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.result-details {
    background: var(--bg-muted);
    border: 1px solid #31435f;
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: left;
    margin-bottom: 18px;
}

.result-detail-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid #33465f;
}

.result-detail-item:last-child {
    border-bottom: 0;
}

.result-detail-label {
    color: var(--text-muted);
    font-size: 13px;
}

.result-detail-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

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

.team-card {
    border: 1px solid #32465f;
    border-radius: var(--radius-md);
    padding: 14px;
    background: #101a2d;
    cursor: pointer;
    transition: var(--transition-base);
}

.team-card:hover,
.team-card.selected {
    border-color: var(--primary);
    box-shadow: 0 10px 22px rgb(59 130 246 / 0.25);
}

.team-name {
    font-weight: 700;
    margin-bottom: 10px;
    color: #f1f5f9;
}

.team-info {
    display: grid;
    gap: 8px;
}

.team-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.team-badge {
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
}

.badge-plus {
    background: rgb(34 211 238 / 0.2);
    color: #67e8f9;
}

.badge-pro {
    background: rgb(59 130 246 / 0.25);
    color: #93c5fd;
}

.badge {
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.badge-success {
    background: rgb(34 197 94 / 0.2);
    color: #86efac;
}

.badge-error {
    background: rgb(248 113 113 / 0.2);
    color: #fecaca;
}

.badge-warranty {
    background: rgb(59 130 246 / 0.2);
    color: #bfdbfe;
}

.badge-normal {
    background: rgb(100 116 139 / 0.2);
    color: #cbd5e1;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 220px;
    max-width: 420px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #3b506e;
    box-shadow: var(--shadow-md);
    background: #0f172a;
    color: var(--text-primary);
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 99;
}

.toast.show {
    display: inline-flex;
}

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

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

.spinning {
    animation: rotate 1.1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .page-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        position: static;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    body {
        padding: 14px;
    }

    .workflow-panel,
    .brand-panel,
    .card {
        padding: 16px;
    }

    .brand-panel h1 {
        font-size: 30px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .toast {
        right: 12px;
        left: 12px;
        top: 12px;
        max-width: none;
    }
}
