/* ================================================================
   Custom Branding - Comité de Ética UNCA
   Premium UI Enhancements (v2 - Glassmorphism & High-End Design)
   ================================================================ */

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

:root {
    --unca-maroon: #7c2d36;
    --unca-maroon-dark: #5c1f27;
    --unca-maroon-mid: #8e3442;
    --unca-maroon-light: #a04050;
    --unca-green: #4ade80;
    --unca-green-dark: #22c55e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* ================================================================
   GLOBAL STYLES
   ================================================================ */
body {
    font-family: 'Montserrat', sans-serif !important;
    background-color: #f0f2f5 !important;
    -webkit-font-smoothing: antialiased;
}

/* ================================================================
   SIDEBAR - Premium Gradient + Glassmorphism
   ================================================================ */
.fi-sidebar {
    background: linear-gradient(165deg,
            var(--unca-maroon-dark) 0%,
            var(--unca-maroon) 50%,
            var(--unca-maroon-mid) 100%) !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
}

.fi-sidebar-header {
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.5rem !important;
}

.fi-logo img {
    height: 3rem !important;
    width: 3rem !important;
    border: 2px solid var(--unca-green) !important;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3) !important;
    padding: 2px !important;
    background: white !important;
    border-radius: 50% !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fi-logo:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Sidebar Item Enhancements */
.fi-sidebar-item-btn {
    margin: 0.25rem 0.75rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-left: none !important;
}

.fi-sidebar-item-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(4px);
}

.fi-sidebar-item.fi-active>.fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border-right: 4px solid rgba(255, 255, 255, 0.7) !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* Gray text with white border for sidebar labels */
.fi-sidebar-item-label {
    color: #4b5563 !important; /* Gray-600 */
    text-shadow: 
        -1px -1px 0 #fff,  
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
    font-weight: 600 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #ffffff !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}

/* ================================================================
   TOPBAR - Sleek & Modern
   ================================================================ */
.fi-topbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

/* Forcing Topbar icons to be visible against white-ish bg */
.fi-topbar .fi-icon-btn svg,
.fi-topbar .fi-topbar-item-icon,
.fi-topbar-item-btn svg {
    color: var(--unca-maroon) !important;
}

.fi-topbar .fi-user-name {
    color: #1f2937 !important;
    font-weight: 700 !important;
}

/* User Role Badge in Topbar (from renderHook) */
.text-unca-green {
    color: #16a34a !important;
    /* Slightly darker green for readability on light topbar */
    font-weight: 800;
}

/* ================================================================
   MAIN CONTENT & CARDS
   ================================================================ */
.fi-main {
    padding: 2rem !important;
}

.fi-wi-stats-overview-stat,
.fi-wi-widget,
.fi-section,
.fi-ta-content {
    border-radius: 1.25rem !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    overflow: hidden;
}

.fi-wi-stats-overview-stat {
    position: relative;
}

.fi-wi-stats-overview-stat::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(124, 45, 54, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

/* Section Header & Table Header Styling (User Request: gris clarito transparentoso) */
.fi-section-header,
.fi-ta-header,
.fi-ta-header-cell {
    background-color: rgba(243, 244, 246, 0.6) !important;
    backdrop-filter: blur(6px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.fi-section-header {
    padding: 0.85rem 1.5rem !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
}

.fi-ta-header {
    padding: 1rem 1.5rem !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
}

.fi-section:hover .fi-section-header,
.fi-ta-content:hover .fi-ta-header {
    background-color: rgba(229, 231, 235, 0.8) !important;
}

.fi-header-heading {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    font-size: 1.875rem !important;
    letter-spacing: -0.04em !important;
}

/* ================================================================
   TABLES - High Contrast & Clean
   ================================================================ */
.fi-ta-header-cell {
    background: #f9fafb !important;
    padding: 1rem !important;
}

.fi-ta-header-cell-label {
    color: #6b7280 !important;
    font-weight: 700 !important;
}

.fi-ta-record {
    transition: background-color 0.15s ease !important;
}

.fi-ta-record:hover {
    background-color: #f9fafb !important;
}

/* ================================================================
   FORM COMPONENTS
   ================================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    transition: all 0.2s ease !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--unca-maroon) !important;
    box-shadow: 0 0 0 4px rgba(124, 45, 54, 0.1) !important;
}

/* ================================================================
   BUTTONS - Gradient & Depth
   ================================================================ */
.fi-btn-primary {
    background: linear-gradient(135deg, var(--unca-maroon) 0%, var(--unca-maroon-dark) 100%) !important;
    padding: 0.6rem 1.5rem !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 15px -3px rgba(124, 45, 54, 0.2) !important;
}

.fi-btn-primary:active {
    transform: scale(0.96);
}

/* ================================================================
   NOTIFICATIONS PANEL
   ================================================================ */
.fi-no-notification {
    border-radius: 1rem !important;
    box-shadow: var(--glass-shadow) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar for a cleaner look */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(124, 45, 54, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 45, 54, 0.4);
}