/* Custom styling for AI Chat Platform Custom Theme */
:root {
    --bg-dark-base: #090d16;
    --bg-dark-card: #121826;
    --bg-dark-hover: #1b2336;
    --border-dark: #1f2a3f;
    --border-light: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-glow: linear-gradient(135deg, #8b5cf6, #ec4899);
    --accent-green: #10b981;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* ==========================================================================
   SHARED READ ONLY BANNER & MODE
   ========================================================================== */
.shared-chat-banner {
    background: var(--accent-glow);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.shared-chat-banner i {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Hide navigation panels when viewing a public share link */
body.share-mode .sidebar {
    display: none !important;
}
body.share-mode .chat-header .mobile-toggle-btn {
    display: none !important;
}
body.share-mode #chatInputArea {
    display: none !important;
}
body.share-mode #chatControlsPanel {
    display: none !important;
}

/* ==========================================================================
   AUTH PAGES STYLING (LOGIN / REGISTER)
   ========================================================================== */
.auth-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #090d16, #0d1527, #131e38, #090d16);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    padding: 20px;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Blurred Circles (v14.0.0) */
.auth-glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.auth-glow-circle.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-purple);
    top: 10%;
    left: 15%;
    animation: floatGlow1 25s ease-in-out infinite alternate;
}

.auth-glow-circle.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    bottom: 10%;
    right: 15%;
    animation: floatGlow2 30s ease-in-out infinite alternate;
}

.auth-glow-circle.circle-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-pink);
    top: 50%;
    left: 60%;
    animation: floatGlow3 20s ease-in-out infinite alternate;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-120px, -60px) scale(0.9); }
}

@keyframes floatGlow3 {
    0% { transform: translate(0, 0) scale(0.9); }
    100% { transform: translate(50px, -80px) scale(1.1); }
}

.auth-card {
    position: relative;
    z-index: 2; /* Render above glow circles */
    background: rgba(18, 24, 38, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.pulse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(139, 92, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--accent-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-errors {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #f87171;
    font-size: 13px;
    margin-bottom: 20px;
}

.auth-errors p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #34d399;
    font-size: 13px;
    margin-bottom: 20px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"] {
    width: 100%;
    background-color: rgba(9, 13, 22, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    padding: 12px 15px 12px 42px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-wrapper input:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--accent-purple);
}

.auth-btn {
    width: 100%;
    background: var(--accent-glow);
    border: none;
    border-radius: 10px;
    padding: 14px;
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   MAIN DASHBOARD LAYOUT (CHAT AREA & SIDEBAR)
   ========================================================================== */
.dashboard-container {
    display: flex;
    height: 100%;
    width: 100vw;
    position: relative;
}

body.share-mode .dashboard-container {
    height: calc(100% - 45px); /* Reduce banner offset */
}

/* Sidebar layout */
.sidebar {
    width: 280px;
    background-color: var(--bg-dark-card);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
    z-index: 99;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-dark);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-glow);
    color: white;
}

.logo h2 {
    font-size: 18px;
    font-weight: 700;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
}

.new-chat-btn {
    margin: 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-chat-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-purple);
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.search-trigger-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-dark-base);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.search-trigger-btn i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.search-trigger-btn span {
    color: var(--text-muted);
    font-size: 13px;
    user-select: none;
    font-family: var(--font-body);
    transition: color 0.2s ease;
}

.search-trigger-btn:hover {
    border-color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.05);
}

.search-trigger-btn:hover i {
    color: var(--text-primary);
}

.search-trigger-btn:hover span {
    color: var(--text-primary);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background-color: var(--bg-dark-base);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 10px 10px 10px 36px;
    color: var(--text-primary);
    font-size: 13px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section h3 i {
    width: 14px;
    height: 14px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title-row h3 {
    margin-bottom: 0;
}

.icon-add-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.icon-add-btn:hover {
    color: var(--text-primary);
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    background-color: var(--bg-dark-hover);
    color: var(--text-primary);
}

.sidebar-item.active {
    background-color: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.sidebar-item .item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.item-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    padding: 2px;
}

.sidebar-item:hover .item-delete-btn {
    display: block;
}

.item-delete-btn:hover {
    color: #ef4444;
}

/* Media grid in sidebar */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.media-thumb {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-dark);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.media-thumb:hover {
    border-color: var(--accent-cyan);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Custom instructions box */
.memory-input-box {
    position: relative;
}

.memory-input-box textarea {
    width: 100%;
    background-color: var(--bg-dark-base);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 12px;
    height: 80px;
    resize: none;
}

.memory-input-box textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.memory-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    background-color: var(--accent-green);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-dark);
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 12px;
    column-gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-dark);
    object-fit: cover;
}

.search-result-item:hover {
    background: var(--bg-dark-light) !important;
}

.lib-tabs-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    padding: 4px;
    border-radius: 30px;
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    width: fit-content;
}

.lib-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
}

.lib-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.lib-tab-btn.active {
    background: rgba(6, 182, 212, 0.15) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    color: var(--accent-cyan) !important;
}

.lib-context-menu {
    position: absolute;
    top: 35px;
    right: 20px;
    background: #18181b !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.7);
    z-index: 1200;
    width: 155px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 4px;
}

.lib-context-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #e4e4e7 !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.lib-context-menu a:hover {
    background: rgba(6, 182, 212, 0.1) !important;
    color: var(--accent-cyan) !important;
}

.lib-context-menu a.lib-ctx-delete:hover,
.lib-context-menu a.lib-ctx-delete-perm:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}

.user-details .username {
    font-size: 13px;
    font-weight: 600;
}

.tier-indicator {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

.tier-badge, .source-badge {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

.tier-free { background-color: #d97706; color: #fff; }
.tier-paid { background-color: var(--accent-green); color: #fff; }
.source-badge { background-color: #3b82f6; color: #fff; }

.logout-btn {
    color: var(--text-secondary);
    cursor: pointer;
}

.logout-btn:hover {
    color: #ef4444;
}

/* Skeleton Loading state */
.skeleton-loader {
    height: 35px;
    background: linear-gradient(90deg, var(--bg-dark-base) 25%, var(--border-dark) 50%, var(--bg-dark-base) 75%);
    background-size: 200% 100%;
    animation: loadingAnim 1.5s infinite;
    border-radius: 6px;
}

@keyframes loadingAnim {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ==========================================================================
   CHAT AREA VIEWPORT & CONTROLS
   ========================================================================== */
.chat-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-dark-base);
}

.chat-header {
    height: 70px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.mobile-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    margin-right: 15px;
}

.chat-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-info h2 {
    font-size: 16px;
    font-weight: 600;
}

.project-tag {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.chat-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Deep Research slider switch */
.toggle-control {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.toggle-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background-color: var(--border-dark);
    border-radius: 10px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-control input:checked + .slider {
    background: var(--accent-glow);
}

.toggle-control input:checked + .slider-purple {
    background: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.toggle-control input:checked + .slider-cyan {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.toggle-control input:checked + .slider-green {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.toggle-control input:checked + .slider:before {
    transform: translateX(16px);
}

.toggle-control .label-text {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-control .label-text i {
    width: 15px;
    height: 15px;
}

/* Dropdown styling */
.model-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.model-dropdown-wrapper select {
    background-color: var(--bg-dark-card);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 8px 15px 8px 36px;
    font-family: var(--font-body);
    font-size: 13px;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.model-dropdown-wrapper select:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.dropdown-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* MESSAGES LIST STREAM */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.welcome-box {
    margin: auto;
    max-width: 600px;
    text-align: center;
    padding: 40px;
}

.welcome-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.welcome-box h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.welcome-box p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.quick-prompts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-prompt-btn {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-prompt-btn:hover {
    background-color: var(--bg-dark-hover);
    color: var(--text-primary);
    border-color: var(--accent-purple);
}

/* Message Bubble Structures */
.message-row {
    display: flex;
    width: 100%;
}

.message-row.user {
    justify-content: flex-end;
}

.message-row.assistant {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 14px;
    position: relative;
}

.message-row.user .message-bubble {
    background: var(--accent-glow);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.message-row.assistant .message-bubble {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}

/* Bubble Actions bar (Copy, Edit, Likes) */
.bubble-actions-bar {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-bubble:hover .bubble-actions-bar {
    opacity: 1;
}

/* Keep opacity visible in mobile as hover doesn't work well */
@media (max-width: 768px) {
    .bubble-actions-bar {
        opacity: 0.8;
    }
}

.bubble-action-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 7px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.bubble-action-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    transform: scale(1.1);
}

.bubble-action-btn i {
    width: 13px;
    height: 13px;
}

/* Specific color per button type */
.copy-btn-style:hover {
    color: var(--accent-cyan) !important;
    border-color: rgba(6,182,212,0.3) !important;
    background: rgba(6,182,212,0.08) !important;
}
.edit-btn-style:hover {
    color: #f59e0b !important;
    border-color: rgba(245,158,11,0.3) !important;
    background: rgba(245,158,11,0.08) !important;
}
.like-btn-style:hover {
    color: var(--accent-green) !important;
    border-color: rgba(16,185,129,0.3) !important;
    background: rgba(16,185,129,0.08) !important;
}
.dislike-btn-style:hover {
    color: #ef4444 !important;
    border-color: rgba(239,68,68,0.3) !important;
    background: rgba(239,68,68,0.08) !important;
}
.speak-btn-style:hover {
    color: var(--accent-purple) !important;
    border-color: rgba(139,92,246,0.3) !important;
    background: rgba(139,92,246,0.08) !important;
}
.regen-btn-style:hover {
    color: var(--accent-pink) !important;
    border-color: rgba(236,72,153,0.3) !important;
    background: rgba(236,72,153,0.08) !important;
}

/* Ratings highlights */
.bubble-action-btn.active-like {
    color: var(--accent-green) !important;
    background: rgba(16,185,129,0.12) !important;
}
.bubble-action-btn.active-dislike {
    color: #ef4444 !important;
    background: rgba(239,68,68,0.12) !important;
}

/* User edit text box wrapper */
.inline-edit-wrapper {
    width: 100%;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-edit-textarea {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    resize: vertical;
    min-height: 70px;
}

.inline-edit-textarea:focus {
    outline: none;
    border-color: white;
}

.inline-edit-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
}

.message-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-row.user .message-meta {
    justify-content: flex-end;
    color: rgba(255, 255, 255, 0.6);
}

.message-meta .model-tag {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 9px;
}

/* Custom style for parsed markdown inside message bubbles */
.message-bubble p {
    margin-bottom: 10px;
}
.message-bubble p:last-child {
    margin-bottom: 0;
}
.message-bubble code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}
.message-bubble pre {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    position: relative;
}
.message-bubble pre code {
    background-color: transparent;
    padding: 0;
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
}
.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Multimodal preview cards */
.attached-image-msg {
    max-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.attached-image-msg img {
    width: 100%;
    height: auto;
}

.attached-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    margin-bottom: 10px;
}
.attached-file-card i {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
}
.attached-file-card .file-name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Speech Mic Recording status animation */
@keyframes micPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.action-circle-btn.listening {
    background-color: #ef4444 !important;
    color: white !important;
    animation: micPulse 1.5s infinite;
}

/* Typing loading dots */
.typing-loader {
    display: flex;
    gap: 5px;
    padding: 5px 0;
}
.typing-loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing-loader span:nth-child(1) { animation-delay: -0.32s; }
.typing-loader span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ATTACHMENT PREVIEW BAR */
.attachment-preview-bar {
    padding: 10px 30px;
    background-color: var(--bg-dark-card);
    border-top: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.preview-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.preview-content i {
    color: var(--accent-purple);
}
.remove-preview-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.remove-preview-btn:hover {
    color: #ef4444;
}

/* INPUT FOOTER STYLING */
.chat-input-area {
    padding: 20px 30px;
    border-top: 1px solid var(--border-dark);
}

.input-form-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 24px;
    padding: 8px 15px;
}

.action-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-dark-hover);
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.action-circle-btn:hover {
    background-color: var(--border-dark);
    color: var(--text-primary);
}

.input-form-wrapper textarea {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    resize: none;
    height: 24px;
    line-height: 24px;
}

.input-form-wrapper textarea:focus {
    outline: none;
}

.send-message-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-message-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.input-disclaimer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}


/* ==========================================================================
   MODAL DIALOGS AND OVERLAYS (PROJECTS, NOTEBOOKS, IMAGE VIEWER)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-card {
    background-color: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-large {
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-dark);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}
.close-modal-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 25px;
}

.modal-body .form-group textarea {
    width: 100%;
    background-color: var(--bg-dark-base);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    height: 100px;
    resize: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Notebook specifics */
.note-title-input {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.note-title-input:focus {
    outline: none;
}

.note-body {
    flex: 1;
    margin-bottom: 0;
}
.note-body textarea {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    resize: none;
}
.note-body textarea:focus {
    outline: none;
}

.note-footer {
    border-top: 1px solid var(--border-dark);
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.autosave-tag {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.autosave-tag.saving {
    color: var(--accent-cyan);
}

.btn-danger-link {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 13px;
}
.btn-danger-link:hover {
    text-decoration: underline;
}

/* Button UI */
.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-primary {
    background: var(--accent-glow);
    border: none;
    color: white;
}
.btn-primary:hover {
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}
.btn-secondary {
    background-color: var(--bg-dark-hover);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    color: var(--text-primary);
}

/* Image viewer */
.modal-image-viewer {
    max-width: 700px;
    padding: 15px;
    position: relative;
}
.close-image-btn {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
}
.image-body {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.image-body img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}
.download-img-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}


/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES MOBILE MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-toggle-btn {
        display: block;
    }

    .mobile-close-btn {
        display: block;
    }

    /* Shift sidebar offscreen */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .chat-header {
        padding: 0 15px;
    }

    .chat-controls {
        gap: 10px;
    }

    .toggle-control .label-text {
        font-size: 0; /* Hide label text on mobile, keep icon */
    }

    .messages-container {
        padding: 15px;
    }

    .message-bubble {
        max-width: 85%;
    }

    .chat-input-area {
        padding: 10px 15px;
    }

    .modal-large {
        height: 90vh;
    }
}

/* ==========================================================================
   VERSION 6.0.0 UPDATES (FOLDERS, 3-DOTS, FULLSCREEN NOTEBOOK & TOOLBAR)
   ========================================================================== */

/* Folders tree */
.project-folder {
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
}

.project-folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.project-folder-header:hover {
    background: var(--bg-dark-hover);
}

.project-folder-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.project-folder-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.project-folder.collapsed .project-folder-arrow {
    transform: rotate(-90deg);
}

.project-folder-chats {
    padding-left: 10px;
    padding-right: 5px;
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.project-folder.collapsed .project-folder-chats {
    display: none;
}

.general-chats-section, .pinned-chats-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.sidebar-section-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 4px;
}

/* 3-Dots actions */
.chat-item-actions-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-item-more-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item:hover .chat-item-more-btn {
    opacity: 1;
}

.chat-item-more-btn:hover {
    color: var(--text-primary);
}

.chat-action-menu-popup {
    position: absolute;
    right: 0;
    top: 24px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 100;
    width: 140px;
    display: flex;
    flex-direction: column;
    padding: 4px 0;
    overflow: hidden;
}

.chat-action-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.chat-action-menu-item:hover {
    background: var(--bg-dark-hover);
    color: var(--text-primary);
}

.chat-action-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.chat-action-menu-item i {
    width: 14px;
    height: 14px;
}

/* Fullscreen modal & Notebook Toolbar */
.modal-card.fullscreen {
    width: 95vw !important;
    height: 95vh !important;
    max-width: none !important;
    max-height: none !important;
}

.modal-card.fullscreen .note-body {
    height: calc(95vh - 130px) !important;
}

.note-toolbar .toolbar-btn:hover {
    background-color: var(--bg-dark-hover) !important;
    color: var(--text-primary) !important;
}

.modal-header .fullscreen-btn .hover {
    background-color: var(--bg-dark-hover) !important;
    color: var(--text-primary) !important;
}

/* ==========================================================================
   VERSION 7.0.0 UPDATES (CITATIONS HOVER CARD & PREVIEWS)
   ========================================================================== */

/* Citation marks inside chat bubbles */
.citation-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 600;
    padding: 0 5px;
    margin: 0 3px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    vertical-align: super;
}

.citation-mark:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark-base);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

/* Citations preview window card */
.citation-preview-card {
    background: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 320px;
    padding: 15px;
    pointer-events: none; /* Prevents cursor fighting */
    animation: previewFadeIn 0.2s ease-out;
}

@keyframes previewFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.citation-preview-card .preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.citation-preview-card .preview-index {
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 13px;
}

.citation-preview-card .preview-title {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.citation-preview-card .preview-body {
    margin-bottom: 10px;
}

.citation-preview-card .preview-snippet {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.citation-preview-card .preview-footer {
    display: flex;
    align-items: center;
}

.citation-preview-card .preview-url {
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    width: 100%;
}

/* ==========================================================================
   VERSION 8.0.0 UPDATES (LIGHT MODE, PRISM, TOGGLES, & FEEDBACK STATES)
   ========================================================================== */

/* Light Mode Variables Override */
body.light-mode {
    --bg-dark-base: #f8fafc;
    --bg-dark-card: #ffffff;
    --bg-dark-hover: #f1f5f9;
    --border-dark: #e2e8f0;
    --border-light: rgba(0, 0, 0, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-glow: linear-gradient(135deg, #7c3aed, #db2777);
}

body.light-mode .sidebar {
    background-color: #ffffff;
    border-right: 1px solid var(--border-dark);
}

body.light-mode .chat-header {
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border-dark);
}

body.light-mode .chat-input-area {
    background-color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid var(--border-dark);
}

body.light-mode .input-form-wrapper {
    background-color: #f1f5f9;
    border: 1px solid var(--border-dark);
}

body.light-mode .input-form-wrapper textarea {
    color: #0f172a;
}

body.light-mode .action-circle-btn {
    background-color: #ffffff;
    border: 1px solid var(--border-dark);
    color: #475569;
}

body.light-mode .action-circle-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

body.light-mode .message-row.assistant .message-bubble {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

body.light-mode .sidebar-item:hover {
    background-color: #f1f5f9;
}

body.light-mode .sidebar-item.active {
    background-color: #e2e8f0;
    color: #0f172a;
}

body.light-mode .project-folder-header:hover {
    background-color: #f1f5f9;
}

body.light-mode .modal-card {
    background: #ffffff;
    border: 1px solid var(--border-dark);
    color: #0f172a;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

body.light-mode .modal-header {
    border-bottom: 1px solid var(--border-dark);
}

body.light-mode .note-title-input {
    color: #0f172a;
}

body.light-mode #activeNoteContent {
    color: #0f172a;
    background: #f8fafc;
}

body.light-mode .note-toolbar {
    background: #f1f5f9 !important;
    border-bottom: 1px solid var(--border-dark);
}

body.light-mode .note-footer {
    border-top: 1px solid var(--border-dark);
}

body.light-mode .citation-preview-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-dark);
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

body.light-mode .citation-preview-card .preview-title {
    color: #0f172a;
}

body.light-mode .citation-preview-card .preview-snippet {
    color: #475569;
}

/* Prism.js styling custom modifications */
pre[class*="language-"] {
    background: #1e1e1e !important;
    border-radius: 12px;
    padding: 18px 15px !important;
    margin: 15px 0 !important;
    position: relative;
    border: 1px solid var(--border-dark);
}

code[class*="language-"] {
    font-family: 'Consolas', 'Monaco', 'Andale Mono', monospace !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Image Toggle Button styling */
#imageToggleBtn.active {
    background: var(--accent-glow) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Voice Lang Pill state updates */
body.light-mode #voiceLangPill {
    background: var(--accent-purple);
    color: #ffffff;
}

/* Dislike and Like button active colors */
.bubble-action-btn.active-like {
    color: var(--accent-green) !important;
}

.bubble-action-btn.active-dislike {
    color: #ef4444 !important;
}

.bubble-action-btn.playing {
    color: var(--accent-cyan) !important;
}

/* ==========================================================================
   VERSION 9.0.0 STYLING ADDITIONS
   ========================================================================== */

/* Voice Wave Animation */
#voiceWaveContainer {
    display: none;
    align-items: center;
    gap: 4px;
}
.wave-line {
    display: inline-block;
    width: 3px;
    height: 5px;
    background-color: var(--accent-cyan);
    border-radius: 2px;
    animation: bounceWave 0.8s ease-in-out infinite alternate;
}
.wave-line:nth-child(2) { animation-delay: 0.15s; }
.wave-line:nth-child(3) { animation-delay: 0.3s; }
.wave-line:nth-child(4) { animation-delay: 0.45s; }
.wave-line:nth-child(5) { animation-delay: 0.6s; }

@keyframes bounceWave {
    0% { height: 5px; transform: scaleY(1); }
    100% { height: 20px; transform: scaleY(1.2); }
}

/* Notebook dual splits */
.note-body-split {
    display: flex;
    height: 480px;
    overflow: hidden;
    padding: 0 !important;
}
.note-content-pane {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.note-ai-panel {
    width: 320px;
    border-left: 1px solid var(--border-dark);
    background: var(--bg-dark-light);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.note-toolbar-tabs .tab-btn.active {
    background: var(--bg-dark-light) !important;
    color: white !important;
}
.note-toolbar-tabs .tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

/* Selection Sparks & Prompt overlay styling */
#selectionAiBtn {
    transition: transform 0.2s ease;
}
#selectionAiBtn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px var(--accent-cyan);
}
#selectionAiPromptOverlay {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
}

/* Media gallery image deletion badges */
.media-thumb {
    position: relative;
}
.media-delete-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    border: none;
    padding: 0;
}
.media-thumb:hover .media-delete-badge {
    opacity: 1;
}
.media-delete-badge:hover {
    transform: scale(1.2);
    background: #ef4444;
}

/* Custom Alerts overlay */
#customAlertModal .modal-card {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: modalPopIn 0.3s ease-out;
}
@keyframes modalPopIn {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Notebook markdown preview style classes */
#activeNotePreview.markdown-body h1 { font-size: 1.5em; border-bottom: 1px solid var(--border-dark); padding-bottom: 0.3em; margin-bottom: 10px; }
#activeNotePreview.markdown-body h2 { font-size: 1.3em; margin-top: 15px; margin-bottom: 8px; }
#activeNotePreview.markdown-body h3 { font-size: 1.1em; margin-top: 15px; margin-bottom: 8px; }
#activeNotePreview.markdown-body p { margin-bottom: 10px; line-height: 1.5; }
#activeNotePreview.markdown-body ul, #activeNotePreview.markdown-body ol { padding-left: 20px; margin-bottom: 10px; }
#activeNotePreview.markdown-body li { margin-bottom: 4px; }
#activeNotePreview.markdown-body code { background: rgba(255,255,255,0.1); padding: 2px 4px; border-radius: 4px; font-family: monospace; font-size: 90%; }
#activeNotePreview.markdown-body pre { background: var(--bg-dark-light); padding: 12px; border-radius: 8px; overflow-x: auto; margin-bottom: 10px; border: 1px solid var(--border-dark); }
#activeNotePreview.markdown-body pre code { background: transparent; padding: 0; }
#activeNotePreview.markdown-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 10px 0; border: 1px solid var(--border-dark); cursor: zoom-in; transition: opacity 0.2s; }
#activeNotePreview.markdown-body img:hover { opacity: 0.85; }
#activeNotePreview.markdown-body blockquote { border-left: 4px solid var(--accent-cyan); padding-left: 15px; color: var(--text-secondary); margin-bottom: 10px; font-style: italic; }
#activeNotePreview.markdown-body strong { color: white; font-weight: bold; }
#activeNotePreview.markdown-body em { font-style: italic; }

/* ==========================================================================
   v10.0.0 - COPY TOAST NOTIFICATION
   ========================================================================== */
#copyToast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: var(--bg-dark-light);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(6,182,212,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#copyToast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   v10.0.0 - SHARE UNLOCK SCREEN ENHANCEMENTS
   ========================================================================== */
#shareUnlockModal .modal-card {
    animation: modalPopIn 0.3s ease-out;
}
#shareExpiredMsg i[data-lucide="shield-off"] {
    display: block;
    margin: 0 auto 12px;
}
.shared-login-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-glow);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(139,92,246,0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.shared-login-cta-btn:hover {
    box-shadow: 0 6px 25px rgba(139,92,246,0.5);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* ==========================================================================
   v10.0.0 - NOTE AI PANEL MODEL SELECTOR
   ========================================================================== */
#noteAiModelSelect {
    background: var(--bg-dark-light);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 11px;
    padding: 3px 6px;
    cursor: pointer;
    max-width: 150px;
    outline: none;
    transition: border-color 0.2s;
}
#noteAiModelSelect:focus {
    border-color: var(--accent-cyan);
}

/* ==========================================================================
   v10.0.0 - NOTE CITATION CHIPS (in Note AI panel)
   ========================================================================== */
.note-cite-link {
    display: inline-flex;
    align-items: center;
    background: rgba(6,182,212,0.12);
    border: 1px solid rgba(6,182,212,0.3);
    color: var(--accent-cyan);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    vertical-align: super;
    transition: background 0.15s;
}
.note-cite-link:hover {
    background: rgba(6,182,212,0.25);
    text-decoration: none;
    color: var(--accent-cyan);
}

/* ==========================================================================
   v10.0.0 - NOTE EXPORT BUTTONS
   ========================================================================== */
#saveNoteTxtBtn, #saveNotePdfBtn {
    transition: background 0.2s, color 0.2s;
}
#saveNoteTxtBtn:hover {
    background: var(--accent-cyan) !important;
    color: var(--bg-dark-base) !important;
    border-color: var(--accent-cyan) !important;
}
#saveNotePdfBtn:hover {
    background: var(--accent-purple) !important;
    color: white !important;
    border-color: var(--accent-purple) !important;
}

/* ==========================================================================
   v10.0.0 - NOTE PRINT (PDF) STYLES
   ========================================================================== */
@media print {
    body > *:not(#notePrintFrame) { display: none !important; }
    #notePrintFrame {
        display: block !important;
        position: fixed !important;
        top: 0; left: 0; right: 0; bottom: 0;
        background: white !important;
        color: black !important;
        padding: 30px !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
        z-index: 999999 !important;
    }
    #notePrintFrame h1, #notePrintFrame h2, #notePrintFrame h3 {
        color: black !important;
    }
}

/* ==========================================================================
   v11.0.0 - CHAT SCROLL ARROW BUTTONS
   ========================================================================== */
.chat-scroll-btn {
    position: absolute;
    right: 18px;
    z-index: 200;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-dark);
    background: var(--bg-dark-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
    opacity: 0.85;
}
.chat-scroll-btn:hover {
    background: var(--accent-glow);
    border-color: transparent;
    color: white;
    opacity: 1;
    transform: scale(1.1);
}
.chat-scroll-btn i {
    width: 16px;
    height: 16px;
}
/* Top button sits near top, bottom button floats just above input area */
#scrollTopBtn {
    top: 14px;
}
.chat-scroll-btn--bottom {
    bottom: 14px;
}

/* ==========================================================================
   v13.0.0 - DESKTOP SIDEBAR TOGGLE AND ACCOUNT SETTINGS
   ========================================================================== */

/* Enable width animation on sidebar */
.sidebar {
    transition: width 0.3s ease, margin-left 0.3s ease, transform 0.3s ease !important;
}

@media (min-width: 769px) {
    /* Collapsed sidebar desktop state */
    .sidebar.collapsed {
        width: 0 !important;
        margin-left: 0 !important;
        border-right: none !important;
        overflow: hidden !important;
    }
    
    #desktopCollapseBtn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        background: transparent;
        color: var(--text-secondary);
        border: none;
    }
    #desktopCollapseBtn:hover {
        background: var(--bg-dark-hover);
        color: white;
    }
    
    #desktopExpandBtn {
        display: none;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        background: transparent;
        color: var(--text-secondary);
        border: none;
    }
    #desktopExpandBtn:hover {
        background: var(--bg-dark-hover);
        color: white;
    }
    
    /* When sidebar is collapsed, expand button in sibling chat-viewport header should show */
    .sidebar.collapsed + .chat-viewport #desktopExpandBtn {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    #desktopCollapseBtn, #desktopExpandBtn {
        display: none !important;
    }
}

/* Tab button color override when profile settings tab is clicked */
.profile-tab-btn {
    transition: all 0.2s;
}
.profile-tab-btn:hover {
    color: white !important;
}

/* Change password form spacing */
#changePasswordForm {
    background: rgba(0, 0, 0, 0.15);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    transition: background 0.2s;
}
.btn-danger:hover {
    background: #b91c1c !important;
}

/* ==========================================================================
   EMAIL VERIFICATION OVERLAY (v14.0.0)
   ========================================================================== */
.verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.verification-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 40px 30px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    animation: authCardFade 0.4s ease;
}

@keyframes authCardFade {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.verification-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.1);
    margin-bottom: 20px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.verification-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.verification-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
}

.code-input:focus {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
    background-color: var(--bg-dark-hover) !important;
}

.code-input {
    transition: all 0.2s ease;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   VERSION 23.0.0 STYLINGS (UPGRADE PLAN, PROGRESS METERS & MOBILE MODAL SCROLLS)
   ========================================================================== */

.upgrade-plan-sidebar-btn {
    grid-column: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--accent-purple), #a855f7);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.upgrade-plan-sidebar-btn i {
    width: 14px;
    height: 14px;
}

.upgrade-plan-sidebar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #9333ea, #a855f7);
}

/* Pulsating blink-upgrade animation when limits are fully depleted */
.upgrade-plan-sidebar-btn.blink-upgrade {
    animation: upgradeBlink 1.5s infinite alternate;
}

@keyframes upgradeBlink {
    0% {
        background: linear-gradient(135deg, #ec4899, #8b5cf6);
        box-shadow: 0 0 5px rgba(236, 72, 153, 0.5), 0 0 10px rgba(139, 92, 246, 0.3);
    }
    100% {
        background: linear-gradient(135deg, #f43f5e, #d946ef);
        box-shadow: 0 0 15px rgba(244, 63, 94, 0.8), 0 0 25px rgba(217, 70, 239, 0.6);
        transform: scale(1.02);
    }
}

/* Progress bars in modal settings metrics */
.plan-metrics-container {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.progress-bar-bg {
    position: relative;
}
.progress-bar-fill {
    transition: width 0.6s ease-in-out;
}

/* Verified checkmark badge layout */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Mobile responsive scroll fixes for modal overlays */
@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-start !important;
        padding: 40px 10px !important;
        overflow-y: auto !important;
    }
    .modal-card {
        max-height: none !important;
        height: auto !important;
        margin-bottom: 30px !important;
    }
}

/* Scroll-able settings modal (v24.0.0) */
#profileSettingsModal .modal-card {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
#profileSettingsModal .modal-body {
    overflow-y: auto;
    flex: 1;
}

/* Plan Upgrade cards styling (v24.0.0) */
.plans-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.plan-upgrade-card {
    background: var(--bg-dark-hover);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}
.plan-upgrade-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
.plan-upgrade-card.current {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.03);
}
.plan-upgrade-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}
.plan-upgrade-card .price {
    font-size: 26px;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
}
.plan-upgrade-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
}
.plan-upgrade-card ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}
.plan-upgrade-card ul li i {
    flex-shrink: 0;
}

/* Forgot password wizard support */
.auth-form-wizard {
    animation: fadeIn 0.3s ease;
}
.wizard-step {
    animation: fadeIn 0.3s ease;
}
.back-link {
    transition: color 0.2s ease;
}
.back-link:hover {
    color: var(--text-primary) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CHANGELOG TIMELINE STYLING (v25.0.0)
   ========================================================================== */
.changelog-page-body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}
.changelog-timeline {
    position: relative;
    padding: 20px 0;
    margin-top: 40px;
}
.changelog-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--border-dark);
}
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 60px;
    animation: fadeIn 0.5s ease;
}
.timeline-badge {
    position: absolute;
    left: 0;
    top: 5px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-dark-card);
    border: 2px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    z-index: 2;
}
.timeline-badge.current {
    background: var(--bg-dark-hover);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}
.timeline-badge i {
    width: 18px;
    height: 18px;
}
.timeline-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.timeline-card:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.15);
}
.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.version-tag {
    background: var(--accent-glow);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 12px;
}
.date-tag {
    font-size: 13px;
    color: var(--text-muted);
}
.timeline-card h2 {
    font-size: 20px;
    color: white;
    margin: 0 0 15px 0;
    font-weight: 700;
}
.changelog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.changelog-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.changelog-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-size: 20px;
    line-height: 1;
    top: -2px;
}

@media (min-width: 768px) {
    .changelog-timeline::before {
        left: 50%;
        margin-left: -1px;
    }
    .timeline-item {
        width: 50%;
        padding-left: 0;
        margin-bottom: 50px;
    }
    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-left: 40px;
    }
    .timeline-item:nth-child(odd) {
        padding-right: 40px;
        text-align: right;
    }
    .timeline-item:nth-child(odd) .changelog-list li {
        padding-left: 0;
        padding-right: 20px;
    }
    .timeline-item:nth-child(odd) .changelog-list li::before {
        left: auto;
        right: 0;
    }
    .timeline-badge {
        left: 50%;
        margin-left: -21px;
        top: 15px;
    }
}

/* ==========================================================================
   v39.0.0 - GHOST SESSION & USER PROFILE DROPDOWN MENU
   ========================================================================== */

.sidebar {
    position: relative;
}

.user-profile-menu-popup {
    position: absolute;
    bottom: 80px;
    left: 15px;
    width: calc(100% - 30px);
    background: rgba(13, 17, 32, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 8px 0;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.user-profile-menu-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.up-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.up-menu-item:hover {
    background-color: var(--bg-dark-hover);
    color: white;
}

.up-menu-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: default;
    background: transparent;
}

.up-menu-header:hover {
    background: transparent;
}

.up-menu-separator {
    height: 1px;
    background: var(--border-dark);
    margin: 6px 0;
}

.up-menu-item-wrapper {
    position: relative;
}

.up-submenu-panel {
    position: absolute;
    bottom: 0;
    left: 100%;
    margin-left: 8px;
    width: 200px;
    background: rgba(13, 17, 32, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 8px 0;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.Help-menu-trigger:hover .up-submenu-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.up-menu-item i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.up-menu-item:hover i {
    color: white;
}

.up-menu-item .arrow-right {
    margin-left: auto;
    width: 14px;
    height: 14px;
}

/* Light mode overrides for profile menu */
body.light-mode .user-profile-menu-popup {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.light-mode .up-menu-item {
    color: #475569;
}

body.light-mode .up-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: #0f172a;
}

body.light-mode .up-menu-header .username {
    color: #0f172a !important;
}

body.light-mode .up-submenu-panel {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.light-mode .up-menu-separator {
    background: rgba(0, 0, 0, 0.08);
}

/* Spinner & screenshots for Bug Report Modal */
.sc-spinner {
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 2px solid white;
    width: 16px;
    height: 16px;
    animation: sc-spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes sc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Archived Chats Styling (v41.0.0) */
.archive-chat-item {
    transition: background-color 0.2s ease;
}
.archive-chat-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}
.unarchive-btn {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.unarchive-btn:hover {
    background-color: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
    color: black !important;
}

/* Light mode overrides for archived chats list */
body.light-mode .archive-chat-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
body.light-mode .archive-chat-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}
body.light-mode .archive-chat-item span {
    color: #0f172a !important;
}
body.light-mode .archive-chat-item span[style*="color: var(--text-muted)"] {
    color: #64748b !important;
}
body.light-mode .unarchive-btn {
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #334155 !important;
}
body.light-mode .unarchive-btn:hover {
    background-color: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
    color: black !important;
}

body.light-mode .session-item {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .session-item div[style*="color: white"] {
    color: #0f172a !important;
}
body.light-mode .privacy-section {
    background: rgba(0, 0, 0, 0.01) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-mode .privacy-section h3 {
    color: #0f172a !important;
}

/* Password visibility toggle styling (v45.0.0) */
.password-toggle-btn {
    position: absolute;
    right: 8px;
    height: 32px;
    width: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}
.password-toggle-btn:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}
.password-toggle-btn i,
.password-toggle-btn svg {
    width: 15px !important;
    height: 15px !important;
    transition: transform 0.15s ease;
}
.password-toggle-btn:active i,
.password-toggle-btn:active svg {
    transform: scale(0.9);
}
.input-wrapper input[type="password"],
.input-wrapper input.password-input-field {
    padding-right: 50px !important;
}

/* Light mode overrides for password toggles */
body.light-mode .password-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #64748b;
}
body.light-mode .password-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
}

/* Global search modal styles (v45.0.0) */
.search-result-chat-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
}
.search-result-chat-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
}
.search-result-chat-item.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
}
.search-result-chat-item.active span {
    color: var(--accent-cyan) !important;
}
.search-result-item.new-chat-option:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--accent-cyan) !important;
}

/* ==========================================================================
   VERSION 50.0.0 STYLING ADDITIONS - PAYMENT, BILLING & NOTIFICATIONS
   ========================================================================== */

/* Modal medium adjustments */
.modal-medium {
    max-width: 600px;
}

/* Payment & Billing Tab Button System */
.payment-tabs, .billing-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-dark);
    background: var(--bg-dark-base);
}

.payment-tab-btn, .billing-tab-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    transition: all 0.25s ease;
    text-align: center;
    outline: none;
}

.payment-tab-btn:hover, .billing-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.payment-tab-btn.active, .billing-tab-btn.active {
    color: var(--accent-cyan) !important;
    border-bottom: 2px solid var(--accent-cyan) !important;
}

/* Quantity Adjusters */
#checkoutQtyMinus, #checkoutQtyPlus {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background: var(--bg-dark-hover);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

#checkoutQtyMinus:hover, #checkoutQtyPlus:hover {
    background: var(--border-dark);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

#checkoutQtyMinus:active, #checkoutQtyPlus:active {
    transform: scale(0.95);
}

/* Offline Gateway Selector Cards */
.offline-gate-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-dark);
    background: var(--bg-dark-hover);
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    min-width: 130px;
    text-align: center;
    box-sizing: border-box;
}

.offline-gate-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    background: var(--bg-dark-base);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.offline-gate-card.selected {
    border-color: var(--accent-cyan) !important;
    background: rgba(6, 182, 212, 0.05);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
    transform: translateY(-2px);
}

/* Screenshot Drag and Drop Uploader */
#screenshotDropArea {
    border: 2px dashed var(--border-dark) !important;
    background: var(--bg-dark-base) !important;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

#screenshotDropArea:hover {
    border-color: var(--accent-cyan) !important;
    background: var(--bg-dark-hover) !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.1);
}

#screenshotUploadLabel {
    transition: color 0.2s ease;
}

#screenshotDropArea:hover #screenshotUploadLabel {
    color: var(--text-primary);
}

/* Tables inside modals */
#billingPaymentsTable, #billingInvoicesTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

#billingPaymentsTable th, #billingInvoicesTable th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px;
    border-bottom: 2px solid var(--border-dark);
}

#billingPaymentsTable td, #billingInvoicesTable td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-primary);
}

#billingPaymentsTable tbody tr:hover, #billingInvoicesTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Scrollbar styles for tables container */
.billing-tab-content div::-webkit-scrollbar,
#onlineGatewaysList::-webkit-scrollbar,
#notificationsListContainer::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.billing-tab-content div::-webkit-scrollbar-track,
#onlineGatewaysList::-webkit-scrollbar-track,
#notificationsListContainer::-webkit-scrollbar-track {
    background: transparent;
}

.billing-tab-content div::-webkit-scrollbar-thumb,
#onlineGatewaysList::-webkit-scrollbar-thumb,
#notificationsListContainer::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 10px;
}

.billing-tab-content div::-webkit-scrollbar-thumb:hover,
#onlineGatewaysList::-webkit-scrollbar-thumb:hover,
#notificationsListContainer::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Notification Bell Styling */
.notification-bell-container {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark-base);
    animation: notificationPulse 2s infinite;
    pointer-events: none;
    box-sizing: content-box;
}

@keyframes notificationPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.notification-dropdown-panel {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    width: 330px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    z-index: 2500;
    overflow: hidden;
    box-sizing: border-box;
    animation: dropdownFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* In-app notification item updates */
.notif-item {
    transition: background-color 0.2s ease;
}

.notif-item:hover {
    background-color: var(--bg-dark-hover) !important;
}

/* Light mode overrides */
body.light-mode .payment-tab-btn:hover, 
body.light-mode .billing-tab-btn:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .offline-gate-card {
    background: #ffffff;
}

body.light-mode .offline-gate-card:hover {
    background: #f8fafc;
}

body.light-mode .offline-gate-card.selected {
    background: rgba(6, 182, 212, 0.03);
}

body.light-mode .notification-dropdown-panel {
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

body.light-mode #billingPaymentsTable tbody tr:hover, 
body.light-mode #billingInvoicesTable tbody tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

body.light-mode .notification-badge {
    border-color: #ffffff;
}

/* Scrollable payment modal container (v52.0.0) */
#paymentPopupModal .modal-card {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#paymentPopupModalBody {
    overflow-y: auto;
    flex: 1;
    padding-right: 6px;
}

/* Custom scrollbar for payment body */
#paymentPopupModalBody::-webkit-scrollbar {
    width: 6px;
}
#paymentPopupModalBody::-webkit-scrollbar-track {
    background: transparent;
}
#paymentPopupModalBody::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 10px;
}
#paymentPopupModalBody::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.payment-tab-content {
    max-height: none !important;
    overflow: visible !important;
}

/* Support Buttons block styling */
.payment-support-buttons .support-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-dark);
    background: var(--bg-dark-hover);
    color: var(--text-primary);
    cursor: pointer;
}

.payment-support-buttons .support-btn:hover {
    background: var(--border-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.payment-support-buttons .support-btn.whatsapp-btn:hover {
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.payment-support-buttons .support-btn.telegram-btn:hover {
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
}

.payment-support-buttons .support-btn:active {
    transform: scale(0.98);
}

/* Light mode support overrides */
body.light-mode .payment-support-buttons .support-btn {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}
body.light-mode .payment-support-buttons .support-btn:hover {
    background: #f8fafc;
}

/* ===== v54.0.0: Appearance & Themes Modal CSS Styles ===== */

/* Theme Select Buttons */
.theme-select-btn {
    background: var(--bg-dark-base) !important;
    border: 2px solid var(--border-dark) !important;
    border-radius: 12px !important;
    padding: 15px 10px !important;
    cursor: pointer !important;
    color: var(--text-secondary) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
}

.theme-select-btn:hover {
    border-color: var(--text-secondary) !important;
    color: white !important;
    background: var(--bg-dark-hover) !important;
    transform: translateY(-2px);
}

.theme-select-btn.active {
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    background: rgba(6, 182, 212, 0.05) !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15) !important;
}

body.light-mode .theme-select-btn {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

body.light-mode .theme-select-btn:hover {
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
}

body.light-mode .theme-select-btn.active {
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    background: rgba(6, 182, 212, 0.05) !important;
}

/* Accent preset buttons */
.accent-preset-btn {
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s ease !important;
}

.accent-preset-btn:hover {
    transform: scale(1.15);
}

.accent-preset-btn.active {
    border-color: white !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.1);
}

body.light-mode .accent-preset-btn.active {
    border-color: #000000 !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4) !important;
}

/* Color picker container wrapper */
#customColorPickerContainer:hover {
    border-color: var(--text-secondary);
}

#customColorPickerContainer.active {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3) !important;
}

/* ==========================================================================
   FILTER DROP-DOWN SUBMENU - v57.0.0
   ========================================================================== */
.filter-submenu-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(13, 17, 32, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 16px;
    width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.1);
    z-index: 1000;
    flex-direction: column;
    gap: 12px;
    border-top: 2px solid var(--accent-cyan);
}
.filter-submenu-panel.show {
    display: flex;
}
.filter-submenu-header {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 8px;
    margin-bottom: 2px;
}
.filter-submenu-panel .toggle-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 0;
    margin: 0;
}
.filter-submenu-panel .toggle-control .label-text {
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   AI RESPONSE MARKDOWN STYLING - v57.0.0
   ========================================================================== */
.bubble-text-content h1, 
.bubble-text-content h2, 
.bubble-text-content h3, 
.bubble-text-content h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-top: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}
.bubble-text-content h1 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 6px;
}
.bubble-text-content h2 {
    font-size: 1.3em;
    border-bottom: 1px dashed var(--border-dark);
    padding-bottom: 4px;
}
.bubble-text-content h3 {
    font-size: 1.15em;
}
.bubble-text-content blockquote {
    border-left: 4px solid var(--accent-cyan) !important;
    padding: 12px 18px 12px 28px !important;
    margin: 16px 0 !important;
    background: rgba(6, 182, 212, 0.04) !important;
    border-radius: 4px !important;
    color: var(--text-secondary) !important;
    font-style: italic !important;
    position: relative !important;
}
.bubble-text-content blockquote::before {
    content: '“' !important;
    position: absolute !important;
    top: 2px !important;
    left: 8px !important;
    font-size: 32px !important;
    color: rgba(6, 182, 212, 0.25) !important;
    font-family: Georgia, serif !important;
    font-weight: bold !important;
    line-height: 1 !important;
}
/* Callout Boxes */
.callout-box {
    border-left: 4px solid;
    padding: 12px 16px;
    margin: 14px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.callout-box .callout-title {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.callout-note, .callout-info {
    border-left-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.06);
    color: #e0f2fe;
}
.callout-note .callout-title, .callout-info .callout-title { color: var(--accent-cyan); }

.callout-warning, .callout-caution {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
    color: #fef3c7;
}
.callout-warning .callout-title, .callout-caution .callout-title { color: #f59e0b; }

.callout-success, .callout-tip {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.06);
    color: #d1fae5;
}
.callout-success .callout-title, .callout-tip .callout-title { color: #10b981; }

.callout-error, .callout-important {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
    color: #fee2e2;
}
.callout-error .callout-title, .callout-important .callout-title { color: #ef4444; }

/* Highlights & Strikethroughs */
.bubble-text-content mark {
    background: rgba(236, 72, 153, 0.25);
    color: #fbcfe8;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid rgba(236, 72, 153, 0.4);
}
.bubble-text-content del {
    color: var(--text-muted);
    text-decoration: line-through;
}
.bubble-text-content hr.markdown-hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-dark), transparent);
    margin: 20px 0;
}
/* Lists */
.bubble-text-content ul, .bubble-text-content ol {
    margin: 10px 0;
    padding-left: 24px;
}
.bubble-text-content li {
    margin-bottom: 6px;
    line-height: 1.6;
}
.bubble-text-content ul.task-list {
    list-style: none;
    padding-left: 5px;
}
.bubble-text-content ul.task-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bubble-text-content ul.task-list li input[type="checkbox"] {
    accent-color: var(--accent-cyan);
    cursor: pointer;
    width: 14px;
    height: 14px;
}
/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
}
.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-primary);
    background: rgba(9, 13, 22, 0.4);
}
.table-container th, .table-container td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-dark);
}
.table-container th {
    background: rgba(6, 182, 212, 0.08);
    color: var(--accent-cyan);
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 11px;
}
.table-container tr:last-child td {
    border-bottom: 0;
}
.table-container tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   IMAGE SLIDER PREVIEW - v57.0.0
   ========================================================================== */
.modal-image-viewer {
    position: relative;
    max-width: 90vw !important;
    width: auto !important;
}
.image-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 60px !important;
}
.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
.image-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-cyan);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}
.prev-image-btn {
    left: 10px;
}
.next-image-btn {
    right: 10px;
}
@media (max-width: 768px) {
    .image-body {
        padding: 20px 40px !important;
    }
    .image-nav-btn {
        width: 36px;
        height: 36px;
    }
    .prev-image-btn {
        left: 5px;
    }
    .next-image-btn {
        right: 5px;
    }
}

/* ==========================================================================
   VERIFIED BADGES SCHEMES - v57.0.0
   ========================================================================== */
.verified-badge.verified-cyan i {
    color: var(--accent-cyan) !important;
    fill: rgba(6, 182, 212, 0.1) !important;
}
.verified-badge.verified-purple i {
    color: var(--accent-purple) !important;
    fill: rgba(139, 92, 246, 0.1) !important;
}
.verified-badge.verified-green i {
    color: var(--accent-green) !important;
    fill: rgba(16, 185, 129, 0.1) !important;
}
.verified-badge.verified-pink i {
    color: var(--accent-pink) !important;
    fill: rgba(236, 72, 153, 0.1) !important;
}

@media (max-width: 768px) {
    #activeChatTitle {
        display: none !important;
    }
}

.arrow-icon.rotated {
    transform: rotate(180deg) !important;
}

/* v75.0.0 Expanded Markdown UI Component Styles */
.message-row.assistant .message-bubble {
    width: 100% !important;
    max-width: 85% !important; /* Increase width limit for tables and diagrams */
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    padding: 20px 25px !important; /* Spacing so text never goes out of boundaries */
}

/* Callout Box styling */
.callout-box {
    border-left: 4px solid;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 13px;
    line-height: 1.6;
}
.callout-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.callout-note, .callout-info { border-color: #3b82f6; background-color: rgba(59, 130, 246, 0.05); color: #93c5fd; }
.callout-tip, .callout-success { border-color: #22c55e; background-color: rgba(34, 197, 94, 0.05); color: #86efac; }
.callout-important { border-color: #a855f7; background-color: rgba(168, 85, 247, 0.05); color: #d8b4fe; }
.callout-warning { border-color: #eab308; background-color: rgba(234, 179, 8, 0.05); color: #fde047; }
.callout-caution, .callout-error { border-color: #ef4444; background-color: rgba(239, 68, 68, 0.05); color: #fca5a5; }

/* Responsive tables */
.message-bubble table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 15px 0;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}
.message-bubble table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #fff;
    border: 1px solid var(--border-dark);
    padding: 8px 12px;
    font-size: 12.5px;
}
.message-bubble table td {
    border: 1px solid var(--border-dark);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Accordion Rotation */
.accordion-icon.rotated {
    transform: rotate(180deg) !important;
}

/* Kbd elements */
kbd {
    box-shadow: 0 1px 0 rgba(0,0,0,0.2), 0 0 0 2px #222 inset !important;
}

/* FLOATING SELECTION REPLY BUTTON (v99.0.0) */
.floating-reply-btn {
    font-family: 'Outfit', sans-serif;
    transform: scale(0.9);
    animation: floatingReplyFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.floating-reply-btn:hover {
    background: var(--bg-dark-hover) !important;
    transform: scale(0.95);
    box-shadow: 0 6px 16px rgba(0, 242, 254, 0.25) !important;
}
@keyframes floatingReplyFadeIn {
    to { transform: scale(1); }
}

/* INPUT QUOTE PREVIEW CARD (v99.0.0) */
.quote-preview-card {
    display: none;
    align-items: flex-start;
    gap: 8px;
    background: var(--bg-dark-card);
    border-left: 2px solid var(--accent-cyan);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 250px;
    max-height: 90px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.quote-preview-text {
    line-height: 1.4;
    white-space: pre-wrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.remove-quote-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    align-self: flex-start;
    display: flex;
    align-items: center;
    justify-content: center;
}
.remove-quote-btn:hover {
    color: #ef4444;
}

/* ==========================================================================
   LIBRARY WORKSPACE - THEME AWARE STYLES (v100.0.0)
   ========================================================================== */

/* Workspace container inherits background from body */
.library-workspace {
    color: var(--text-primary);
}

/* Workspace headings */
.workspace-heading {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

/* Library search input - theme aware */
#librarySearchInput {
    color: var(--text-primary);
}

/* Library table styling - theme aware */
#libraryWorkspace table {
    background: transparent;
}
#libraryWorkspace th,
#libraryWorkspace td {
    color: var(--text-primary);
}
#libraryWorkspace tbody tr:hover {
    background: var(--bg-dark-hover);
}

/* Dropdown menus in workspace - theme aware */
#libraryNewDropdownMenu a {
    color: var(--text-primary);
}
#libraryNewDropdownMenu a:hover {
    background: var(--bg-dark-base);
}

/* Light mode: Library search panel + new dropdown */
body.light-mode #librarySearchInput {
    color: #0f172a;
}
body.light-mode #libraryWorkspace th {
    color: #0f172a;
    border-bottom: 1px solid var(--border-dark);
}
body.light-mode #libraryWorkspace td {
    color: #334155;
}
body.light-mode #libraryWorkspace tbody tr:hover {
    background: #f1f5f9;
}
body.light-mode #libraryNewDropdownMenu a {
    color: #0f172a;
}
body.light-mode #libraryNewDropdownMenu a:hover {
    background: #f1f5f9;
}

/* ==========================================================================
   PARTNERS WORKSPACE & CARDS (v99.0.0 / refined v100.0.0)
   ========================================================================== */

/* PARTNERS CARD GRID LAYOUT */
.partner-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
}
.partner-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15);
}
.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.partner-card:hover::before {
    opacity: 1;
}
.partner-logo-wrapper {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 4px;
}
.partner-logo {
    max-height: 54px;
    max-width: 130px;
    object-fit: contain;
    border-radius: 8px;
}
.partner-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-heading);
}
.partner-desc {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    flex-grow: 1;
}
.partner-link-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
}
.partner-link-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateX(2px);
}
.partner-link-btn i {
    width: 13px;
    height: 13px;
    transition: transform 0.2s;
}
.partner-link-btn:hover i {
    transform: translate(2px, -2px);
}

/* --- Light mode partner card overrides (v100.0.0) --- */
body.light-mode .partner-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
body.light-mode .partner-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.12);
}
body.light-mode .partner-title {
    color: #0f172a;
}
body.light-mode .partner-desc {
    color: #475569;
}
body.light-mode .partner-link-btn {
    color: #0891b2;
    background: rgba(8, 145, 178, 0.08);
    border-color: rgba(8, 145, 178, 0.2);
}
body.light-mode .partner-link-btn:hover {
    background: rgba(8, 145, 178, 0.15);
    color: #0891b2;
    border-color: #0891b2;
}
body.light-mode .partner-logo {
    filter: none;
}

/* Partners workspace heading (light mode) */
body.light-mode .workspace-heading {
    color: #0f172a;
}

/* Partners empty state (light mode) */
body.light-mode #partnersContainer [data-lucide] {
    color: #94a3b8;
}

/* Partners container in light mode - ensure grid background is clean */
body.light-mode #otherPartnersWorkspace {
    background: var(--bg-dark-base);
}

/* ==========================================================================
   COMPREHENSIVE LIGHT MODE LIBRARY WORKSPACE OVERRIDES (v100.0.0)
   ========================================================================== */

/* Library - all inline color:white overrides */
body.light-mode #libraryWorkspace h1[style*="color: white"],
body.light-mode #libraryWorkspace h2[style*="color: white"],
body.light-mode #libraryWorkspace h3[style*="color: white"] {
    color: #0f172a !important;
}
body.light-mode #libraryWorkspace a[style*="color: white"] {
    color: #0f172a !important;
}
body.light-mode #libraryWorkspace a[style*="color: white"]:hover {
    color: var(--accent-cyan) !important;
}
body.light-mode #libraryWorkspace [style*="color: white"] {
    color: #334155 !important;
}

/* Library workspace background itself */
body.light-mode #libraryWorkspace {
    background: var(--bg-dark-base);
    color: #0f172a;
}

/* Library table header rows */
body.light-mode #libraryWorkspace thead tr {
    background: transparent;
    color: #475569;
}
body.light-mode #libraryWorkspace tbody tr {
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}
body.light-mode #libraryWorkspace tbody tr:hover {
    background: #f1f5f9;
}

/* Library action buttons (three dot menus etc.) */
body.light-mode #libraryWorkspace .lib-action-btn,
body.light-mode #libraryWorkspace .file-action-btn {
    color: #64748b;
}
body.light-mode #libraryWorkspace .lib-action-btn:hover,
body.light-mode #libraryWorkspace .file-action-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

/* Library New dropdown menu - light mode */
body.light-mode #libraryNewDropdownMenu {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}
body.light-mode #libraryNewDropdownMenu a {
    color: #334155 !important;
}
body.light-mode #libraryNewDropdownMenu a:hover {
    background: #f1f5f9;
}

/* Search panel in library - light mode */
body.light-mode #librarySearchPanel {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}
body.light-mode #librarySearchPanel a,
body.light-mode #librarySearchPanel span,
body.light-mode #librarySearchPanel p {
    color: #334155;
}

/* Lib tabs - light mode */
body.light-mode .lib-tab-btn {
    color: #64748b;
    border-bottom-color: transparent;
}
body.light-mode .lib-tab-btn.active {
    color: #0f172a;
    border-bottom-color: var(--accent-cyan);
}
body.light-mode .lib-tab-btn:hover {
    color: #0f172a;
}

/* Library sort icons and column headers - light mode */
body.light-mode #libraryWorkspace .sort-icon,
body.light-mode #libraryWorkspace #libHeaderName,
body.light-mode #libraryWorkspace #libHeaderDate,
body.light-mode #libraryWorkspace #libHeaderSize {
    color: #64748b;
}
body.light-mode #libraryWorkspace #libHeaderName:hover,
body.light-mode #libraryWorkspace #libHeaderDate:hover,
body.light-mode #libraryWorkspace #libHeaderSize:hover {
    color: #0f172a;
}

/* Breadcrumbs - light mode */
body.light-mode #libraryBreadcrumbs {
    color: #64748b;
}

/* Search trigger btn active state */
.search-trigger-btn.active {
    border-color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.08);
}
.search-trigger-btn.active i,
.search-trigger-btn.active span {
    color: var(--accent-purple);
}

/* Light mode active state for trigger */
body.light-mode .search-trigger-btn.active {
    border-color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.06);
}
body.light-mode .search-trigger-btn.active i,
body.light-mode .search-trigger-btn.active span {
    color: var(--accent-purple);
}
body.light-mode .search-trigger-btn {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}
body.light-mode .search-trigger-btn:hover {
    background-color: #f1f5f9;
    border-color: var(--accent-purple);
}

/* ==========================================================================
   PARTNERS SLIDE-IN PANEL (v101.0.0)
   ========================================================================== */

/* --- Backdrop / Overlay --- */
.partners-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.partners-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

/* --- Slide Panel Container --- */
.partners-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    max-width: 100vw;
    height: 100vh;
    z-index: 9001;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark-card);
    border-left: 1px solid var(--border-dark);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.partners-slide-panel.open {
    transform: translateX(0);
}

/* --- Panel Header --- */
.partners-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-dark);
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%);
    position: relative;
}
.partners-panel-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan), transparent);
    opacity: 0.5;
}
.partners-panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.partners-panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    flex-shrink: 0;
}
.partners-panel-icon i {
    width: 20px;
    height: 20px;
}
.partners-panel-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    font-family: var(--font-heading);
    letter-spacing: -0.3px;
}
.partners-panel-title p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    font-family: var(--font-body);
}

/* --- Close Button --- */
.partners-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.partners-panel-close i {
    width: 16px;
    height: 16px;
}
.partners-panel-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg);
}

/* --- Panel Body (Scrollable) --- */
.partners-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) transparent;
}
.partners-panel-body::-webkit-scrollbar { width: 5px; }
.partners-panel-body::-webkit-scrollbar-track { background: transparent; }
.partners-panel-body::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}
.partners-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Partners Grid (inside panel) --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

/* Tighter card sizing inside panel */
.partners-slide-panel .partner-card {
    padding: 18px;
    border-radius: 14px;
    gap: 10px;
}
.partners-slide-panel .partner-logo-wrapper {
    height: 52px;
    margin-bottom: 2px;
}
.partners-slide-panel .partner-logo {
    max-height: 44px;
    max-width: 110px;
}
.partners-slide-panel .partner-title {
    font-size: 15px;
}
.partners-slide-panel .partner-desc {
    font-size: 12.5px;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.partners-slide-panel .partner-link-btn {
    font-size: 12px;
    padding: 5px 10px;
}

/* --- Empty / Loading States --- */
.partners-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.partners-empty-state i {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}
.partners-empty-state p {
    font-size: 14px;
    margin: 0;
}
.partners-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- Light Mode Overrides for Panel --- */
body.light-mode .partners-slide-panel {
    background: #ffffff;
    border-left-color: #e2e8f0;
    box-shadow: -20px 0 60px rgba(15, 23, 42, 0.12);
}
body.light-mode .partners-panel-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(8, 145, 178, 0.03) 100%);
    border-bottom-color: #e2e8f0;
}
body.light-mode .partners-panel-title h2 {
    color: #0f172a;
}
body.light-mode .partners-panel-title p {
    color: #94a3b8;
}
body.light-mode .partners-panel-close {
    border-color: #e2e8f0;
    color: #64748b;
}
body.light-mode .partners-panel-close:hover {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
body.light-mode .partners-panel-body {
    background: #f8fafc;
    scrollbar-color: #e2e8f0 transparent;
}
body.light-mode .partners-panel-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}
body.light-mode .partners-backdrop {
    background: rgba(15, 23, 42, 0.4);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .partners-slide-panel {
        width: 100vw;
        max-width: 100vw;
        border-left: none;
        border-top: 1px solid var(--border-dark);
        top: auto;
        bottom: 0;
        height: 85vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    }
    .partners-slide-panel.open {
        transform: translateY(0);
    }
    .partners-panel-header {
        padding: 20px 20px 16px;
    }
    /* Mobile drag indicator pill */
    .partners-panel-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: var(--border-dark);
        border-radius: 2px;
    }
    .partners-panel-body {
        padding: 16px 20px;
    }
    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 12px;
    }
    body.light-mode .partners-slide-panel {
        border-top-color: #e2e8f0;
    }
}

@media (max-width: 480px) {
    .partners-slide-panel {
        height: 90vh;
    }
    .partners-grid {
        grid-template-columns: 1fr;
    }
}










/* ========== REMINDER TASK SYSTEM v102.0.0 ========== */
.slash-cmd-popup{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);z-index:9000;background:var(--bg-dark-hover);border:1px solid rgba(99,102,241,.35);border-radius:14px;box-shadow:0 -10px 40px rgba(0,0,0,.5);width:340px;overflow:hidden;backdrop-filter:blur(12px);animation:slashPopupIn .15s ease;}
@keyframes slashPopupIn{from{opacity:0;transform:translateX(-50%) translateY(10px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
.slash-cmd-header{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--text-muted);padding:10px 14px 6px;border-bottom:1px solid var(--border-dark);}
.slash-cmd-list{padding:6px;}
.slash-cmd-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:10px;cursor:pointer;transition:background .15s;text-align:left;color:var(--text-primary);}
.slash-cmd-item:hover,.slash-cmd-item.active{background:rgba(99,102,241,.12);}
.slash-cmd-icon{font-size:20px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:rgba(99,102,241,.1);border-radius:8px;flex-shrink:0;}
.slash-cmd-info{flex:1;}
.slash-cmd-name{font-size:13px;font-weight:600;color:var(--text-primary);}
.slash-cmd-desc{font-size:11px;color:var(--text-secondary);margin-top:1px;}
.reminder-create-card{max-width:480px;width:95%;}
.reminder-panel-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:3900;opacity:0;pointer-events:none;transition:opacity .3s ease;backdrop-filter:blur(4px);}
.reminder-panel-backdrop.active{opacity:1;pointer-events:all;}
.reminder-slide-panel{position:fixed;top:0;right:-480px;width:460px;max-width:100vw;height:100vh;background:var(--bg-dark-card);border-left:1px solid var(--border-dark);z-index:4000;display:flex;flex-direction:column;overflow:hidden;transition:right .35s cubic-bezier(.4,0,.2,1);box-shadow:-15px 0 50px rgba(0,0,0,.5);}
.reminder-slide-panel.active{right:0;}
.reminder-panel-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--border-dark);background:var(--bg-dark-base);flex-shrink:0;}
.reminder-panel-title{display:flex;align-items:center;gap:12px;}
.reminder-panel-icon{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#6366f1,#8b5cf6);display:flex;align-items:center;justify-content:center;color:white;flex-shrink:0;}
.reminder-panel-icon svg{width:20px;height:20px;}
.reminder-panel-title h2{font-size:16px;font-weight:700;margin:0;}
.reminder-panel-title p{font-size:11px;color:var(--text-secondary);margin:2px 0 0;}
.reminder-panel-close{width:34px;height:34px;border-radius:8px;border:1px solid var(--border-dark);background:transparent;color:var(--text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;}
.reminder-panel-close:hover{background:var(--bg-dark-hover);color:white;}
.reminder-panel-close svg{width:16px;height:16px;}
.reminder-tab-nav{display:flex;border-bottom:1px solid var(--border-dark);background:var(--bg-dark-base);flex-shrink:0;}
.reminder-tab-btn{flex:1;padding:13px 16px;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .2s;}
.reminder-tab-btn.active{color:#6366f1;border-bottom-color:#6366f1;background:rgba(99,102,241,.05);}
.reminder-tab-btn:hover:not(.active){color:var(--text-primary);background:var(--bg-dark-hover);}
.reminder-tab-content{display:none;flex-direction:column;overflow:hidden;flex:1;}
.reminder-tab-content.active{display:flex;}
.reminder-search-bar{padding:14px 16px 8px;display:flex;gap:10px;flex-shrink:0;}
.reminder-filter-bar{display:flex;gap:6px;padding:0 16px 12px;flex-wrap:wrap;flex-shrink:0;}
.reminder-filter-btn{padding:5px 12px;background:var(--bg-dark-hover);border:1px solid var(--border-dark);border-radius:20px;color:var(--text-secondary);font-size:12px;font-weight:500;cursor:pointer;transition:all .2s;display:flex;align-items:center;}
.reminder-filter-btn.active,.reminder-filter-btn:hover{background:rgba(99,102,241,.15);border-color:rgba(99,102,241,.4);color:#a5b4fc;}
.reminder-tasks-list{flex:1;overflow-y:auto;padding:4px 16px 16px;display:flex;flex-direction:column;gap:10px;}
.reminder-tasks-list::-webkit-scrollbar{width:4px;}
.reminder-tasks-list::-webkit-scrollbar-thumb{background:var(--border-dark);border-radius:2px;}
.task-card{background:var(--bg-dark-hover);border:1px solid var(--border-dark);border-radius:14px;padding:14px 16px;transition:all .2s;position:relative;overflow:hidden;}
.task-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;border-radius:3px 0 0 3px;}
.task-card.status-pending::before{background:#f59e0b;}
.task-card.status-complete::before{background:#10b981;}
.task-card.status-missed::before{background:#ef4444;}
.task-card:hover{border-color:rgba(99,102,241,.3);box-shadow:0 4px 20px rgba(0,0,0,.3);transform:translateY(-1px);}
.task-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px;}
.task-card-title{font-size:14px;font-weight:600;color:var(--text-primary);flex:1;line-height:1.3;}
.task-status-badge{font-size:10px;font-weight:700;padding:3px 8px;border-radius:20px;text-transform:uppercase;letter-spacing:.5px;flex-shrink:0;}
.badge-pending{background:rgba(245,158,11,.15);color:#fbbf24;border:1px solid rgba(245,158,11,.3);}
.badge-complete{background:rgba(16,185,129,.15);color:#34d399;border:1px solid rgba(16,185,129,.3);}
.badge-missed{background:rgba(239,68,68,.15);color:#f87171;border:1px solid rgba(239,68,68,.3);}
.task-card-meta{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--text-secondary);margin-bottom:10px;}
.task-card-meta span{display:flex;align-items:center;gap:4px;}
.task-card-desc{font-size:12px;color:var(--text-muted);margin-bottom:10px;line-height:1.4;}
.task-card-actions{display:flex;gap:6px;flex-wrap:wrap;}
.task-action-btn{padding:5px 11px;border-radius:7px;border:1px solid var(--border-dark);font-size:11px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:5px;transition:all .2s;}
.task-action-btn svg{width:12px;height:12px;}
.task-btn-complete{background:rgba(16,185,129,.1);border-color:rgba(16,185,129,.3);color:#34d399;}
.task-btn-complete:hover{background:rgba(16,185,129,.2);}
.task-btn-edit{background:rgba(99,102,241,.1);border-color:rgba(99,102,241,.3);color:#a5b4fc;}
.task-btn-edit:hover{background:rgba(99,102,241,.2);}
.task-btn-delete{background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.3);color:#f87171;}
.task-btn-delete:hover{background:rgba(239,68,68,.2);}
.reminder-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:50px 20px;text-align:center;color:var(--text-secondary);gap:12px;}
.reminder-empty-state .empty-icon{font-size:48px;opacity:.5;}
.reminder-empty-state h3{font-size:15px;font-weight:600;color:var(--text-primary);}
.reminder-empty-state p{font-size:12px;line-height:1.5;max-width:220px;}
.reminder-email-settings-wrap{padding:20px 18px;overflow-y:auto;flex:1;}
.reminder-email-settings-wrap::-webkit-scrollbar{width:4px;}
.reminder-email-settings-wrap::-webkit-scrollbar-thumb{background:var(--border-dark);border-radius:2px;}
.reminder-email-intro{display:flex;align-items:center;gap:12px;background:rgba(99,102,241,.08);border:1px solid rgba(99,102,241,.2);border-radius:12px;padding:14px 16px;margin-bottom:20px;}
.reminder-email-toggles{display:flex;flex-direction:column;gap:4px;}
.reminder-email-toggle-row{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-radius:12px;cursor:pointer;transition:background .2s;border:1px solid transparent;gap:12px;}
.reminder-email-toggle-row:hover{background:var(--bg-dark-hover);border-color:var(--border-dark);}
.ret-left{display:flex;align-items:center;gap:12px;flex:1;}
.ret-icon{font-size:20px;width:38px;height:38px;display:flex;align-items:center;justify-content:center;background:var(--bg-dark-hover);border-radius:9px;flex-shrink:0;}
.ret-label{font-size:13px;font-weight:600;color:var(--text-primary);}
.ret-desc{font-size:11px;color:var(--text-muted);margin-top:2px;}
.ret-switch{position:relative;display:inline-flex;flex-shrink:0;}
.ret-switch input{opacity:0;width:0;height:0;position:absolute;}
.ret-slider{display:block;width:42px;height:24px;background:var(--bg-dark-base);border:1px solid var(--border-dark);border-radius:24px;position:relative;cursor:pointer;transition:background .3s,border-color .3s;}
.ret-slider::before{content:'';position:absolute;width:18px;height:18px;border-radius:50%;background:var(--text-muted);top:2px;left:2px;transition:transform .3s,background .3s;}
.ret-switch input:checked + .ret-slider{background:rgba(99,102,241,.3);border-color:rgba(99,102,241,.5);}
.ret-switch input:checked + .ret-slider::before{transform:translateX(18px);background:#6366f1;}
.view-tasks-btn{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:8px 16px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:white!important;border:none;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none!important;transition:opacity .2s,transform .2s;}
.view-tasks-btn:hover{opacity:.85;transform:translateY(-1px);}
body.light-mode .slash-cmd-popup{background:#fff;border-color:rgba(99,102,241,.25);}
body.light-mode .slash-cmd-name{color:#111827;}
body.light-mode .slash-cmd-item:hover{background:rgba(99,102,241,.08);}
body.light-mode .reminder-slide-panel{background:#fff;border-left-color:#e2e8f0;}
body.light-mode .reminder-panel-header{background:#f8fafc;border-bottom-color:#e2e8f0;}
body.light-mode .reminder-tab-nav{background:#f8fafc;border-bottom-color:#e2e8f0;}
body.light-mode .task-card{background:#f8fafc;border-color:#e2e8f0;}
body.light-mode .task-card-title{color:#111827;}
body.light-mode .ret-label{color:#111827;}
body.light-mode .ret-slider{background:#e2e8f0;border-color:#cbd5e1;}
body.light-mode .ret-slider::before{background:#94a3b8;}
@media (max-width:640px){
  .reminder-slide-panel{width:100vw;right:-100vw;}
  .slash-cmd-popup{width:calc(100vw - 32px);bottom:80px;}
}


/* ================================================================
   v103.0.0 — Upgrade Panel, Reminder Panel Mobile, Task Metrics
   ================================================================ */

/* ── Profile Menu: Upgrade badge ── */
.up-menu-upgrade-btn {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08)) !important;
    border: 1px solid rgba(99,102,241,0.25) !important;
    position: relative;
}
.up-menu-upgrade-btn:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.22), rgba(139,92,246,0.18)) !important;
    border-color: rgba(99,102,241,0.45) !important;
}
.up-upgrade-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Upgrade Panel Card ── */
.upgrade-panel-card {
    max-width: 660px;
    width: 95%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: rgba(13, 17, 32, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    padding: 25px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── Upgrade Tab Nav ── */
.upgrade-tab-nav {
    display: flex;
    gap: 6px;
    margin-top: 18px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 4px;
    flex-shrink: 0;
}
.upgrade-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}
.upgrade-tab-btn:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}
.upgrade-tab-btn.active {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
}

/* ── Upgrade Tab Content ── */
.upgrade-tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}
.upgrade-tab-content.active {
    display: flex;
    flex-direction: column;
}
.upgrade-tab-inner {
    flex: 1;
    overflow-y: auto;
    padding-top: 18px;
    padding-right: 4px;
}
.upgrade-tab-inner::-webkit-scrollbar { width: 4px; }
.upgrade-tab-inner::-webkit-scrollbar-track { background: transparent; }
.upgrade-tab-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* ── Package Row ── */
.upgrade-pkg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 14px 18px;
    gap: 12px;
    flex-wrap: wrap;
    transition: border-color 0.2s, background 0.2s;
}
.upgrade-pkg-row:hover {
    background: rgba(99,102,241,0.05);
    border-color: rgba(99,102,241,0.25);
}
.upgrade-pkg-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 180px;
}
.upgrade-pkg-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.upgrade-pkg-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: white;
}
.upgrade-pkg-desc {
    margin: 3px 0 0;
    font-size: 11px;
    color: var(--text-secondary);
}
.upgrade-pkg-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.upgrade-pkg-price {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.upgrade-buy-btn {
    border-radius: 20px !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap;
}
.upgrade-empty-msg {
    text-align: center;
    padding: 30px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed var(--border-dark);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 13px;
}
.upgrade-pkg-loading {
    padding: 5px 0;
}

/* ── Reminder Slide Panel — Scrollable & Mobile Responsive ── */
#reminderSlidePanel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-dark-panel, #0d1120);
    border-left: 1px solid var(--glass-border);
    z-index: 1800;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    overflow: hidden;
}
#reminderSlidePanel.active {
    right: 0;
}
#reminderPanelBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1799;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}
#reminderPanelBackdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* Panel header */
.reminder-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-dark);
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
}
.reminder-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    font-family: 'Outfit', sans-serif;
}
.reminder-panel-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Panel tabs */
.reminder-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
    flex-shrink: 0;
}
.reminder-tab-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.reminder-tab-btn.active {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
}
.reminder-tab-btn:hover:not(.active) {
    background: rgba(255,255,255,0.05);
    color: white;
}

/* Panel body scrollable */
.reminder-panel-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.reminder-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}
.reminder-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reminder-tab-content::-webkit-scrollbar { width: 4px; }
.reminder-tab-content::-webkit-scrollbar-track { background: transparent; }
.reminder-tab-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Panel toolbar */
.reminder-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 0;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.reminder-search-wrap {
    flex: 1;
    min-width: 120px;
    position: relative;
}
.reminder-search-wrap input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    padding: 7px 10px 7px 30px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.reminder-search-wrap input:focus { border-color: rgba(99,102,241,0.5); }
.reminder-search-wrap .search-icon-inner {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.reminder-filter-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-dark);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.reminder-filter-btn.active,
.reminder-filter-btn:hover {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.35);
    color: #a5b4fc;
}

/* Task cards */
.task-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.2s, background 0.2s;
}
.task-card:hover { border-color: rgba(99,102,241,0.25); }
.task-card.status-complete { border-left: 3px solid #10b981; }
.task-card.status-missed   { border-left: 3px solid #ef4444; opacity: 0.75; }
.task-card.status-pending  { border-left: 3px solid #6366f1; }
.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.task-card-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    line-height: 1.4;
    flex: 1;
}
.task-status-badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-pending  { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge-complete { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.badge-missed   { background: rgba(239,68,68,0.15); color: #fca5a5; }
.task-card-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.task-card-meta span { display: flex; align-items: center; gap: 4px; }
.task-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    border-left: 2px solid rgba(99,102,241,0.3);
}
.task-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.task-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-dark);
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}
.task-btn-complete { border-color: rgba(16,185,129,0.3); color: #6ee7b7; }
.task-btn-complete:hover { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.5); }
.task-btn-edit { border-color: rgba(99,102,241,0.3); color: #a5b4fc; }
.task-btn-edit:hover { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.5); }
.task-btn-delete { border-color: rgba(239,68,68,0.25); color: #fca5a5; }
.task-btn-delete:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); }

/* Reminder empty state */
.reminder-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}
.reminder-empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; }
.reminder-empty-state h3 { font-size: 15px; font-weight: 600; color: white; margin: 0 0 8px; }
.reminder-empty-state p  { font-size: 12px; margin: 0; line-height: 1.6; }

/* Email settings tab */
.reminder-email-settings { display: flex; flex-direction: column; gap: 12px; }
.email-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    padding: 12px 14px;
    gap: 12px;
}
.email-toggle-info { flex: 1; }
.email-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: white;
    display: block;
    margin-bottom: 2px;
}
.email-toggle-desc { font-size: 11px; color: var(--text-secondary); }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 22px;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #6366f1; border-color: #6366f1; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Save email settings btn */
.email-save-row {
    padding: 14px 16px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}
.email-saved-msg {
    font-size: 12px;
    color: #6ee7b7;
    display: none;
}

/* Reminder panel new task btn */
.reminder-new-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}
.reminder-new-task-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Reminder modals */
#reminderCreateModal,
#reminderEditModal {
    z-index: 2000;
}

/* "View Tasks" button in chat bubble */
.view-tasks-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.1);
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    margin-top: 6px;
}
.view-tasks-btn:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.6);
    color: white;
}

/* Task metrics in billing */
.billing-task-limit-warning {
    display: none;
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
    /* Reminder panel full width on mobile */
    #reminderSlidePanel {
        width: 100vw !important;
        border-left: none;
        border-radius: 0;
    }

    /* Upgrade panel full width on mobile */
    .upgrade-panel-card {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        padding: 20px 16px !important;
    }

    /* Stack package rows on mobile */
    .upgrade-pkg-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .upgrade-pkg-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Task card actions wrap nicely */
    .task-card-actions { gap: 5px; }
    .task-action-btn { padding: 4px 8px; font-size: 10px; }

    /* Email toggle rows */
    .email-toggle-row { flex-wrap: wrap; }

    /* Reminder toolbar */
    .reminder-toolbar { padding: 10px 12px 0; }

    /* Upgrade tabs */
    .upgrade-tab-btn { font-size: 11px; padding: 8px 8px; gap: 4px; }
}

@keyframes spin { to { transform: rotate(360deg); } }


/* v103.0.0 Reminder Panel scroll fix override */
.reminder-slide-panel {
    z-index: 4000 !important;
    width: 430px !important;
    max-width: 100vw !important;
}
.reminder-tasks-list {
    overflow-y: auto !important;
    flex: 1 !important;
}
.reminder-tab-content {
    overflow: hidden !important;
}
.reminder-tab-content.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow: hidden !important;
}
.reminder-email-settings-wrap {
    overflow-y: auto !important;
    flex: 1 !important;
    padding: 16px !important;
}


/* ======================================================
   REDESIGNED UPGRADE TABS & RESPONSIVE FIXES — v103.0.0
   ====================================================== */
.upgrade-modal-tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}
.upgrade-modal-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.02);
}
.upgrade-modal-tab.active {
    color: #06b6d4 !important;
    border-bottom: 2px solid #06b6d4 !important;
}
.upgrade-modal-content {
    display: none;
}
.upgrade-modal-content.active {
    display: block !important;
}

.upgrade-modal-content::-webkit-scrollbar {
    width: 6px;
}
.upgrade-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.upgrade-modal-content::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}

@media screen and (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end !important;
    }
    .modal-card {
        width: 100% !important;
        height: 85vh !important;
        max-height: 85vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    .upgrade-modal-content {
        overflow-y: auto !important;
    }
    .storage-package-row,
    .task-package-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 15px !important;
    }
    .storage-package-row button,
    .task-package-row button {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* ======================================================
   REMINDER SLIDE PANEL SCROLLABILITY & MOBILE RESPONSIVE
   ====================================================== */
.reminder-slide-panel {
    display: flex !important;
    flex-direction: column !important;
}
#reminderTabContentTasks,
#reminderTabContentEmail {
    flex: 1 !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 150px) !important;
    padding-bottom: 20px !important;
}
.reminder-email-settings-wrap {
    max-height: 100% !important;
    overflow-y: visible !important;
}

@media screen and (max-width: 480px) {
    .reminder-slide-panel {
        width: 100% !important;
        max-width: 100vw !important;
    }
}


/* ======================================================
   v103.0.0 — GORGEOUS REMINDER TASK CARD STYLE OVERRIDES
   ====================================================== */
.reminder-tasks-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    overflow-y: auto !important;
    flex: 1 !important;
    min-height: 0 !important;
}

.task-card {
    display: block !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    position: relative !important;
    overflow: visible !important;
    transition: all 0.2s ease-in-out !important;
    margin-bottom: 4px !important;
}

.task-card:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.task-card::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    border-radius: 12px 0 0 12px !important;
}
.task-card.status-pending::before { background: #f59e0b !important; }
.task-card.status-complete::before { background: #10b981 !important; }
.task-card.status-missed::before { background: #ef4444 !important; }

.task-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
}

.task-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: white !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    text-align: left !important;
}

.task-status-badge {
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

.task-card-meta {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-size: 11px !important;
    color: var(--text-secondary) !important;
    margin-bottom: 12px !important;
    flex-wrap: wrap !important;
}

.task-card-meta span {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #94a3b8 !important;
}

.task-card-meta span svg {
    width: 13px !important;
    height: 13px !important;
    color: #6366f1 !important;
}

.task-card-desc {
    font-size: 12px !important;
    color: #cbd5e1 !important;
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 8px !important;
    border-left: 2px solid rgba(99, 102, 241, 0.3) !important;
    text-align: left !important;
}

.task-card-actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 12px !important;
    width: 100% !important;
}

.task-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-dark) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    color: #cbd5e1 !important;
    transition: all 0.2s ease !important;
    font-family: 'Outfit', sans-serif !important;
}

.task-action-btn svg {
    width: 12px !important;
    height: 12px !important;
}

.task-btn-complete {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}
.task-btn-complete:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.task-btn-edit {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
}
.task-btn-edit:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

.task-btn-delete {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}
.task-btn-delete:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}


/* Mobile Responsiveness for Reminder Slide Panel (v103.0.0) */
@media (max-width: 480px) {
    .reminder-slide-panel {
        width: 100% !important;
        right: -100% !important;
    }
    .reminder-slide-panel.active {
        right: 0 !important;
    }
    .reminder-panel-header {
        padding: 12px 14px !important;
    }
    .reminder-tab-btn {
        padding: 10px 10px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }
    .reminder-search-bar {
        padding: 10px 12px 6px !important;
    }
    .reminder-filter-bar {
        padding: 0 12px 10px !important;
        gap: 4px !important;
    }
    .reminder-filter-btn {
        padding: 4px 10px !important;
        font-size: 11px !important;
    }
    .reminder-tasks-list {
        padding: 6px 12px 12px !important;
    }
    .task-card {
        padding: 12px !important;
    }
    .task-card-meta {
        gap: 10px !important;
    }
    .task-action-btn {
        padding: 5px 8px !important;
        font-size: 10px !important;
    }
}

/* ==========================================================================
   PREMIUM CODE BLOCK & TABLE RENDERER CUSTOM STYLES — v105.0.0
   ========================================================================== */

.code-block-wrapper {
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-md) !important;
    margin: 18px 0 !important;
    overflow: hidden !important;
    background: rgba(9, 13, 22, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    position: relative !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.code-block-wrapper:hover {
    border-color: rgba(6, 182, 212, 0.45) !important;
}

.code-block-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 14px !important;
    background: rgba(18, 18, 24, 0.95) !important;
    border-bottom: 1px solid var(--border-dark) !important;
}

.code-block-lang {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    font-family: var(--font-heading) !important;
}

.code-block-body {
    padding: 14px 16px !important;
    overflow-x: auto !important;
    font-family: 'Consolas', 'Monaco', 'Andale Mono', monospace !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    background: transparent !important;
}

.code-block-line {
    display: flex !important;
    align-items: flex-start !important;
    line-height: 1.65 !important;
}

.code-block-ln {
    width: 32px !important;
    text-align: right !important;
    margin-right: 16px !important;
    color: #4b5563 !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    font-size: 12px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-right: 8px !important;
}

.code-block-code {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    color: #e4e4e7 !important;
}

/* Copy Button Hover Transition Effects */
.code-block-wrapper .code-copy-btn {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-secondary) !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 11px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.code-block-wrapper:hover .code-copy-btn {
    opacity: 1 !important;
    visibility: visible !important;
}

.code-copy-btn:hover {
    background: rgba(6, 182, 212, 0.2) !important;
    color: var(--accent-cyan) !important;
    border-color: rgba(6, 182, 212, 0.45) !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.2) !important;
}

/* Beautiful responsive tables matching theme */
.table-container {
    width: 100% !important;
    overflow-x: auto !important;
    margin: 18px 0 !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-dark) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.table-container table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 13.5px !important;
    color: var(--text-primary) !important;
    background: rgba(9, 13, 22, 0.5) !important;
}

.table-container th, 
.table-container td {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--border-dark) !important;
}

.table-container th {
    background: rgba(6, 182, 212, 0.08) !important;
    color: var(--accent-cyan) !important;
    font-weight: 700 !important;
    font-family: var(--font-heading) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    border-bottom: 2px solid rgba(6, 182, 212, 0.2) !important;
}

.table-container tr:last-child td {
    border-bottom: 0 !important;
}

.table-container tr:hover td {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ==========================================================================
   SCROLLABLE NON-CHAT PAGES & MOBILE RESPONSIVE FOOTER (v106.0.0)
   ========================================================================== */

/* Enable scrollable layout on all non-chat dashboard pages */
body:not(.page-template-page-chat) {
    overflow: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    width: auto !important;
    min-height: 100vh !important;
}

/* Make auth pages container scrollable when form exceeds viewport height */
.auth-container {
    overflow-y: auto !important;
    min-height: 100vh !important;
    height: auto !important;
}

/* Home page footer style and mobile responsiveness */
.home-footer {
    background-color: #060913 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 40px 20px !important;
    text-align: center !important;
    width: 100% !important;
    margin-top: auto !important;
    position: relative !important;
    z-index: 10 !important;
}
.home-footer .footer-links {
    display: flex !important;
    justify-content: center !important;
    gap: 25px !important;
    flex-wrap: wrap !important;
    margin-bottom: 20px !important;
}
.home-footer .footer-links a {
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
}
.home-footer .footer-links a:hover {
    color: var(--accent-cyan) !important;
}
.home-footer .footer-text {
    color: #4b5563 !important;
    font-size: 12.5px !important;
}

@media (max-width: 768px) {
    .home-footer {
        padding: 30px 15px !important;
    }
    .home-footer .footer-links {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }
    .home-footer .footer-links a {
        font-size: 14.5px !important;
        padding: 5px 0 !important;
    }
}

