/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    --bg-app: #09090d;
    --bg-sidebar: #101016;
    --bg-card: #14141d;
    --bg-input: #1a1a26;
    --border-color: #232332;
    --border-color-hover: #323249;
    
    --text-primary: #f3f4f6;
    --text-muted: #8c8da3;
    
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    --accent: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(20, 20, 29, 0.7);
    --glass-border: rgba(255, 255, 255, 0.03);
    
    /* Social Brand Colors */
    --fb-color: #1877f2;
    --fb-gradient: linear-gradient(135deg, #1877f2 0%, #0056b3 100%);
    --ig-gradient: linear-gradient(135deg, #f99f1b 0%, #dd2a7b 50%, #812897 100%);

    --ln-color: #0a66c2;
    --ln-gradient: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
    --tk-color: #010101;
    --tk-gradient: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
    --yt-color: #ff0000;
    --yt-gradient: linear-gradient(135deg, #ff0000 0%, #b30000 100%);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100%;
    max-width: 100%;
}

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

/* Utility classes */
.d-none { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.25rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.25rem; }
.py-5 { padding-top: 2rem; padding-bottom: 2rem; }
.mr-auto { margin-right: auto; }
.flex-grow { flex-grow: 1; }
.align-start { align-items: flex-start !important; }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.pt-3 { padding-top: 0.75rem; }
.flex-end { display: flex; justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Sidebar navigation */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    height: 100%;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #ffffff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

.nav-btn.active {
    color: var(--text-primary);
    background-color: var(--primary-glow);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 4px;
    background-color: var(--primary);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    opacity: 0.8;
}

.nav-btn.active .nav-icon {
    color: var(--primary);
    opacity: 1;
}

.badge {
    background: var(--primary-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
}

.badge-accent {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-container {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
}

.avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--bg-sidebar);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main content workspace */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(9, 9, 13, 0.3);
    backdrop-filter: blur(8px);
}

.page-title-section h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.15rem;
}

.page-title-section p {
    font-size: 0.85rem;
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
    overflow-y: auto;
    background-color: var(--bg-app);
}

.content-view {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
    height: 100%;
}

.content-view.active {
    display: block;
}

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

/* ==========================================================================
   UI COMPONENTS (CARDS, BUTTONS, FORMS)
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
    border-color: var(--border-color-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color-hover);
}

.btn-outline-primary {
    background: transparent;
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    resize: none;
}

/* ==========================================================================
   VIEW 1: DASHBOARD VIEW
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.scheduled { background-color: rgba(99, 102, 241, 0.1); color: var(--primary); }
.stat-icon.published { background-color: rgba(16, 185, 129, 0.1); color: var(--accent); }
.stat-icon.connected { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dashboard Layout Charts & Activity */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1.7fr 1.3fr;
    gap: 1.5rem;
}

.chart-container {
    height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    flex-grow: 1;
    position: relative;
    margin-bottom: 1rem;
}

#chart-svg-container {
    width: 100%;
    height: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.fb { background-color: var(--fb-color); }
.legend-dot.ig { background: linear-gradient(to right, #dd2a7b, #812897); }
.legend-dot.ln { background-color: var(--ln-color); }
.legend-dot.yt { background-color: var(--yt-color); }

/* Activity container */
.activity-container {
    height: 380px;
    display: flex;
    flex-direction: column;
}

.activity-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================================================
   VIEW 2: POST COMPOSER VIEW
   ========================================================================== */
.composer-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

.composer-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.platform-toggle-btn {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
}

.platform-toggle-btn:hover:not(.disabled) {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.platform-toggle-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.platform-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.2s;
}

.platform-toggle-btn.active {
    color: var(--text-primary);
    border-color: var(--primary);
    background-color: var(--primary-glow);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.1);
}

.platform-toggle-btn.active .platform-icon-wrap.fb { background: var(--fb-gradient); color: white; }
.platform-toggle-btn.active .platform-icon-wrap.ig { background: var(--ig-gradient); color: white; }
.platform-toggle-btn.active .platform-icon-wrap.ln { background: var(--ln-gradient); color: white; }
.platform-toggle-btn.active .platform-icon-wrap.tk { background: var(--tk-gradient); color: white; }
.platform-toggle-btn.active .platform-icon-wrap.yt { background: var(--yt-gradient); color: white; }

.connection-status-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.platform-toggle-btn:not(.disabled) .connection-status-dot {
    background-color: var(--accent);
}

.helper-text {
    font-size: 0.75rem;
    color: var(--warning);
}

.textarea-footer {
    display: flex;
    justify-content: flex-end;
    font-size: 0.8rem;
    padding-top: 0.25rem;
}

/* Upload dropzone */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(25, 25, 38, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-dropzone:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.03);
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    transition: transform 0.2s;
}

.upload-dropzone:hover .upload-icon {
    transform: translateY(-2px);
    color: var(--primary);
}

.upload-text {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.browse-link {
    color: var(--primary);
    text-decoration: underline;
}

.upload-limit {
    font-size: 0.75rem;
}

/* Media Preview inside Composer */
.media-preview-container {
    position: relative;
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    max-height: 180px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
}

.media-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 180px;
}

.btn-remove-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-remove-media:hover {
    background-color: var(--danger);
}

/* Schedule section style */
.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.schedule-time-inputs {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.input-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* Composer Right Pane: Previews */
.preview-pane {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    position: sticky;
    top: 2rem;
}

.preview-tabs {
    display: flex;
    gap: 0.25rem;
    background-color: var(--bg-input);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.preview-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-tab.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.preview-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 1.5rem 0.5rem;
}

/* PREVIEW CARD STYLING */
.social-preview-card {
    width: 100%;
    max-width: 360px;
    border-radius: 12px;
    padding: 1rem;
    display: none;
    animation: fadeIn 0.3s;
}

.social-preview-card.active {
    display: block;
}

.preview-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.preview-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.preview-user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.preview-username {
    font-weight: 600;
    font-size: 0.85rem;
}

.preview-time {
    font-size: 0.7rem;
}

.preview-text-content {
    font-size: 0.85rem;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
}

.preview-media-content {
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    aspect-ratio: 16/9;
}

.preview-media-content img, 
.preview-media-content video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Facebook Preview */
.fb-preview {
    background-color: #ffffff;
    color: #1c1e21;
    border: 1px solid #ced0d4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fb-preview .preview-time {
    color: #65676b;
}

.fb-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e5e5e5;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.fb-action-btn {
    font-size: 0.8rem;
    color: #65676b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

/* Instagram Preview */
.ig-preview {
    background-color: #ffffff;
    color: #262626;
    border: 1px solid #dbdbdb;
    padding: 0;
}

.ig-preview .preview-card-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
}

.avatar-ring {
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-preview .preview-avatar {
    border: 2px solid white;
}

.ig-preview .preview-username {
    color: #262626;
}

.preview-location {
    font-size: 0.65rem;
    color: #262626;
}

.ig-media-content {
    aspect-ratio: 1/1;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-top: 0;
}

.ig-media-empty {
    width: 100%;
    height: 100%;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ig-actions {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #262626;
}

.ig-left-actions {
    display: flex;
    gap: 0.85rem;
}

.ig-body {
    padding: 0 1rem 1rem 1rem;
}

.ig-caption {
    font-size: 0.8rem;
    line-height: 1.4;
}

.ig-caption strong {
    font-weight: 600;
    margin-right: 0.35rem;
}

/* LinkedIn Preview */
.ln-preview {
    background-color: #ffffff;
    color: #191919;
    border: 1px solid #e0e0e0;
}

.preview-tagline {
    font-size: 0.65rem;
    color: #5e5e5e;
}

.ln-preview .preview-time {
    color: #5e5e5e;
}

.ln-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #ebebeb;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.ln-action-btn {
    font-size: 0.75rem;
    color: #5e5e5e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

/* ==========================================================================
   VIEW 3: CALENDAR VIEW
   ========================================================================== */
.calendar-layout {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 1.5rem;
    height: 100%;
}

.calendar-grid-container {
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.calendar-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav h3 {
    font-size: 1.15rem;
    font-weight: 700;
    min-width: 140px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(70px, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    flex-grow: 1;
}

.calendar-day-cell {
    background-color: var(--bg-card);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
    min-height: 70px;
}

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

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.today {
    box-shadow: inset 0 0 0 1px var(--primary);
    background-color: rgba(99, 102, 241, 0.03);
}

.calendar-day-cell.active-selected {
    background-color: rgba(99, 102, 241, 0.08);
    box-shadow: inset 0 0 0 2px var(--primary);
}

.day-number {
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-end;
}

.today .day-number {
    color: var(--primary);
}

.day-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 0.25rem;
}

.day-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.day-indicator-dot.fb { background-color: var(--fb-color); }
.day-indicator-dot.ig { background-color: #dd2a7b; }
.day-indicator-dot.ln { background-color: var(--ln-color); }
.day-indicator-dot.tk { background-color: #fe2c55; }
.day-indicator-dot.yt { background-color: var(--yt-color); }

/* Right Pane: Day details */
.day-details-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.day-details-pane .card-header {
    margin-bottom: 0;
    padding-bottom: 1rem;
}

.day-posts-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 0;
}

.post-item-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.post-item-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.post-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.post-item-platforms {
    display: flex;
    gap: 4px;
}

.platform-mini-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: white;
}

.platform-mini-badge.fb { background-color: var(--fb-color); }
.platform-mini-badge.ig { background: var(--ig-gradient); }
.platform-mini-badge.ln { background-color: var(--ln-color); }
.platform-mini-badge.tk { background-color: #000; }
.platform-mini-badge.yt { background-color: var(--yt-color); }

.post-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-item-body {
    display: flex;
    gap: 0.75rem;
}

.post-item-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.post-item-snippet {
    font-size: 0.8rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* ==========================================================================
   VIEW 4: ACCOUNTS (CANALI SOCIAL)
   ========================================================================== */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.account-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 220px;
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.85rem;
}

.platform-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.platform-logo.fb { background: var(--fb-gradient); }
.platform-logo.ig { background: var(--ig-gradient); }
.platform-logo.ln { background: var(--ln-gradient); }
.platform-logo.tk { background: var(--tk-gradient); }
.platform-logo.yt { background: var(--yt-gradient); }

.platform-meta h4 {
    font-size: 1rem;
    font-weight: 600;
}

.status-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    display: inline-block;
    margin-top: 0.15rem;
}

.status-pill.connected {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent);
}

.status-pill.disconnected {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.status-pill.failed {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-pill.publishing {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.account-profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-grow: 1;
}

.account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.account-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.account-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.account-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Connected vs Disconnected states */
.account-card.connected {
    border-color: rgba(16, 185, 129, 0.3);
}

.account-card.connected:hover {
    border-color: rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   MODALS AND DIALOGS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out forwards;
}

/* OAuth Window Simulation */
.oauth-window {
    width: 100%;
    max-width: 460px;
    padding: 0;
    background-color: var(--bg-card);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.oauth-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.oauth-brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.platform-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.platform-badge.fb { background: var(--fb-gradient); }
.platform-badge.ig { background: var(--ig-gradient); }
.platform-badge.ln { background: var(--ln-gradient); }
.platform-badge.tk { background: var(--tk-gradient); }
.platform-badge.yt { background: var(--yt-gradient); }

.oauth-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.oauth-security-lock {
    font-size: 0.65rem;
    color: var(--accent);
    display: block;
    margin-top: 0.1rem;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.oauth-body {
    padding: 1.5rem;
    animation: fadeIn 0.3s;
}

.oauth-instruction {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.oauth-footer-text {
    font-size: 0.7rem;
}

/* Spinner */
.oauth-loader-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.success-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleUp {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Post Details Modal */
.post-details-window {
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
}

.post-details-body {
    margin-top: 1.25rem;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.post-details-body::-webkit-scrollbar {
    width: 5px;
}
.post-details-body::-webkit-scrollbar-track {
    background: transparent;
}
.post-details-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.post-details-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.detail-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
}

.detail-value {
    font-size: 0.85rem;
    line-height: 1.45;
    word-break: break-word;
}

.detail-media-wrap {
    max-width: 150px;
    max-height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

/* ==========================================================================
   SVG LINE CHART STYLING
   ========================================================================== */
.chart-line {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    animation: drawPath 1.5s ease-out forwards;
}

.chart-line.fb { stroke: var(--fb-color); }
.chart-line.ig { stroke: url(#ig-stroke-gradient); }
.chart-line.ln { stroke: var(--ln-color); }
.chart-line.yt { stroke: var(--yt-color); }

.chart-area {
    fill-opacity: 0.06;
    animation: fadeIn 1s ease-out forwards;
}

.chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
    stroke-dasharray: 4,4;
}

.chart-label-x, .chart-label-y {
    fill: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
}

@keyframes drawPath {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   QUEUE PREVIEW LIST ITEMS
   ========================================================================== */
.queue-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: transform 0.25s, border-color 0.25s;
    cursor: pointer;
}

.queue-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-color-hover);
}

.queue-card.failed-post {
    border-left: 3px solid #ef4444;
}
.queue-card.failed-post .queue-time {
    color: #ef4444 !important;
}

.queue-meta {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.queue-title {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.queue-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.queue-platforms {
    display: flex;
    gap: 4px;
}

.queue-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   MODE TOGGLE SWITCH (GLASSMORPHIC STYLING)
   ========================================================================== */
.mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    margin-right: 1rem;
    transition: background-color 0.3s, border-color 0.3s;
}

.mode-toggle-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color-hover);
}

.mode-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
    user-select: none;
}

.mode-label.demo.active {
    color: var(--text-primary);
}

.mode-label.cloud.active {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-input);
    transition: .3s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
}

input:checked + .slider {
    background-color: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: var(--primary);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1100px) {
    .composer-layout {
        grid-template-columns: 1fr;
    }
    
    .preview-pane {
        position: static;
        height: auto;
        margin-top: 1.5rem;
    }
    
    .calendar-layout {
        grid-template-columns: 1fr;
    }
    
    .day-details-pane {
        margin-top: 1.5rem;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .activity-container {
        height: auto;
    }
}

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none; /* In a real app we'd have a mobile drawer */
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   AUTH & PAYWALL PREMIUM UI STYLES
   ========================================================================== */
#auth-overlay, #paywall-overlay {
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-auth-tab-login.active, #btn-auth-tab-register.active {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-sm) !important;
}

#btn-auth-tab-login:not(.active), #btn-auth-tab-register:not(.active) {
    background: transparent !important;
    color: var(--text-muted) !important;
}

/* Paywall Specific Styles */
#btn-paywall-subscribe {
    background: var(--primary-gradient);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    font-weight: 600;
}

#btn-paywall-subscribe:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

/* ==========================================================================
   INDIVIDUAL POST STATS STYLES
   ========================================================================== */
.post-stats-section {
    width: 100%;
}

.post-stats-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.post-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.post-stat-box {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.post-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.post-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.post-stat-sub {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.post-stats-breakdown {
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.75rem;
    width: 100%;
}

.breakdown-metrics {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
}

.breakdown-pill {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
}

.breakdown-pill strong {
    color: var(--text-primary);
}

.breakdown-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.rating-label {
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 50px;
    color: white;
}

.badge-primary { background-color: var(--primary); }
.badge-accent { background: var(--accent-gradient, #f59e0b); }
.badge-info { background-color: #0284c7; }
.badge-secondary { background-color: var(--text-muted); }

/* Responsive adjustments for stats */
@media (max-width: 480px) {
    .post-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .breakdown-metrics {
        flex-direction: column;
        gap: 0.25rem;
    }
    .breakdown-pill {
        display: flex;
        justify-content: space-between;
    }
}

/* ==========================================================================
   MOBILE & PWA OVERLAYS & LAYOUT STYLES
   ========================================================================== */
.mobile-header, .mobile-bottom-nav {
    display: none;
}

@media (max-width: 900px) {
    .sidebar {
        display: none !important;
    }
    
    .app-container {
        grid-template-columns: 1fr !important;
        padding-top: 60px !important; /* Space for fixed mobile top header */
        padding-bottom: calc(65px + env(safe-area-inset-bottom)) !important; /* Space for fixed mobile bottom nav */
        height: 100dvh !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    .main-content {
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    
    .top-bar {
        padding: 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        background-color: transparent !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
    
    .top-bar-actions {
        display: none !important; /* Hide "Crea Post" button since we have the bottom navigation bar */
    }
    
    #page-subtitle {
        display: none !important; /* Hide subtitles to save valuable height */
    }
    
    .content-body {
        padding: 0.75rem !important;
        overflow-y: visible !important;
    }
    
    .content-view {
        height: auto !important;
    }
    
    .card {
        padding: 1rem !important;
        border-radius: 10px !important;
        margin-bottom: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .chart-container {
        height: 320px !important;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Composer Layout */
    .composer-layout {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .platform-selector-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .platform-toggle-btn {
        padding: 0.5rem 0.35rem !important;
        font-size: 0.75rem !important;
        gap: 0.4rem !important;
    }
    
    .platform-icon-wrap {
        width: 22px !important;
        height: 22px !important;
    }
    
    .platform-icon-wrap svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .social-preview-card {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
    }
    
    /* Calendar Layout overrides */
    .calendar-layout {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .calendar-grid-container {
        min-height: auto !important;
    }
    
    .calendar-weekdays {
        font-size: 0.7rem !important;
        padding-bottom: 0.25rem !important;
    }
    
    .calendar-days-grid {
        grid-auto-rows: minmax(50px, 1fr) !important;
    }
    
    .calendar-day-cell {
        padding: 2px !important;
        min-height: 50px !important;
        font-size: 0.75rem !important;
    }
    
    .calendar-day-cell .event-dots {
        display: none !important; /* Hide event dots if they cause vertical stretch */
    }
    
    /* Fixed Top Mobile Header */
    .mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: var(--bg-sidebar);
        border-bottom: 1px solid var(--border-color);
        padding: 0 16px;
        z-index: 9999;
    }
    
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-logo {
        width: 32px;
        height: 32px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .mobile-brand-name {
        font-family: 'Outfit', sans-serif;
        font-size: 1.2rem;
        font-weight: 700;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .mobile-user {
        display: flex;
        align-items: center;
    }
    
    .mobile-user .user-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--primary-gradient);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: var(--shadow-sm);
        border: 2px solid var(--border-color);
    }
    
    /* Fixed Bottom Mobile Navigation */
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(65px + env(safe-area-inset-bottom)) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        background-color: var(--bg-sidebar);
        border-top: 1px solid var(--border-color);
        z-index: 99999 !important; /* Always on top */
        box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
        padding: 0 10px;
    }
    
    .mobile-bottom-nav .nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: transparent !important;
        border: none !important;
        color: var(--text-muted) !important;
        font-size: 0.65rem !important;
        font-weight: 500 !important;
        cursor: pointer;
        padding: 6px 0 !important;
        transition: color 0.2s;
        box-shadow: none !important;
        width: auto !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .mobile-bottom-nav .nav-btn.active {
        color: var(--primary) !important;
    }
    
    .mobile-bottom-nav .nav-btn .nav-icon {
        margin: 0 !important;
        width: 20px;
        height: 20px;
        color: var(--text-muted);
    }
    
    .mobile-bottom-nav .nav-btn.active .nav-icon {
        stroke: var(--primary) !important;
        color: var(--primary) !important;
    }
    
    /* Disables the vertical active bar on mobile navigation tabs */
    .mobile-bottom-nav .nav-btn.active::before {
        display: none !important;
    }
}

/* ==========================================================================
   TOAST NOTIFICATIONS (IN-APP NOTIFICATIONS)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
}

.custom-toast {
    background-color: rgba(20, 20, 29, 0.95);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    word-break: break-word;
}

.custom-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.custom-toast.success {
    border-left-color: #10b981;
}

.custom-toast.error {
    border-left-color: #ef4444;
}

.custom-toast.info {
    border-left-color: #3b82f6;
}

.custom-toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.custom-toast-close:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .toast-container {
        top: 15px;
        right: 50%;
        transform: translateX(50%);
        max-width: 90%;
    }
}
