
:root {
    --bg-dark: #050505;
    --accent-blue: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-muted: #6b7280;
}

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.liquid-glass { 
    background: var(--glass-bg); 
    backdrop-filter: blur(24px); 
    border: 1px solid var(--glass-border); 
    border-radius: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}

.liquid-glass:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-[10px] uppercase font-bold tracking-[0.2em];
    font-size: 10px;
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.sidebar-link.active i {
    color: var(--accent-blue);
}

.text-glow { text-shadow: 0 0 40px rgba(59, 130, 246, 0.4); }

/* Clean Modern Sidebar */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 3rem 1.5rem;
    background: #050505;
    border-right: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 16px; /* Espaço fixo entre ícone e texto */
    padding: 0.85rem 1.25rem;
    margin-bottom: 0.25rem;
    border-radius: 0.75rem;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.2s ease;
}

.sidebar-link i, .sidebar-link svg {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    flex-shrink: 0;
}

/* Chat Specific Styles */
.chat-layout {
    display: flex;
    height: calc(100vh - 8rem); /* Descontando breadcrumbs e padding */
    gap: 2rem;
}

.chat-channels {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.03);
    padding-right: 2rem;
}

.channel-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #444;
    font-[10px] font-bold uppercase tracking-widest;
    font-size: 10px;
    transition: all 0.2s;
}

.channel-link:hover, .channel-link.active {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

/* Email Viewer Styles */
.email-list {
    width: 350px;
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow-y: auto;
}

.email-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s;
}

.email-item:hover {
    background: rgba(255,255,255,0.02);
}

.email-item.active {
    background: rgba(59, 130, 246, 0.05);
    border-right: 2px solid var(--accent-blue);
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    padding: 1.5rem;
    text-align: center;
    border-radius: 1.5rem;
    background: rgba(255,255,255,0.02);
    transition: all 0.3s;
    cursor: pointer;
}

.resource-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-5px);
}

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 1.5rem;
    overflow: hidden;
}

.calendar-day {
    aspect-ratio: 1;
    padding: 1.5rem;
    background: #050505;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: rgba(255,255,255,0.02);
}

.calendar-day.today {
    background: rgba(59, 130, 246, 0.03);
}

.calendar-day.today .day-number {
    color: var(--accent-blue);
}

.day-number {
    font-size: 10px;
    font-weight: 900;
    color: #333;
    margin-bottom: 1rem;
    display: block;
}

.event-tag {
    font-size: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
}

.kanban-column {
    flex: 1;
    min-width: 300px;
}

.kanban-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.kanban-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
    cursor: grab;
    transition: all 0.3s;
}

.kanban-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

.sidebar-link.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
}

.sidebar-link.active i {
    color: var(--accent-blue);
    opacity: 1;
}

.sidebar-section-label {
    font-size: 9px;
    font-weight: 900;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin: 2.5rem 0 1rem 1rem;
}

/* Breadcrumbs (Ladder path) */
.ladder-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #333;
    margin-bottom: 3rem;
}

.ladder-breadcrumb span.active {
    color: var(--accent-blue);
}

.role-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.btn-pill {
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.2em;
    font-size: 9px;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 20px; }

/* ── Form fields — force dark theme across all pages ─────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select,
textarea {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.08);
    -webkit-text-fill-color: #ffffff;
    color-scheme: dark;
}

/* Browser autocomplete override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0d0d0d inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

select option {
    background-color: #0d0d0d;
    color: #ffffff;
}

/* Role-gated financial values — blurred for non-admin */
.restricted-value { transition: filter .2s; }
body:not(.is-admin) .restricted-value { filter: blur(8px); pointer-events: none; user-select: none; }

/* Dashboard Titles */
.page-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

/* ── Notification panel ─────────────────────────────────────────────────── */
#nl-notif-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 360px;
    background: #070707; border-left: 1px solid rgba(255,255,255,.06);
    z-index: 500; display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s cubic-bezier(0.16,1,0.3,1);
    box-shadow: -24px 0 60px rgba(0,0,0,.7);
}
#nl-notif-panel.open  { transform: translateX(0); }

#nl-notif-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 499;
}
#nl-notif-overlay.visible { display: block; }

.nl-bell-badge {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: -5px; right: -5px;
    min-width: 16px; height: 16px; border-radius: 99px;
    background: #ef4444; color: #fff;
    font-size: 7px; font-weight: 900; letter-spacing: 0;
    padding: 0 3px; border: 2px solid #050505;
}
.nl-bell-badge.hidden { display: none; }

.notif-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    transition: background .12s; cursor: pointer;
    text-decoration: none; border: 1px solid transparent;
    color: inherit;
}
.notif-item:hover  { background: rgba(255,255,255,.03); }
.notif-item.n-warn { border-color: rgba(249,115,22,.15); }
.notif-item.n-err  { border-color: rgba(239,68,68,.15);  }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }

/* ── Mobile responsive ──────────────────────────────────────────────────── */
#nl-mobile-toggle {
    display: none;
    position: fixed; top: .9rem; left: .9rem; z-index: 200;
    width: 40px; height: 40px; border-radius: 11px;
    background: rgba(5,5,5,.92); border: 1px solid rgba(255,255,255,.09);
    align-items: center; justify-content: center;
    color: #fff; cursor: pointer; backdrop-filter: blur(12px);
}

#nl-mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 149;
}
#nl-mobile-overlay.visible { display: block; }

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(0.16,1,0.3,1);
        z-index: 150;
    }
    .sidebar.mobile-open  { transform: translateX(0); }
    .main-content         { margin-left: 0 !important; width: 100% !important; }
    #nl-mobile-toggle     { display: flex; }
    #nl-notif-panel       { width: min(360px, 92vw); }
}
