/**
 * CRM Enterprise - Acrylic Glass Design
 * Windows 11 inspired frosted glass UI with landscape background
 */

/* =====================================================
   CSS VARIABLES & THEMING
   ===================================================== */
:root {
    /* Primary Colors */
    --primary: #0078d4;
    --primary-hover: #106ebe;
    --primary-light: rgba(0, 120, 212, 0.15);

    /* Accent Colors - Windows 11 style */
    --accent: #60cdff;
    --accent-dark: #0067c0;

    /* Secondary Colors */
    --secondary: #6b7280;
    --secondary-hover: #4b5563;

    /* Status Colors */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.15);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Acrylic Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --blur-amount: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Light Theme - Acrylic */
[data-bs-theme="light"] {
    --bg-body: transparent;
    --bg-card: rgba(255, 255, 255, 0.5);
    --bg-sidebar: rgba(15, 23, 42, 0.6);
    --bg-topbar: rgba(255, 255, 255, 0.5);
    --bg-sidebar-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-sidebar: rgba(255, 255, 255, 0.95);
    --text-sidebar-active: #ffffff;
    --border-color: rgba(255, 255, 255, 0.3);
    --input-bg: rgba(255, 255, 255, 0.7);
    --table-stripe: rgba(0, 0, 0, 0.02);
}

/* Dark Theme - Acrylic */
[data-bs-theme="dark"] {
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-border: rgba(255, 255, 255, 0.15);
    --bg-body: transparent;
    --bg-card: rgba(15, 23, 42, 0.5);
    --bg-sidebar: rgba(0, 0, 0, 0.5);
    --bg-topbar: rgba(15, 23, 42, 0.5);
    --bg-sidebar-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-sidebar: rgba(255, 255, 255, 0.9);
    --text-sidebar-active: #ffffff;
    --border-color: rgba(255, 255, 255, 0.15);
    --input-bg: rgba(30, 41, 59, 0.6);
    --table-stripe: rgba(255, 255, 255, 0.03);
}

/* =====================================================
   BASE STYLES
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;

    /* ========================================
       TROQUE A URL ABAIXO PARA MUDAR A IMAGEM
       ======================================== */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%),
        url('https://images.unsplash.com/photo-1523712999610-f77fbcfc3843?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center fixed;
    background-size: cover;

    z-index: -1;
    pointer-events: none;
    filter: blur(8px);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.logo i {
    font-size: 1.75rem;
    color: var(--primary);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-close-sidebar {
    background: none;
    border: none;
    color: var(--text-sidebar);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    margin: 0.125rem 0.75rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-sidebar);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-nav .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 1rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    font-size: 2rem;
    color: var(--primary);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-sidebar);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    flex: 1;
}

.top-navbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--bg-topbar, var(--bg-card));
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1030;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.breadcrumb-nav .breadcrumb {
    font-size: 0.875rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.page-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Ensure rows and containers fill width */
.page-content>.row,
.page-content>.card,
.page-content>.table-container {
    width: 100%;
}

/* =====================================================
   CARDS - Acrylic Glass
   ===================================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Stats Cards */
.stats-card {
    border: none;
    overflow: hidden;
}

.stats-card .card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stats-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stats-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stats-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stats-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stats-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stats-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* =====================================================
   TABLES
   ===================================================== */
.table-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h5 {
    margin: 0;
    font-weight: 600;
}

.table {
    margin: 0;
}

.table thead th {
    background: var(--bg-body);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--table-stripe);
}

.table-hover tbody tr:hover {
    background: var(--primary-light);
}

/* DataTables Custom */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 1rem 1.25rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 1rem 1.25rem;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-control,
.form-select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.input-group-text {
    background: var(--input-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* =====================================================
   BADGES & STATUS
   ===================================================== */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.pago,
.status-badge.ativo {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.pago::before,
.status-badge.ativo::before {
    background: var(--success);
}

.status-badge.pendente {
    background: var(--warning-light);
    color: var(--warning);
}

.status-badge.pendente::before {
    background: var(--warning);
}

.status-badge.atrasado,
.status-badge.inativo {
    background: var(--danger-light);
    color: var(--danger);
}

.status-badge.atrasado::before,
.status-badge.inativo::before {
    background: var(--danger);
}

/* =====================================================
   MODALS - Acrylic Glass
   ===================================================== */
.modal-backdrop {
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #a78bfa 100%);
    color: #fff;
}

.login-header .logo-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.login-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.login-body {
    padding: 2rem;
}

.login-body .form-control {
    padding: 0.75rem 1rem;
}

.login-body .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* =====================================================
   CHARTS
   ===================================================== */
.chart-container {
    position: relative;
    height: 300px;
}

/* =====================================================
   CALENDAR / AGENDA
   ===================================================== */
.calendar-event {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
    background: var(--primary-light);
}

.calendar-event.aula {
    border-left-color: var(--info);
    background: var(--info-light);
}

.calendar-event.reuniao {
    border-left-color: var(--warning);
    background: var(--warning-light);
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-muted {
    color: var(--text-muted) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #a78bfa 100%);
}

.rounded-xl {
    border-radius: var(--border-radius);
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .btn-toggle-sidebar {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 1rem;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-card .card-body {
        flex-direction: column;
        text-align: center;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Page Transition */
.page-content>* {
    animation: fadeIn 0.3s ease;
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {

    .sidebar,
    .top-navbar,
    .btn,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* =====================================================
   ENHANCED DARK MODE SUPPORT
   ===================================================== */

/* Dark mode - Dropdown menus */
[data-bs-theme="dark"] .dropdown-menu {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .dropdown-header {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: var(--glass-border);
}

/* Dark mode - Tables */
[data-bs-theme="dark"] .table {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .table thead th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

[data-bs-theme="dark"] .table tbody td {
    border-color: var(--glass-border);
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .bg-light {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Dark mode - Modals */
[data-bs-theme="dark"] .modal-content {
    background: rgba(15, 23, 42, 0.95);
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: var(--glass-border);
}

/* Dark mode - Alerts */
[data-bs-theme="dark"] .alert {
    border-radius: var(--border-radius);
}

/* Dark mode - Buttons outline */
[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
}

/* Dark mode - Form elements */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: var(--input-bg);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: var(--input-bg);
    border-color: var(--primary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .input-group-text {
    background: var(--input-bg);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .form-check-input {
    background-color: var(--input-bg);
    border-color: var(--glass-border);
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Dark mode - Breadcrumb */
[data-bs-theme="dark"] .breadcrumb-item a {
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .breadcrumb-item+.breadcrumb-item::before {
    color: var(--text-muted);
}

/* Dark mode - Card colors */
[data-bs-theme="dark"] .card.bg-success,
[data-bs-theme="dark"] .card.bg-warning,
[data-bs-theme="dark"] .card.bg-danger,
[data-bs-theme="dark"] .card.bg-info,
[data-bs-theme="dark"] .card.bg-primary {
    backdrop-filter: none;
}

/* Dark mode - Text colors */
[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: var(--text-secondary) !important;
}

/* Dark mode - List Group Items (Acrylic) */
[data-bs-theme="dark"] .list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .list-group-item-action:hover,
[data-bs-theme="dark"] .list-group-item-action:focus {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card .list-group-flush .list-group-item {
    background: transparent;
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .card .list-group-flush .list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Dark mode - BG Light inside cards (Acrylic) */
[data-bs-theme="dark"] .card .bg-light,
[data-bs-theme="dark"] .bg-light.rounded {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px);
    border-color: var(--glass-border) !important;
}

/* Dark mode - Alert Light */
[data-bs-theme="dark"] .alert-light {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

/* Dark mode - Card headers with opacity backgrounds */
[data-bs-theme="dark"] .bg-danger.bg-opacity-10,
[data-bs-theme="dark"] .bg-warning.bg-opacity-10,
[data-bs-theme="dark"] .bg-success.bg-opacity-10,
[data-bs-theme="dark"] .bg-info.bg-opacity-10,
[data-bs-theme="dark"] .bg-primary.bg-opacity-10 {
    backdrop-filter: blur(10px);
}

/* Dark mode - Form check inputs inside cards */
[data-bs-theme="dark"] .card .form-check-label {
    color: var(--text-primary);
}

/* Dark mode - Table content inside cards (Acrylic like Tickets Críticos) */
[data-bs-theme="dark"] .card .table,
[data-bs-theme="dark"] .table-container .table {
    background: transparent;
}

[data-bs-theme="dark"] .card .table tbody tr,
[data-bs-theme="dark"] .table-container .table tbody tr {
    background: transparent;
}

[data-bs-theme="dark"] .card .table tbody td,
[data-bs-theme="dark"] .table-container .table tbody td {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--glass-border);
}

[data-bs-theme="dark"] .card .table-hover tbody tr:hover td,
[data-bs-theme="dark"] .table-container .table-hover tbody tr:hover td {
    background: rgba(255, 255, 255, 0.08);
}

/* Dark mode - Table text elements */
[data-bs-theme="dark"] .card .table .fw-bold,
[data-bs-theme="dark"] .card .table .fw-medium,
[data-bs-theme="dark"] .table-container .table .fw-bold {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .card .table .text-muted,
[data-bs-theme="dark"] .card .table small.text-muted,
[data-bs-theme="dark"] .table-container .table .text-muted {
    color: var(--text-muted) !important;
}

/* Dark mode - Table links */
[data-bs-theme="dark"] .card .table a.text-decoration-none,
[data-bs-theme="dark"] .table-container .table a.text-decoration-none {
    color: var(--primary);
}

/* Dark mode - Modal content bg-light containers (Contas, Funcionários view modals) */
[data-bs-theme="dark"] .modal .bg-light,
[data-bs-theme="dark"] .modal-body .bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px);
    border-color: var(--glass-border) !important;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .modal .bg-light .text-muted,
[data-bs-theme="dark"] .modal-body .bg-light small {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .modal .bg-light .fw-bold,
[data-bs-theme="dark"] .modal-body .bg-light .fw-bold,
[data-bs-theme="dark"] .modal-body .bg-light .fw-medium {
    color: var(--text-primary) !important;
}

/* Dark mode - Table thead bg-light (Funcionários, Projetos tables) */
[data-bs-theme="dark"] thead.bg-light,
[data-bs-theme="dark"] .table thead.bg-light {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] thead.bg-light th,
[data-bs-theme="dark"] .table thead.bg-light th {
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

/* =====================================================
   ROUNDED CORNERS FIX - ALL ELEMENTS
   ===================================================== */

/* Ensure all interactive elements have rounded corners */
.btn,
.btn-group>.btn,
.input-group>.form-control,
.input-group>.form-select,
.input-group>.input-group-text {
    border-radius: var(--border-radius-sm);
}

/* Fix input group corners */
.input-group>.form-control:first-child,
.input-group>.input-group-text:first-child {
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
}

.input-group>.form-control:last-child,
.input-group>.input-group-text:last-child,
.input-group>.btn:last-child {
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
}

.input-group>*:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Button groups rounded */
.btn-group>.btn:first-child {
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
}

.btn-group>.btn:last-child {
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
}

.btn-group>.btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Tables rounded */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Pagination rounded */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: var(--border-radius-sm) !important;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .page-link {
    background: var(--bg-card);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    background: transparent;
    color: var(--text-muted);
}

/* Alerts rounded */
.alert {
    border-radius: var(--border-radius);
}

/* List group rounded */
.list-group {
    border-radius: var(--border-radius);
}

.list-group-item:first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Nav tabs rounded */
.nav-tabs .nav-link {
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.nav-pills .nav-link {
    border-radius: var(--border-radius-sm);
}

/* Progress bars rounded */
.progress {
    border-radius: var(--border-radius-sm);
}

/* Tooltips rounded */
.tooltip-inner {
    border-radius: var(--border-radius-sm);
}

/* Popovers rounded */
.popover {
    border-radius: var(--border-radius);
}

/* Toast rounded */
.toast {
    border-radius: var(--border-radius);
}

/* =====================================================
   ADDITIONAL POLISH
   ===================================================== */

/* Smooth scrollbar for dark mode */
[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Selection color */
::selection {
    background: var(--primary);
    color: #fff;
}

/* Focus ring for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Card footer and header rounded when inside card */
.card>.card-header:first-child {
    border-top-left-radius: calc(var(--border-radius-lg) - 1px);
    border-top-right-radius: calc(var(--border-radius-lg) - 1px);
}

.card>.card-footer:last-child {
    border-bottom-left-radius: calc(var(--border-radius-lg) - 1px);
    border-bottom-right-radius: calc(var(--border-radius-lg) - 1px);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* =====================================================
   AUTO REFRESH INDICATOR
   ===================================================== */
.refresh-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 1rem;
    cursor: help;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.1s linear;
    transform-origin: 50% 50%;
}

.progress-ring__circle-bg {
    opacity: 0.3;
}

.refresh-icon {
    position: absolute;
    font-size: 0.75rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* States */
.refresh-indicator.fetching .progress-ring {
    animation: spin 1s linear infinite;
}

.refresh-indicator.fetching .progress-ring__circle {
    stroke-dashoffset: 0 !important;
    /* Force full circle */
    stroke-dasharray: 10 20 !important;
    /* Dashed */
}

.refresh-indicator.paused .progress-ring__circle {
    stroke: var(--warning);
}

.refresh-indicator.paused .refresh-icon {
    opacity: 1;
}

.refresh-indicator.paused .refresh-icon::before {
    content: "\F4C3";
    /* pause icon */
    color: var(--warning);
}

@keyframes spin {
    100% {
        transform: rotate(270deg);
        /* 360 - 90 */
    }
}