/* ============================================
   Components CSS - Buttons, Cards, Forms, Modals
   ============================================ */

/* ============================================
   App Container & Layout
   ============================================ */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: var(--space-lg);
}

.view {
    display: none;
    padding: var(--space-md);
    animation: fadeIn var(--transition-slow);
}

.view.active {
    display: block;
}

/* ============================================
   Header
   ============================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    padding-top: calc(var(--space-md) + var(--safe-top));
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.logo-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.logo-byline {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ============================================
   Buttons
   ============================================ */

/* Icon Button */
.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.btn-icon:hover, .btn-icon:active {
    background: var(--accent);
    color: var(--text-primary);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Primary Button */
.btn-primary {
    padding: var(--space-sm) var(--space-md);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

/* Danger Button */
.btn-danger {
    padding: var(--space-sm) var(--space-md);
    background: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-danger:hover {
    background: #dc2626;
}

/* Navigation Button */
.btn-nav {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-nav:hover {
    background: var(--accent);
}

/* Floating Action Button */
.fab-add {
    display: none; /* Hidden - using top action bar instead */
    position: fixed;
    bottom: calc(80px + var(--safe-bottom));
    right: var(--space-md);
    height: 48px;
    padding: 0 20px 0 16px;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 90;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fab-add:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--accent);
    transform: translateY(-2px);
}

.fab-add:active {
    transform: translateY(0) scale(0.98);
}

.fab-add svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--accent);
    stroke-width: 2.5;
}

.fab-add .fab-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Search Input */
.search-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

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

/* Tag Checkboxes - see Checkbox Styles section for detailed styling */
.tag-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.analytics-grid .form-group:last-child {
    grid-column: span 2;
}

@media (min-width: 400px) {
    .analytics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .analytics-grid .form-group:last-child {
        grid-column: auto;
    }
}

/* ============================================
   Character Counter Component
   ============================================ */
.char-counter {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
    transition: all var(--transition-normal);
}

.char-counter-main {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.char-counter-warning {
    display: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--danger);
    animation: pulse 1s ease-in-out infinite;
}

.char-counter-warning svg {
    width: 14px;
    height: 14px;
}

.char-counter-count {
    font-variant-numeric: tabular-nums;
}

.char-counter-separator {
    color: var(--text-muted);
}

.char-counter-max {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.char-counter-optimal {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Character Counter Status States */
.char-counter.status-optimal .char-counter-count {
    color: var(--success);
}

.char-counter.status-optimal .char-counter-optimal {
    color: var(--success);
}

.char-counter.status-warning .char-counter-count {
    color: var(--warning);
}

.char-counter.status-danger .char-counter-count {
    color: var(--danger);
}

.char-counter.status-over .char-counter-count {
    color: var(--danger);
    font-weight: 700;
}

.char-counter.status-over .char-counter-warning {
    display: flex;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

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

/* ============================================
   Modals
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: var(--z-modal);
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-md);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp var(--transition-slow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 1.1rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-form {
    padding: var(--space-md);
}

.modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    margin-top: var(--space-md);
}

/* Full Page Modal */
.modal-fullpage {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 250;
    overflow: hidden;
}

.modal-fullpage.active {
    display: flex;
    flex-direction: column;
    animation: slideInRight var(--transition-slow);
}

/* ============================================
   Filter Tags
   ============================================ */
.filter-tags {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
}

.tag-filter {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.tag-filter:hover, .tag-filter.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ============================================
   View Toggle
   ============================================ */
.view-toggle {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    background: var(--bg-card);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
}

.toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.toggle-btn.active {
    background: var(--accent);
    color: var(--text-primary);
}

.toggle-btn svg {
    flex-shrink: 0;
}

/* ============================================
   Top Navigation
   ============================================ */
.top-nav {
    display: flex;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-xs);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

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

/* Legacy bottom-nav (hidden) */
.bottom-nav {
    display: none;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    z-index: var(--z-toast);
    animation: toastIn var(--transition-slow);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width var(--transition-slow);
}

/* ============================================
   Checkbox Styles - Clean & Minimal
   ============================================ */

/* Base custom checkbox - hide native */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Visual checkbox container */
.checkbox-visual {
    position: absolute;
    inset: 0;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.checkbox-visual svg {
    width: 10px;
    height: 10px;
    opacity: 0;
    stroke-width: 2.5;
    transition: all var(--transition-fast);
    transform: scale(0.8);
}

/* Hover state */
.stage-checkbox:hover .checkbox-visual,
.subtask-checkbox:hover .checkbox-visual,
.detail-section-checkbox:hover .checkbox-visual {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Tag Checkboxes (Ideas, Swipe File)
   ============================================ */
.tag-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.tag-checkbox:hover {
    color: var(--text-primary);
}

.tag-checkbox input[type="checkbox"] {
    position: relative;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.tag-checkbox input[type="checkbox"]:hover {
    border-color: var(--text-muted);
}

.tag-checkbox input[type="checkbox"]:checked {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.tag-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Alternative: thin checkmark instead of dot */
.tag-checkbox.use-checkmark input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    border-radius: 0;
    background: transparent;
    transform: rotate(45deg);
}

/* ============================================
   Toggle Switch (for settings)
   ============================================ */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    transition: all var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

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

.toggle-switch:hover .toggle-slider {
    border-color: var(--text-muted);
}

.toggle-switch input:checked:hover + .toggle-slider {
    background: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
}

/* ============================================
   Desktop Enhancements
   ============================================ */
@media (min-width: 768px) {
    .main-content {
        padding-bottom: var(--space-lg);
    }
    
    .top-nav {
        justify-content: center;
        gap: var(--space-md);
        padding: var(--space-xs) var(--space-md);
    }
    
    .top-nav .nav-item {
        flex: none;
        flex-direction: row;
        gap: var(--space-xs);
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
        border-bottom: none;
    }
    
    .top-nav .nav-item span {
        font-size: 0.85rem;
    }
    
    .top-nav .nav-item.active {
        background: rgba(233, 69, 96, 0.15);
        color: var(--accent);
    }
    
    .top-nav .nav-item:hover {
        background: var(--bg-hover);
    }
    
    .modal-content {
        border-radius: var(--radius-lg);
        margin-bottom: auto;
        margin-top: auto;
    }
    
    .fab-add {
        bottom: var(--space-lg);
        right: var(--space-lg);
    }
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
    font-size: 1.2rem;
}

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Mode Toggle
   ============================================ */
.mode-toggle-section {
    margin-bottom: var(--space-lg);
}

.mode-toggle {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-card);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
}

.mode-btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mode-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.mode-btn.active {
    background: var(--accent);
    color: var(--text-primary);
}

/* ============================================
   Pillar Filters
   ============================================ */
.pillar-filters {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
    -webkit-overflow-scrolling: touch;
}

.pillar-filter {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.pillar-filter:hover {
    border-color: var(--pillar-color, var(--accent));
    color: var(--text-primary);
}

.pillar-filter.active {
    background: var(--pillar-color, var(--accent));
    border-color: var(--pillar-color, var(--accent));
    color: #fff;
}

/* ============================================
   Pillar Badge
   ============================================ */
.pillar-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
}

/* ============================================
   Hooks Grid & Cards
   ============================================ */
.hooks-header {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.hooks-filters {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
    -webkit-overflow-scrolling: touch;
}

.hook-filter {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.hook-filter:hover, .hook-filter.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.hooks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}

@media (min-width: 600px) {
    .hooks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hook-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.hook-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hook-card:active {
    transform: translateY(0);
}

.hook-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.hook-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hook-category {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    text-transform: capitalize;
}

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

.hook-delete {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-normal);
}

.hook-delete:hover {
    opacity: 1;
}

.hooks-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.hooks-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.hooks-empty-hint {
    font-size: 0.85rem;
    margin-top: var(--space-sm);
}

/* ============================================
   Onboarding Modal
   ============================================ */
.onboarding-modal {
    background: rgba(0, 0, 0, 0.9);
}

.onboarding-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn var(--transition-slow);
}

.onboarding-slide {
    display: none;
}

.onboarding-slide.active {
    display: block;
    animation: fadeIn var(--transition-slow);
}

.onboarding-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.onboarding-slide h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.onboarding-slide p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
}

.onboarding-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.onboarding-dots .dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.onboarding-dots .dot:hover {
    background: var(--text-muted);
}

.onboarding-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.onboarding-buttons .btn-skip {
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.onboarding-buttons .btn-skip:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.onboarding-buttons .btn-back {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.onboarding-buttons .btn-back:hover {
    background: var(--bg-tertiary);
}

.onboarding-buttons .btn-next {
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.onboarding-buttons .btn-next:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* ============================================
   Search Modal
   ============================================ */
.search-modal .modal-content {
    max-height: 80vh;
}

.search-input-wrapper {
    margin-bottom: var(--space-md);
}

.search-input-lg {
    width: 100%;
    padding: var(--space-md);
    font-size: 1.1rem;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.search-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.search-section {
    margin-bottom: var(--space-lg);
}

.search-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.search-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.search-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.search-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.search-item-title {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.search-item-meta {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-item-platform {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.search-item-platform.instagram { background: var(--instagram); color: #fff; }
.search-item-platform.tiktok { background: var(--tiktok); color: #000; }
.search-item-platform.x { background: var(--x); color: #000; }
.search-item-platform.youtube { background: var(--youtube); color: #fff; }

/* ============================================
   Settings Enhancements
   ============================================ */
.settings-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.settings-section-title:first-child {
    margin-top: 0;
}

.settings-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

.settings-times-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.settings-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.settings-time-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.settings-time-row input {
    width: 100px;
    padding: var(--space-xs);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.settings-help-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.btn-secondary {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--text-primary);
}

.modal-content-lg {
    max-width: 600px;
}

/* ============================================
   Hashtag Sets
   ============================================ */
.hashtag-sets-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.hashtag-set-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.hashtag-set-info {
    flex: 1;
    min-width: 0;
}

.hashtag-set-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.hashtag-set-preview {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hashtag-set-actions {
    display: flex;
    gap: var(--space-xs);
}

.hashtag-set-edit,
.hashtag-set-delete {
    padding: var(--space-xs);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.hashtag-set-edit:hover,
.hashtag-set-delete:hover {
    opacity: 1;
}

/* Hashtag Picker Dropdown */
.hashtag-picker {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
    min-width: 200px;
}

.hashtag-picker-header {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.hashtag-picker-list {
    max-height: 200px;
    overflow-y: auto;
}

.hashtag-picker-item {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.hashtag-picker-item:hover {
    background: var(--bg-card);
}

.hashtag-picker-name {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.hashtag-picker-preview {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Hashtag Insert Button */
.btn-hashtag-insert {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: var(--space-sm) var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-hashtag-insert:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn-hashtag-insert svg {
    flex-shrink: 0;
}

/* ============================================
   Repurpose Chips
   ============================================ */
.repurpose-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.repurpose-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.repurpose-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

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

.repurpose-chip .chip-icon {
    font-size: 0.9rem;
}

.repurpose-chip .chip-label {
    font-weight: 600;
}

/* ============================================
   Advanced Options Section
   ============================================ */
.advanced-options-wrapper {
    margin-top: var(--space-lg);
}

.advanced-options-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.advanced-options-toggle:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.advanced-chevron {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-normal);
}

.advanced-options-toggle.expanded .advanced-chevron {
    transform: rotate(180deg);
}

.advanced-options-content {
    margin-top: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.advanced-section {
    margin-bottom: var(--space-lg);
}

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

.advanced-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

/* Asset Links Row */
.asset-links-row {
    display: flex;
    gap: var(--space-sm);
}

.asset-links-row input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.asset-links-row input:focus {
    outline: none;
    border-color: var(--accent);
}

.asset-open-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.asset-open-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.asset-open-btn svg {
    width: 18px;
    height: 18px;
}

/* Performance Notes Section */
.performance-notes-section {
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.performance-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

@media (min-width: 400px) {
    .performance-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.perf-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

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

.perf-stat input {
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

.perf-stat input:focus {
    outline: none;
    border-color: var(--accent);
}

#detail-perf-notes {
    width: 100%;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

#detail-perf-notes:focus {
    outline: none;
    border-color: var(--accent);
}

/* Inspiration input in advanced */
#detail-inspiration {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
}

#detail-inspiration:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================
   Export Menu Dropdown
   ============================================ */
.export-menu {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
    min-width: 200px;
}

.export-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.export-menu-item:hover {
    background: var(--bg-card);
}

.export-menu-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.export-menu-item span {
    font-size: 1rem;
}

/* ============================================
   Upcoming Posts Banner
   ============================================ */
.upcoming-banner {
    background: linear-gradient(135deg, var(--brand-primary), #ff6b6b);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown var(--transition-slow) ease;
}

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

.upcoming-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.upcoming-text {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.upcoming-dismiss {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.upcoming-dismiss:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Notification Settings
   ============================================ */
.settings-section {
    margin-bottom: var(--space-md);
}

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.settings-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

#notifications-status {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   Reminder Badge on Post Cards
   ============================================ */
.reminder-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: rgba(233, 69, 96, 0.15);
    color: var(--accent);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.reminder-badge::before {
    content: '🔔';
    font-size: 0.65rem;
}
