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

:root {
    /* Premium Color Palette */
    --solar-primary: #f59e0b;
    /* Amber 500 */
    --solar-primary-dark: #d97706;
    /* Amber 600 */
    --solar-primary-light: #fcd34d;
    /* Amber 300 */
    --solar-secondary: #0f172a;
    /* Slate 900 */
    --solar-secondary-hover: #1e293b;
    /* Slate 800 */

    --solar-accent: #6366f1;
    /* Indigo 500 */

    --solar-bg: #f8fafc;
    /* Slate 50 */
    --solar-surface: #ffffff;
    --solar-surface-glass: rgba(255, 255, 255, 0.8);

    --solar-text: #0f172a;
    /* Slate 900 */
    --solar-text-muted: #64748b;
    /* Slate 500 */
    --solar-text-light: #f1f5f9;
    /* Slate 100 */

    --solar-border: #e2e8f0;
    /* Slate 200 */
    --solar-border-light: rgba(255, 255, 255, 0.1);

    --solar-success: #10b981;
    --solar-danger: #ef4444;
    --solar-warning: #f59e0b;
    --solar-info: #3b82f6;

    /* Dimensions */
    --sidebar-width: 280px;
    --header-height: 72px;

    /* Elevation & Shadows */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.12), 0 2px 6px -2px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 12px 24px -4px rgb(0 0 0 / 0.12), 0 8px 16px -4px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 20px 32px -8px rgb(0 0 0 / 0.15);

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--solar-bg);
    color: var(--solar-text);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    transition: color 0.2s;
}

/* Sidebar Styles */
#sidebar-wrapper {
    height: 100vh;
    max-height: 100vh;
    width: var(--sidebar-width);
    transform: translateX(calc(var(--sidebar-width) * -1));
    transition: transform var(--transition-base);
    background-color: var(--solar-secondary);
    color: var(--solar-text-light);
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1050;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--solar-border-light);
    display: flex;
    flex-direction: column;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0 1.75rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--solar-primary);
    background-color: rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    border-bottom: 1px solid var(--solar-border-light);
    flex-shrink: 0;
}

/* Área de navegação com scroll */
.sidebar-nav-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

/* Customização da scrollbar */
.sidebar-nav-wrapper::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

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

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

/* Área de suporte fixa no rodapé */
.sidebar-footer {
    flex-shrink: 0;
    padding: 1rem 0.75rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
    border-top: 1px solid var(--solar-border-light);
}

.sidebar-footer .sidebar-section {
    padding: 0 1rem 0.5rem !important;
    margin-top: 0 !important;
}

.sidebar-footer .btn-support-whatsapp {
    margin: 0 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.sidebar-section {
    font-weight: 700 !important;
    font-size: 0.725rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--solar-text-muted) !important;
    opacity: 0.9;
    padding: 1rem 1.75rem 0.5rem !important;
    margin-top: 0.25rem !important;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent;
    color: #94a3b8;
    border: none;
    padding: 0.75rem 1.75rem;
    font-weight: 500;
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
    margin: 0.125rem 0.75rem;
    border-radius: 0.75rem;
}

#sidebar-wrapper .list-group-item i {
    width: 22px;
    margin-right: 1rem;
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: transform var(--transition-fast);
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
}

#sidebar-wrapper .list-group-item:hover i {
    transform: scale(1.1);
    opacity: 1;
}

#sidebar-wrapper .list-group-item.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%) !important;
    color: var(--solar-primary) !important;
    font-weight: 600;
}

#sidebar-wrapper .list-group-item.active i {
    color: var(--solar-primary) !important;
    opacity: 1 !important;
    transform: scale(1.1);
}

#sidebar-wrapper .list-group {
    width: 100%;
    padding: 1rem 0;
}

/* Main Content Styles */
#wrapper {
    display: flex;
    overflow-x: hidden;
}

#page-content-wrapper {
    min-width: 100vw;
    width: 100%;
    transition: transform var(--transition-base);
}

#wrapper.toggled #sidebar-wrapper {
    transform: translateX(0);
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        transform: translateX(0);
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
        margin-left: var(--sidebar-width);
    }

    #wrapper.toggled #sidebar-wrapper {
        transform: translateX(calc(var(--sidebar-width) * -1));
    }

    #wrapper.toggled #page-content-wrapper {
        transform: translateX(calc(var(--sidebar-width) * -1));
        margin-left: var(--sidebar-width);
    }
}

/* Navbar Styles */
.navbar {
    height: var(--header-height);
    background-color: var(--solar-surface-glass) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--solar-border);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.btn-toggle-menu {
    color: var(--solar-text-muted);
    font-size: 1.25rem;
    padding: 0.6rem;
    background: var(--solar-bg);
    border: 1px solid var(--solar-border);
    border-radius: 0.75rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.btn-toggle-menu:hover {
    color: var(--solar-primary);
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* Header User Profile */
.user-avatar-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--solar-primary);
    border: 1px solid rgba(245, 158, 11, 0.1);
    transition: all var(--transition-fast);
}

.nav-link:hover .user-avatar-small {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.3) 100%);
    box-shadow: var(--shadow-sm);
}

.user-name-header {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--solar-text);
    display: block;
    line-height: 1.2;
}

.user-role-header {
    font-size: 0.75rem;
    color: var(--solar-text-muted);
    display: block;
}

/* Notifications */
.notification-dropdown .bg-light {
    background-color: var(--solar-bg) !important;
    border: 1px solid var(--solar-border);
    border-radius: 12px !important;
}

.notification-dropdown:hover .bg-light {
    background-color: white !important;
    color: var(--solar-primary) !important;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    /* Removido transform global — evita layout shift em cards que contêm dropdowns/tabelas.
       Use .card-hover-lift para cards que precisam de efeito hover. */
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-base);
}

/* Premium Dashboard Cards */
.bg-gradient-success-premium {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
}

.bg-gradient-info-premium {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3);
}

.card-premium-glow-success:hover {
    box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.5) !important;
}

.card-premium-glow-info:hover {
    box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.5) !important;
}

.icon-wrapper-premium {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all var(--transition-base);
}

.card:hover .icon-wrapper-premium {
    transform: rotate(-10deg) scale(1.1);
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.card-body {
    padding: 1.25rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--solar-primary-dark);
    border-color: var(--solar-primary-dark);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-outline-primary {
    color: var(--solar-primary);
    border-color: var(--solar-primary);
}

.btn-outline-primary:hover {
    background-color: var(--solar-primary);
    border-color: var(--solar-primary);
}

/* Tables */
.table-responsive {
    /* NOTA: border-radius aqui + overflow:hidden bloqueia scroll horizontal.
       O radius é aplicado via wrapper .card-premium (overflow:hidden) em vez disso. */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--solar-border) transparent;
}

/* Fix para dropdowns cortados em telas desktop */
@media (min-width: 992px) {
    .table-responsive {
        overflow: visible !important;
    }
}

/* Fix para dropdowns cortados no final da lista em telas mobile */
@media (max-width: 991.98px) {
    .table-responsive {
        padding-bottom: 120px;
    }
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    background-color: #f1f5f9;
    /* Slate 100 */
    color: var(--solar-text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--solar-border);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    color: var(--solar-text);
    border-bottom: 1px solid var(--solar-border);
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* ============================================
   PREMIUM DESIGN SYSTEM — Reusable Patterns
   ============================================ */

/* --- Page Header --- */
.premium-page-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--solar-border);
}

.premium-page-header h1,
.premium-page-header h2,
.premium-page-header .h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--solar-text);
}

.premium-page-header p {
    color: var(--solar-text-muted);
    margin-bottom: 0;
}

.premium-page-header .page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* --- Premium Card --- */
.card-premium {
    border: 1px solid var(--solar-border) !important;
    border-radius: 1rem !important;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    background: var(--solar-surface);
}

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

/* --- Premium Card Header --- */
.card-header-premium {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 2px solid rgba(245, 158, 11, 0.15) !important;
    padding: 1rem 1.25rem !important;
    border-top-left-radius: calc(1rem - 1px) !important;
    border-top-right-radius: calc(1rem - 1px) !important;
}

.card-header-premium h5,
.card-header-premium h6,
.card-header-premium .card-title {
    font-weight: 700;
    color: var(--solar-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.card-header-premium i {
    color: var(--solar-primary);
    font-size: 1rem;
}

/* --- Filter Card --- */
.card-filter {
    border: 1px solid var(--solar-border) !important;
    border-radius: 0.875rem !important;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 50%) !important;
    box-shadow: none !important;
    margin-bottom: 1.25rem;
}

.card-filter .card-body {
    padding: 1rem 1.25rem !important;
}

.card-filter .form-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--solar-text-muted);
}

/* --- Stats Card --- */
.stat-card {
    border: 1px solid var(--solar-border) !important;
    border-radius: 1rem !important;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

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

/* Gradient stat card variants */
.stat-card-primary {
    background: linear-gradient(135deg, #fef3c7 0%, #fff 60%) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

.stat-card-success {
    background: linear-gradient(135deg, #d1fae5 0%, #fff 60%) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.stat-card-info {
    background: linear-gradient(135deg, #dbeafe 0%, #fff 60%) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.stat-card-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fff 60%) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

/* --- Premium Table Header --- */
.table-premium thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid rgba(245, 158, 11, 0.12);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--solar-text-muted);
    padding: 0.875rem 1rem;
}

/* --- Premium Modal --- */
.modal-premium .modal-content {
    border: none !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden;
}

.modal-premium .modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid rgba(245, 158, 11, 0.12);
    padding: 1.125rem 1.5rem;
}

.modal-premium .modal-header .modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-premium .modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--solar-border);
    padding: 0.875rem 1.5rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--solar-text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- Progress Premium --- */
.progress-premium {
    height: 10px;
    border-radius: 999px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.progress-premium .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--solar-primary) 0%, var(--solar-primary-light) 100%);
}

/* --- Icon Badge (circular icon container) --- */
.icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.icon-badge-sm {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.icon-badge-lg {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 1.4rem;
}

/* --- Premium Section Divider --- */
.section-label {
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--solar-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--solar-border);
}

/* Premium responsive overrides */
@media (max-width: 767.98px) {
    .premium-page-header {
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }

    .premium-page-header .page-actions {
        width: 100%;
        flex-direction: column;
    }

    .premium-page-header .page-actions .btn {
        width: 100%;
    }

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

    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.1rem;
    }

    .card-premium {
        border-radius: 0.875rem !important;
    }

    .modal-premium .modal-content {
        border-radius: 1rem !important;
    }
}

/* ============================================
   Authentication Pages — Premium Split-Screen
   ============================================ */
.auth-bg {
    height: 100vh;
    display: flex;
    background: #020617;
    overflow: hidden;
}

/* ---- Hero Panel (left side) ---- */
.auth-hero {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    position: relative;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        linear-gradient(160deg, #020617 0%, #0f172a 50%, #020617 100%);
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Floating orbs */
.auth-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 12s ease-in-out infinite alternate;
}

.auth-hero-orb--amber {
    width: 300px;
    height: 300px;
    background: var(--solar-primary);
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.auth-hero-orb--indigo {
    width: 220px;
    height: 220px;
    background: var(--solar-accent);
    bottom: 20%;
    right: 10%;
    animation-delay: -3s;
}

.auth-hero-orb--teal {
    width: 160px;
    height: 160px;
    background: var(--solar-success);
    top: 60%;
    left: 55%;
    animation-delay: -5s;
    opacity: 0.3;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, -50px) scale(1.1);
    }
}

@keyframes heroIconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.auth-hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 500px;
}

.auth-hero-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.25);
    animation: heroIconFloat 4s ease-in-out infinite;
}

.auth-hero h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-hero-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-hero-feature:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.auth-hero-feature i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--solar-primary);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

/* ---- Form Panel (right side) ---- */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 80% 10%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #020617 0%, #0a0f1c 100%);
}

/* ---- Card — Glassmorphism ---- */
.auth-card {
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.auth-card:hover {
    border-color: rgba(245, 158, 11, 0.15);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 40px -8px rgba(245, 158, 11, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-card .card-body {
    padding: 1.5rem 1.75rem !important;
}

/* ---- Logo ---- */
.auth-logo {
    text-align: center;
    margin-bottom: 0.75rem;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-primary-dark));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.5rem;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.auth-logo-icon:hover {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.4);
}

.auth-logo-text {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

/* ---- Auth Heading ---- */
.auth-heading {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-heading h4 {
    font-weight: 700;
    color: white;
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.auth-heading p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
}

/* ---- Form Controls — Dark Theme ---- */
.auth-card .form-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.auth-card .input-group-text {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    color: #64748b;
    border-radius: 0.75rem 0 0 0.75rem;
}

.auth-card .form-control {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.925rem;
    transition: all var(--transition-base);
}

.auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.auth-card .form-control:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--solar-primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
    color: white;
}

.auth-card .form-control:focus+.input-group-text,
.auth-card .input-group:focus-within .input-group-text {
    border-color: var(--solar-primary);
    color: var(--solar-primary);
}

/* ---- Auth Button ---- */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-primary-dark));
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
    letter-spacing: 0.01em;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.4);
    filter: brightness(1.05);
}

.auth-btn:hover::before {
    left: 100%;
}

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

/* ---- Auth Links ---- */
.auth-link {
    color: var(--solar-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: var(--solar-primary-light);
}

.auth-footer {
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin: 0;
}

.auth-footer a {
    color: var(--solar-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--solar-primary-light);
}

/* ---- Remember Me / Forgot Password ---- */
.auth-card .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-card .form-check-input:checked {
    background-color: var(--solar-primary);
    border-color: var(--solar-primary);
}

.auth-card .form-check-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ---- Role Selector Cards ---- */
.auth-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all var(--transition-base);
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.auth-role-card i {
    font-size: 1.25rem;
    transition: transform var(--transition-base);
}

.auth-role-card span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-role-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.btn-check:checked+.auth-role-card {
    border-color: var(--solar-primary);
    background: rgba(245, 158, 11, 0.1);
    color: var(--solar-primary);
    box-shadow: 0 0 0 1px var(--solar-primary), 0 4px 12px rgba(245, 158, 11, 0.15);
}

.btn-check:checked+.auth-role-card i {
    transform: scale(1.15);
    color: var(--solar-primary);
}

/* ---- Success / Confirmation State ---- */
.auth-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--solar-success);
    border: 2px solid rgba(16, 185, 129, 0.2);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
}

/* ---- Validation ---- */
.auth-card .text-danger {
    font-size: 0.78rem;
    margin-top: 0.35rem;
}

.auth-card .validation-summary-valid,
.auth-card .field-validation-valid {
    display: none;
}

.auth-card .validation-summary-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

/* ---- Compact Form Spacing ---- */
.auth-card .mb-3 {
    margin-bottom: 0.5rem !important;
}

.auth-card .mb-4 {
    margin-bottom: 0.6rem !important;
}

.auth-card .form-label {
    margin-bottom: 0.3rem;
}

/* ---- Responsive ---- */
@media (min-width: 992px) {
    .auth-hero {
        display: flex;
    }

    .auth-form-panel {
        max-width: 540px;
    }
}

@media (max-width: 991.98px) {
    .auth-form-panel {
        min-height: 100vh;
        padding: 1.5rem 1.25rem;
    }

    .auth-card .card-body {
        padding: 1.5rem !important;
    }

    .auth-card {
        border-radius: 1.25rem;
    }
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--solar-border);
    background-color: #f8fafc;
}

.form-control:focus {
    background-color: white;
    border-color: var(--solar-primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.input-group-text {
    border: 1px solid var(--solar-border);
    background-color: #f8fafc;
    border-right: none;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

.bg-success-soft {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.bg-warning-soft {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.bg-danger-soft {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Dashboard Utilities */
.border-left-primary {
    border-left: 4px solid var(--solar-primary) !important;
}

.border-left-success {
    border-left: 4px solid var(--solar-success) !important;
}

.border-left-warning {
    border-left: 4px solid var(--solar-warning) !important;
}

.border-left-info {
    border-left: 4px solid var(--solar-info) !important;
}

.text-gray-300 {
    color: #cbd5e1 !important;
}

.text-gray-800 {
    color: var(--solar-text) !important;
}

/* ========================================
   MODERN ENHANCEMENTS & ANIMATIONS
   ======================================== */

/* Animation easing variables (complementam as do :root inicial) */
:root {
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

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

/* Animation Utility Classes */
.animate-fade-in {
    animation: fadeIn var(--transition-slow) var(--ease-out);
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) var(--ease-out);
}

.animate-fade-in-down {
    animation: fadeInDown var(--transition-slow) var(--ease-out);
}

.animate-slide-in-right {
    animation: slideInRight var(--transition-slow) var(--ease-out);
}

.animate-pulse {
    animation: pulse 2s var(--ease-in-out) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Stagger children animations — GPU compositing otimizado */
.stagger-children>* {
    opacity: 0;
    animation: fadeInUp 300ms var(--ease-out) forwards;
    will-change: opacity, transform;
}

.stagger-children>*:nth-child(1) {
    animation-delay: 0ms;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 80ms;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 160ms;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 240ms;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 320ms;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 400ms;
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg,
            #f1f5f9 25%,
            #e2e8f0 37%,
            #f1f5f9 63%);
    background-size: 400px 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 0.5rem;
    color: transparent !important;
}

.skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.625rem;
    border-radius: 0.25rem;
    display: block;
}

.skeleton-text:last-child {
    width: 60%;
}

/* Skeleton table row */
.skeleton-row td {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
}

.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(245, 158, 11, 0.15);
    border-left-color: var(--solar-primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* Enhanced Button States */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Enhanced Card Hover Effects */
.card-hover-lift {
    transition: transform var(--transition-base) var(--ease-out),
        box-shadow var(--transition-base) var(--ease-out);
    will-change: transform;
}

.card-hover-lift:hover {
    /* scale removido — evita layout shift em containers com tabelas/dropdowns */
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Input Enhancements */
.form-control,
.input-group-text {
    transition: all var(--transition-base) var(--ease-out);
}

.form-control:focus {
    transform: translateY(-1px);
}

.form-control.is-valid {
    border-color: var(--solar-success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.375rem) center;
    background-size: calc(0.75em + 0.75rem) calc(0.75em + 0.75rem);
}

.form-control.is-invalid {
    border-color: var(--solar-danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.375rem) center;
    background-size: calc(0.75em + 0.75rem) calc(0.75em + 0.75rem);
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--solar-border);
    overflow: hidden;
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 100%;
    transition: width var(--transition-base) var(--ease-out),
        background-color var(--transition-base) var(--ease-out);
    width: 0;
}

.password-strength-bar.weak {
    width: 33%;
    background-color: var(--solar-danger);
}

.password-strength-bar.medium {
    width: 66%;
    background-color: var(--solar-warning);
}

.password-strength-bar.strong {
    width: 100%;
    background-color: var(--solar-success);
}

/* Toast Notifications Override */
.toast-success {
    background-color: var(--solar-success) !important;
}

.toast-error {
    background-color: var(--solar-danger) !important;
}

.toast-warning {
    background-color: var(--solar-warning) !important;
}

.toast-info {
    background-color: var(--solar-info) !important;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--solar-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
    z-index: 10;
}

.toggle-password:hover {
    color: var(--solar-primary);
}

/* Tooltip Styles */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    background-color: var(--solar-secondary);
    color: white;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    white-space: nowrap;
}

.tooltip-custom .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--solar-secondary) transparent transparent transparent;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Page Preloader */
#page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--solar-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

#page-preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Counter Animation */
.counter {
    /* Forçamos o uso do espaçamento proporcional para consistência visual */
    font-variant-numeric: normal;
}

/* Table Enhancements */
.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table-sortable th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem !important;
}

.table-sortable th::after {
    content: '↕';
    position: absolute;
    right: 0.75rem;
    opacity: 0.3;
    transition: opacity var(--transition-fast);
}

.table-sortable th:hover::after {
    opacity: 0.6;
}

.table-sortable th.sorted-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--solar-primary);
}

.table-sortable th.sorted-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--solar-primary);
}

/* Search/Filter Input */
.search-input {
    position: relative;
}

.search-input input {
    padding-left: 2.5rem;
}

.search-input::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--solar-text-muted);
    pointer-events: none;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Utility Classes */
.hover-scale {
    transition: transform var(--transition-base) var(--ease-out);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-brightness {
    transition: filter var(--transition-base);
}

.hover-brightness:hover {
    filter: brightness(1.1);
}

.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

/* Responsive Table Stackable */
@media (max-width: 991.98px) {

    .table-responsive-stack .thead-light,
    .table-responsive-stack thead {
        display: none;
    }

    .table-responsive-stack tr {
        display: block;
        border: 1px solid var(--solar-border);
        margin-bottom: 1rem;
        border-radius: 0.75rem;
        background-color: var(--solar-surface);
        padding: 0.5rem;
        box-shadow: var(--shadow-sm);
    }

    .table-responsive-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px solid var(--solar-border);
        padding: 0.75rem 0.5rem;
    }

    .table-responsive-stack td:last-child {
        border-bottom: none;
    }

    .table-responsive-stack td::before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--solar-text-muted);
        text-align: left;
        margin-right: 1rem;
    }
}

/* Hide on mobile utility */
@media (max-width: 767.98px) {
    .hide-on-mobile {
        display: none !important;
    }

    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-mobile-full {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Melhorar espaçamento de títulos */
    h1,
    h2,
    h3 {
        font-size: 1.5rem !important;
    }

    h4,
    h5 {
        font-size: 1.25rem !important;
    }

    /* Melhorar touch targets - botões maiores */
    .btn-sm {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .btn {
        padding: 0.625rem 1rem !important;
    }

    /* Dropdown menu de ações em mobile - posição fixa para evitar overflow */
    .dropdown-menu {
        font-size: 0.95rem !important;
        min-width: 200px;
    }

    .dropdown-item {
        padding: 0.75rem 1rem !important;
    }

    /* Badges maiores para melhor legibilidade */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.4em 0.65em !important;
    }

    /* Melhorar espaçamento de cards */
    .card {
        margin-bottom: 1rem !important;
    }

    .card-header {
        padding: 1rem !important;
        font-size: 1rem !important;
    }

    /* Formulários mais espaçados */
    .form-control,
    .form-select {
        font-size: 1rem !important;
        padding: 0.75rem !important;
    }

    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Melhorar espaçamento entre elementos de formulário */
    .mb-3 {
        margin-bottom: 1.25rem !important;
    }

    /* Ajustar modais para tela cheia em mobile */
    .modal-dialog {
        margin: 0.5rem !important;
    }

    .modal-content {
        border-radius: 0.75rem !important;
    }

    .modal-body {
        padding: 1.25rem !important;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem 1.25rem !important;
    }

    /* Melhorar tabelas em mobile - aumentar padding */
    .table-responsive-stack td {
        padding: 1rem 0.75rem !important;
        font-size: 0.9rem !important;
    }

    .table-responsive-stack td::before {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
    }


}

/* Tablet Adjustments (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {

    /* Reduzir padding em tablets */
    .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Ajustar tamanho de títulos */
    h1,
    h2 {
        font-size: 1.75rem !important;
    }

    h3,
    h4 {
        font-size: 1.35rem !important;
    }

    /* Melhorar espaçamento de cards */
    .card-body {
        padding: 1.25rem !important;
    }

    /* Ajustar tabelas para scroll horizontal suave */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Modais um pouco menores */
    .modal-lg {
        max-width: 90% !important;
    }
}

/* Mobile Sidebar Adjustments */
@media (max-width: 767.98px) {
    #sidebar-wrapper {
        width: 100%;
        left: -100%;
        transition: left 0.3s ease-in-out;
    }

    #wrapper.toggled #sidebar-wrapper {
        left: 0;
        margin-left: 0;
    }

    #page-content-wrapper {
        margin-left: 0 !important;
    }
}

/* Mobile Navbar collapse layout */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--solar-surface);
        padding: 1rem;
        border-radius: 0.875rem;
        box-shadow: var(--shadow-lg);
        margin-top: 0.5rem;
        border: 1px solid var(--solar-border);
    }

    .navbar-nav {
        align-items: flex-start !important;
    }

    .navbar-nav .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .navbar-nav .nav-link {
        display: flex;
        align-items: center;
        padding: 0.75rem !important;
        border-radius: 0.5rem;
    }

    .navbar-nav .nav-link:hover {
        background-color: #f8fafc;
    }

    .notification-dropdown {
        position: static !important;
    }

    .notification-counter {
        left: 30px !important;
    }
}

/* User Profile Menu fix */
@media (max-width: 575.98px) {

    .user-profile-menu,
    .notification-menu {
        width: calc(100vw - 2rem) !important;
        position: fixed !important;
        left: 1rem !important;
        right: 1rem !important;
        top: calc(var(--header-height) + 10px) !important;
        transform: none !important;
        z-index: 2000 !important;
    }

    .notification-items-container {
        width: 100% !important;
    }
}

/* Notification Dropdown Styles */
.notification-dropdown {
    z-index: 1060;
}

.notification-dropdown .dropdown-toggle::after {
    display: none;
}

.notification-menu,
.user-profile-menu {
    width: 380px;
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--solar-border) !important;
    z-index: 2000 !important;
    margin-top: 0.5rem !important;
}

.user-profile-menu {
    width: 260px;
}

.notification-items-container {
    max-height: 420px;
    overflow-y: auto;
    width: 380px;
}

.notification-item {
    padding: 1.125rem;
    border-bottom: 1px solid var(--solar-border);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    position: relative;
    background-color: var(--solar-surface);
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item.unread {
    background-color: rgba(245, 158, 11, 0.03);
    /* Light Amber */
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--solar-primary);
}

.notification-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.bg-info-soft {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.bg-success-soft {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.bg-warning-soft {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--solar-primary-dark);
}

.bg-danger-soft {
    background-color: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.notification-content {
    flex-grow: 1;
    min-width: 0;
    /* Important for text truncation/wrapping */
}

.notification-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--solar-text);
    line-height: 1.2;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--solar-text-muted);
    margin-bottom: 0.375rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.notification-message:hover {
    color: var(--solar-primary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--solar-text-muted);
    font-weight: 500;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 0.75rem;
}

.btn-delete-notification {
    color: var(--solar-text-muted);
    opacity: 0.4;
    transition: all 0.2s;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-item:hover .btn-delete-notification {
    opacity: 1;
}

.btn-delete-notification:hover {
    color: var(--solar-danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Profile Dropdown Specifics */
.user-profile-menu .dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    color: var(--solar-text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.user-profile-menu .dropdown-item i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.user-profile-menu .dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--solar-primary-dark);
}

.user-profile-menu .dropdown-item.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.05);
    color: var(--solar-danger) !important;
}

/* ========================================
   MOBILE-FIRST UTILITY CLASSES
   ======================================== */

/* Scroll horizontal suave para tabelas */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--solar-border) transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: var(--solar-border);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: var(--solar-text-muted);
}

/* Melhorar legibilidade de texto em mobile */
@media (max-width: 767.98px) {
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    .small,
    small {
        font-size: 0.85rem !important;
    }

    /* Melhorar contraste de texto muted */
    .text-muted {
        color: #64748b !important;
    }

    /* Espaçamento entre seções */
    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* Melhorar espaçamento de rows */
    .row {
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }

    .row>* {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Ajustar gap em flex containers */
    .gap-3 {
        gap: 0.75rem !important;
    }

    .gap-2 {
        gap: 0.5rem !important;
    }

    /* Melhorar visualização de badges em grupos */
    .d-flex.gap-1 {
        flex-wrap: wrap !important;
        gap: 0.35rem !important;
    }

    /* Ajustar border-start para mobile */
    .border-start {
        border-left: none !important;
        border-top: 1px solid var(--solar-border) !important;
        padding-top: 1rem !important;
        margin-top: 0.5rem !important;
    }

    /* Melhorar visualização de font-monospace */
    .font-monospace {
        font-size: 0.8rem !important;
        word-break: break-all !important;
    }

    /* Ajustar input-group para mobile */
    .input-group {
        flex-wrap: wrap !important;
    }

    .input-group>* {
        flex: 1 1 100% !important;
    }

    /* Melhorar alert em mobile */
    .alert {
        padding: 0.875rem !important;
        font-size: 0.9rem !important;
    }

    /* Ajustar progress bars */
    .progress {
        height: 1.25rem !important;
        font-size: 0.8rem !important;
    }
}

/* Utility: Texto truncado com ellipsis */
.text-truncate-mobile {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .text-truncate-mobile {
        max-width: 200px;
    }
}

/* Utility: Flex direction column em mobile */
@media (max-width: 767.98px) {
    .flex-mobile-column {
        flex-direction: column !important;
    }

    .flex-mobile-column>* {
        width: 100% !important;
    }
}

/* Utility: Centralizar conteúdo em mobile */
@media (max-width: 767.98px) {
    .text-mobile-center {
        text-align: center !important;
    }

    .justify-content-mobile-center {
        justify-content: center !important;
    }
}

/* Melhorar acessibilidade de links */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--solar-primary) !important;
    outline-offset: 2px !important;
}

/* Melhorar área de toque em elementos clicáveis */
@media (max-width: 767.98px) {

    a,
    button,
    .btn,
    .clickable {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Exceções para elementos específicos */
    .btn-link,
    .nav-link,
    .dropdown-item {
        min-height: 40px;
    }

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

/* WhatsApp Support Button */
.btn-support-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border-left: none !important;
}

.btn-support-whatsapp:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    filter: brightness(1.1);
    color: white !important;
}

.btn-support-whatsapp i {
    color: white !important;
    opacity: 1 !important;
}

/* ========================================
   UI/UX PRO MAX — SISTEMA GLOBAL DE QUALIDADE
   Aplicado via skill ui-ux-pro-max
   ======================================== */

/* 1. PREFERS-REDUCED-MOTION — Acessibilidade Crítica */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .stagger-children>* {
        opacity: 1 !important;
        animation: none !important;
    }

    .auth-hero-orb {
        animation: none !important;
    }

    .auth-hero-icon {
        animation: none !important;
    }

    .card-hover-lift:hover {
        transform: none !important;
    }

    .auth-btn:hover {
        transform: none !important;
    }
}

/* 2. BADGE VARIANTE FALTANTE — bg-secondary-soft */
.bg-secondary-soft {
    background-color: rgba(100, 116, 139, 0.12);
    color: #475569;
}

/* 3. NAV TABS PREMIUM — Design refinado para abas */
.nav-tabs {
    border-bottom: 2px solid var(--solar-border);
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    color: var(--solar-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    margin-bottom: -2px;
    cursor: pointer;
}

.nav-tabs .nav-link:hover {
    color: var(--solar-text);
    background-color: rgba(245, 158, 11, 0.05);
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

.nav-tabs .nav-link.active {
    color: var(--solar-primary-dark);
    background-color: transparent;
    border-bottom: 2px solid var(--solar-primary);
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-tabs .nav-link i {
    transition: transform var(--transition-fast);
}

.nav-tabs .nav-link.active i,
.nav-tabs .nav-link:hover i {
    transform: scale(1.15);
    color: var(--solar-primary);
}

/* 4. FORM SELECT PREMIUM */
.form-select {
    border: 1px solid var(--solar-border);
    border-radius: 0.5rem;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.9rem;
    color: var(--solar-text);
    background-color: #f8fafc;
    transition: all var(--transition-base);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--solar-primary);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
    outline: none;
}

/* 5. SCROLL HINT PARA TABELAS EM MOBILE — indica que há conteúdo além */
.table-scroll-wrapper {
    position: relative;
}

@media (max-width: 767.98px) {
    .table-scroll-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9));
        pointer-events: none;
        border-radius: 0 0.75rem 0.75rem 0;
        opacity: 1;
        transition: opacity 0.3s;
    }

    .table-scroll-wrapper.scrolled-end::after {
        opacity: 0;
    }
}

/* 6. EMPTY STATE MELHORADO */
.empty-state-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: var(--solar-text-muted);
}

.empty-state-premium .empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--solar-text-muted);
    border: 1px solid var(--solar-border);
}

.empty-state-premium h6 {
    font-weight: 700;
    color: var(--solar-text);
    margin-bottom: 0.5rem;
}

.empty-state-premium p {
    font-size: 0.875rem;
    max-width: 280px;
    margin: 0;
    line-height: 1.6;
}

/* 7. BADGE PILL REFINADO — evitar overflow em texto longo */
.badge {
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 8. FOCUS VISIBLE GLOBAL — acessibilidade por teclado */
:focus-visible {
    outline: 2px solid var(--solar-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.list-group-item:focus-visible {
    outline: 2px solid var(--solar-primary) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15) !important;
}

/* 9. CARD PREMIUM — min-height para evitar content jumping nos stat cards */
.stat-card {
    min-height: 110px;
}

.stat-card .stat-value {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

/* 10. TABLE ROW HOVER MAIS ELEGANTE */
.table-hover tbody tr:hover {
    background-color: rgba(245, 158, 11, 0.03);
    transition: background-color var(--transition-fast);
}

.table-premium tbody tr:hover td {
    background-color: rgba(245, 158, 11, 0.025);
}

/* 11. INPUT GROUP — arredondamento consistente */
.input-group>.form-control:not(:last-child),
.input-group>.form-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group>.form-control:not(:first-child),
.input-group>.form-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 12. DROPDOWN MENU PREMIUM */
.dropdown-menu {
    border: 1px solid var(--solar-border);
    border-radius: 0.875rem;
    box-shadow: var(--shadow-lg);
    padding: 0.375rem;
    background-color: #ffffff;
    animation: fadeInDown 150ms var(--ease-out);
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--solar-text-muted);
    transition: all var(--transition-fast);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(245, 158, 11, 0.06);
    color: var(--solar-text);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.dropdown-divider {
    margin: 0.375rem 0;
    border-color: var(--solar-border);
    opacity: 1;
}

/* 13. PAGINAÇÃO PREMIUM */
.pagination .page-link {
    border-radius: 0.5rem;
    border: 1px solid var(--solar-border);
    color: var(--solar-text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    margin: 0 0.125rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.pagination .page-link:hover {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--solar-primary-dark);
}

.pagination .page-item.active .page-link {
    background-color: var(--solar-primary);
    border-color: var(--solar-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* 14. ALERT PREMIUM */
.alert {
    border-radius: 0.875rem;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    border-left: 4px solid var(--solar-info);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-left: 4px solid var(--solar-success);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    color: #92400e;
    border-left: 4px solid var(--solar-warning);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border-left: 4px solid var(--solar-danger);
}

/* 15. CURSOR POINTER EM TODOS ELEMENTOS INTERATIVOS */
.btn,
.nav-link,
.list-group-item-action,
.dropdown-item,
.page-link,
[role="button"],
[data-bs-toggle],
.clickable {
    cursor: pointer;
}

/* 16. TRANSIÇÕES SUAVES EM FORM CONTROLS */
.form-control,
.form-select {
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        background-color var(--transition-base);
}

/* Remove transform no focus — evita layout shift */
.form-control:focus {
    transform: none;
}

/* 17. SCROLLBAR GLOBAL REFINADA */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--solar-border);
    border-radius: 4px;
    border: 2px solid var(--solar-bg);
}

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

/* 18. PRINT STYLES BÁSICOS */
@media print {

    #sidebar-wrapper,
    .navbar,
    #page-preloader,
    .btn,
    .modal {
        display: none !important;
    }

    #page-content-wrapper {
        margin-left: 0 !important;
    }

    .card-premium {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}

/* ============================================
   19. PWA — Install, Update & Offline UI
   ============================================ */

/* --- Install Banner (bottom sheet) --- */
#pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1rem env(safe-area-inset-bottom) 1rem;
}

#pwa-install-banner.show {
    transform: translateY(0);
}

.pwa-install-content {
    max-width: 600px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--solar-border);
    border-radius: 1.25rem;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--solar-primary);
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    min-width: 140px;
}

.pwa-install-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--solar-text);
    line-height: 1.3;
}

.pwa-install-text span {
    display: block;
    font-size: 0.8rem;
    color: var(--solar-text-muted);
    margin-top: 2px;
}

.pwa-install-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-action-install {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-primary-dark));
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.pwa-action-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.pwa-action-dismiss {
    padding: 0.625rem 1rem;
    background: transparent;
    color: var(--solar-text-muted);
    border: 1px solid var(--solar-border);
    border-radius: 0.625rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-action-dismiss:hover {
    background: var(--solar-bg);
    color: var(--solar-text);
}

/* --- Update Banner (top bar) --- */
#pwa-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#pwa-update-banner.show {
    transform: translateY(0);
}

.pwa-update-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--solar-secondary), #1e293b);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.pwa-update-content i {
    color: var(--solar-primary);
    animation: spin 2s linear infinite;
}

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

.pwa-update-btn {
    padding: 0.375rem 1rem;
    background: var(--solar-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-update-btn:hover {
    background: var(--solar-primary-dark);
    transform: scale(1.05);
}

.pwa-update-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.pwa-update-close:hover {
    color: white;
}

/* --- Offline Toast --- */
#pwa-offline-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--solar-secondary);
    color: white;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

#pwa-offline-toast.show {
    transform: translateX(-50%) translateY(0);
}

#pwa-offline-toast i {
    color: var(--solar-danger);
    font-size: 0.9rem;
}

#pwa-offline-toast.online {
    background: linear-gradient(135deg, #059669, #10b981);
}

#pwa-offline-toast.online i {
    color: white;
}

/* --- PWA Standalone Mode Enhancements --- */
@media (display-mode: standalone) {
    /* Remover scroll bounce no iOS */
    html {
        overscroll-behavior: none;
    }

    /* Adicionar safe-area padding no sidebar */
    #sidebar-wrapper {
        padding-top: env(safe-area-inset-top);
    }

    /* Adicionar safe-area no navbar */
    .navbar {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--header-height) + env(safe-area-inset-top));
    }

    /* Body padding para safe areas */
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    /* Fixed bottom elements need safe-area */
    #pwa-install-banner {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Responsive adjustments para PWA banners */
@media (max-width: 480px) {
    .pwa-install-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .pwa-install-actions {
        width: 100%;
        flex-direction: column;
    }

    .pwa-action-install,
    .pwa-action-dismiss {
        width: 100%;
    }

    .pwa-update-content {
        font-size: 0.8rem;
        padding: 0.625rem 1rem;
    }
}