/**
 * Vistoria Fácil - Estilos Principais
 * Layout moderno SaaS
 */

:root {
    --primary-navy: #1A1F2B;
    --primary-blue: #3b94d9; /* Cor da logo - harmonizado */
    --bg-light: #F5F7FA;
    --border-color: #DDE4EE;
    --success-color: #2ECC71;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --text-muted: #6B7280;
}

/* Override Bootstrap primary para usar cor da logo */
.bg-primary {
    background-color: #3b94d9 !important;
}

.btn-primary {
    background-color: #3b94d9 !important;
    border-color: #3b94d9 !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #2d7ab8 !important;
    border-color: #2d7ab8 !important;
}

.text-primary {
    color: #3b94d9 !important;
}

.border-primary {
    border-color: #3b94d9 !important;
}

.btn-outline-primary {
    color: #3b94d9 !important;
    border-color: #3b94d9 !important;
}

.btn-outline-primary:hover {
    background-color: #3b94d9 !important;
    color: white !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--primary-navy);
    font-size: 14px;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-navy);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand img {
    display: block;
}

.sidebar-brand i {
    font-size: 28px;
    color: var(--primary-blue);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--primary-navy);
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 12px;
    font-weight: 500;
}

.menu-item:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.menu-item.active {
    background: var(--primary-blue);
    color: white;
    border-radius: 0;
}

.menu-section-title {
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-navy);
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.content-wrapper {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-navy);
}

.card-header i {
    margin-right: 8px;
    color: var(--primary-blue);
}

.card-body {
    padding: 24px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-info h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-navy);
    margin: 0;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 148, 217, 0.25);
}

.btn-primary:hover {
    background: #2d7ab8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 148, 217, 0.35);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #27AE60;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-blue);
    border: 1.5px solid var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
}

/* Forms */
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 8px;
    display: block;
}

.form-control, .form-select {
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--primary-navy);
    transition: all 0.2s ease;
    width: 100%;
}

/* Ajuste específico para o select de quantidade (DataTables) para evitar sobreposição do ícone */
.dataTables_length .form-select {
    width: auto;
    min-width: 72px;
    padding: 6px 28px 6px 12px;
    line-height: 1.4;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 148, 217, 0.1);
    outline: none;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg-light);
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-navy);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge.bg-primary {
    background: var(--primary-blue);
    color: white;
}

.badge.bg-success {
    background: var(--success-color);
    color: white;
}

.badge.bg-warning {
    background: var(--warning-color);
    color: white;
}

.badge.bg-danger {
    background: var(--danger-color);
    color: white;
}

.badge.bg-secondary {
    background: var(--text-muted);
    color: white;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Wizard */
.wizard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.wizard-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.wizard-step.active .wizard-step-number {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.wizard-step.completed .wizard-step-number {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.wizard-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.wizard-step.active .wizard-step-label {
    color: var(--primary-blue);
}

/* Option Cards */
.option-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.option-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 148, 217, 0.1);
}

.option-card.selected {
    border-color: var(--primary-blue);
    background: rgba(59, 148, 217, 0.05);
}

.option-card i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.option-card h5 {
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 8px;
}

.option-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Utilities */
.text-muted {
    color: var(--text-muted) !important;
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.py-5 { padding-top: 32px; padding-bottom: 32px; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

.w-100 { width: 100%; }

/* Fix para iOS - evitar zoom em inputs */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* =============================================
   ESTILOS PARA PÁGINAS DE LISTAGEM
   (Inquilinos, Imóveis, Vistorias)
   ============================================= */

/* Page Header com gradiente sutil */
.page-header-modern {
    background: linear-gradient(135deg, rgba(59, 148, 217, 0.08) 0%, rgba(30, 87, 133, 0.04) 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(59, 148, 217, 0.1);
}

.page-header-modern h4 {
    color: var(--primary-navy);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-modern h4 i {
    color: var(--primary-blue);
    font-size: 28px;
}

/* Cards de listagem */
.list-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

/* Search box */
.search-box-modern {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.search-box-modern .form-control {
    border: none;
}

.search-box-modern .form-control:focus {
    box-shadow: none;
}

.search-box-modern .input-group-text {
    background: transparent;
    border: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(59, 148, 217, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-state-icon i {
    font-size: 36px;
    color: var(--primary-blue);
}

/* Ações em massa */
.mass-actions-bar {
    background: linear-gradient(135deg, #3b94d9 0%, #1e5785 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mass-actions-bar .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* Botões de ação na tabela - SIMPLES */
.action-buttons {
    display: inline-flex;
    gap: 4px;
    white-space: nowrap;
}

.action-buttons .btn-sm {
    padding: 4px 8px;
    font-size: 13px;
}

/* Botão Continuar */
.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}
