/* ============================================
   TerraPulse Dashboard — Predios UI
   ============================================ */

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

.predios-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.predios-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.predios-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.predios-filters .search-box {
    margin-left: auto;
    position: relative;
}

.predios-filters .search-box input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px 10px 36px;
    border-radius: var(--radius-md);
    font-size: 14px;
    width: 280px;
    transition: var(--transition);
}

.predios-filters .search-box input:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px var(--green-dim);
}

.predios-filters .search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.predios-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.predios-empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--green);
    margin-bottom: 24px;
    opacity: 0.8;
}

.predios-empty-state h3 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 12px;
}

.predios-empty-state p {
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto 32px auto;
    font-size: 15px;
    line-height: 1.6;
}

/* Farm Cards */
.farm-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.farm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.farm-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--gradient-green);
    opacity: 0.8;
}

.farm-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.farm-card .card-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.farm-card .card-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.farm-card .quality-badge {
    background: var(--green-dim);
    color: var(--green);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.farm-card .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.farm-card .stat-item .label {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.farm-card .stat-item .value {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
}

/* Wizard Modal */
.wizard-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 8, 6, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.wizard-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wizard-modal {
    background: var(--bg-card);
    width: 900px;
    max-width: 95vw;
    height: 85vh;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
}

.wizard-modal-overlay.active .wizard-modal {
    transform: translateY(0);
}

.wizard-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-header h3 {
    font-size: 20px;
    color: var(--text-primary);
}

.wizard-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.wizard-sidebar {
    width: 240px;
    background: var(--bg-card-inner);
    padding: 32px 0;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}

.wizard-step-nav {
    list-style: none;
}

.wizard-step-nav li {
    padding: 12px 32px;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    font-size: 14px;
}

.wizard-step-nav li.active {
    color: var(--green);
    background: var(--green-dim);
}

.wizard-step-nav li.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--green);
}

.wizard-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    width: 100%;
}

.wizard-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    background: var(--bg-card-inner);
}

/* ============================================
   RESPONSIVE DESIGN PREDIOS
   ============================================ */

@media (max-width: 992px) {
    .predios-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .predios-filters .search-box {
        margin-left: 0;
        width: 100%;
    }
    
    .predios-filters .search-box input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .wizard-body {
        flex-direction: column;
        overflow-y: auto;
    }
    
    .wizard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px 0;
        display: flex;
        overflow-x: auto;
    }
    
    .wizard-step-nav {
        display: flex;
        width: max-content;
    }
    
    .wizard-step-nav li {
        padding: 12px 24px;
    }
    
    .wizard-step-nav li.active::before {
        left: 0; right: 0; top: auto; bottom: 0; height: 4px; width: 100%;
    }
    
    .wizard-content {
        padding: 20px;
        overflow-y: visible; /* Let parent scroll */
    }
    
    .wizard-modal {
        height: 95vh;
    }
    
    .wizard-header {
        padding: 16px 20px;
    }
    
    .wizard-footer {
        padding: 16px 20px;
    }
}
