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

/* =============================================================================
   CSS DESIGN SYSTEM - BPO MOVVE
   Baseado no padrão visual do Dashboard da Agência Movve
   ============================================================================= */

:root {
    /* =========================================================================
       CORES PRINCIPAIS - Padrão Movve
       ========================================================================= */

    /* Primária - Azul Movve */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --primary-hover: #1E40AF;

    /* Estados */
    --success: #10B981;
    --success-light: #34D399;
    --warning: #F59E0B;
    --warning-light: #FBBF24;
    --danger: #EF4444;
    --danger-light: #F87171;
    --info: #06B6D4;

    /* =========================================================================
       BACKGROUNDS - Estilo Movve
       ========================================================================= */
    --bg-body: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1E293B;
    --bg-sidebar-dark: #0F172A;
    --bg-input: #FFFFFF;

    /* =========================================================================
       TEXTO
       ========================================================================= */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-light: #CBD5E1;
    --text-on-sidebar: #94A3B8;
    --text-on-sidebar-active: #FFFFFF;

    /* =========================================================================
       BORDAS E SOMBRAS
       ========================================================================= */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    /* Sombras suaves */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);

    /* =========================================================================
       DIMENSÕES
       ========================================================================= */
    --sidebar-width: 240px;
    --header-height: 64px;

    /* =========================================================================
       TRANSIÇÕES
       ========================================================================= */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Alias */
    --text-main: var(--text-primary);
    --color-primary: var(--primary);
    --color-success: var(--success);
    --color-warning: var(--warning);
    --color-danger: var(--danger);
    --color-border: var(--border-color);
}

/* =============================================================================
   TEMA ESCURO
   ============================================================================= */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg-body: #0F172A;
    --bg-card: #1E293B;
    --bg-input: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #334155;
    --border-light: #1E293B;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .form-control {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .table th {
    background: var(--bg-card);
}

html[data-theme="dark"] .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-footer {
    background: var(--bg-card);
}

html[data-theme="dark"] .card-footer {
    background: rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .stat-card-icon {
    background: rgba(37, 99, 235, 0.2);
}

html[data-theme="dark"] .stat-card-icon.success {
    background: rgba(16, 185, 129, 0.2);
}

html[data-theme="dark"] .stat-card-icon.warning {
    background: rgba(245, 158, 11, 0.2);
}

html[data-theme="dark"] .stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.2);
}

html[data-theme="dark"] .badge-info {
    background: rgba(37, 99, 235, 0.2);
    color: #93C5FD;
}

html[data-theme="dark"] .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

html[data-theme="dark"] .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
}

html[data-theme="dark"] .badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

html[data-theme="dark"] .mobile-topbar {
    background: rgba(15, 23, 42, 0.95);
    border-color: var(--border-color);
}

html[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
    border-color: rgba(16, 185, 129, 0.3);
}

html[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, 0.3);
}

html[data-theme="dark"] .toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* =============================================================================
   RESET E BASE
   ============================================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
}

/* =============================================================================
   TIPOGRAFIA
   ============================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.375rem;
}

h3 {
    font-size: 1.125rem;
}

h4 {
    font-size: 1rem;
}

/* =============================================================================
   LAYOUT
   ============================================================================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* =============================================================================
   SIDEBAR - Estilo Premium Ultra Movve
   ============================================================================= */
.sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform var(--transition-slow);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* Efeito de padrão sutil no fundo */
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.logo-link:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 10px;
    position: relative;
    z-index: 1;
}

/* Scrollbar estilizado para sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    padding: 20px 12px 8px;
    font-weight: 700;
}

.nav-item {
    margin-bottom: 1px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #64748b;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
    color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.2s;
}

.nav-link:hover .nav-icon {
    opacity: 0.9;
}

.nav-item.active .nav-link .nav-icon {
    opacity: 1;
    color: #60a5fa;
}

/* Sidebar Footer Premium */
.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.user-role {
    font-size: 10px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 1px;
}

.btn-logout {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.btn-logout svg {
    width: 16px;
    height: 16px;
}

/* =============================================================================
   CONTEÚDO PRINCIPAL
   ============================================================================= */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

.mobile-topbar {
    display: none;
}

.mobile-overlay {
    display: none;
}

.content-wrapper {
    padding: 24px 32px;
    width: 100%;
}

/* =============================================================================
   HEADER DA PÁGINA
   ============================================================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* =============================================================================
   FILTRO DE DATA - Estilo Movve
   ============================================================================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* =============================================================================
   CARDS
   ============================================================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

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

.card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-body);
}

/* =============================================================================
   ESTATÍSTICAS - Estilo Movve
   ============================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.stat-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-card-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-card-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card-icon svg {
    width: 20px;
    height: 20px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* =============================================================================
   BADGES
   ============================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* =============================================================================
   BOTÕES
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-body);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-body);
    color: var(--text-primary);
}

.btn-ghost-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* =============================================================================
   TABELAS
   ============================================================================= */
.table-container {
    overflow-x: auto;
}

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

.table th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-align: left;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

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

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* =============================================================================
   FORMULÁRIOS
   ============================================================================= */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* =============================================================================
   ALERTAS
   ============================================================================= */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error,
.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success,
.alert.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* =============================================================================
   EMPTY STATE
   ============================================================================= */
.empty-state {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 300px;
}

/* =============================================================================
   MODAIS
   ============================================================================= */
.modal-container {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-container:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 480px;
    border-radius: var(--border-radius-lg);
    position: relative;
    z-index: 101;
    box-shadow: var(--shadow-lg);
    animation: modalIn var(--transition) ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
}

.modal-close:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-body);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* =============================================================================
   TOAST
   ============================================================================= */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-left: 3px solid var(--primary);
    animation: toastIn var(--transition-slow) ease-out;
    font-size: 14px;
    font-weight: 500;
    min-width: 260px;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* =============================================================================
   LOGIN
   ============================================================================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-sidebar);
    padding: 16px;
}

.login-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-logo {
    height: 36px;
    margin-bottom: 24px;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.login-form {
    text-align: left;
}

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
}

/* =============================================================================
   GRIDS
   ============================================================================= */
.grid {
    display: grid;
    gap: 16px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* =============================================================================
   UTILITÁRIOS
   ============================================================================= */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.mt-3 {
    margin-top: 12px;
}

.mb-3 {
    margin-bottom: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* =============================================================================
   RESPONSIVO
   ============================================================================= */
@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .sidebar {
        transform: translateX(-100%);
        width: min(85vw, var(--sidebar-width));
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px);
        z-index: 45;
        display: none;
    }

    body.sidebar-open .mobile-overlay {
        display: block;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        padding: 0 16px;
        position: sticky;
        top: 0;
        z-index: 40;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
        background: var(--bg-card);
        color: var(--text-primary);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
    }

    .mobile-topbar-title {
        font-weight: 600;
        font-size: 14px;
        color: var(--text-primary);
    }

    .mobile-topbar-logo {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-topbar-logo img {
        height: 20px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .content-wrapper {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .page-title {
        font-size: 20px;
    }

    .page-header-right {
        width: 100%;
    }

    .page-header-right .btn {
        flex: 1;
        justify-content: center;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-input {
        flex: 1;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .card-footer {
        flex-direction: column;
        gap: 12px;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
    }

    .table {
        min-width: 600px;
    }

    .form-control {
        font-size: 16px;
    }

    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .login-card {
        padding: 24px;
    }
}

/* =============================================================================
   SVG OVERRIDES - Correção de tamanhos
   Estas regras sobrepõem o reset da linha 229 (img,svg {max-width:100%})
   ============================================================================= */

/* Stats icon wrapper - container 48px */
.stats-icon-wrapper {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stats-icon-wrapper.blue {
    background-color: #DBEAFE;
    color: #2563EB;
}

.stats-icon-wrapper.green {
    background-color: #D1FAE5;
    color: #10B981;
}

.stats-icon-wrapper.orange {
    background-color: #FEF3C7;
    color: #F59E0B;
}

.stats-icon-wrapper.red {
    background-color: #FEE2E2;
    color: #EF4444;
}

/* Stats icon wrapper SVG - ícone 24px */
.stats-icon-wrapper svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* Monte Carlo cards SVG */
div[style*="linear-gradient"] svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    max-width: 20px;
    flex-shrink: 0;
    display: inline-block !important;
}

/* Filter buttons SVG */
.filter-btn svg {
    width: 14px !important;
    height: 14px !important;
    display: inline-block !important;
}

/* Empty state icon */
.empty-state-icon svg {
    width: 64px !important;
    height: 64px !important;
}

/* Table actions */
.table-actions svg {
    width: 18px !important;
    height: 18px !important;
}