* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Cores de fundo */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --bg-muted: #f3f4f6;
    
    /* Cores de texto */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    /* Bordas */
    --border-color: #e5e7eb;
    --border-radius: 8px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-bg: #1f2937;
    --sidebar-text: #d1d5db;
    --sidebar-active: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.logo:hover,
.logo:focus {
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
}

.nav-menu {
    display: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Reset para links: sem underline em todo o site */
a {
    text-decoration: none;
    color: inherit;
}

a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
    
    .menu-toggle {
        display: none;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-muted);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/* Hero layout with image */
.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 520px;
}

@media (min-width: 768px) {
    .hero-layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .hero-content {
        flex: 1 1 50%;
        text-align: left;
        padding-right: 1.5rem;
    }

    .hero-image {
        flex: 1 1 45%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Sections */
.section {
    padding: 4rem 1rem;
}

.section-alt {
    background: var(--bg-card);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-2 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.grid-3 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin: 1rem 0;
}

.card-header {
    margin-bottom: 1.5rem;
}

/* Danger card header: position relative so danger button can be top-right */
.card.card-danger .card-header {
    position: relative;
}

.card.card-danger .card-header .danger-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body {
    color: var(--text-secondary);
}

.feature-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Aumentar e centralizar ícone e textos na seção de funcionalidades */
#funcionalidades .grid .card {
    text-align: center;
}

#funcionalidades .feature-icon {
    font-size: 4rem;
    margin: 0 auto 1rem;
    display: block;
    line-height: 1;
}

#funcionalidades .grid .card h3,
#funcionalidades .grid .card p {
    text-align: center;
}

/* Pricing */
.pricing-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
}

.pricing-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    margin: 0;
    min-height: 240px;
    max-width: none;
    justify-self: stretch;
}

/* Individual plan heading style */
.plan h3 {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Toggle styles */
.pricing-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.pricing-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 999px;
    display: inline-flex;
}
.pricing-toggle .toggle-option {
    background: transparent;
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
}
.pricing-toggle .toggle-option.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.status-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    justify-content: center;
}

.status-toggle .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.status-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.status-toggle .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border-color);
    border-radius: 24px;
    transition: background 0.2s ease;
}

.status-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.status-toggle input:checked + .slider {
    background: var(--success);
}

.status-toggle input:checked + .slider:before {
    transform: translateX(20px);
}

.slider-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px;
    border-radius: 999px;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    overflow: hidden;
    width: 100%;
    min-width: 210px;
    margin-top: 0.5rem;
}

.slider-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: 999px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background-color 0.3s;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.slider-toggle--status-1::after { transform: translateX(0%); background-color: var(--success); }
.slider-toggle--status-2::after { transform: translateX(100%); background-color: var(--warning); }
.slider-toggle--status-3::after { transform: translateX(200%); background-color: var(--danger); }

.slider-toggle-two {
    min-width: 160px;
}

.slider-toggle-two::after {
    width: calc((100% - 6px) / 2);
    left: 3px;
}

.slider-toggle-two.slider-toggle--status-1::after {
    transform: translateX(0%);
    background-color: var(--warning);
}

.slider-toggle-two.slider-toggle--status-2::after {
    transform: translateX(100%);
    background-color: var(--success);
}

.slider-toggle button {
    position: relative;
    z-index: 2;
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 2px;
    text-align: center;
    outline: none;
}

.slider-toggle button:hover:not(:disabled) {
    color: var(--primary);
}

.slider-toggle button:disabled {
    color: #fff;
    cursor: default;
}

/* Price visibility by period */
.pricing-grid[data-period="yearly"] .price-monthly { display: none; }
.pricing-grid[data-period="yearly"] .price-yearly { display: block; }
.pricing-grid[data-period="monthly"] .price-yearly { display: none; }
.pricing-grid[data-period="monthly"] .price-monthly { display: block; }

.price-row { display: block; margin-bottom: 0.75rem; }
.featured-row { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.session-timer {
    text-align: center;
    padding: 0.5rem 0;
}
.session-timer .small-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.1;
}
.session-timer #sessionTimer {
    display: inline-block;
    margin-left: 0.35rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-white);
}

@media (max-width: 480px) {
    .session-timer .small-text { font-size: 0.9rem; }
    .session-timer #sessionTimer { font-size: 1rem; }
}

.pricing-featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features i {
    color: var(--success);
}

.floating-support {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    top: auto;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.support-toggle {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.65rem 1.35rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.support-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.5rem);
    width: 320px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    box-shadow: var(--shadow-xl);
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.support-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.support-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.support-header h4 {
    margin: 0;
    font-size: 1rem;
}

.support-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.support-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
}

.support-panel form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.support-panel label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.support-panel input,
.support-panel textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-default);
    transition: border 0.2s ease;
}

.support-panel input:focus,
.support-panel textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-block {
    width: 100%;
    text-align: center;
}

@media (max-width: 768px) {
    .floating-support {
        right: 1rem;
        bottom: 1rem;
    }

    .support-panel {
        width: 280px;
    }
}

/* Advantages */
.advantages-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 900px;
    margin: 0 auto;
}

.advantage-item {
    text-align: center;
}

.advantage-item i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.advantage-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer,
.site-footer {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}

.footer {
    padding: 3rem 1rem 1rem;
}

.footer-content {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--sidebar-text);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

/* Forçar links do rodapé brancos e sem underline */
.footer a,
.footer-section a,
.footer-bottom a,
.site-footer a {
    color: white !important;
    text-decoration: none !important;
}
.footer a:hover,
.footer-section a:hover,
.footer-bottom a:hover,
.site-footer a:hover {
    color: white !important;
    text-decoration: none !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer {
    padding: 1.5rem 1rem;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: var(--sidebar-text);
}

.painel-body .site-footer {
    width: 100%;
    margin-top: auto;
}

.painel-body > .site-footer {
    flex-basis: 100%;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin: 1rem 0 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: none;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.25rem 0;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Make select text slightly smaller for better fit */
select.form-control,
select.form-control option {
    font-size: 0.9rem;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-grid-6 {
    display: grid;
    gap: 1rem;
    /* Fixed 6-column layout on desktop */
    grid-template-columns: repeat(6, 1fr);
}

/* Keep a slightly smaller gap on small screens */
@media (max-width: 768px) {
    .form-grid-6 {
        gap: 0.75rem;
    }
}

/* Responsive adjustments for .form-grid-6 */
@media (max-width: 1200px) {
    .form-grid-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .form-grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .form-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .form-grid-6 { grid-template-columns: 1fr; }
}

/* Ensure each form-group occupies one column inside the 6-column grid */
.form-grid-6 .form-group { grid-column: span 1; }

.form-grid-5 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
    .form-grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .form-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .form-grid-5 {
        grid-template-columns: 1fr;
    }
}

/* Ensure individual form groups inside a 5-column grid occupy one column each,
   while `.full-width` still spans all columns. This forces 5 campos por linha. */
.form-grid-5 .form-group {
    grid-column: span 1;
}


.form-grid-3 {
    display: grid;
    gap: 1rem;
    /* Fixed 3-column layout on desktop, collapses on narrower screens */
    grid-template-columns: repeat(3, 1fr);
}

.form-grid-tarefas {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 3fr;
}

@media (max-width: 768px) {
    .form-grid-tarefas {
        grid-template-columns: 1fr;
    }
}

.form-grid-compras {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr 1fr 3fr 1fr;
}

.form-grid-compras .form-group {
    grid-column: span 1;
}

@media (max-width: 992px) {
    .form-grid-compras {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .form-grid-compras {
        grid-template-columns: 1fr;
    }
}

/* 4-column form grid (used for veiculos forms) */
.form-grid-4 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .form-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .form-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .form-grid-4 { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* Ensure each form-group occupies one column inside the 4-column grid */
.form-grid-4 .form-group { grid-column: span 1; }

@media (max-width: 992px) {
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }
}

@media (max-width: 768px) {
    .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.full-width,
.form-group.full-width {
    grid-column: 1 / -1 !important;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Painel Layout */
.painel-body {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -var(--sidebar-width);
    height: 100vh;
    transition: left 0.3s;
    z-index: 1000;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-header .logo {
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--border-radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.sidebar-nav .nav-item i {
    min-width: 24px;
    text-align: center;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav .nav-item span {
    line-height: 1;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: white;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 0;
}

.mobile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.content-wrapper {
    flex: 1;
    padding: 1.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 2rem;
}

.text-muted {
    color: var(--text-muted);
}

@media (min-width: 1024px) {
    .sidebar {
        left: 0;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .mobile-header {
        display: none;
    }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 2rem;
}

.card-stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 2rem;
}

.card-stats .stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-stats .stat h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-stats .stat p {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.card-stats .stat-receber p {
    color: var(--success);
}

.card-stats .stat-pagar p {
    color: var(--danger);
}

.card-stats .stat-projetado p {
    color: var(--primary);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.2;
}

.stat-success .stat-value {
    color: var(--success);
}

.stat-success .stat-icon {
    color: var(--success);
}

.stat-danger .stat-value {
    color: var(--danger);
}

.stat-danger .stat-icon {
    color: var(--danger);
}

/* Alerts */
.alert {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Close button for server-rendered alerts */
.alert {
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.alert .alert-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.alert .alert-close:hover {
    color: var(--text-primary);
}

.alert.fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

/* Body wrapper for alert title + text */
.alert-body {
    display: block;
}

.alert-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.alert-text {
    display: block;
    color: var(--text-secondary);
}

/* Simple modal for messages */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
}
.modal {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}
.modal h3 {
    margin: 0 0 0.5rem 0;
}
.modal p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.alert-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-success .alert-icon {
    background: var(--success);
}

.alert-success .alert-title {
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-warning .alert-icon {
    background: var(--warning);
}

.alert-warning .alert-title {
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-danger .alert-icon {
    background: var(--danger);
}

.alert-danger .alert-title {
    color: var(--danger);
}

.debug-panel {
    margin: 1.5rem auto;
    max-width: 1200px;
    padding: 1rem 1.25rem;
    background: rgba(254, 226, 226, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.6);
    border-radius: var(--border-radius);
    color: var(--danger);
    font-size: 0.95rem;
    line-height: 1.4;
}

.debug-panel ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

/* Progress */
.progress-item {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-muted);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s;
}

.bg-success {
    background: var(--success);
}

.bg-danger {
    background: var(--danger);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Shortcuts */
.shortcuts-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

.shortcut-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.shortcut-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.shortcut-btn i {
    font-size: 1.5rem;
}

.shortcut-btn span {
    font-size: 0.75rem;
    text-align: center;
}

#parcelasContainer {
    display: contents;
}

#parcelasContainer .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#parcelasContainer .parcelas-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: flex-start;
}

#parcelasContainer .parcelas-row .form-control {
    width: 100%;
}

.parcelamento-field label {
    display: block;
    margin-bottom: 0.25rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}
.table .col-5 { width: 5%; }
.table .col-10 { width: 10%; }
.table .col-15 { width: 15%; }
.table .col-20 { width: 20%; }
.table .col-25 { width: 25%; }
.table .col-30 { width: 30%; }
.table .col-35 { width: 35%; }
.table .col-40 { width: 40%; }
.table .col-45 { width: 45%; }
.table .col-50 { width: 50%; }
.table .col-55 { width: 55%; }
.table .col-60 { width: 60%; }
.table .col-65 { width: 65%; }
.table .col-70 { width: 70%; }
.table .col-75 { width: 75%; }
.table .col-80 { width: 80%; }
.table .col-85 { width: 85%; }
.table .col-90 { width: 90%; }
.table .col-95 { width: 95%; }
.table .col-100 { width: 100%; }

.table thead {
    background: var(--bg-muted);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.text-start {
    text-align: left;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: var(--bg-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filters */
.filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.align-end {
    align-self: end;
}

/* Chart Placeholder */
.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--bg-muted);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
}

.chart-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Column for names should be left-aligned */
.col-name {
    text-align: left;
}

.table tbody td.col-name {
    text-align: center;
}
.table tbody td.col-name .flex-with-icon {
    justify-content: center;
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Utility for hiding elements (used instead of inline styles) */
.hidden {
    display: none !important;
}

.address-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: wait;
    z-index: 1050;
}

.address-loading-overlay.hidden {
    display: none;
}

.address-loading-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-weight: 600;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinner 0.9s linear infinite;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Danger styles for cards and buttons */
.card-danger {
    border-color: var(--danger);
    margin: 1rem 0;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.small-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Form check inputs (checkboxes / radios) */
.form-check-input {
    width: auto;
    margin: 0;
    vertical-align: middle;
}

/* Utility for flex items with icon/text */
.flex-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Utility width helpers (used instead of inline width styles) */
.w-75 { width: 75%; }
.w-45 { width: 45%; }

/* Input with Icon Wrapper */
.input-with-icon {
    position: relative;
    display: block;
}

.input-with-icon input{
    width: 100%;
}


.input-with-icon .form-control {
    padding-right: 2.5rem;
}

.input-with-icon .btn-icon {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.input-with-icon .btn-icon:hover {
    color: var(--primary);
}
