body { font-family: 'Inter', sans-serif; background-color: #000; color: #e4e4e7; }
        
/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #09090b; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* Sidebar Transitions */
#sidebar { transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
main { transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* Collapsed State Styles - STRICT HIDING */
.sidebar-collapsed .logo-text,
.sidebar-collapsed .nav-label, 
.sidebar-collapsed .section-header,
.sidebar-collapsed .user-info, 
.sidebar-collapsed .toggle-btn { 
    display: none !important; 
    opacity: 0; 
    width: 0;
    pointer-events: none;
}

/* Centering Icons in Collapsed State */
.sidebar-collapsed .logo-container {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* FIX: Force the inner logo wrapper to center content when collapsed */
.sidebar-collapsed .logo-container > div {
    width: auto !important;
    justify-content: center !important;
}

.sidebar-collapsed .nav-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 48px; 
    margin-left: auto;
    margin-right: auto;
}

/* Tooltip Logic */
.sidebar-collapsed .nav-item:hover::after { display: none; }

/* Filter Scrollbar */
.filter-scroll::-webkit-scrollbar { height: 4px; }
.filter-scroll::-webkit-scrollbar-track { background: transparent; }
.filter-scroll::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }
.filter-scroll { -webkit-overflow-scrolling: touch; }

/* Slide-Over Panel */
#quick-view-panel { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.panel-overlay { transition: opacity 0.3s ease; }

/* Pulse Animation */
@keyframes pulse-health {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.health-dot-active { animation: pulse-health 2s infinite; }

/* Improved Row Hover */
.roster-row {
    transition: background-color 0.15s ease-in-out;
}
.roster-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
/* Safe Area Padding Utilities */
.pb-safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}
.pt-safe-top {
    padding-top: env(safe-area-inset-top, 20px);
}

/* Mobile Card View Transformation */
@media (max-width: 768px) {
    /* Hide table headers */
    thead {
        display: none;
    }

    /* Convert table to block layout */
    table, tbody, th, td, tr {
        display: block;
    }

    /* Style Rows as Cards */
    tr.roster-row {
        background-color: rgba(24, 24, 27, 0.5); /* zinc-900/50 */
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0.75rem;
        margin-bottom: 1rem;
        padding: 1rem;
        position: relative;
    }

    /* Adjust Cell Styling */
    td {
        border: none;
        padding: 0.5rem 0;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        min-height: 2.5rem;
    }

    /* Add Labels via pseudo-element */
    td:before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 700;
        color: #71717a; /* zinc-500 */
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-right: 1rem;
    }

    /* Specific Cell Overrides */

    /* Artist Name/Image - Top of Card */
    td[data-label="Artist"] {
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    td[data-label="Artist"]:before {
        display: none; /* Hide "Artist" label */
    }

    /* Actions - Bottom of Card */
    td[data-label="Actions"] {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        justify-content: flex-end;
    }
    td[data-label="Actions"]:before {
        display: none;
    }
}

/* --- Telegram Chat Styles --- */

.chat-bubble {
    position: relative;
    padding: 6px 10px 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    font-size: 14px;
    line-height: 1.4;
    color: #000;
    min-width: 120px; /* Ensure space for time */
    overflow-wrap: anywhere; /* Fix for long text peeling out */
    word-break: break-word; /* Fix for long text peeling out */
}

/* Ensure images and videos stay inside bubble */
.chat-bubble img, .chat-bubble video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Sent (Admin) - Gray #E5E5EA */
.chat-bubble-sent {
    background-color: #E5E5EA;
    border-bottom-right-radius: 0;
    color: #000;
}
.chat-bubble-sent.has-tail::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: -6px;
    width: 0;
    height: 0;
    border-left: 10px solid #E5E5EA;
    border-top: 10px solid transparent;
}

/* Received (Artist) - Blue #007AFF */
.chat-bubble-received {
    background-color: #007AFF;
    border-bottom-left-radius: 0;
    color: #FFF;
}
.chat-bubble-received.has-tail::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-right: 10px solid #007AFF;
    border-top: 10px solid transparent;
}

.chat-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 10px;
    margin-top: 2px;
    margin-left: auto;
    width: fit-content;
    float: right;
    padding-left: 8px;
    opacity: 0.6;
}

.chat-bubble-sent .chat-meta { color: #71717a; } /* Dark gray for gray bubble */
.chat-bubble-received .chat-meta { color: #e4e4e7; } /* Whiteish for blue bubble */

/* Unread Badge Animation */
@keyframes pop-in {
    0% { transform: scale(0); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.unread-badge {
    animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --- FULLCALENDAR OVERRIDES (DARK MODE) --- */
:root {
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: rgba(255,255,255,0.05);
    --fc-neutral-text-color: #a1a1aa;
    --fc-border-color: rgba(255,255,255,0.1);

    --fc-button-text-color: #fff;
    --fc-button-bg-color: #18181b;
    --fc-button-border-color: rgba(255,255,255,0.1);
    --fc-button-hover-bg-color: #27272a;
    --fc-button-hover-border-color: rgba(255,255,255,0.2);
    --fc-button-active-bg-color: #10b981;
    --fc-button-active-border-color: #059669;

    --fc-event-bg-color: #3b82f6;
    --fc-event-border-color: #2563eb;
    --fc-today-bg-color: rgba(16, 185, 129, 0.05);
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: var(--fc-border-color) !important;
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.fc .fc-col-header-cell-cushion {
    color: #a1a1aa;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding-top: 8px;
    padding-bottom: 8px;
}

.fc .fc-daygrid-day-number {
    color: #e4e4e7;
    font-size: 0.875rem;
    padding: 8px;
}

.fc .fc-list-event:hover td {
    background-color: rgba(255,255,255,0.05);
}

.fc-popover {
    background-color: #18181b !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.fc-popover-header {
    background-color: #09090b !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.fc-popover-title {
    color: white;
    font-weight: bold;
}

.fc-event {
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
