/* ========================================
   DECLARUSHUB - DESIGN CORPORATIVO
   Design System Profissional & Elegante
   ======================================== */

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

:root {
    /* Paleta Corporativa - Azul Profissional */
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --primary-dark: #1e3a8a;
    --primary-darker: #1e293b;

    /* Secundário - Cinza Elegante */
    --secondary: #64748b;
    --secondary-light: #94a3b8;
    --secondary-dark: #475569;
    --secondary-darker: #334155;

    /* Cores Semânticas */
    --success: #059669;
    --success-light: #d1fae5;
    --success-dark: #065f46;

    --danger: #dc2626;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;

    --warning: #d97706;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;

    --info: #0284c7;
    --info-light: #e0f2fe;
    --info-dark: #075985;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;

    /* Textos */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-white: #ffffff;
    --text-muted: #cbd5e1;

    /* Bordas */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
    --border-darker: #94a3b8;

    /* Sombras Sutis e Profissionais */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

    /* Espaçamentos */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius - Mais Conservador */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Tipografia Corporativa */
    --font-sans: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* ========================================
   BASE & RESET
   ======================================== */

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

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9375rem;
    font-weight: 400;
}

::selection {
    background: var(--primary);
    color: white;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: var(--radius-md);
    border: 3px solid var(--bg-tertiary);
    transition: var(--transition);
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ========================================
   LOGIN PAGE - DESIGN CORPORATIVO
   ======================================== */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.login-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--space-12);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--bg-tertiary);
}

.login-header .logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.login-header .logo-container img {
    object-fit: contain;
    transition: transform 0.3s ease;
}

.login-header .logo-container img:hover {
    transform: scale(1.05);
}

.login-header h1 {
    color: var(--primary-dark);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    letter-spacing: -0.025em;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

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

.login-footer {
    text-align: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */

.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.sidebar {
    width: 280px;
    background: var(--bg-darker);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: var(--space-8) var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 64, 175, 0.1);
}

.sidebar-header .logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.sidebar-header .logo-container img {
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sidebar-header .logo-container img:hover {
    transform: scale(1.05);
}

.sidebar-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.025em;
}

.sidebar-header p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
    font-weight: 500;
}

.sidebar-menu {
    flex: 1;
    padding: var(--space-6) var(--space-4);
    overflow-y: auto;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: var(--transition);
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.sidebar-menu a:hover::before {
    height: 60%;
}

.sidebar-menu a.active {
    background: rgba(30, 64, 175, 0.25);
    color: var(--text-white);
    font-weight: 600;
    border-color: rgba(59, 130, 246, 0.3);
}

.sidebar-menu a.active::before {
    height: 60%;
}

.sidebar-menu a span:first-child {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: var(--space-8);
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.top-bar h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    letter-spacing: -0.025em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.user-info span {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ========================================
   CARDS & CONTAINERS - DESIGN CORPORATIVO
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transform-origin: top;
    transition: var(--transition);
}

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

.stat-card:hover::before {
    transform: scaleY(1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.025em;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-6);
}

.table-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
}

.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-6);
    transition: var(--transition);
}

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

/* ========================================
   FORMS - DESIGN CORPORATIVO
   ======================================== */

.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group small {
    display: block;
    margin-top: var(--space-2);
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

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

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

/* ========================================
   BUTTONS - DESIGN CORPORATIVO
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--secondary);
    text-decoration: none;
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover:not(:disabled) {
    background: var(--success-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-warning {
    background: var(--warning);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover:not(:disabled) {
    background: var(--warning-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8125rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.0625rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    gap: var(--space-3);
}

/* ========================================
   TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table thead {
    background: var(--bg-tertiary);
}

table thead th {
    padding: var(--space-4);
    text-align: left;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

table thead th:first-child {
    border-top-left-radius: var(--radius-lg);
}

table thead th:last-child {
    border-top-right-radius: var(--radius-lg);
}

table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

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

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

table tbody td {
    padding: var(--space-4);
    color: var(--text-primary);
    font-size: 0.9375rem;
}

table tbody td:first-child {
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: var(--space-2);
}

.action-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.125rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn.view:hover {
    background: var(--info-light);
    border-color: var(--info);
}

.action-btn.edit:hover {
    background: var(--warning-light);
    border-color: var(--warning);
}

.action-btn.delete:hover {
    background: var(--danger-light);
    border-color: var(--danger);
}

/* ========================================
   BADGES - DESIGN CORPORATIVO
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
    border-color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger-dark);
    border-color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
    border-color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info-dark);
    border-color: var(--info);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-dark);
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 0.9375rem;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border-color: var(--success);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-dark);
    border-color: var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
    border-color: var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: var(--info-dark);
    border-color: var(--info);
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active,
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

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

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-modal {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--danger-light);
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-content form {
    padding: var(--space-6);
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumbs {
    margin-bottom: var(--space-6);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.breadcrumbs a {
    color: var(--primary-solid);
    font-weight: 500;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary-dark);
}

.breadcrumbs span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   UTILITIES
   ======================================== */

.flex {
    display: flex;
}

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

.justify-center {
    justify-content: center;
}

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

.gap-10 {
    gap: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

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

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

/* ========================================
   TABS
   ======================================== */

.tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    padding: var(--space-3) var(--space-5);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    margin-bottom: -2px;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

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

/* ========================================
   NOTIFICAÇÕES FLUTUANTES - CORPORATIVO
   ======================================== */

.notificacoes-flutuante {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    z-index: 999;
}

.btn-notificacoes {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
    position: relative;
}

.btn-notificacoes:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.badge-notificacoes {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    min-width: 22px;
    height: 22px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    border: 2px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

/* Modal de Notificações */
.modal-notificacoes {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-notificacoes.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-notificacoes-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal-notificacoes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-notificacoes-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.025em;
}

.close-modal-notificacoes {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal-notificacoes:hover {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

.modal-notificacoes-body {
    padding: var(--space-6);
    overflow-y: auto;
    max-height: calc(80vh - 100px);
}

.notificacao-item {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--border-dark);
    transition: var(--transition);
}

.notificacao-item.nao-lida {
    background: var(--info-light);
    border-left-color: var(--primary);
    border-left-width: 3px;
}

.notificacao-item.lida {
    opacity: 0.65;
}

.notificacao-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.notificacao-conteudo {
    margin-bottom: var(--space-3);
}

.notificacao-titulo {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.notificacao-mensagem {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.notificacao-data {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-marcar-lida {
    background: var(--success);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.btn-marcar-lida:hover {
    background: var(--success-dark);
    box-shadow: var(--shadow-sm);
}

.sem-notificacoes,
.erro-notificacoes,
.loading {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

.erro-notificacoes {
    color: var(--danger);
}

/* ========================================
   ANIMAÇÕES
   ======================================== */

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   CHECKBOX & SWITCH
   ======================================== */

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-dark);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: var(--radius-full);
}

input:checked + .slider {
    background: var(--primary-solid);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

/* ========================================
   TOOLTIP
   ======================================== */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-dark);
    color: white;
    font-size: 0.8125rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    margin-bottom: var(--space-2);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

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

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

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: var(--space-4);
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .top-bar h1 {
        font-size: 1.5rem;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.875rem;
    }

    table thead th,
    table tbody td {
        padding: var(--space-3);
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .login-box {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .notificacoes-flutuante {
        bottom: var(--space-4);
        right: var(--space-4);
    }

    .btn-notificacoes {
        width: 50px;
        height: 50px;
    }

    .btn {
        padding: var(--space-2) var(--space-4);
        font-size: 0.875rem;
    }

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

    .modal-notificacoes-content {
        width: 95%;
        max-height: 90vh;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .sidebar,
    .top-bar .user-info,
    .btn,
    .notificacoes-flutuante,
    .btn-notificacoes,
    .action-btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .table-container,
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* ========================================
   DARK MODE (Opcional - Preparado)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Descomente para ativar dark mode automático
    :root {
        --bg-primary: #1e293b;
        --bg-secondary: #0f172a;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-tertiary: #94a3b8;
        --border-color: #334155;
    }
    */
}

/* ========================================
   CUSTOM SCROLLBAR PARA MODAIS
   ======================================== */

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: var(--radius-full);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ========================================
   FOCUS VISIBLE (Acessibilidade)
   ======================================== */

*:focus-visible {
    outline: 2px solid var(--primary-solid);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-solid);
    outline-offset: 2px;
}

/* ========================================
   STATS GRID - CARDS DE ESTATÍSTICAS
   ======================================== */

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

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary);
    transition: var(--transition);
    text-align: left;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary-dark);
    transform: translateY(-2px);
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* ========================================
   CHARTS GRID - GRÁFICOS
   ======================================== */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   FIM DO CSS
   ======================================== */

