/* ============================================
   WIZARD DE REGISTRO - DARK THEME
   ============================================ */

/* === VARIABLES === */
:root {
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --bg-input: #0d0d0d;
    --bg-hover: #1a1a1a;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --text: #ffffff;
    --text-muted: #888888;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

/* === GLOBAL STYLES === */
body.register {
    background: var(--bg-dark);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

.register-wizard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === HEADER === */
.wizard-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* === PROGRESS BAR === */
.wizard-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 10px;
}

.wizard-progress .step {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.wizard-progress .step.active {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.wizard-progress .step.completed {
    background: var(--blue);
    color: white;
}

.wizard-progress .step.completed .number {
    display: none;
}

.wizard-progress .step.completed::after {
    content: '✓';
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
}

.wizard-progress .line {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    /* transition: background 0.3s ease; */
}

.wizard-progress .step.completed ~ .line {
    background: var(--blue);
}

/* === FORM CONTAINER === */
.wizard-form-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 50px;
    min-height: 600px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #1a1a1a;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    text-align: center;
}

.step-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    text-align: center;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-input);
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.required {
    color: var(--error);
}

.form-control {
    width: 100%;
    background: var(--bg-input) !important;
    border: 0px solid #1a1a1a !important;
    color: var(--text);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    /* transition: all 0.3s ease; */
    box-shadow: 0px 0px 1px rgba(255, 255, 255, 1) !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Bootstrap Select (dropdown customizado) */
.register-wizard-container .bootstrap-select .btn {
    background: #0d0d0d !important;
    background-color: #0d0d0d !important;
    color: #ffffff !important;
    border: 0px solid #1a1a1a !important;
    box-shadow: 0px 0px 1px rgba(255, 255, 255, 1) !important;
    padding: 7px 0px 10px 10px !important;
    border-radius: 8px !important;
}

.dropdown-menu .open{
   border: 1px solid  var(--blue) !important;
}

.dropdown-menu,
.dropdown-menu .active {
  background: rgba(0, 0, 0, 0.6) !important;
}

.dropdown-menu .active,
.dropdown-menu li * {
    color: var(--blue) !important;
}

.register-wizard-container .bootstrap-select .btn:hover,
.register-wizard-container .bootstrap-select .btn:focus,
.register-wizard-container .bootstrap-select .btn:active {
    background: #0d0d0d !important;
    background-color: #0d0d0d !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0px 0px 1px rgba(255, 255, 255, 1) !important;
}

.register-wizard-container .bootstrap-select .filter-option-inner-inner {
    color: #ffffff !important;
}

.register-wizard-container .bootstrap-select .bs-caret .caret {
    border-top-color: #ffffff !important;
}

.register-wizard-container .bootstrap-select .dropdown-menu {
    background: #0d0d0d !important;
    background-color: #0d0d0d !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 8px !important;
    padding: 0 !important;
}

.register-wizard-container .bootstrap-select .dropdown-menu li a {
    background: #0d0d0d !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
}

.register-wizard-container .bootstrap-select .dropdown-menu li a:hover,
.register-wizard-container .bootstrap-select .dropdown-menu li.selected a {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

.register-wizard-container .bootstrap-select .dropdown-menu li.active a,
.register-wizard-container .bootstrap-select .dropdown-menu li.active a:hover {
    background: var(--blue) !important;
    color: #ffffff !important;
}

/* Hide Bootstrap Select action boxes and done buttons */
.register-wizard-container .bootstrap-select .bs-actionsbox,
.register-wizard-container .bootstrap-select .bs-donebutton,
.register-wizard-container .bs-actionsbox,
.register-wizard-container .bs-donebutton {
    display: none !important;
}

/* Estilos específicos para dropdowns de departamento (tabela de usuários) */
.register-wizard-container .bootstrap-select .btn-dark-theme {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #1a1a1a !important;
    box-shadow: 0px 0px 1px rgba(255, 255, 255, 0.3) !important;
    padding: 7px 0px 10px 10px !important;
    border-radius: 8px !important;
}

.register-wizard-container .bootstrap-select .btn-dark-theme:hover,
.register-wizard-container .bootstrap-select .btn-dark-theme:focus,
.register-wizard-container .bootstrap-select .btn-dark-theme:active {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0px 0px 1px rgba(255, 255, 255, 0.5) !important;
}

.register-wizard-container .bootstrap-select .btn-dark-theme .filter-option-inner-inner {
    color: #ffffff !important;
}

/* Dropdown menu específico para departamentos (renderizado no body) */
.dropdown-menu.dropdown-dark-theme,
body > .dropdown-menu.dropdown-dark-theme {
    background: #000000 !important;
    background-color: #000000 !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 8px !important;
}

/* Itens do dropdown menu de departamentos */
.dropdown-menu.dropdown-dark-theme li a,
body > .dropdown-menu.dropdown-dark-theme li a {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
}

.dropdown-menu.dropdown-dark-theme li a:hover,
.dropdown-menu.dropdown-dark-theme li.selected a,
body > .dropdown-menu.dropdown-dark-theme li a:hover,
body > .dropdown-menu.dropdown-dark-theme li.selected a {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

.dropdown-menu.dropdown-dark-theme li.active a,
.dropdown-menu.dropdown-dark-theme li.active a:hover,
body > .dropdown-menu.dropdown-dark-theme li.active a {
    background: var(--blue) !important;
    color: #ffffff !important;
}

/* Fallback para select nativo (caso Bootstrap Select não esteja carregado) */
body.register select,
select.form-control,
select#country {
    /* background: #0d0d0d !important;
    background-color: #0d0d0d !important;
    color: #ffffff !important;
    border: 0px solid #1a1a1a !important;
    box-shadow: 0px 0px 1px rgba(255, 255, 255, 1) !important;
    padding: 2px 16px !important;
    border-radius: 8px !important; */
}

.form-control::placeholder {
    color: rgba(68, 68, 68, 0.8) !important;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.error-msg {
    display: block;
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 18px;
}

.form-control.input-error {
    border-color: var(--error);
}

/* === INPUT WITH BUTTON === */
.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button .form-control {
    flex: 1;
}

.btn-icon {
    background: var(--bg-input);
    border: 1px solid var(--bg-hover);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.btn-add {
    background: var(--blue);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* === SECTION BOX === */
.section-box {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--bg-input);
}

.box-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.box-title svg {
    color: var(--blue);
}

.box-description {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.input-large {
    max-width: 200px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* === TAGS (DEPARTAMENTOS) === */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 40px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--purple);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.remove-tag {
    cursor: pointer;
    font-size: 1.2rem;
    font-style: normal;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.remove-tag:hover {
    opacity: 1;
}

/* === TABLE === */
.table-responsive {
    overflow-x: auto;
}

.usuarios-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.usuarios-table thead {
    background: var(--bg-dark);
}

.usuarios-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--bg-input);
}

.usuarios-table td {
    padding: 12px;
}

.usuarios-table tbody tr {
    border-bottom: 1px solid var(--bg-input);
}

/* === PLANS GRID === */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-input);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.plan-card {
    background: var(--bg-dark);
    border: 2px solid var(--bg-input);
    border-radius: 12px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.plan-card:hover {
    border-color: var(--blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.plan-card.recommended {
    border-color: var(--blue);
}

.plan-card.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--blue);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.badge-recommended {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-card h3 {
    font-size: 1.5rem;
    margin: 15px 0;
    color: var(--text);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blue);
    margin: 20px 0;
}

.plan-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    min-height: 60px;
}

.btn-select-plan {
    width: 100%;
    background: var(--blue);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-plan:hover {
    background: #2563eb;
}

.plan-card.selected .btn-select-plan {
    background: var(--success);
}

/* === SECURITY (STEP 5) === */
.security-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.security-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.security-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.security-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.password-strength {
    margin-top: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 20px;
}

.password-tips {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    text-align: left;
}

.password-tips h4 {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 1rem;
}

.password-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-tips li {
    color: var(--text-muted);
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.password-tips li::before {
    content: '•';
    position: absolute;
    left: 10px;
    color: var(--blue);
    font-size: 1.2rem;
}

.checkbox-container {
    margin: 25px 0;
    text-align: left;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox-container label {
    color: var(--text-muted);
    cursor: pointer;
}

.recaptcha-container {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

/* === NAVIGATION === */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
}

.btn-secondary:hover {
    background: var(--blue);
    color: white;
}

/* === FOOTER === */
.wizard-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.wizard-footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.wizard-footer a:hover {
    text-decoration: underline;
}

/* === LOADING OVERLAY === */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.overlay-content {
    text-align: center;
}

.spinner-large {
    width: 80px;
    height: 80px;
    border: 4px solid var(--bg-input);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

#loading-message {
    font-size: 1.2rem;
    color: var(--text);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .wizard-form-container {
        padding: 30px 20px;
    }

    .wizard-progress .step {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wizard-progress .line {
        width: 30px;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .section-box {
        padding: 20px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .wizard-navigation {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .col-md-6,
    .col-md-4,
    .col-md-3,
    .col-md-1 {
        width: 100%;
    }

    .input-with-button {
        flex-direction: column;
    }

    .btn-icon,
    .btn-add {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .register-wizard-container {
        padding: 20px 10px;
    }

    .wizard-progress {
        gap: 5px;
    }

    .wizard-progress .step {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .wizard-progress .line {
        width: 20px;
    }
}
