@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    /* Primary Colors */
    --primary: #FD9A12;
    --primary-hover: #E68A0F;
    --primary-light: #FEE8CC;
    --primary-lighter: #FFF4E6;

    /* Secondary Colors */
    --secondary: #242323;
    --secondary-light: #3A3939;
    --secondary-lighter: #5A5959;

    /* Neutral Colors */
    --background: #F8F8F8;
    --surface: #FFFFFF;
    --border: #E4E4E4;
    --divider: #EEEEEE;

    /* Text Colors */
    --text: #1A1A1A;
    --text-muted: #666666;
    --text-light: #999999;

    /* Semantic Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--secondary);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0.75rem;
}

.sidebar-logo img {
    width: 100%;
    max-height: 100px;
    /* Ajuste este valor para aumentar/diminuir a logo */
    object-fit: contain;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, #FFC847 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    margin-bottom: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateX(2px);
}

.nav-link.active {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(253, 154, 18, 0.3);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #FFFFFF;
    border-radius: 0 3px 3px 0;
}

.nav-link i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    background-color: var(--background);
}

/* Header Context */
.header-context {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.page-title h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

.filters-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-filters {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    gap: 0 !important;
}

.select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    border-right: 1px solid var(--divider);
}

.select-wrapper:last-child {
    border-right: none;
}

.select-wrapper i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

.select-wrapper select {
    border: none !important;
    background: transparent !important;
    padding: 0.75rem 0.5rem !important;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-transform: capitalize;
    width: auto !important;
    box-shadow: none !important;
}

select,
input {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    outline: none;
    background: white;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    transition: all var(--transition-fast);
}

select:focus,
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(253, 154, 18, 0.1);
}

input::placeholder {
    color: var(--text-light);
}

/* Dashboard KPIs */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
}

.kpi-card {
    background: linear-gradient(135deg, var(--surface) 0%, #FAFAFA 100%);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, #FFC847 100%);
}

.kpi-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #FFC847 100%);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.kpi-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Tables */
.table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.table-container:hover {
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: linear-gradient(180deg, var(--background) 0%, #F5F5F5 100%);
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    letter-spacing: 0.5px;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--divider);
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 400;
}

tr {
    transition: all var(--transition-fast);
}

tr:hover td {
    background-color: #FEFCF8;
}

tr:last-child td {
    border-bottom: none;
}

/* Expandable Row Styles */
.btn-expand {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: transform var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.btn-expand:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

.btn-expand.active {
    transform: rotate(90deg);
    color: var(--primary);
}

.details-row {
    animation: fadeIn var(--transition-base) ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

tbody tr:first-child td {
    padding-top: 1rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-transform: capitalize;
    transition: all var(--transition-fast);
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.status-pago {
    background: linear-gradient(135deg, var(--success-light) 0%, #C3FDD9 100%);
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.status-atrasado {
    background: linear-gradient(135deg, var(--error-light) 0%, #FFCCCB 100%);
    color: #7F1D1D;
    border: 1px solid #FECACA;
}

.status-em_aberto {
    background: linear-gradient(135deg, var(--warning-light) 0%, #FDE68A 100%);
    color: #78350F;
    border: 1px solid #FCD34D;
}

.status-ativo {
    background: linear-gradient(135deg, var(--info-light) 0%, #BFDBFE 100%);
    color: #1E3A8A;
    border: 1px solid #93C5FD;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #FFC847 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(253, 154, 18, 0.3);
    font-weight: 700;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #FFB830 100%);
    box-shadow: 0 6px 20px rgba(253, 154, 18, 0.4);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    border: 1.5px solid var(--border);
    color: var(--text);
    font-weight: 600;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, #FFC847 100%);
    border-radius: 10px;
    border: 2px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-hover) 0%, #FFB830 100%);
}

/* Firefox Scrollbar */
* {
    scrollbar-color: var(--primary) var(--background);
    scrollbar-width: thin;
}

/* Dashboard Shortcut section */
.shortcuts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
}

.shortcut-btn {
    background: linear-gradient(135deg, var(--surface) 0%, #FAFAFA 100%);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition-base);
    cursor: pointer;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.shortcut-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, #FFC847 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.shortcut-btn:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.shortcut-btn:hover::before {
    opacity: 1;
}

.shortcut-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(253, 154, 18, 0.1) 0%, rgba(255, 200, 71, 0.1) 100%);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-base);
}

.shortcut-btn:hover .shortcut-icon {
    background: linear-gradient(135deg, var(--primary) 0%, #FFC847 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.shortcut-label {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text);
}

/* Custom Suggestion Dropdown */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.suggestion-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 8px;
    display: none;
    animation: slideDown var(--transition-fast) ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-list.active {
    display: block;
}

.suggestion-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-weight: 500;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--primary-lighter);
    color: var(--primary);
    padding-left: 1.5rem;
}

.suggestion-item .type-badge {
    font-size: 0.65rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Forms & Inputs */
textarea,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background-color: white;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    transition: all var(--transition-base);
    outline: none;
}

textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(253, 154, 18, 0.08);
    background-color: #FFFBF8;
}

textarea:disabled,
select:disabled,
input:disabled {
    background-color: var(--background);
    color: var(--text-light);
    cursor: not-allowed;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

a:active {
    opacity: 0.8;
}

/* Cards & Containers */
.card {
    background: linear-gradient(135deg, var(--surface) 0%, #FAFAFA 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Modals & Dialogs */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalIn var(--transition-base) ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color var(--transition-fast);
}

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

/* Elegant Form Restyle */
.form-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    animation: slideDown var(--transition-base) ease-out;
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--divider);
}

.form-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-light), transparent);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--divider);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    width: 18px;
}

.input-icon-wrapper input, 
.input-icon-wrapper select {
    padding-left: 3rem;
}

.tip-text {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
    font-style: italic;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base) ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    padding: 2rem;
    animation: slideUp var(--transition-base) ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

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

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-left: 4px solid;
    animation: slideDown var(--transition-base) ease-out;
}

.alert-success {
    background: var(--success-light);
    color: #065F46;
    border-left-color: var(--success);
}

.alert-error {
    background: var(--error-light);
    color: #7F1D1D;
    border-left-color: var(--error);
}

.alert-warning {
    background: var(--warning-light);
    color: #78350F;
    border-left-color: var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: #1E3A8A;
    border-left-color: var(--info);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
    color: var(--primary);
}

.badge-secondary {
    background: var(--background);
    color: var(--text-muted);
}

/* Separators */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 1.5rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        padding: 1.5rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .header-context {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        padding: 1rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .page-title h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 1rem;
        gap: 1.5rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .shortcuts-section {
        grid-template-columns: repeat(2, 1fr);
    }

    table {
        font-size: 0.8rem;
    }

    td,
    th {
        padding: 0.75rem;
    }

    .filters-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sidebar {
        display: none;
    }

    .app-container {
        flex-direction: column;
    }

    .page-title h1 {
        font-size: 1.25rem;
    }

    .main-content {
        padding: 1rem;
    }

    .shortcuts-section {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Professional Login Page (Melhoria 1) */
.login-page {
    background: var(--secondary);
}

.login-card {
    border-top: 4px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
}

/* Modals (Refined) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Financial Reports Print Styles (Melhoria 6) */
@media print {
    .sidebar, .btn, .filters-group, .modal, .no-print, .user-info {
        display: none !important;
    }
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
        width: 100% !important;
    }
    .table-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        overflow: visible !important;
    }
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    body {
        background: white !important;
    }
}