/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================ */
/* App Shell Layout */
/* ============================================ */
.board-shell {
    display: flex;
    height: 100vh;
    background: var(--app-bg);
    overflow: hidden;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    gap: 20px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 10;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.sidebar-link {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-link.active {
    background: var(--surface-subtle);
    color: var(--text-primary);
    border-color: var(--border);
}

.sidebar-link:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

.sidebar-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--text-secondary);
}

.nav-badge.subtle {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-tertiary);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--app-bg);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.topbar-menu-toggle:hover {
    background: var(--surface-subtle);
}

.topbar-menu-toggle:active {
    transform: scale(0.98);
}

.topbar-title h1 {
    font-size: 22px;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.global-search input {
    width: 280px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 13px;
    background: var(--surface);
}

.view-container {
    padding: 24px 32px 80px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.view-content {
    display: none;
}

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



/* ============================================ */
/* Dashboard */
/* ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    background: var(--surface-subtle);
    border-color: var(--border-strong);
}

.dashboard-card-title {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 600;
    margin: 10px 0 6px;
}

.dashboard-card-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 24px;
}

.dashboard-activity {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-top: 20px;
}

.dashboard-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.btn-link {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

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

.dashboard-activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-subtle);
}

.dashboard-activity-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    min-width: 70px;
}

.dashboard-activity-title {
    font-size: 13px;
    color: var(--text-primary);
}

.dashboard-activity-empty {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ============================================ */
/* Insights Toolbar */
/* ============================================ */
.insights-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.insights-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.insights-stats {
    font-size: 13px;
    color: var(--text-secondary);
}

.insights-search input {
    width: 220px;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 13px;
    background: var(--surface);
}

/* Insights toolbar mobile */
@media (max-width: 768px) {
    .insights-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .insights-toolbar-left,
    .insights-toolbar-right {
        width: 100%;
    }
    
    .insights-search {
        flex: 1;
    }
    
    .insights-search input {
        width: 100%;
    }
    
    .insights-toolbar-right {
        justify-content: flex-start;
    }
    
    .insights-toolbar-right .channel-filter {
        flex: 1;
        min-width: 0;
    }
}

/* ============================================ */
/* Post Ideas Kanban */
/* ============================================ */
/* Post Ideas and Podcast headers removed - using topbar title only */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.kanban-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kanban-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 80px;
}

.kanban-list.empty {
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    color: var(--text-tertiary);
    font-size: 13px;
    background: var(--surface-subtle);
}

/* ============================================ */
/* Advisor Composer */
/* ============================================ */
.advisor-composer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.advisor-composer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.advisor-composer-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.advisor-composer-header p {
    font-size: 12px;
    color: var(--text-tertiary);
}

.advisor-composer-actions {
    display: flex;
    gap: 8px;
}

.advisor-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.advisor-segmented {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.advisor-segment {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.advisor-segment.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 122, 255, 0.08);
}

.advisor-segment span {
    margin-left: 6px;
    color: var(--text-tertiary);
    font-weight: 600;
}

/* ============================================ */
/* Shortcuts Modal */
/* ============================================ */
.shortcuts-modal {
    max-width: 520px;
}

.shortcuts-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shortcut-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-subtle);
    font-size: 13px;
}

/* ============================================ */
/* Skeletons */
/* ============================================ */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
}

.skeleton-card {
    height: 140px;
    border-radius: 16px;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

.skeleton-line {
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

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

/* ============================================ */
/* Responsive Shell */
/* ============================================ */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        width: 240px;
        transition: left 0.2s ease;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-footer {
        padding-top: 16px;
        border-top: 1px solid var(--border);
        flex-shrink: 0;
    }
    
    .sidebar-footer .profile-button {
        display: flex;
        width: 100%;
        height: auto;
        padding: 10px 12px;
    }
    
    .sidebar-footer .btn-logout {
        display: flex;
        width: 100%;
        padding: 10px 12px;
    }

    .topbar {
        padding: calc(16px + env(safe-area-inset-top)) 18px 16px;
        gap: 12px;
    }

    .topbar-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .topbar-title {
        flex: 1;
    }

    .global-search input {
        width: 180px;
    }

    .view-container {
        padding: 16px 18px calc(24px + env(safe-area-inset-bottom));
        -webkit-overflow-scrolling: touch;
    }

}

.inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    color: currentColor;
    vertical-align: middle;
}

.inline-icon svg {
    width: 16px;
    height: 16px;
}

/* ============================================ */
/* Advisor Tips */
/* ============================================ */
.advisor-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.advisor-toolbar-status {
    font-size: 13px;
    color: var(--text-tertiary);
}

.advisor-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.advisor-action-btn:hover {
    background: var(--surface-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.advisor-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.advisor-message-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 24px;
}

.advisor-message-modal {
    width: min(520px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-lg);
}

.advisor-message-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.advisor-message-modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.advisor-message-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.advisor-message-close:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

.advisor-message-input {
    width: 100%;
    resize: vertical;
    min-height: 96px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-subtle);
    color: var(--text-primary);
    padding: 12px 14px;
    font-size: 14px;
}

.advisor-message-input:focus {
    outline: none;
    border-color: var(--border-strong);
    background: var(--surface);
}

.advisor-message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.advisor-message-status {
    font-size: 12px;
    color: var(--text-tertiary);
}

.advisor-message-send {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.advisor-message-send:hover {
    background: var(--surface-subtle);
    border-color: var(--border-strong);
}

.advisor-message-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.advisor-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 56px 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.advisor-section-header:first-child {
    margin-top: 24px;
}

.advisor-section-header h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin: 0;
}

.advisor-section-header span {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.advisor-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ===== ADVISOR TIP CARDS - APPLE STYLE ===== */
.advisor-tip-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.advisor-tip-card:hover {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--border-strong);
}

.advisor-tip-card:active {
    transform: scale(0.99);
}

/* Action buttons - top right corner */
.advisor-card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    opacity: 1;
}

/* Show actions if any is active */
.advisor-card-actions:has(.active) {
    opacity: 1;
}

.advisor-feedback-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.advisor-feedback-btn:hover {
    background: var(--surface-elevated);
    color: var(--text-secondary);
}

.advisor-feedback-btn.active.positive {
    background: #e8f9ef;
    color: #30a14e;
}

.advisor-feedback-btn.active.negative {
    background: #ffeef0;
    color: #cf222e;
}

/* Category label - small, subtle */
.advisor-card-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.advisor-card-category.category-strategie { color: #007aff; }
.advisor-card-category.category-taktika { color: #34c759; }
.advisor-card-category.category-content { color: #ff9500; }
.advisor-card-category.category-byznys { color: #af52de; }

/* Title */
.advisor-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-right: 70px; /* Space for action buttons */
    letter-spacing: -0.01em;
}

/* Summary */
.advisor-card-summary {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

/* Footer */
.advisor-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.advisor-card-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Completion badge */
.advisor-completion-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
}

.advisor-completion-badge.pending {
    background: var(--surface-subtle);
    color: var(--text-tertiary);
}

.advisor-completion-badge.completed {
    background: #e8f9ef;
    color: #30a14e;
}

.advisor-completion-badge.abandoned {
    background: #ffeef0;
    color: #cf222e;
}

.advisor-completion-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.advisor-completion-btn {
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.advisor-completion-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.advisor-completion-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 122, 255, 0.08);
}

.advisor-completion-btn.completed.active {
    border-color: #22c55e;
    color: #15803d;
    background: #e8f9ef;
}

.advisor-completion-btn.abandoned.active {
    border-color: #f87171;
    color: #b91c1c;
    background: #ffeef0;
}

.advisor-history-modal {
    max-height: 80vh;
}

.advisor-history-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}

.advisor-history-loading,
.advisor-history-empty {
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    padding: 18px 12px;
}

.advisor-history-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.advisor-history-meta {
    font-size: 11px;
    color: var(--text-tertiary);
}

.advisor-history-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Empty state */
.advisor-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.advisor-empty-icon {
    color: var(--text-tertiary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.advisor-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.advisor-empty-desc {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
    max-width: 280px;
}

.advisor-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 32px 0 16px;
}

.advisor-pagination .page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.advisor-pagination .page-btn:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

.advisor-pagination .page-btn.active {
    background: var(--accent);
    color: white;
}

/* Advisor Detail Modal */
.advisor-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 24px;
}

.advisor-detail-modal {
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.advisor-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.advisor-detail-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.advisor-detail-close {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
}

.advisor-detail-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

.advisor-detail-category {
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
}

.advisor-detail-summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.advisor-detail-completion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 18px;
}

.advisor-detail-completion-actions {
    display: inline-flex;
    gap: 8px;
}

.advisor-detail-completion-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.advisor-detail-completion-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.advisor-detail-completion-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 122, 255, 0.08);
}

.advisor-detail-completion-btn.completed.active {
    border-color: #22c55e;
    color: #15803d;
    background: #e8f9ef;
}

.advisor-detail-completion-btn.abandoned.active {
    border-color: #f87171;
    color: #b91c1c;
    background: #ffeef0;
}

.advisor-detail-section {
    margin-bottom: 16px;
}

.advisor-detail-section h3 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.advisor-detail-section p {
    color: var(--text-secondary);
    font-size: 14px;
}

.advisor-detail-section ul,
.advisor-detail-section ol {
    margin-left: 18px;
    color: var(--text-secondary);
    font-size: 14px;
}

.advisor-detail-sources {
    display: grid;
    gap: 12px;
}

.advisor-detail-source {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-subtle);
}

.advisor-detail-source-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.advisor-detail-source-content {
    font-size: 13px;
    color: var(--text-secondary);
}

:root {
    /* Apple System Colors - aligned */
    --app-bg: #F2F2F7;
    --surface: #ffffff;
    --surface-subtle: #F2F2F7;
    --surface-elevated: #ffffff;
    --text-primary: #1C1C1E;
    --text-secondary: #6e6e73;
    --text-tertiary: #8E8E93;
    --border: #D1D1D6;
    --border-strong: #C7C7CC;
    --accent: #007AFF;
    --accent-weak: #e5f1ff;
    --danger: #FF3B30;
    --danger-weak: #fdecec;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--app-bg);
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* iOS specific improvements */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
    /* Prevent pull-to-refresh */
    overscroll-behavior-y: none;
}

/* Login Section */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    padding: 20px;
    background: radial-gradient(circle at top, rgba(0, 122, 255, 0.08), transparent 55%), var(--surface-subtle);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
}

.login-box {
    background: var(--surface-elevated);
    border-radius: 24px;
    padding: 44px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}

.login-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    background: linear-gradient(135deg, #0a84ff, #5ac8fa);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.28);
    letter-spacing: -0.02em;
}

.login-brand-text h1 {
    font-size: 26px;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.login-brand-subtitle {
    display: block;
    font-size: 13px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.5;
}

.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.75);
    transition: all 0.2s;
}

.login-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.18);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #4b5563;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.login-box button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0a84ff, #0071e3);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 14px 30px rgba(10, 132, 255, 0.22);
}

.login-box button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(10, 132, 255, 0.26);
}

.login-box button[type="submit"]:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--danger-weak);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 14px;
    display: none;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.error-message.show {
    display: block;
}

/* Board Section */
.board-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 32px 40px;
    height: 100vh;
    width: 100%;
    background: var(--app-bg);
    /* Smooth scrolling on iOS */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Prevent pull-to-refresh */
    overscroll-behavior-y: none;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.board-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stats-badge {
    padding: 6px 12px;
    background: var(--surface-subtle);
    color: var(--text-secondary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-height: 40px;
}

.profile-menu {
    position: relative;
}

.profile-button {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.profile-button:hover {
    background: var(--surface);
}

.profile-initials {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.profile-button:active {
    transform: scale(0.98);
}

.profile-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 24px;
}

.profile-modal-overlay[hidden] {
    display: none;
}

.profile-modal {
    width: min(640px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 85vh;
    overflow: hidden;
}

.profile-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.profile-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-modal-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.profile-modal-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.profile-modal-close:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding-right: 4px;
}

.profile-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-form-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.profile-form-row input[type="text"],
.profile-form-row textarea,
.profile-form-row input[type="file"] {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-form-row input[type="text"]:focus,
.profile-form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.profile-form-row textarea {
    resize: vertical;
    min-height: 96px;
}

.profile-file-help {
    font-size: 12px;
    color: var(--text-tertiary);
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.profile-form-status {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 16px;
}

.mobile-menu {
    position: relative;
    display: none;
    margin-left: auto;
}

.btn-menu {
    padding: 10px 14px;
    border: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.btn-menu:hover {
    background: var(--surface-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.mobile-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow-md);
    z-index: 20;
}

.mobile-menu-item {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-menu-item:hover {
    background: var(--surface-subtle);
}

.mobile-menu-item.destructive {
    color: var(--danger);
}

.mobile-menu-item.destructive:hover {
    background: var(--danger-weak);
}

.filter-group {
    display: flex;
    gap: 8px;
    min-width: 220px;
}

.channel-filter {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
    height: 40px;
}

.channel-filter:hover {
    border-color: var(--accent);
}

.channel-filter:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.btn-refresh,
.btn-logout {
    padding: 10px 20px;
    border: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    height: 40px;
}

.btn-refresh:hover {
    background: var(--surface-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-logout:hover {
    background: var(--danger-weak);
    border-color: rgba(220, 38, 38, 0.4);
    color: var(--danger);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 100px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Empty State */
.empty-state,
.error-state {
    text-align: center;
    padding: 80px 24px;
    margin: 32px auto;
    max-width: 680px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state svg,
.error-state svg {
    margin: 0 auto 24px;
}

.empty-state p,
.error-state p {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state small,
.error-state small {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-retry {
    display: block;
    margin: 0 auto;
    padding: 10px 24px;
    border: 1px solid var(--accent);
    background: var(--surface);
    color: var(--accent);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-retry:hover {
    background: var(--accent);
    color: white;
}

/* Insights Grid - Apple Style */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Insight Card - Apple Style */
.insight-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
}

.insight-card:hover {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--border-strong);
}

.insight-card:active {
    transform: scale(0.99);
}

.insight-card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    opacity: 1;
}

.insight-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.insight-action-btn svg {
    width: 16px;
    height: 16px;
}

.insight-action-btn:hover {
    background: var(--surface-elevated);
    color: var(--text-secondary);
}

.insight-action-btn.active {
    color: #f59e0b;
    background: #fffbeb;
}

.insight-action-btn.delete:hover {
    color: #ef4444;
    background: var(--danger-weak);
}

.insight-card-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.insight-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0 0 12px;
    padding-right: 70px;
    letter-spacing: -0.01em;
}

.insight-card-summary {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insight-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    min-width: 0;
}

.insight-card-video {
    flex: 1;
    min-width: 0;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insight-card-video:hover {
    color: #0077ed;
    text-decoration: underline;
}

.insight-card-date {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}


/* Tablet optimizations */
@media (max-width: 1024px) {
    .board-container {
        padding: 24px 20px;
    }
}

/* Mobile optimizations - Primary target */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent iOS zoom on input focus */
    }

    .board-container {
        padding: 16px 12px;
    }

    .dashboard-activity {
        margin-top: 24px;
    }

    .board-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
        margin-bottom: 20px;
    }

    .header-left {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    /* Hide header-actions row when filter is hidden (non-insights tabs) */
    .header-actions:has(.filter-group[style*="display: none"]) {
        display: none;
    }

    .board-header h1 {
        font-size: 22px;
    }

    .stats-badge {
        display: none;
    }

    .header-actions {
        flex-direction: row;
        width: 100%;
        gap: 8px;
    }

    .topbar .profile-button {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .profile-modal-overlay {
        padding: 12px;
    }

    .profile-modal {
        padding: 16px;
        max-height: 90vh;
    }

    .profile-form-row input[type="text"],
    .profile-form-row textarea,
    .profile-form-row input[type="file"] {
        font-size: 16px;
    }

    .filter-group {
        width: 100%;
        flex: 1;
    }

    .channel-filter,
    .btn-refresh,
    .btn-logout {
        width: 100%;
        min-height: 48px; /* iOS touch target */
        justify-content: center;
        font-size: 15px;
    height: 48px;
    }

    .btn-refresh,
    .btn-logout {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .btn-menu {
        min-height: 44px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .header-left {
        width: 100%;
    }

    /* Login optimizations */
    .login-container {
        padding: 16px;
    }

    .login-box {
        padding: 32px 20px;
    }

    .login-brand {
        gap: 12px;
    }

    .login-logo {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 13px;
    }

    .login-brand-text h1 {
        font-size: 24px;
    }

    .login-box input[type="email"],
    .login-box input[type="password"] {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 14px 16px;
        min-height: 48px;
    }

    .login-box button[type="submit"] {
        min-height: 48px;
        font-size: 16px;
    }

    /* Loading/Empty states */
    .loading-state,
    .empty-state,
    .error-state {
        padding: 60px 20px;
    }

    .empty-state p,
    .error-state p {
        font-size: 17px;
    }

    .empty-state small,
    .error-state small {
        font-size: 14px;
    }

    .advisor-placeholder {
        padding: 48px 16px;
    }

    .advisor-placeholder h2 {
        font-size: 18px;
    }
}

/* iPhone 15 Pro Max specific (430x932) */
@media (max-width: 430px) {
    .board-container {
        padding: 12px 10px;
    }

    .board-header {
        padding: 14px;
    }

    .board-header h1 {
        font-size: 20px;
    }

    .stats-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Landscape mode (mobile) */
@media (max-width: 932px) and (orientation: landscape) {
    .board-container {
        padding: 16px 20px;
    }

    .board-header {
        padding: 12px 16px;
    }
}

/* iOS Safe Area (for notch) */
@supports (padding: max(0px)) {
    .board-container {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .login-container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* ============================================ */
/* NEW: Tab Navigation */
/* ============================================ */
.tab-navigation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 28px;
    padding: 6px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.tab-btn.active {
    color: var(--text-primary);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

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

/* Advisor placeholder */
.advisor-placeholder {
    text-align: center;
    padding: 72px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.advisor-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--surface-subtle);
    color: var(--text-primary);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 16px;
}

.advisor-placeholder h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.advisor-placeholder p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.advisor-meta {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ============================================ */
/* NEW: Post Ideas Grid */
/* ============================================ */
.post-ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 8px;
}

.post-idea-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    padding-top: 56px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.post-idea-card:hover {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--border-strong);
}

.post-idea-card:active {
    transform: scale(0.99);
}

.post-idea-card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    opacity: 1;
}

.post-idea-card-actions .star-btn,
.post-idea-card-actions .delete-btn,
.post-idea-card-actions .post-feedback-btn,
.post-idea-card-actions .post-publish-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.post-idea-card-actions .star-btn svg,
.post-idea-card-actions .delete-btn svg,
.post-idea-card-actions .post-feedback-btn svg,
.post-idea-card-actions .post-publish-btn svg {
    width: 16px;
    height: 16px;
}

.post-idea-card-actions .star-btn:hover {
    color: #f59e0b;
    background: #fffbeb;
}

.post-idea-card-actions .star-btn.active {
    color: #f59e0b;
    background: #fffbeb;
}

.post-idea-card-actions .post-feedback-btn:hover,
.post-idea-card-actions .post-publish-btn:hover {
    background: var(--surface-elevated);
    color: var(--text-secondary);
}

.post-idea-card-actions .post-feedback-btn.active.positive {
    color: #16a34a;
    background: #dcfce7;
}

.post-idea-card-actions .post-feedback-btn.active.negative {
    color: #dc2626;
    background: #fee2e2;
}

.post-idea-card-actions .post-publish-btn.active {
    color: #7c3aed;
    background: #ede9fe;
}

.post-idea-card-actions .delete-btn:hover {
    color: #ef4444;
    background: var(--danger-weak);
}

.editor-actions .star-btn {
    border-radius: 999px;
}

.editor-actions .star-btn.active {
    border-color: #f59e0b;
    color: #f59e0b;
}

.editor-actions .post-feedback-btn.active.positive {
    border-color: #16a34a;
    color: #16a34a;
}

.editor-actions .post-feedback-btn.active.negative {
    border-color: #dc2626;
    color: #dc2626;
}

.editor-actions .post-publish-btn.active {
    border-color: #7c3aed;
    color: #7c3aed;
}

.editor-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.starred-section {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.starred-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.starred-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.starred-header span {
    font-size: 12px;
    color: #92400e;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Sortable grid for publication queue */
.sortable-grid {
    min-height: 100px;
}

.sortable-card {
    position: relative;
    cursor: grab;
}

.sortable-card:active {
    cursor: grabbing;
}

/* Publish order badge */
.publish-order-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
    z-index: 2;
}

/* Drag handle */
.drag-handle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.15s ease;
}

.drag-handle:hover {
    background: var(--surface-elevated);
    color: var(--text-secondary);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle svg {
    width: 16px;
    height: 16px;
}

/* Dragging state */
.post-idea-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Drag over state */
.post-idea-card.drag-over {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.published-section {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
}

.published-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.published-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #6d28d9;
}

.published-header span {
    font-size: 12px;
    color: #6d28d9;
    background: #ede9fe;
    padding: 2px 8px;
    border-radius: 10px;
}

.post-idea-topic {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.post-idea-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.post-idea-status.generated {
    background: var(--surface-subtle);
    color: var(--text-secondary);
}

.post-idea-status.selected {
    background: var(--accent-weak);
    color: var(--accent);
}

.post-idea-status.scheduled {
    background: #DCFCE7;
    color: #16a34a;
}

.post-idea-status.published {
    background: #F3E8FF;
    color: #9333ea;
}

/* Post idea card typography */
.post-idea-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.post-idea-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0 0 12px;
    padding-right: 70px;
    letter-spacing: -0.01em;
}

.post-idea-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-idea-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 8px 0 0;
}

.post-idea-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.post-idea-footer-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Post Idea Sources Section */
.post-idea-sources {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.sources-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.source-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-chip:hover {
    background: var(--accent-weak);
    border-color: var(--accent);
    color: var(--accent);
}

.source-chip:active {
    transform: scale(0.97);
}

.insight-usage-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
    font-style: italic;
    cursor: help;
}

/* Insight Detail Modal */
.insight-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.insight-modal-overlay[hidden] {
    display: none;
}

.insight-modal {
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease-out;
}

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

.insight-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.insight-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.insight-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-subtle);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.insight-modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.insight-modal-content {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.insight-modal-loading {
    display: grid;
    gap: 10px;
}

.insight-modal-content p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.insight-modal-quote {
    padding: 14px 16px;
    background: var(--surface-subtle);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-primary);
    margin-top: 12px;
}

.insight-modal-video {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.insight-modal-video-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.insight-modal-video-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.insight-modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.insight-modal-btn {
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.insight-modal-btn.secondary {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

.insight-modal-btn:hover {
    background: #0071e3;
}

.insight-modal-btn.secondary:hover {
    background: var(--border);
}

.insight-modal-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* ============================================ */
/* NEW: Filtering Panel */
/* ============================================ */
.filtering-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.filter-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sort-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--surface);
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

/* ============================================ */
/* NEW: Mobile Preview */
/* ============================================ */
.mobile-preview-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    position: sticky;
    top: 20px;
    max-width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-actions {
    display: flex;
    gap: 8px;
}

.preview-btn {
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mobile-phone {
    background: #000;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    max-width: 420px;
    width: 100%;
}

.phone-screen {
    background: var(--surface-subtle);
    border-radius: 24px;
    overflow: hidden;
    height: clamp(520px, 70vh, 680px);
    overflow-y: auto;
}

.linkedin-header {
    background: var(--surface);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-strong);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-headline {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-top: 2px;
}

.post-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.post-content-preview {
    background: var(--surface);
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.post-content-preview.collapsed .post-content-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content-text {
    white-space: pre-line;
    word-break: normal;
    overflow-wrap: break-word;
}

.see-less-btn {
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    margin-top: 8px;
}

.see-more-btn {
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    margin-top: 4px;
}

.see-more-btn:hover {
    color: var(--accent);
}

.linkedin-footer {
    background: var(--surface);
    padding: 8px 16px;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border);
}

.footer-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 12px;
}

.preview-stats {
    margin-top: 16px;
    padding: 12px;
    background: var(--surface-subtle);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.warning {
    color: #f59e0b;
}

.stat-value.error {
    color: #dc2626;
}

.stat-value.success {
    color: #16a34a;
}

/* ============================================ */
/* NEW: Editor View */
/* ============================================ */

/* Editor Navigation Header */
.editor-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.editor-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.btn-delete:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-weak);
}

.post-nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 8px;
}

.post-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px !important;
    transition: all 0.2s ease;
}

.post-nav-btn:not(:disabled):hover {
    background: var(--accent-weak);
    border-color: var(--accent);
    color: var(--accent);
}

.post-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.post-nav-counter {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: center;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(400px, 1fr) 500px;
    gap: 24px;
    margin-top: 24px;
}

.editor-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.editor-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.post-ideas-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-ideas-toolbar-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.post-ideas-toolbar-actions .btn-icon {
    width: 36px;
    height: 36px;
}

.apple-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.apple-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.apple-toggle-track {
    width: 38px;
    height: 22px;
    background: #e5e7eb;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.apple-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.apple-toggle input:checked + .apple-toggle-track {
    background: #34c759;
}

.apple-toggle input:checked + .apple-toggle-track::after {
    transform: translateX(16px);
}

.apple-toggle-label {
    color: var(--text-secondary);
}

.apple-toggle-empty {
    margin-top: 12px;
}


.variant-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.variant-tab {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.variant-tab:hover {
    border-color: var(--accent);
}

.variant-tab.active {
    background: var(--accent-weak);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.variant-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    font-weight: 600;
    line-height: 1;
}

.variant-close:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: var(--danger-weak);
}

.variant-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.variant-loading {
    font-size: 12px;
    color: #3B82F6;
    margin: 4px 0 12px;
}

.editor-textarea {
    width: 100%;
    min-height: 400px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    background: var(--surface);
    color: var(--text-primary);
}

.editor-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.autosave-indicator {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

.autosave-indicator.saving {
    color: #3B82F6;
}

.editor-counts {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

/* AI Assistant */
.ai-assistant-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--surface-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.ai-assistant-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.ai-chat-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-chat-input {
    width: 100%;
    min-height: 90px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: var(--surface);
    color: var(--text-primary);
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.ai-chat-actions {
    display: flex;
    justify-content: flex-end;
}

.ai-chat-submit {
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.ai-chat-submit:hover {
    background: #0071e3;
}

.ai-chat-submit:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.ai-chat-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-chat-history {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-history-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.ai-history-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.ai-history-prompt {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.ai-history-restore {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-history-restore:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.ai-history-empty {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 2px;
}

/* ============================================ */
/* NEW: Calendar View */
/* ============================================ */
.calendar-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-month {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: var(--surface-subtle);
    border-color: var(--accent);
}

.calendar-day.today {
    border-color: var(--accent);
    font-weight: 600;
}

.calendar-day.has-posts {
    background: var(--accent-weak);
}

.calendar-day-number {
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-day-posts {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.post-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ============================================ */
/* NEW: Podcast */
/* ============================================ */
.podcast-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.podcast-toolbar-actions {
    display: flex;
    gap: 8px;
}

.podcast-generator {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.podcast-generator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.podcast-generator-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.podcast-generator-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    cursor: pointer;
}

.podcast-generator p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.podcast-generator-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.podcast-generator-form input {
    flex: 1;
    min-width: 240px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #0071e3;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 8px;
}

.podcast-grid.podcast-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.podcast-date-separator {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin: 6px 8px 0;
}

.podcast-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.podcast-card:hover {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--border-strong);
}

.podcast-card:active {
    transform: scale(0.99);
}

.podcast-card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    opacity: 1;
}

.podcast-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.podcast-action-btn svg {
    width: 16px;
    height: 16px;
}

.podcast-action-btn.delete:hover {
    color: #ef4444;
    background: var(--danger-weak);
}

.podcast-card-label {
    display: inline-flex;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-weak);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.podcast-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.podcast-card-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.podcast-ideas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.podcast-idea-chip {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 999px;
}

.podcast-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-tertiary);
}

.podcast-modal-overlay,
.podcast-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.podcast-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.podcast-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.podcast-modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 16px;
}

.podcast-detail {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 860px;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
}

.podcast-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.podcast-detail-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 6px;
}

.podcast-detail-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--surface-subtle);
    color: var(--text-tertiary);
    cursor: pointer;
}

.podcast-detail-label {
    display: inline-flex;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-weak);
    padding: 4px 10px;
    border-radius: 999px;
}

.podcast-detail-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.podcast-detail-ideas {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.podcast-detail-ideas-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.podcast-detail-ideas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.podcast-detail-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.podcast-detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.podcast-detail-section-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.podcast-detail-content {
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.podcast-copy-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.podcast-copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.podcast-detail-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* ============================================ */
/* Responsive - Tablet */
/* ============================================ */
@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mobile-preview-container {
        position: static;
        margin-top: 20px;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================ */
/* Responsive - Mobile */
/* ============================================ */
@media (max-width: 768px) {
    button,
    .btn-icon,
    .topbar-menu-toggle,
    .insight-modal-close,
    .insight-modal-btn,
    .source-chip {
        min-height: 44px;
    }

    input,
    textarea,
    select {
        font-size: 16px;
    }

    .board-container {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .tab-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 10px 12px;
        gap: 8px;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        background: var(--surface-elevated);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
        justify-content: space-between;
        z-index: 20;
    }
    
    .tab-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 12px;
        text-align: center;
        white-space: nowrap;
    }

    .tab-btn.active {
        background: var(--accent-weak);
        color: var(--accent);
        box-shadow: none;
    }
    
    .post-ideas-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post-idea-card {
        padding: 16px;
        gap: 8px;
    }

    .post-idea-card-actions {
        position: static;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin: 12px 0 8px;
        order: 2;
    }

    .publish-order-badge {
        position: static;
        margin-bottom: 6px;
        align-self: flex-start;
    }

    .post-idea-title {
        order: 1;
        padding-right: 0;
        margin-bottom: 8px;
    }

    .post-idea-summary {
        order: 3;
    }

    .post-idea-footer {
        order: 4;
    }

    .post-idea-sources {
        order: 5;
    }

    .podcast-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .podcast-detail-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .podcast-detail {
        max-height: 80vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 20px;
    }
    
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .mobile-preview-container {
        position: static;
        margin-top: 16px;
        padding: 16px;
    }
    
    .editor-main {
        padding: 16px;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .editor-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .editor-textarea {
        min-height: 250px;
        padding: 12px;
        font-size: 15px;
    }
    
    .phone-screen {
        height: clamp(360px, 55vh, 520px);
    }
    
    .variant-tabs {
        margin-bottom: 12px;
        gap: 6px;
    }
    
    .variant-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Compact AI Assistant on mobile */
    .ai-chat-input {
        min-height: 70px;
        font-size: 14px;
    }

    .ai-chat-actions {
        justify-content: stretch;
    }

    .ai-chat-submit {
        width: 100%;
        padding: 10px 12px;
    }
    
    /* Reduce margins in editor */
    .autosave-indicator {
        margin-top: 6px;
        font-size: 11px;
    }
    
    .editor-counts {
        margin-top: 4px;
        font-size: 11px;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        padding: 4px;
        font-size: 12px;
    }

    /* Mobile: Source chips */
    .source-chip {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Mobile: Insight modal */
    .insight-modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }

    .insight-modal {
        max-height: 70vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .insight-modal-header {
        padding: 20px 20px 14px;
    }

    .insight-modal-header h3 {
        font-size: 16px;
    }

    .insight-modal-content {
        padding: 16px 20px;
    }

    .insight-modal-content p {
        font-size: 14px;
    }

    .insight-modal-footer {
        padding: 14px 20px 20px;
    }

    /* Mobile: Editor navigation */
    .editor-nav-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .editor-nav-left {
        flex-wrap: wrap;
        width: 100%;
        gap: 12px;
    }

    .post-nav-controls {
        order: -1;
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
    }

    .editor-nav-header .btn-delete {
        width: 100%;
        justify-content: center;
    }

    .post-nav-btn {
        width: 44px;
        height: 44px;
    }

    .post-nav-counter {
        font-size: 15px;
        min-width: 70px;
    }
}

/* ============================================ */
/* Loading Screen */
/* ============================================ */
.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-bg);
    z-index: 9999;
}

.loading-screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loading-screen-logo {
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: white;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.loading-screen-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

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

/* ============================================ */
/* Refresh Button for Lists */
/* ============================================ */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-refresh:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-refresh:active {
    transform: scale(0.97);
}

.btn-refresh svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-refresh.refreshing svg {
    animation: refresh-spin 0.8s linear infinite;
}

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

/* ============================================ */
/* Newsletter Styles */
/* ============================================ */

/* Newsletter Form */
.newsletter-form-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 0;
}

.newsletter-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.newsletter-form-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.newsletter-form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.newsletter-form-section {
    margin-bottom: 24px;
}

.newsletter-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.newsletter-form-help {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.newsletter-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    background: var(--app-bg);
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.newsletter-form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.newsletter-form-textarea::placeholder {
    color: var(--text-tertiary);
}

.newsletter-form-divider {
    height: 1px;
    background: var(--border);
    margin: 28px 0;
}

.newsletter-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

/* Newsletter Editor Layout */
.newsletter-editor-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    margin-top: 16px;
}

.newsletter-editor-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Newsletter Sections */
.newsletter-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.newsletter-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

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

.newsletter-section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-edit-section {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-edit-section:hover {
    background: var(--accent);
    color: white;
}

.newsletter-section-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.newsletter-section-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    background: var(--app-bg);
    color: var(--text-primary);
}

.newsletter-section-textarea:focus {
    outline: none;
}

/* Newsletter Sources */
.newsletter-sources-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.newsletter-sources-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.newsletter-sources-empty {
    font-size: 13px;
    color: var(--text-tertiary);
}

.newsletter-sources-group {
    margin-bottom: 12px;
}

.newsletter-sources-group:last-child {
    margin-bottom: 0;
}

.newsletter-sources-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.newsletter-sources-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Newsletter Preview */
.newsletter-preview-container {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.newsletter-preview {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.newsletter-preview-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.newsletter-preview-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.newsletter-preview-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text-primary);
}

.newsletter-preview-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text-primary);
}

.newsletter-preview-content p {
    margin-bottom: 12px;
}

.newsletter-preview-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.newsletter-preview-content ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.newsletter-preview-content li {
    padding-left: 16px;
    position: relative;
    margin-bottom: 8px;
}

.newsletter-preview-content li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}

.newsletter-preview-content a {
    color: var(--accent);
    text-decoration: none;
}

.newsletter-preview-content a:hover {
    text-decoration: underline;
}

.newsletter-preview-content strong {
    font-weight: 600;
}

/* Newsletter Card (extends post-idea-card) */
.newsletter-card {
    /* Inherits from .post-idea-card */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .newsletter-form {
        padding: 20px;
    }

    .newsletter-form-title {
        font-size: 18px;
    }

    .newsletter-form-actions {
        flex-direction: column;
    }

    .newsletter-form-actions button {
        width: 100%;
    }

    .newsletter-editor-layout {
        grid-template-columns: 1fr;
    }

    .newsletter-preview-container {
        position: static;
        margin-top: 16px;
    }

    .newsletter-preview {
        max-height: 400px;
    }
}

/* ============================================
   Rejection Modal
   ============================================ */

.rejection-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.15s ease-out;
}

.rejection-modal {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease-out;
}

.rejection-modal h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.rejection-modal textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.rejection-modal textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rejection-modal textarea::placeholder {
    color: var(--text-tertiary);
}

.rejection-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}

.rejection-modal-buttons button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rejection-modal-buttons .btn-cancel {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.rejection-modal-buttons .btn-cancel:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
}

.rejection-modal-buttons .btn-confirm {
    background: #dc2626;
    border: none;
    color: white;
}

.rejection-modal-buttons .btn-confirm:hover {
    background: #b91c1c;
}

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