:root {
    --bg-app: #000000;
    --bg-sidebar: #000000;
    --bg-card: #0A0A0A;
    --bg-input: #050505;

    --border-base: #27272a; /* zinc-800 */
    --border-subtle: rgba(255,255,255,0.08);

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa; /* zinc-400 */

    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: #0A0A0A;
    --fc-neutral-text-color: #a1a1aa;
    --fc-border-color: #27272a;

    --fc-button-text-color: #fff;
    --fc-button-bg-color: transparent;
    --fc-button-border-color: #27272a;
    --fc-button-hover-bg-color: #27272a;
    --fc-button-hover-border-color: #3f3f46;
    --fc-button-active-bg-color: #27272a;
    --fc-button-active-border-color: #fff;

    --fc-event-bg-color: #27272a;
    --fc-event-border-color: #3f3f46;
    --fc-today-bg-color: rgba(255,255,255,0.03);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em; /* tight */
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* Custom Scrollbar utility class */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 2px; }

/* Animation Utilities */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in-from-right {
    animation: slideInRight 0.3s ease-out forwards;
}

@keyframes zoomIn95 {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.zoom-in-95 {
    animation: zoomIn95 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Sidebar Collapsed State */
.sidebar-collapsed .logo-text,
.sidebar-collapsed #plan-badge,
.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;
}
.sidebar-collapsed .logo-container > div { width: auto !important; }
.sidebar-collapsed .nav-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 40px;
    margin: 0 auto 4px auto;
}
.sidebar-collapsed .nav-item .relative.shrink-0 { margin: 0 !important; }
.sidebar-collapsed .logo-container {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.sidebar-collapsed .nav-item:hover::after { display: none; }

/* --- COMPONENT CLASSES (LINEAR STYLE) --- */
/* Core UI components shared with Artist Portal */

.l-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-base);
    border-radius: 0.75rem; /* rounded-xl */
    overflow: hidden;
}

.l-card-hover {
    transition: all 0.2s ease;
}
.l-card-hover:hover {
    border-color: #3f3f46; /* zinc-700 */
    background-color: #101012;
}

.l-btn-primary {
    background-color: #ffffff;
    color: #000000;
    font-weight: 500;
    font-size: 0.875rem; /* text-sm */
    padding: 0.5rem 1rem;
    border-radius: 0.375rem; /* rounded-md */
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.l-btn-primary:hover {
    background-color: #e4e4e7; /* zinc-200 */
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

.l-btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-base);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}
.l-btn-secondary:hover {
    color: #ffffff;
    border-color: #52525b; /* zinc-600 */
    background-color: rgba(255,255,255,0.02);
}

.l-btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}
.l-btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.l-btn-icon {
    padding: 0.375rem;
    color: var(--text-secondary);
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}
.l-btn-icon:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.05);
}

.l-input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-base);
    color: white;
    font-size: 0.875rem;
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.5rem 0.75rem;
    width: 100%;
    outline: none;
    transition: border-color 0.15s, background-color 0.15s;
}
.l-input:focus {
    border-color: #52525b; /* zinc-600 */
    background-color: #000000;
}
.l-input::placeholder {
    color: #52525b; /* zinc-600 */
}

/* Badge Utility */
.l-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: 1px solid transparent;
}

/* Modals */
.l-modal-content {
    background-color: #09090b; /* Slightly darker than card */
    border: 1px solid var(--border-base);
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .l-modal-content {
        max-height: 100vh !important;
        border-radius: 0;
        height: 100%;
    }
}

/* Sidebar Active State */
.nav-item.active {
    background-color: #111;
    color: white;
    font-weight: 500;
    border: 1px solid transparent;
}
.nav-item.active i { color: currentColor; }
/* Section Headers */
.section-header {
    font-size: 11px;
    font-weight: 600;
    color: #52525b; /* zinc-600 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 12px;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Premium Table - Linear Style */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}
.premium-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #a1a1aa; /* zinc-400 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-base);
    background-color: rgba(255,255,255,0.02);
}
.premium-table td {
    padding: 0.75rem 1rem;
    color: #d4d4d8; /* zinc-300 */
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: color 0.15s;
}
.premium-table tr:hover td {
    background-color: rgba(255,255,255,0.02);
    color: #ffffff;
}
.premium-table tr:last-child td {
    border-bottom: none;
}
.premium-table .cell-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #71717a; /* zinc-500 */
}

/* 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); }

/* --- Chat Styles (Refined) --- */
.chat-bubble {
    position: relative;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.chat-bubble-sent {
    background-color: #27272a; /* Zinc 800 */
    border-bottom-right-radius: 2px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.05);
}
.chat-bubble-received {
    background-color: #2563eb; /* Blue 600 */
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255,255,255,0.05);
}
.chat-meta {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 4px;
    text-align: right;
}

/* --- Inbox V2 (Vercel/Linear Style) --- */

/* Thread List */
.thread-item {
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}
.thread-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}
.thread-item.active {
    background-color: rgba(255, 255, 255, 0.06);
    border-left-color: #fff;
}

/* Chat Area */
.chat-container {
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.message-group {
    margin-bottom: 1.5rem;
}

.message-bubble {
    font-size: 0.875rem; /* 14px */
    line-height: 1.6;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem; /* rounded-lg */
    position: relative;
    transition: background-color 0.2s;
    max-width: 100%;
}

/* Sender: Admin (Me) - Minimalist, no background, just text alignment or subtle bg */
.message-me .message-bubble {
    background-color: #27272a; /* Zinc 800 */
    color: #fff;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Sender: Artist (Them) */
.message-them .message-bubble {
    background-color: transparent;
    color: #e4e4e7; /* Zinc 200 */
    border: 1px solid rgba(255,255,255,0.1);
}

.message-timestamp {
    font-size: 0.65rem;
    color: #52525b; /* Zinc 600 */
    margin-top: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.message-group:hover .message-timestamp {
    opacity: 1;
}

/* Input Area */
.chat-input-wrapper {
    background: #09090b;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

.chat-textarea {
    min-height: 44px;
    max-height: 200px;
    line-height: 1.5;
}

/* Alias Badge */
.alias-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #71717a; /* Zinc 500 */
    margin-bottom: 0.25rem;
    display: block;
}

/* --- FULLCALENDAR OVERRIDES --- */
.fc-theme-standard td, .fc-theme-standard th {
    border-color: var(--fc-border-color) !important;
}
.fc .fc-toolbar-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: white;
}
.fc .fc-col-header-cell-cushion {
    color: var(--fc-neutral-text-color);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.fc .fc-daygrid-day-number {
    color: #d4d4d8;
    font-size: 0.8rem;
    padding: 8px;
}
.fc-popover {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
.fc-popover-header {
    background-color: var(--bg-app) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

/* Mini Calendar */
#mini-calendar .fc-toolbar-title {
    font-size: 0.8rem !important;
    font-weight: 600;
    padding-left: 4px;
}
#mini-calendar .fc-button {
    width: 24px !important;
    height: 24px !important;
}
#mini-calendar .fc-daygrid-day-number {
    font-size: 0.75rem !important;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 6px; /* slightly squared */
}
#mini-calendar .fc-day-today .fc-daygrid-day-number {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 700;
}

/* --- UTILITY ADDITIONS FOR DASHBOARD V2 --- */

.l-card-gradient {
    position: relative;
    overflow: hidden;
}
.l-card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0.5;
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #27272a transparent;
}
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #27272a;
    border-radius: 4px;
}

/* Glass effect for overlays */
.l-glass {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Text Gradient */
.text-gradient-primary {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to bottom right, #ffffff, #a1a1aa);
}
