/* ==========================================================================
   Dashboard & Backoffice – Mobile-First
   ========================================================================== */

/* Dashboard Layout */
.dashboard-body { background: #f1f5f9; }
.dashboard-wrapper { display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; padding: 1rem; gap: 1rem; min-height: calc(100vh - 60px); }

/* Sidebar – horizontal scroll on mobile */
.dashboard-sidebar { width: 100%; }
.dashboard-sidebar nav { background: #fff; border-radius: 8px; padding: 0.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); display: flex; overflow-x: auto; gap: 0.3rem; }
.sidebar-link { display: block; padding: 0.7rem 1rem; color: #374151; border-radius: 6px; font-size: 0.95rem; white-space: nowrap; min-height: 44px; line-height: 1.4; }
.sidebar-link:hover { background: #f0f4ff; color: #2563eb; text-decoration: none; }

@media (min-width: 768px) {
    .dashboard-wrapper { flex-direction: row; padding: 1.5rem 1rem; gap: 1.5rem; }
    .dashboard-sidebar { width: 240px; flex-shrink: 0; }
    .dashboard-sidebar nav { flex-direction: column; overflow-x: visible; }
}

/* Main content */
.dashboard-main { flex: 1; min-width: 0; }

/* Cards */
.dash-card { background: #fff; border-radius: 8px; padding: 1.5rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.dash-card h2 { font-size: 1.35rem; color: #0f172a; margin-bottom: 1rem; }
.wizard-grid { display: grid; gap: 1rem; }
.wizard-grid-2 { grid-template-columns: 1fr; }
.wizard-grid-3 { grid-template-columns: 1fr; }

@media (min-width: 480px) {
    .wizard-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .wizard-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .wizard-grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .wizard-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* Import card */
.import-card { background: linear-gradient(135deg, #ecfeff 0%, #fff7ed 55%, #fef3c7 100%); border: 1px solid #bae6fd; border-radius: 24px; padding: 1.5rem; margin-bottom: 1.5rem; display: grid; gap: 1rem; box-shadow: 0 20px 40px rgba(14, 165, 233, 0.08); }
.import-badge { display: inline-block; background: #fff; color: #0f766e; border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.6rem; box-shadow: 0 8px 18px rgba(15,118,110,0.12); }
.import-form { display: grid; gap: 0.7rem; }
.import-label { font-weight: 600; color: #1e3a5f; }
.import-input { width: 100%; padding: 0.75rem 0.9rem; border: 1px solid #bfdbfe; border-radius: 10px; min-height: 44px; font-size: 1rem; }
.import-note { font-size: 0.9rem; color: #475569; margin: 0; }
.import-summary { padding: 1rem; background: rgba(255,255,255,0.8); border-radius: 16px; border: 1px solid #fde68a; }
.import-summary p { margin-bottom: 0.35rem; }

/* Import agent card */
.import-agent-card { border: 1px solid #dbeafe; border-radius: 24px; box-shadow: 0 16px 40px rgba(37,99,235,0.08); }
.import-agent-disclosure { padding: 0; overflow: hidden; }
.import-agent-summary { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; cursor: pointer; padding: 1.5rem; }
.import-agent-summary::-webkit-details-marker { display: none; }
.import-agent-summary h2 { margin: 0; }
.import-agent-toggle { font-size: 0.95rem; color: #2563eb; transition: transform 0.18s ease; }
.import-agent-disclosure[open] .import-agent-toggle { transform: rotate(180deg); }
.import-agent-panel { padding: 0 1.5rem 1.5rem; border-top: 1px solid #dbeafe; }
.import-agent-header { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.import-agent-header p { margin: 0; color: #475569; }
.import-agent-suggestions { margin-top: 1rem; }
.import-agent-list { padding-left: 1.2rem; color: #334155; display: grid; gap: 0.55rem; }
.import-agent-empty { color: #64748b; margin: 0; }

@media (min-width: 768px) {
    .import-agent-summary { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
    .import-agent-header { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border-radius: 8px; padding: 1rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-number { font-size: 1.6rem; font-weight: 700; color: #2563eb; }
.stat-label { font-size: 0.85rem; color: #6b7280; margin-top: 0.2rem; }

@media (min-width: 480px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
    .stat-number { font-size: 2rem; }
}

/* Property list */
.property-list { list-style: none; }
.property-item { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; border-bottom: 1px solid #e5e7eb; }
.property-item:last-child { border-bottom: none; }
.property-title { font-weight: 500; color: #1e3a5f; }
.property-status { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.status-draft { background: #f3f4f6; color: #6b7280; }
.status-pending_review { background: #fef3c7; color: #92400e; }
.status-active { background: #d1fae5; color: #065f46; }
.status-paused { background: #e0e7ff; color: #3730a3; }
.status-rejected { background: #fecaca; color: #991b1b; }

/* Tables – responsive */
.dash-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.dash-table th, .dash-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid #e5e7eb; font-size: 0.9rem; }
.dash-table th { color: #6b7280; font-weight: 500; font-size: 0.85rem; }

/* Wizard responsive */
@media (max-width: 767px) {
    .wizard-shell,
    .wizard-hero { grid-template-columns: 1fr !important; }
    .wizard-phases { grid-template-columns: 1fr 1fr; }
    .wizard-preview-panel { position: static; }
}
