/* Modal base */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    z-index: 900;
    animation: wz-fadeIn 0.25s ease-out;
}
.modal.show { display: flex; }

@keyframes wz-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wz-slideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wz-slideContent {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Wizard container */
.wizard-modal {
    width: min(600px, 94vw);
    background: var(--card-background, #1a1a1a);
    border-radius: 1rem;
    border: 1px solid var(--border-color, #333);
    box-shadow: 0 16px 50px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow: auto;
    animation: wz-slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

/* Header */
.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #333);
}

.wizard-header h3 {
    color: var(--text-primary, #fff);
    font-size: 1.2rem;
    margin: 0;
}

.wizard-close {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary, #999);
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    line-height: 1;
}
.wizard-close:hover { color: var(--text-primary, #fff); }

/* Stepper */
.wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.25rem 1.5rem 0.75rem;
}

.wizard-step-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.wizard-step-dot {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: #333;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.wizard-step-dot.active {
    background: var(--primary-color, #d4af37);
    color: #000;
    border-color: var(--primary-color, #d4af37);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.wizard-step-dot.done {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.wizard-step-line {
    width: 2.5rem;
    height: 2px;
    background: #333;
    transition: background 0.3s;
}

.wizard-step-line.done { background: #10b981; }

/* Content area */
.wizard-body {
    padding: 1.5rem;
    flex: 1;
    animation: wz-slideContent 0.25s ease-out;
}

.wizard-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin-bottom: 1.25rem;
}

.wizard-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary, #999);
    margin-top: -0.75rem;
    margin-bottom: 1.25rem;
}

/* Action cards (Step 1 - big) */
.wizard-action-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wizard-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color, #333);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(32,32,32,0.9), rgba(20,20,20,0.8));
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wizard-action-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color, #d4af37);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
}

.wizard-action-card.selected {
    border-color: var(--primary-color, #d4af37);
    background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(184,134,11,0.05));
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.wizard-action-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.wizard-action-info {
    flex: 1;
}

.wizard-action-title {
    font-weight: 700;
    color: var(--text-primary, #fff);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.wizard-action-desc {
    font-size: 0.8rem;
    color: var(--text-secondary, #999);
    line-height: 1.3;
}

/* Selection cards (medios, personas) */
.wizard-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.wizard-sel-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem;
    border: 2px solid var(--border-color, #333);
    border-radius: 0.6rem;
    background: linear-gradient(135deg, rgba(32,32,32,0.9), rgba(20,20,20,0.8));
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wizard-sel-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color, #d4af37);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.wizard-sel-card.selected {
    border-color: var(--primary-color, #d4af37);
    background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(184,134,11,0.05));
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.wizard-sel-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    background: var(--primary-color, #d4af37);
    color: #000;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.65rem;
}

.wizard-sel-icon { font-size: 1.2rem; flex-shrink: 0; }
.wizard-sel-name { font-weight: 600; color: var(--text-primary, #fff); font-size: 0.9rem; }

.wizard-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: rgba(212, 175, 55, 0.1);
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: 0.6rem;
    color: var(--primary-color, #d4af37);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.wizard-add-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary-color, #d4af37);
}

/* Monto input */
.wizard-monto-wrapper {
    text-align: center;
    margin-bottom: 1.25rem;
}

.wizard-monto-label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary, #999);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.wizard-monto-input {
    width: 100%;
    max-width: 320px;
    padding: 1rem;
    border: 2px solid var(--border-color, #333);
    border-radius: 0.75rem;
    background: rgba(20, 20, 20, 0.9);
    color: var(--text-primary, #fff);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.wizard-monto-input:focus {
    outline: none;
    border-color: var(--primary-color, #d4af37);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.wizard-fecha-wrapper {
    text-align: center;
    margin-top: 1rem;
}

.wizard-fecha-input {
    width: 100%;
    max-width: 320px;
    padding: 0.75rem;
    border: 2px solid var(--border-color, #333);
    border-radius: 0.75rem;
    background: rgba(20, 20, 20, 0.9);
    color: var(--text-primary, #fff);
    font-size: 1rem;
    text-align: center;
}

.wizard-fecha-input:focus {
    outline: none;
    border-color: var(--primary-color, #d4af37);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Summary */
.wizard-summary {
    background: rgba(32, 32, 32, 0.7);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color, #333);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wizard-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wizard-summary-row:last-child { border-bottom: none; }

.wizard-summary-label {
    color: var(--text-secondary, #999);
    font-weight: 600;
    font-size: 0.9rem;
}

.wizard-summary-value {
    color: var(--text-primary, #fff);
    font-weight: 700;
    font-size: 0.95rem;
}

.wizard-summary-value.amount {
    color: var(--primary-color, #d4af37);
    font-size: 1.15rem;
}

/* Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color, #333);
}

.wizard-nav-btn {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.wizard-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wizard-btn-back {
    background: #444;
    color: #fff;
}
.wizard-btn-back:hover:not(:disabled) { background: #555; }

.wizard-btn-next {
    background: var(--primary-color, #d4af37);
    color: #000;
}
.wizard-btn-next:hover:not(:disabled) {
    background: #f5c842;
    transform: translateY(-1px);
}

.wizard-btn-save {
    background: #10b981;
    color: #fff;
}
.wizard-btn-save:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
}

/* Empty state */
.wizard-empty {
    text-align: center;
    color: var(--text-secondary, #999);
    padding: 1.5rem;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .wizard-modal { width: 98vw; }
    .wizard-selection-grid { grid-template-columns: repeat(2, 1fr); }
    .wizard-monto-input { font-size: 1.25rem; }
    .wizard-action-card { padding: 1rem; }
    .wizard-body { padding: 1rem; }
    .wizard-nav { padding: 0.75rem 1rem; }
    .wizard-nav-btn { min-width: 100px; padding: 0.75rem 1rem; }
}
