/* WWGold Landing - Estilos base funcionales */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f5f5;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.form-section {
    width: 100%;
    background-color: #fef5d0;
    border-top: 1px solid #b8860b;
}

.form-section__inner {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="tel"],
.form-section input[type="password"],
.form-section input[type="date"],
.form-section input[type="search"],
.form-section select {
    border: 1px solid #b8b4b4;
    border-radius: 13px;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
}

.header p {
    margin: 0;
    color: #666;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.stepper-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.5;
}

.stepper-item.active,
.stepper-item.completed {
    opacity: 1;
}

.stepper-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.stepper-item.active .stepper-number,
.stepper-item.completed .stepper-number {
    background: #b8860b;
}

.stepper-label {
    font-size: 0.75rem;
    text-align: center;
}

/* Form */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

legend {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="search"],
select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid #b8860b;
    outline-offset: 1px;
}

input.invalid,
select.invalid,
.form-section input.invalid,
.form-section select.invalid {
    border-color: #c0392b;
}

.error-message {
    display: block;
    color: #c0392b;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
}

.link-button {
    background: none;
    border: none;
    color: #b8860b;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
}

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

.btn-primary {
    background: #b8860b;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #996f0a;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover:not(:disabled) {
    background: #ccc;
}

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

.hidden {
    display: none !important;
}

/* Honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Alert */
.alert {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Paso 4: pantalla de resultado */
.form-step--result {
    text-align: center;
    padding: 2rem 1rem;
}

.form-result {
    max-width: 480px;
    margin: 0 auto;
}

.form-result__icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.form-result--success .form-result__icon::before {
    content: "✓";
    color: #2e7d32;
}

.form-result--error .form-result__icon::before {
    content: "✕";
    color: #c0392b;
}

.form-result__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.form-result__title:focus {
    outline: none;
}

.form-result__message {
    font-size: 1rem;
    color: #333;
    margin: 0 0 0.5rem;
}

.form-result__hint {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.form-actions--result {
    justify-content: center;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 1200px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-title {
    margin-top: 3rem;
}


/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.admin-filters .form-group {
    margin-bottom: 0;
    min-width: 160px;
}

.table-wrapper {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #fafafa;
    font-weight: 600;
    white-space: nowrap;
}

tr:hover td {
    background: #fafafa;
}

.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-sent {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #666;
}

.login-card {
    max-width: 400px;
    margin: 4rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.detail-item {
    font-size: 0.875rem;
}

.detail-item strong {
    display: block;
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .stepper-label {
        font-size: 0.6875rem;
    }

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