/* ========================================
   RentalMe — Formulario de Propietarios
   ======================================== */

:root {
    --bg-primary: #0c1117;
    --bg-secondary: #141b24;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-input-focus: rgba(255, 255, 255, 0.1);
    --text-primary: #e8ecf0;
    --text-secondary: #8c99a6;
    --text-muted: #5a6672;
    --accent: #4a73c9;
    --accent-hover: #5b84da;
    --accent-subtle: rgba(74, 115, 201, 0.12);
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(74, 115, 201, 0.5);
    --error: #d94452;
    --success: #34a853;
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.2s ease;
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   Container & Layout
   ======================================== */

.form-container {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.form-header {
    padding: 20px 24px 0;
    text-align: center;
    flex-shrink: 0;
}

.logo {
    height: 38px;
    margin-bottom: 20px;
}

.form-body {
    flex: 1;
    padding: 20px 24px 24px;
    overflow-y: auto;
}

.form-footer {
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
}

/* ========================================
   Progress Bar
   ======================================== */

.progress-bar {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 20%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.step-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.step-dot.active {
    background: var(--accent);
}

.step-dot.completed {
    background: var(--success);
}

/* ========================================
   Slides
   ======================================== */

.slide {
    display: none;
    animation: fadeIn 0.3s ease;
}

.slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Welcome Slide
   ======================================== */

.welcome-slide {
    text-align: center;
    padding: 16px 0;
}

.welcome-slide h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
    margin: 0 auto;
    text-align: left;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.info-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.check-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 168, 83, 0.12);
    color: var(--success);
    border-radius: 50%;
    margin: 0 auto 16px;
}

/* ========================================
   Typography
   ======================================== */

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* ========================================
   Form Elements
   ======================================== */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 2px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.required {
    color: var(--error);
    font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input.error,
textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(217, 68, 82, 0.1);
}

.error-message {
    font-size: 12px;
    color: var(--error);
    margin-top: 3px;
    display: none;
}

.error-message.visible {
    display: block;
}

textarea {
    resize: vertical;
    min-height: 72px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238c99a6' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ========================================
   Toggle Buttons
   ======================================== */

.toggle-group {
    display: flex;
    gap: 6px;
}

.toggle-btn {
    flex: 1;
    padding: 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    background: var(--bg-card-hover);
}

.toggle-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

/* ========================================
   Number Selector
   ======================================== */

.property-count-group {
    text-align: center;
    margin-bottom: 24px;
}

.number-selector {
    display: inline-flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 6px;
}

.num-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.num-btn:hover {
    background: var(--bg-card-hover);
}

.number-selector input[type="number"] {
    width: 48px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 4px;
    -moz-appearance: textfield;
}

.number-selector input[type="number"]::-webkit-inner-spin-button,
.number-selector input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ========================================
   Property Cards
   ======================================== */

.property-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
}

.property-card-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.property-card-header h3 {
    margin-bottom: 0;
    color: var(--accent);
    text-transform: none;
    letter-spacing: normal;
    font-size: 15px;
}

.property-card .form-row {
    margin-bottom: 0;
}

.amenities-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.amenity-check {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.amenity-check:hover {
    background: var(--bg-card-hover);
}

.amenity-check input {
    display: none;
}

.amenity-check.checked {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent-hover);
}

/* ========================================
   Platform Cards
   ======================================== */

.platform-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.platform-header {
    margin-bottom: 10px;
}

.platform-name {
    font-size: 15px;
    font-weight: 600;
}

/* ========================================
   Documentation Section
   ======================================== */

.doc-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.doc-list {
    list-style: none;
    padding: 0;
}

.doc-list li {
    padding: 7px 0 7px 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.doc-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.doc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--text-muted);
    border-radius: 50%;
}

.doc-actions {
    display: flex;
    gap: 10px;
    margin: 16px 0;
}

.email-reminder {
    background: var(--accent-subtle);
    border: 1px solid rgba(74, 115, 201, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 16px;
}

.email-reminder p {
    font-size: 13px;
    color: var(--text-secondary);
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ========================================
   Buttons
   ======================================== */

.btn-next {
    padding: 10px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-next:hover {
    background: var(--accent-hover);
}

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

.btn-back {
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--bg-card);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Loading Overlay
   ======================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 17, 23, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 100;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ========================================
   Toast
   ======================================== */

.toast {
    position: fixed;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    padding: 10px 20px;
    background: #1e2a36;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 200;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   Conditional Fields
   ======================================== */

.conditional-fields {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

/* ========================================
   Responsive
   ======================================== */

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

    .form-header {
        padding: 14px 16px 0;
    }

    .form-body {
        padding: 16px;
    }

    .form-footer {
        padding: 12px 16px;
    }

    .welcome-slide h1 {
        font-size: 21px;
    }

    h2 {
        font-size: 18px;
    }

    .property-card {
        padding: 14px;
    }

    .doc-actions {
        flex-direction: column;
    }

    .doc-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .logo {
        height: 32px;
    }
}
