/* 
 * CSS Principal - Portal de Cartas Contempladas
 * Estética Premium, Responsiva e Interativa
 */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #0ea5e9;
    --secondary-hover: #0284c7;
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-text: #047857;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-text: #b45309;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    
    --border: #e2e8f0;
    --border-focus: #cbd5e1;
    --text-main: #334155;
    --text-muted: #64748b;
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --gradient-hero: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--light);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Utilitários */
.hidden {
    display: none !important;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--light);
    border-color: var(--border-focus);
}

.btn-whatsapp {
    background: var(--gradient-success);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* Header */
.app-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    color: var(--dark);
    line-height: 1.1;
}

.logo-text h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-stats {
    display: flex;
    gap: 24px;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--light);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    min-width: 140px;
}

.stat-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 36px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 16px;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* App Main */
.app-main {
    margin-top: -30px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

/* Tabs */
.tabs-container {
    display: flex;
    background-color: var(--white);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    width: fit-content;
    border: 1px solid var(--border);
}

.tab-btn {
    border: none;
    background: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--dark);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

/* Filters */
.filters-section {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.search-bar-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 15px;
    background-color: var(--light);
    outline: none;
    transition: var(--transition);
}

#search-input:focus {
    background-color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.view-toggle-wrapper {
    display: flex;
    background-color: var(--light);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.view-toggle-btn {
    border: none;
    background: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.view-toggle-btn:hover {
    color: var(--dark);
}

.view-toggle-btn.active {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.category-buttons {
    display: flex;
    gap: 8px;
}

.category-btn {
    border: 1px solid var(--border);
    background-color: var(--white);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.category-btn:hover {
    background-color: var(--light);
    border-color: var(--border-focus);
}

.category-btn.active {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 12px;
}

select {
    width: 100%;
    padding: 10px 36px 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.ranges-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 16px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    margin-bottom: 16px;
}

.range-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.range-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
}

.range-values {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-full);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-hover);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    transition: var(--transition);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-hover);
}

.filters-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-clear-filters {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-clear-filters:hover {
    color: var(--primary);
}

.checkbox-filter-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Spinner Loader */
.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    gap: 16px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loader-wrapper p {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 500;
}

/* Error Container */
.error-container {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: var(--shadow-sm);
}

.error-icon {
    font-size: 40px;
    color: #ef4444;
    margin-bottom: 12px;
}

.error-container h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: #991b1b;
    margin-bottom: 8px;
}

.error-container p {
    font-size: 14px;
    color: #7f1d1d;
    margin-bottom: 20px;
}

/* No Results Box */
.no-results-box {
    text-align: center;
    padding: 60px 0;
}

.no-results-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results-box h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 8px;
}

.no-results-box p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.card-item {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.card-item.cat-imovel::before {
    background-color: var(--primary);
}

.card-item.cat-veiculo::before {
    background-color: var(--secondary);
}

.card-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-focus);
}

.card-badge-category {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.cat-imovel .card-badge-category {
    background-color: var(--primary-light);
    color: var(--primary);
}

.cat-veiculo .card-badge-category {
    background-color: #e0f2fe;
    color: var(--secondary);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    height: 45px;
}

.card-admin-logo {
    max-height: 36px;
    max-width: 120px;
    object-fit: contain;
}

.card-admin-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
}

.admin-txt-fallback {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
}

.badge-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-left: 8px;
}

.badge-status-available {
    background-color: var(--success-light);
    color: var(--success-text);
}

.badge-status-reserved {
    background-color: var(--warning-light);
    color: var(--warning-text);
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.card-value-group {
    background-color: var(--light);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.value-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.value-credit {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 26px;
    color: var(--dark);
    margin-top: 2px;
}

.card-details-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini-detail {
    display: flex;
    flex-direction: column;
}

.mini-lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.mini-val {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
}

.text-primary {
    color: var(--primary) !important;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.card-proposal-id {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-card-details {
    background: none;
    border: none;
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.btn-card-details:hover {
    color: var(--primary-hover);
}

.btn-card-details i {
    transition: var(--transition);
}

.btn-card-details:hover i {
    transform: translateX(3px);
}

/* Table View Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background-color: var(--light);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.7);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-category-label {
    font-size: 11px;
    font-weight: 700;
    background-color: var(--light);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.text-credit {
    font-size: 15px;
    color: var(--dark);
}

.text-entry {
    font-size: 15px;
    color: var(--primary);
}

.font-semibold {
    font-weight: 600;
}

.status-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.status-pill-available {
    background-color: var(--success-light);
    color: var(--success-text);
}

.status-pill-reserved {
    background-color: var(--warning-light);
    color: var(--warning-text);
}

.btn-table-action {
    background-color: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-table-action:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: var(--transition);
}

.modal-box {
    background-color: var(--white);
    width: 90%;
    max-width: 650px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    position: relative;
    animation: modalAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes modalAppear {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--dark);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-admin-logo {
    height: 50px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
    border-radius: var(--radius-md);
    padding: 8px;
    border: 1px solid var(--border);
}

.modal-admin-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.modal-admin-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
}

.modal-header-titles h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    color: var(--dark);
}

.modal-header-titles p {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-header-titles span {
    font-weight: 700;
    color: var(--primary);
}

.modal-content {
    padding: 24px;
}

.highlight-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.highlight-stat-item {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.credit-highlight {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(79, 70, 229, 0.15);
}

.entry-highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.15);
}

.hl-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
}

.highlight-stat-item h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    margin-top: 2px;
}

.credit-highlight h4 {
    color: var(--dark);
}

.entry-highlight h4 {
    color: var(--success-text);
}

.hl-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.details-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background-color: var(--light);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.detail-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
}

.badge-reserve {
    display: inline-block;
    width: fit-content;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
}

.badge-reserve.available {
    background-color: var(--success-light);
    color: var(--success-text);
}

.badge-reserve.reserved {
    background-color: var(--warning-light);
    color: var(--warning-text);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    background-color: var(--light);
    border-top: 1px solid var(--border);
}

/* Footer styling */
.app-footer {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 30px 0;
    border-top: 1px solid var(--dark-light);
    text-align: center;
    font-size: 13px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-partner-notice {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}

/* Seleção de Cartas para Soma */
.card-item {
    position: relative;
}

/* Checkbox flutuante nos cards */
.card-select-wrapper {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 15;
    display: flex;
    align-items: center;
}

.card-select-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid var(--border);
    transition: var(--transition);
}

/* Ajuste do header do card para afastar o conteúdo do checkbox */
.card-header {
    padding-left: 20px; /* Dá espaço para o checkbox */
}

/* Card selecionado */
.card-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15), var(--shadow-lg);
}

/* Card desativado (quando selecionada outra administradora) */
.card-item.disabled-select {
    opacity: 0.45;
    filter: grayscale(40%);
}

.card-item.disabled-select input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Tabela - Linha selecionada e desativada */
.data-table tr.selected {
    background-color: rgba(79, 70, 229, 0.04) !important;
}

.data-table tr.disabled-select {
    opacity: 0.45;
}

.data-table tr.disabled-select input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0.5;
}

.data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Barra Flutuante de Soma de Créditos */
.floating-sum-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    padding: 16px 0;
    color: var(--white);
    z-index: 999;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.sum-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.sum-bar-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sum-bar-badge {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sum-bar-admin-info {
    font-size: 13px;
    color: #94a3b8;
}

.sum-bar-totals {
    display: flex;
    gap: 40px;
}

.sum-total-item {
    display: flex;
    flex-direction: column;
}

.sum-total-lbl {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sum-total-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    color: var(--white);
}

.sum-total-item .text-primary {
    color: #38bdf8 !important; /* light blue/cyan for contrast on dark background */
}

.sum-bar-actions {
    display: flex;
    gap: 12px;
}

.sum-bar-actions .btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.sum-bar-actions .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Adiciona margem inferior ao body para o rodapé não ficar coberto pela barra flutuante */
body.has-floating-bar {
    padding-bottom: 90px;
}

@media (max-width: 768px) {
    .sum-bar-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 16px;
    }
    
    .sum-bar-info {
        align-items: center;
    }
    
    .sum-bar-totals {
        justify-content: space-around;
        gap: 10px;
    }
    
    .sum-total-val {
        font-size: 20px;
    }
    
    .sum-bar-actions {
        flex-direction: column;
    }
    
    .sum-bar-actions .btn {
        width: 100%;
    }
}

/* Esconder cards que não pertencem à mesma administradora selecionada */
.card-item.hidden-by-select {
    display: none !important;
}

tr.hidden-by-select {
    display: none !important;
}

/* Detalhamento de parcelas com prazos diferentes */
.installment-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    background-color: var(--white);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-main);
}

.breakdown-item strong {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-stats {
        width: 100%;
        justify-content: center;
    }

    .header-contact {
        width: 100%;
    }

    .header-contact .btn {
        width: 100%;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .app-main {
        margin-top: -15px;
    }

    .filters-section {
        padding: 16px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ranges-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-bar-row {
        flex-direction: column;
        gap: 12px;
    }

    .view-toggle-wrapper {
        display: none; /* Esconde alternador de tabela no mobile */
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filters-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        text-align: center;
    }

    .checkbox-filter-wrapper {
        justify-content: center;
    }

    .btn-clear-filters {
        justify-content: center;
    }

    /* Modal Overlay & Centering */
    .modal-overlay {
        align-items: flex-start;
        padding: 20px 10px;
        overflow-y: auto;
    }

    .modal-box {
        width: 100%;
        max-width: 100%;
        margin: auto;
    }

    .highlight-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .details-list-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
}

@media (max-width: 576px) {
    .modal-content {
        padding: 16px;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        font-size: 24px;
    }

    .modal-footer {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 10px;
        padding: 16px;
    }

    #modal-btn-download {
        grid-column: 1;
        grid-row: 1;
        width: 48px;
        height: 48px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #modal-btn-close {
        grid-column: 2;
        grid-row: 1;
        height: 48px;
        margin: 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    #modal-btn-whatsapp {
        grid-column: 1 / span 2;
        grid-row: 2;
        width: 100%;
        height: 48px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Floating bottom bar actions */
    .sum-bar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .sum-bar-actions #sum-btn-whatsapp {
        grid-column: 1 / span 2;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .category-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
    }

    .modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 24px 16px 16px 16px;
    }

    .modal-admin-logo {
        margin-top: 10px;
    }

    .highlight-stat-item h4 {
        font-size: 20px;
    }
}
