:root {
    --bg-dark: #090d16;
    --card-bg: #111827;
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: #1e293b;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 12px 40px;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
}

.main-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Header */
.header-box {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.reseller-logo {
    max-height: 52px;
    max-width: 160px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 6px;
}

/* Stepper Progress Bar */
.stepper-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    padding: 0 8px;
}

.stepper-line {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-50%);
    z-index: 1;
}

.stepper-progress {
    position: absolute;
    top: 50%;
    left: 20px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.3s ease;
    width: 0%;
}

.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

.step-node.active {
    background: var(--primary);
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 0 14px var(--primary-glow);
}

.step-node.completed {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

/* Card Container */
.card-wizard {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.step-header {
    margin-bottom: 18px;
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-field::placeholder {
    color: #64748b;
}

/* Inline Input + Button */
.input-inline {
    display: flex;
    gap: 8px;
}

.input-inline .input-field {
    flex: 1;
}

.btn-inline {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid var(--primary);
    color: #60a5fa;
    border-radius: var(--radius-md);
    padding: 0 16px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-inline:hover {
    background: var(--primary);
    color: #fff;
}

/* Indicator Result Box */
.indicator-box {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-box.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.indicator-box.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* OTP Box */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

.otp-digit {
    width: 52px;
    height: 56px;
    background: var(--input-bg);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Alert Boxes */
.alert-box {
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}

.alert-box.danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    display: block;
}

.alert-box.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    display: block;
}

/* Footer Copyright */
.footer-text {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 24px;
}


/* Planos Cards (Etapa 3) */
.plans-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    text-align: left;
}

.plan-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.05);
}

.plan-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 0 16px var(--primary-glow);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.plan-name {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.plan-sub {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.plan-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Devices & Brands (Etapa 4) */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.device-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.device-btn i {
    font-size: 20px;
    color: #60a5fa;
}

.device-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--primary);
}

.device-btn.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Apps Grid */
.apps-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.app-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.app-card:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.app-card.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.app-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-badge-auto {
    font-size: 10px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Tutorial Box */
.tutorial-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1;
    text-align: left;
}

.tutorial-box strong {
    color: #fff;
}
