:root {
    /* Dark Theme (Default) */
    --bg-main: hsl(222, 47%, 7%);
    --bg-panel: hsla(222, 47%, 12%, 0.85);
    --bg-card: hsla(222, 47%, 15%, 0.7);
    --glass-bg: hsla(222, 47%, 15%, 0.6);
    --glass-border: hsla(217, 33%, 17%, 0.8);
    
    --primary: hsl(255, 100%, 75%);
    --primary-glow: hsla(255, 100%, 75%, 0.3);
    --primary-hover: hsl(255, 100%, 80%);
    
    --secondary: hsl(190, 100%, 70%);
    --accent: hsl(330, 100%, 70%);
    
    --success: hsl(142, 71%, 45%);
    --warning: hsl(48, 96%, 53%);
    --danger: hsl(0, 84%, 60%);
    
    --text-main: hsl(210, 40%, 98%);
    --text-muted: hsl(215, 20%, 65%);
    --text-dim: hsl(215, 15%, 45%);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.3);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode {
    --bg-main: hsl(210, 40%, 98%);
    --bg-panel: hsla(210, 40%, 95%, 0.8);
    --bg-card: hsla(0, 0%, 100%, 0.7);
    --glass-bg: hsla(0, 0%, 100%, 0.4);
    --glass-border: hsla(214, 32%, 91%, 0.8);
    
    --primary: hsl(255, 80%, 60%);
    --primary-glow: hsla(255, 80%, 60%, 0.15);
    --primary-hover: hsl(255, 80%, 55%);
    
    --text-main: hsl(222, 47%, 11%);
    --text-muted: hsl(215, 25%, 40%);
    --text-dim: hsl(215, 15%, 60%);
}

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

body { 
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif; 
    background-color: var(--bg-main); 
    background-image: radial-gradient(circle at 0% 0%, hsla(255, 100%, 75%, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 100% 100%, hsla(190, 100%, 70%, 0.05) 0%, transparent 50%);
    color: var(--text-main); 
    overflow: hidden;
    line-height: 1.5;
    height: 100vh;
}

/* App Layout */
.app-container { display: flex; height: 100vh; backdrop-filter: blur(20px); }

/* Sidebar */
.sidebar { 
    width: 240px; 
    background: var(--bg-panel); 
    border-right: 1px solid var(--glass-border); 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0;
    backdrop-filter: blur(12px);
}
.sidebar-header { padding: 1.5rem; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--glass-border); }
.sidebar-header .logo-icon { font-size: 1.6rem; filter: drop-shadow(0 0 8px var(--primary-glow)); }
.sidebar-header h2 { 
    font-size: 1.1rem; 
    font-weight: 800; 
    background: linear-gradient(135deg, #fff, #a855f7); 
    background-clip: text;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}
.sync-status { display: flex; align-items: center; gap: 5px; opacity: 0.8; }
.status-txt { font-size: 0.65rem; color: var(--success); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pulse { box-shadow: 0 0 0 rgba(16, 185, 129, 0.4); animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.dot.green { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

.sidebar-nav { flex: 1; padding: 1.2rem 0.8rem; }
.nav-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 0.8rem 1rem; 
    color: var(--text-muted); 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 500; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}
.nav-item:hover { color: var(--text-main); background: var(--bg-hover); transform: translateX(4px); }
.nav-item.active { 
    color: var(--text-main); 
    background: linear-gradient(90deg, var(--primary-glow), transparent); 
    border-left: 3px solid var(--primary);
    box-shadow: inset 4px 0 10px rgba(168, 85, 247, 0.1);
}
.nav-item i { width: 18px; height: 18px; }

.sidebar-footer { padding: 1.2rem; border-top: 1px solid var(--glass-border); }
.user-profile { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
}
.user-profile img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--glass-border); }
.user-info strong { font-size: 0.85rem; color: var(--text-main); }
.user-info span { font-size: 0.75rem; color: var(--text-dim); }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }

/* Top Header */
.top-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0.6rem 2rem; 
    border-bottom: 1px solid var(--glass-border); 
    background: rgba(10, 15, 25, 0.5); 
    backdrop-filter: blur(8px);
    z-index: 10;
}
.credit-badges { display: flex; gap: 10px; }
.credit-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 6px 12px; 
    border-radius: 30px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    border: 1px solid var(--glass-border); 
    background: var(--bg-card);
    transition: all 0.3s;
}
.credit-badge:hover { transform: translateY(-2px); border-color: var(--primary); }
.credit-badge.serper { color: #60a5fa; box-shadow: 0 0 15px rgba(96, 165, 250, 0.1); }
.credit-badge.apify { color: #fb923c; }
.credit-badge.outscraper { color: #4ade80; }

.header-actions { display: flex; gap: 8px; }
.icon-btn { 
    background: var(--bg-card); 
    border: 1px solid var(--glass-border); 
    color: var(--text-muted); 
    width: 38px; 
    height: 38px; 
    border-radius: 10px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s; 
}
.icon-btn:hover { color: var(--text-main); border-color: var(--primary); background: var(--primary-glow); transform: rotate(15deg); }

/* View Panels */
.view-panel { display: none; flex: 1; overflow-y: auto; padding: 2rem; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.view-panel.active { display: block; }
#view-map.view-panel.active {
    animation: none;
    overflow: hidden;
}

/* Scrape Bar */
.scrape-bar { margin-bottom: 2rem; max-width: 800px; }
.scrape-input-group { 
    display: flex; 
    align-items: center; 
    background: var(--bg-panel); 
    border: 1px solid var(--glass-border); 
    border-radius: 20px; 
    padding: 6px; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: var(--shadow-lg);
}
.scrape-input-group:focus-within { 
    border-color: var(--primary); 
    box-shadow: 0 0 30px var(--primary-glow);
    transform: scale(1.01);
}
.scrape-icon { margin: 0 16px; color: var(--primary); width: 22px; height: 22px; }
.scrape-input-group input, .scrape-select, .scrape-number { 
    flex: 1; 
    background: none; 
    border: none; 
    outline: none; 
    color: var(--text-main); 
    font-size: 0.95rem; 
    padding: 0.8rem 0; 
}
.scrape-select {
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    margin: 0 5px;
    padding: 0.8rem 10px;
    border-radius: 10px;
    max-width: 180px;
}
.scrape-select option { background: #0f172a; color: var(--text-main); }
.scrape-limit-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 10px;
    padding-left: 10px;
    border-left: 1px solid var(--glass-border);
}
.limit-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.scrape-number { width: 60px; text-align: center; background: rgba(255,255,255,0.03); border-radius: 10px; padding: 0.8rem 0; }
.scrape-btn { 
    background: linear-gradient(135deg, #a855f7, #7c3aed); 
    color: var(--text-main); 
    border: none; 
    padding: 0.8rem 1.8rem; 
    border-radius: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.3s; 
}
.scrape-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px var(--primary-glow); }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { 
    background: var(--bg-card); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--radius); 
    padding: 1.5rem; 
    text-align: left; 
    transition: all 0.4s; 
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary); opacity: 0.5;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.stat-card.glow-purple::before { background: var(--primary); }
.stat-card.glow-green::before { background: var(--success); }
.stat-card.glow-blue::before { background: var(--secondary); }
.stat-card.glow-orange::before { background: var(--warning); }

.stat-number { font-size: 2.2rem; font-weight: 900; color: var(--text-main); letter-spacing: -1px; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; }

/* Filter Bar */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-group { display: flex; gap: 10px; }
.filter-bar select, .filter-bar input[type="text"] { 
    background: var(--bg-card); 
    border: 1px solid var(--glass-border); 
    color: var(--text-main); 
    padding: 0.6rem 1rem; 
    border-radius: 12px; 
    font-size: 0.85rem; 
    outline: none; 
    transition: all 0.3s; 
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--primary); background: var(--bg-panel); }

/* Table Section */
.leads-section { 
    background: var(--bg-panel); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--radius); 
    overflow: hidden; 
    backdrop-filter: blur(20px);
}
.leads-table th { 
    background: rgba(15, 23, 42, 0.8); 
    color: var(--text-muted); 
    padding: 1rem; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
.leads-table td { padding: 1rem; border-bottom: 1px solid var(--glass-border); transition: all 0.2s; }
.leads-table tr:hover td { background: var(--bg-hover); color: var(--text-main); }

/* Status Badges */
.status-badge { 
    padding: 4px 10px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 800; 
}
.status-badge.hot { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-badge.warm { background: rgba(249, 115, 22, 0.15); color: var(--warning); border: 1px solid rgba(249, 115, 22, 0.2); }

/* Animations */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 10px; border: 2px solid var(--bg-dark); }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* Channels View Premium */
.channel-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(255,255,255,0.02));
    border: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.channel-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.channel-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; }
.channel-btn { 
    background: var(--bg-hover); 
    border: 1px solid var(--glass-border); 
    color: var(--text-main); 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    cursor: pointer; 
    transition: all 0.3s;
}
.channel-btn:hover:not(:disabled) { background: var(--primary); border-color: var(--primary); }
.channel-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Skeleton Loader */
.skeleton-text {
    height: 1.5rem;
    width: 80%;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    display: inline-block;
    border-radius: 4px;
}

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

/* Map & UI Enhancements */
.mini-map-container {
    height: 550px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    background: var(--bg-panel);
    transition: all 0.3s ease;
}
.mini-map-container:hover {
    border-color: var(--primary);
    box-shadow: 0 0 40px var(--primary-glow);
}
#miniMap,
#fullMap {
    width: 100%;
}
#fullMap {
    min-height: 520px;
    height: calc(100vh - 220px);
    border-radius: 12px;
    overflow: hidden;
    background: #0b1220;
}
.leaflet-container {
    background: #0b1220;
}

.filter-actions { display: flex; align-items: center; gap: 10px; }
.filter-reset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.filter-reset-btn:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.2);
}
.filter-reset-btn i { width: 16px; height: 16px; }

/* ---- NEW VIEWS: LEADS & SALES BOT ---- */
.leads-view-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.filter-bar.flat {
    background: rgba(30, 41, 59, 0.5);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.table-container.full-table {
    height: calc(100vh - 350px);
    overflow-y: auto;
}

/* Export Buttons */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.export-btn.csv { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: none; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }
.export-btn.excel { background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3); }
.export-btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

/* Sales Bot Styles */
.bot-header { margin-bottom: 2rem; }
.bot-tabs {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0px;
}

.bot-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}
.bot-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.bot-tab:hover:not(.active) { color: var(--text-main); }

.bot-panel { display: none; margin-top: 1.5rem; }
.bot-panel.active { display: block; animation: fadeIn 0.4s ease-out; }

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

.bot-status-bar {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.status-indicator { display: flex; align-items: center; gap: 0.6rem; }
.bot-stats-row { display: flex; gap: 2rem; color: var(--text-muted); font-size: 0.85rem; }
.bot-stats-row b { color: var(--text-main); margin-right: 4px; }

.bot-config-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.config-card, .log-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 1.8rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.config-card h3, .log-card h3 { margin-bottom: 1.2rem; font-size: 1rem; color: var(--text-main); }

.bot-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem;
    border-radius: 10px;
    margin-top: 0.6rem;
    font-family: inherit;
    transition: border-color 0.3s;
}
.bot-input:focus { border-color: var(--primary); outline: none; }

.chat-logs {
    height: 350px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

.log-entry {
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
}
.log-entry .meta { 
    display: flex; 
    justify-content: space-between;
    color: var(--primary); 
    font-weight: 700; 
    font-size: 0.7rem; 
    margin-bottom: 0.5rem; 
    text-transform: uppercase;
    letter-spacing: 1px;
}
.log-entry .body { color: #cbd5e1; line-height: 1.5; }
.log-entry .ai-reply { 
    margin-top: 0.8rem; 
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #10b981; 
    font-style: normal;
    font-weight: 500;
}
.log-entry .ai-reply b { color: #34d399; font-weight: 700; }

.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px dashed var(--glass-border);
    color: var(--text-muted);
}


/* Funnel Styles */
.funnel-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.funnel-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.funnel-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-panel);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.funnel-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--text-muted);
}

.funnel-tab:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.funnel-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
}

.tab-label { font-size: 0.9rem; font-weight: 700; }
.tab-count { font-size: 0.75rem; opacity: 0.8; font-weight: 800; }

.status-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}
.status-new { background: rgba(168, 85, 247, 0.1); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.2); }
.status-approved { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-contacted { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }

.funnel-actions { display: flex; gap: 8px; }
.btn-approve { background: var(--success); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 700; transition: var(--transition); }
.btn-approve:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-contacted { background: var(--secondary); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 700; transition: var(--transition); }
.btn-contacted:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3); }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-modal { background: none; border: none; color: var(--text-muted); font-size: 1.8rem; cursor: pointer; transition: var(--transition); }
.close-modal:hover { color: var(--danger); transform: rotate(90deg); }

.modal-footer { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }

.draft-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    padding: 4px 8px;
    border-radius: 4px;
}
.draft-preview:hover { color: var(--primary); background: var(--bg-hover); }
