/* ═══════════════════════════════════════════════════════════════════
   NEOARTE MECÂNICA - Sistema de Gestão Automotiva
   Design System v2.0 - Modern Professional Dark Theme
   ═══════════════════════════════════════════════════════════════════ */

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

/* ══════════════════════════════════════════════════════════════════
   CSS VARIABLES - Design Tokens
   ══════════════════════════════════════════════════════════════════ */
:root {
    /* Core Colors */
    --bg-base: #0a0a0f;
    --bg-elevated: #12121a;
    --bg-surface: #1a1a24;
    --bg-surface-2: #22222e;
    --bg-hover: #2a2a38;
    
    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-primary-soft: rgba(99, 102, 241, 0.12);
    --accent-primary-glow: rgba(99, 102, 241, 0.25);
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    
    /* Status Colors */
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.12);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;
    
    /* Border Colors */
    --border-subtle: rgba(148, 163, 184, 0.08);
    --border-default: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.18);
    --border-accent: rgba(99, 102, 241, 0.4);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--accent-primary-glow);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Layout */
    --sidebar-width: 280px;
    --topbar-height: 80px;
}

/* ══════════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.08), transparent);
    pointer-events: none;
    z-index: -1;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ══════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════
   APP SHELL - Main Layout
   ══════════════════════════════════════════════════════════════════ */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR - Navigation
   ══════════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-base) 100%);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-slow);
}

/* Brand Block */
.brand-block {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
    box-shadow: var(--shadow-glow);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.brand-info strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-info small,
.brand-block small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
    transition: height var(--transition-base);
}

.nav-item:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary-soft);
    color: var(--accent-primary);
}

.nav-item.active::before {
    height: 24px;
}

.nav-item span:first-child {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

/* Sidebar User */
.sidebar-user {
    padding: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.sidebar-user-inner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

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

.sidebar-user-info strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ══════════════════════════════════════════════════════════════════
   CONTENT AREA - Main Content
   ══════════════════════════════════════════════════════════════════ */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl);
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════════
   TOPBAR - Header
   ══════════════════════════════════════════════════════════════════ */
.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.topbar-left h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.topbar-left p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    max-width: 600px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.toggle-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.toggle-button:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS - All Button Styles
   ══════════════════════════════════════════════════════════════════ */
.btn,
.btn-secondary,
.btn-danger,
.btn-ghost,
.btn-success,
.btn-warning,
.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

/* Primary Button */
.btn,
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

/* Danger Button */
.btn-danger {
    background: var(--danger-soft);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Success Button */
.btn-success {
    background: var(--success-soft);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

/* Warning Button */
.btn-warning {
    background: var(--warning-soft);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

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

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

/* Logout Link */
.logout-link {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.logout-link:hover {
    background: var(--danger-soft);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
}

/* Small Button */
.btn-sm {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

/* ══════════════════════════════════════════════════════════════════
   CARDS - Content Containers
   ══════════════════════════════════════════════════════════════════ */
.card,
.section-card {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-lg);
}

.card h2,
.card h3 {
    margin-bottom: var(--space-sm);
}

.card-value {
    font-size: 2.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-label {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* ══════════════════════════════════════════════════════════════════
   GRID LAYOUTS
   ══════════════════════════════════════════════════════════════════ */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* ══════════════════════════════════════════════════════════════════
   SUMMARY CARDS - KPI Cards
   ══════════════════════════════════════════════════════════════════ */
.summary-card {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.summary-card:hover::before {
    opacity: 1;
}

.summary-label {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.summary-foot {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    margin-top: var(--space-sm);
}

/* ══════════════════════════════════════════════════════════════════
   STATS GRID - Dashboard KPIs
   ══════════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-sm {
    padding: var(--space-md);
}

.stat-card-sm .stat-value {
    font-size: 1.25rem;
}

.stat-card-sm .stat-label {
    font-size: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.page-header-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.page-header-content p {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

.page-header-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   CARD HEADER
   ══════════════════════════════════════════════════════════════════ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.card-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.card-body {
    /* Body padding if needed */
}

/* ══════════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════════════ */
.form-section {
    margin-bottom: var(--space-xl);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

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

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

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    transition: all var(--transition-base);
}

.form-control:hover {
    border-color: var(--border-strong);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-soft);
}

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

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

/* ══════════════════════════════════════════════════════════════════
   TABLE RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
}

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

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.table th {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-surface);
}

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

.table tbody tr:hover {
    background: var(--bg-surface);
}

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

/* ══════════════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════════════ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.alert-success {
    background: var(--success-soft);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-danger {
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: var(--warning-soft);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: var(--info-soft);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* ══════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    margin-top: var(--space-lg);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.pagination span.active {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.pagination span.disabled {
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: not-allowed;
}
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

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

th, td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

th {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-surface);
}

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

tbody tr:hover {
    background: var(--bg-surface);
}

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

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

/* ══════════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--success-soft);
    color: #6ee7b7;
}

.badge-warning {
    background: var(--warning-soft);
    color: #fcd34d;
}

.badge-danger {
    background: var(--danger-soft);
    color: #fca5a5;
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
}

.badge-info {
    background: var(--info-soft);
    color: #93c5fd;
}

/* ══════════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════════ */
.field {
    margin-bottom: var(--space-lg);
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea,
.inline-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    transition: all var(--transition-base);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-soft);
}

.field input::placeholder,
.field textarea::placeholder,
.inline-input::placeholder {
    color: var(--text-muted);
}

.field select {
    cursor: pointer;
    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%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.field-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.helper,
.form-caption {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    margin-top: var(--space-sm);
}

/* ══════════════════════════════════════════════════════════════════
   FORM CARD - Login/Auth
   ══════════════════════════════════════════════════════════════════ */
.form-card {
    max-width: 440px;
    margin: 10vh auto;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
}

.form-card h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

/* ══════════════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════════════ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-soft);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

.alert-error {
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fecaca;
}

.alert-warning {
    background: var(--warning-soft);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fef3c7;
}

.alert-info {
    background: var(--info-soft);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
}

.alert-inline {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
}

.alert-inline.success {
    background: var(--success-soft);
    color: #a7f3d0;
}

.alert-inline.error {
    background: var(--danger-soft);
    color: #fecaca;
}

/* ══════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════════════════════════════════ */
.section-header,
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.section-header h2,
.section-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.section-header p,
.section-head p,
.page-subtitle {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* ══════════════════════════════════════════════════════════════════
   FILTERS & SEARCH
   ══════════════════════════════════════════════════════════════════ */
.filters-bar,
.page-actions,
.form-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.filters-grid .field {
    margin: 0;
}

.search-input {
    min-width: 300px;
}

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.empty-state,
.empty-box,
.empty-large {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-lg);
}

.empty-state h3,
.empty-large h3 {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

/* ══════════════════════════════════════════════════════════════════
   PERMISSIONS
   ══════════════════════════════════════════════════════════════════ */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.permission-group {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.permission-group strong {
    display: block;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    margin-top: 2px;
}

.permission-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
}

.employee-picker {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.employee-picker-card {
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

.employee-picker-card:hover {
    border-color: var(--border-strong);
}

.employee-picker-card.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary-soft);
}

/* ══════════════════════════════════════════════════════════════════
   FORM LAYOUTS
   ══════════════════════════════════════════════════════════════════ */
.form-shell {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: var(--space-xl);
}

.sticky-side {
    position: sticky;
    top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.form-grid .field {
    margin: 0;
}

.field-span-2 {
    grid-column: span 2;
}

.field-span-3 {
    grid-column: span 3;
}

/* ══════════════════════════════════════════════════════════════════
   INFO ITEMS
   ══════════════════════════════════════════════════════════════════ */
.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.info-item {
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.info-item strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.info-item span,
.info-item p {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ══════════════════════════════════════════════════════════════════
   HINT BOX
   ══════════════════════════════════════════════════════════════════ */
.hint-box {
    background: var(--accent-primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

/* ══════════════════════════════════════════════════════════════════
   LIST CARDS
   ══════════════════════════════════════════════════════════════════ */
.list-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════
   MINI LIST
   ══════════════════════════════════════════════════════════════════ */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.mini-item {
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.mini-item strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
}

.mini-item span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ══════════════════════════════════════════════════════════════════
   KPI INLINE
   ══════════════════════════════════════════════════════════════════ */
.kpi-inline {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.kpi-chip {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ══════════════════════════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════════════════════════ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.toolbar-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.toolbar-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.toolbar-note {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

/* ══════════════════════════════════════════════════════════════════
   EMPLOYEE STYLES
   ══════════════════════════════════════════════════════════════════ */
.employee-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.employee-meta {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   ACTIONS
   ══════════════════════════════════════════════════════════════════ */
.actions-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.actions-row {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.inline-btns {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════
   INLINE INPUT GROUP
   ══════════════════════════════════════════════════════════════════ */
.input-inline-group {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    flex-wrap: wrap;
}

.input-inline-group .inline-input {
    max-width: 150px;
}

/* ══════════════════════════════════════════════════════════════════
   MINI STAT
   ══════════════════════════════════════════════════════════════════ */
.mini-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mini-stat strong {
    font-size: 1.125rem;
}

/* ══════════════════════════════════════════════════════════════════
   PLACEHOLDER
   ══════════════════════════════════════════════════════════════════ */
.placeholder-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.placeholder-item {
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

/* ══════════════════════════════════════════════════════════════════
   MUTED TEXT
   ══════════════════════════════════════════════════════════════════ */
.muted-small {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ══════════════════════════════════════════════════════════════════
   PANEL SOFT
   ══════════════════════════════════════════════════════════════════ */
.panel-soft {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

/* ══════════════════════════════════════════════════════════════════
   SECTION BLOCK
   ══════════════════════════════════════════════════════════════════ */
.section-block {
    margin-top: var(--space-xl);
}

/* ══════════════════════════════════════════════════════════════════
   FORM SECTION
   ══════════════════════════════════════════════════════════════════ */
.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 var(--space-sm);
}

.form-section-note {
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
}

/* ══════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--space-xl);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.pagination span.active,
.pagination .active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD SPECIFIC STYLES
   ══════════════════════════════════════════════════════════════════ */

/* Quick Access Cards */
.quick-cards,
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.quick-card {
    display: block;
    text-decoration: none;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    color: inherit;
}

.quick-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.quick-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.quick-card p {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   TABS SYSTEM - Sistema de Abas
   ══════════════════════════════════════════════════════════════════ */
.tabs-container {
    margin-bottom: var(--space-xl);
}

.tabs-nav {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    padding-bottom: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-base);
    white-space: nowrap;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.tab-btn.active {
    color: var(--accent-primary);
    background: var(--bg-surface);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px 2px 0 0;
}

.tab-btn .tab-icon {
    font-size: 1.125rem;
}

.tab-btn .tab-badge {
    background: var(--accent-primary-soft);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* ══════════════════════════════════════════════════════════════════
   VEHICLE CARDS - Carteira de Veículos
   ══════════════════════════════════════════════════════════════════ */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.vehicle-card-item {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.vehicle-card-item:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg);
}

.vehicle-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.vehicle-plate {
    background: var(--accent-gradient);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

.vehicle-model {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-client {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.vehicle-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.vehicle-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.vehicle-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-base);
    border-radius: var(--radius-md);
}

.vehicle-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.stat-text {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vehicle-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════
   CLIENT CARDS - Carteira de Clientes
   ══════════════════════════════════════════════════════════════════ */
.client-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.client-card-item {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.client-card-item:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg);
}

.client-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.client-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

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

.client-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-company {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.client-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.client-detail {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.client-detail span:first-child {
    font-size: 1rem;
}

.client-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-base);
    border-radius: var(--radius-md);
}

.client-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.client-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-tertiary);
}

.empty-state span {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.metric-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--accent-gradient);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.metric-label {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.metric-note {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--accent-gradient);
    opacity: 0.08;
    border-radius: 50%;
    filter: blur(60px);
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.hero-top h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.hero-sub {
    color: var(--text-tertiary);
    max-width: 600px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Filter Panel */
.filter-panel {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: var(--space-md);
    align-items: end;
}

.filter-grid .field {
    margin: 0;
}

.result-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Client Cards */
.client-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.client-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.8fr auto;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.client-card:hover {
    border-color: var(--border-strong);
}

.client-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.client-meta,
.client-note {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.client-note {
    margin-top: var(--space-sm);
}

.client-block-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.client-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.client-kpi {
    text-align: center;
    padding: var(--space-sm);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.client-kpi .n {
    display: block;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
}

.client-kpi .l {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.client-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 160px;
}

/* Inline Note */
.inline-note {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Minor Link */
.minor-link {
    color: var(--accent-primary);
    font-size: 0.8125rem;
    transition: color var(--transition-fast);
}

.minor-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Item Row */
.item-row {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.6fr 0.8fr 0.8fr auto;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    align-items: center;
    margin-bottom: var(--space-sm);
}

.item-main strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.item-main small {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* Detail Box */
.detail-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.detail-list {
    display: grid;
    gap: var(--space-md);
}

.detail-list > div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
}

.detail-list span {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.detail-list strong {
    color: var(--text-primary);
    text-align: right;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1400px) {
    .cards,
    .quick-cards,
    .quick-access-grid,
    .summary-grid,
    .stats-grid,
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .form-shell,
    .permission-shell {
        grid-template-columns: 1fr;
    }
    
    .sticky-side {
        position: static;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .field-span-3 {
        grid-column: span 2;
    }
    
    .filter-grid,
    .client-card {
        grid-template-columns: 1fr;
    }
    
    .client-kpis {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .grid-2,
    .grid-3,
    .permission-grid,
    .vehicle-grid,
    .client-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 880px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    
    .content-area {
        margin-left: 0;
        padding: var(--space-md);
    }
    
    .toggle-button {
        display: flex;
    }
    
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .cards,
    .quick-cards,
    .quick-access-grid,
    .summary-grid,
    .stats-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row,
    .form-row-2,
    .form-row-3,
    .form-row-4,
    .field-row,
    .field-row-3,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-header-actions {
        width: 100%;
    }
    
    .page-header-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .field-span-2,
    .field-span-3 {
        grid-column: span 1;
    }
    
    .search-input {
        min-width: 100%;
    }
    
    .page-actions,
    .actions-row,
    .inline-btns,
    .filters-bar {
        width: 100%;
    }
    
    .page-actions > *,
    .actions-row > *,
    .inline-btns > * {
        flex: 1;
    }
    
    .item-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .client-kpis {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ══════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .sidebar,
    .toggle-button,
    .btn,
    .btn-secondary,
    .btn-danger,
    .logout-link {
        display: none !important;
    }
    
    .content-area {
        margin-left: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.4s ease-out;
}

/* ══════════════════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   SELECTION
   ══════════════════════════════════════════════════════════════════ */
::selection {
    background: var(--accent-primary);
    color: white;
}


/* ══════════════════════════════════════════════════════════════════
   RESPONSIVIDADE FULL - Revisão NeoArte 2026
   Mantém funcionalidades e padroniza páginas, tabelas, formulários,
   cards, imagens e ações em telas pequenas.
   ══════════════════════════════════════════════════════════════════ */
:root {
    --container-max: 1680px;
    --mobile-safe: 14px;
}

.content-area {
    width: calc(100% - var(--sidebar-width));
    max-width: var(--container-max);
}

.topbar > div:first-child {
    min-width: 0;
    flex: 1 1 360px;
}

.topbar-left {
    min-width: 0;
}

.topbar-left h1,
.page-title,
.card-title,
.form-section-title {
    overflow-wrap: anywhere;
}

.page-header,
.card-header,
.section-header,
.filters-bar,
.actions-row,
.page-actions,
.inline-btns,
.form-actions,
.topbar-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.page-header,
.card-header,
.section-header {
    align-items: flex-start;
    justify-content: space-between;
}

.page-header-content,
.card-header-content,
.section-header-content {
    min-width: 0;
    flex: 1 1 280px;
}

.page-header-actions,
.card-header-actions,
.section-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.card,
.section-card,
.summary-card,
.stat-card,
.info-card,
.client-card,
.vehicle-card,
.permission-card,
.form-card,
.detail-box {
    min-width: 0;
}

.card-body,
.form-section,
.table-responsive,
.checklist-layout,
.motor-map-card,
.susp-map-card,
.vehicle-map-card {
    min-width: 0;
}

.form-row,
.form-row-2,
.form-row-3,
.form-row-4,
.field-row,
.field-row-3,
.form-grid,
.filter-grid {
    display: grid;
    gap: var(--space-md);
    align-items: end;
}

.form-row:not(.form-row-3):not(.form-row-4),
.form-row-2,
.field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row-3,
.field-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.form-group,
.field,
.input-group {
    min-width: 0;
}

.form-group-full,
.field-span-2 {
    grid-column: 1 / -1;
}

.form-control,
.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"] {
    width: 100%;
    max-width: 100%;
}

textarea.form-control,
textarea {
    resize: vertical;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}

.table-responsive .table,
.table-responsive table,
table.table {
    min-width: 760px;
}

.table th,
.table td {
    vertical-align: middle;
}

.table td:last-child,
.table th:last-child {
    white-space: nowrap;
}

.table .btn,
.table .btn-secondary,
.table .btn-danger,
.table .btn-success,
.table .btn-warning,
.table .btn-ghost {
    margin: 2px;
}

img,
.checklist-image,
.vehicle-map img,
.motor-map img,
.susp-map img,
.preview-image,
.photo-preview img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.motor-map,
.susp-map,
.vehicle-map,
.image-map,
.checklist-map {
    overflow: hidden;
    max-width: 100%;
}

.badge,
.status-badge,
.alert-inline {
    max-width: 100%;
    white-space: normal;
}

@media (max-width: 1200px) {
    .content-area {
        width: calc(100% - var(--sidebar-width));
        padding: var(--space-lg);
    }

    .form-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    html {
        font-size: 15px;
    }

    body {
        overflow-x: hidden;
    }

    .content-area {
        width: 100%;
        max-width: 100%;
        padding: var(--space-md);
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 80;
        margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) var(--space-lg);
        padding: var(--space-md);
        background: rgba(10, 10, 15, 0.92);
        border-bottom: 1px solid var(--border-subtle);
        backdrop-filter: blur(14px);
    }

    .topbar > div:first-child {
        width: 100%;
        flex: 1 1 100%;
    }

    .topbar-left h1 {
        font-size: clamp(1.25rem, 6vw, 1.7rem);
        line-height: 1.15;
    }

    .topbar-left p {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .topbar-actions,
    .page-header-actions,
    .card-header-actions,
    .section-actions {
        width: 100%;
        justify-content: stretch;
    }

    .topbar-actions > *,
    .page-header-actions > *,
    .card-header-actions > *,
    .section-actions > * {
        flex: 1 1 auto;
    }

    .sidebar {
        width: min(88vw, 320px);
    }

    .sidebar-nav {
        overflow-y: auto;
        max-height: calc(100vh - 170px);
        padding-bottom: var(--space-xl);
    }

    .card,
    .section-card {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-md);
    }

    .stat-card,
    .summary-card,
    .info-card,
    .detail-box {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
    }

    .stat-card {
        align-items: flex-start;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-value,
    .summary-value,
    .card-value {
        font-size: clamp(1.35rem, 7vw, 1.9rem);
    }

    .grid-2,
    .grid-3,
    .cards,
    .quick-cards,
    .quick-access-grid,
    .summary-grid,
    .stats-grid,
    .metrics-grid,
    .info-cards,
    .client-kpis,
    .vehicle-grid,
    .client-grid,
    .permission-grid {
        grid-template-columns: 1fr !important;
    }

    .form-row,
    .form-row-2,
    .form-row-3,
    .form-row-4,
    .field-row,
    .field-row-3,
    .form-grid,
    .filter-grid {
        grid-template-columns: 1fr !important;
    }

    .field-span-2,
    .field-span-3,
    .form-group-full {
        grid-column: 1 / -1 !important;
    }

    .btn,
    .btn-secondary,
    .btn-danger,
    .btn-ghost,
    .btn-success,
    .btn-warning,
    .logout-link {
        min-height: 44px;
        padding: 11px 14px;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }

    .content-area {
        padding: var(--mobile-safe);
    }

    .topbar {
        margin: calc(var(--mobile-safe) * -1) calc(var(--mobile-safe) * -1) var(--space-md);
        padding: var(--mobile-safe);
    }

    .topbar > div:first-child {
        gap: 10px !important;
        align-items: flex-start !important;
    }

    .toggle-button {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .topbar-actions,
    .page-header-actions,
    .card-header-actions,
    .section-actions,
    .form-actions,
    .page-actions,
    .actions-row,
    .inline-btns,
    .filters-bar {
        gap: var(--space-sm);
    }

    .topbar-actions > *,
    .page-header-actions > *,
    .card-header-actions > *,
    .section-actions > *,
    .form-actions > *,
    .page-actions > *,
    .actions-row > *,
    .inline-btns > *,
    .filters-bar > * {
        width: 100%;
        flex: 1 1 100%;
    }

    .btn,
    .btn-secondary,
    .btn-danger,
    .btn-ghost,
    .btn-success,
    .btn-warning,
    .logout-link {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .btn-sm {
        min-height: 38px;
        padding: 9px 12px;
    }

    .card,
    .section-card {
        padding: var(--space-md);
    }

    .card-header,
    .page-header,
    .section-header {
        gap: var(--space-sm);
    }

    .card-title,
    .page-title,
    .form-section-title {
        font-size: clamp(1.05rem, 5vw, 1.35rem);
    }

    .table-responsive.mobile-card-table {
        overflow: visible;
        border-radius: 0;
    }

    .table-responsive.mobile-card-table table,
    .table-responsive.mobile-card-table .table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .table-responsive.mobile-card-table thead {
        display: none;
    }

    .table-responsive.mobile-card-table tbody,
    .table-responsive.mobile-card-table tr,
    .table-responsive.mobile-card-table td {
        display: block;
        width: 100%;
    }

    .table-responsive.mobile-card-table tr {
        background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: var(--space-sm);
        box-shadow: var(--shadow-sm);
    }

    .table-responsive.mobile-card-table td {
        border: none !important;
        padding: 9px 8px !important;
        text-align: left !important;
        white-space: normal !important;
    }

    .table-responsive.mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--text-tertiary);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .table-responsive.mobile-card-table td[data-label="" ]::before,
    .table-responsive.mobile-card-table td:not([data-label])::before {
        display: none;
    }

    .table-responsive.mobile-card-table td:last-child {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        align-items: center;
    }

    .table-responsive.mobile-card-table td:last-child::before {
        flex: 1 1 100%;
    }

    .table-responsive.mobile-card-table td:last-child .btn,
    .table-responsive.mobile-card-table td:last-child .btn-secondary,
    .table-responsive.mobile-card-table td:last-child .btn-danger,
    .table-responsive.mobile-card-table td:last-child .btn-success,
    .table-responsive.mobile-card-table td:last-child .btn-warning,
    .table-responsive.mobile-card-table td:last-child .btn-ghost,
    .table-responsive.mobile-card-table td:last-child a,
    .table-responsive.mobile-card-table td:last-child button {
        width: auto;
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }

    .detail-list > div {
        flex-direction: column;
        gap: 3px;
    }

    .detail-list strong {
        text-align: left;
    }

    .motor-map,
    .susp-map,
    .vehicle-map,
    .image-map,
    .checklist-map {
        padding: var(--space-sm) !important;
        overflow-x: auto;
    }
}

@media (max-width: 420px) {
    .brand-block {
        padding: var(--space-md);
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .topbar-left p {
        display: none;
    }

    .alert-inline {
        justify-content: center;
        text-align: center;
    }
}
