/* CSS Variables & Theme Setup */
:root {
    /* Colors - Dark SaaS Theme */
    --bg-base: #0a0a0b;
    --bg-surface: #121316;
    --bg-surface-hover: #1a1b20;
    --bg-panel: #18191d;
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    /* Brand & Accents */
    --accent-blue: #3b82f6;
    --accent-blue-dim: rgba(59, 130, 246, 0.15);
    
    --color-green: #10b981;
    --color-green-dim: rgba(16, 185, 129, 0.15);
    
    --color-red: #ef4444;
    --color-red-dim: rgba(239, 68, 68, 0.15);
    
    --color-purple: #8b5cf6;
    --color-purple-dim: rgba(139, 92, 246, 0.15);
    
    --sidebar-width: 270px;
    --topbar-height: 64px;
    
    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Theme Overrides */
[data-theme="emerald"] {
    --accent-blue: #10b981;
    --accent-blue-dim: rgba(16, 185, 129, 0.15);
}
[data-theme="amethyst"] {
    --accent-blue: #8b5cf6;
    --accent-blue-dim: rgba(139, 92, 246, 0.15);
}
[data-theme="rose"] {
    --accent-blue: #f43f5e;
    --accent-blue-dim: rgba(244, 63, 94, 0.15);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow: hidden; /* handled by components */
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-hover);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

a { color: var(--accent-blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Layout Grid */
.layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-blue), var(--color-purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-logo .logo-icon { width: 18px; height: 18px; }

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section {
    padding: 24px 16px 0;
}

.nav-section > span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-left: 12px;
    font-weight: 600;
}

.nav-section nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item svg { width: 18px; height: 18px; opacity: 0.7; transition: opacity 0.2s; }

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

.nav-item.active {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}
.nav-item.active svg { opacity: 1; color: var(--accent-blue); }

.sidebar-spacer { flex: 1; }

.system-status {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-green);
    border-radius: 50%;
}
.status-dot.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulseObj 2s infinite;
}
@keyframes pulseObj {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-info { display: flex; flex-direction: column; }
.status-title { font-size: 0.85rem; font-weight: 500; }
.status-time { font-size: 0.75rem; color: var(--text-tertiary); }

/* --- MAIN WORKSPACE --- */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(18, 19, 22, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 50;
}

.topbar-search {
    position: relative;
    width: 400px;
}

.topbar-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    color: var(--text-tertiary);
}

.topbar-search input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 16px 8px 36px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

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

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.env-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 20px;
}
.env-badge svg { width: 14px; }

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: background 0.2s;
}
.icon-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.icon-btn svg { width: 18px; }

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

/* --- CONTENT AREA --- */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.view { display: none; animation: fadeIn 0.3s ease forwards; }
.view.active { display: block; }

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

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

.view-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}
.view-header .subtitle {
    color: var(--text-secondary);
    margin-top: 4px;
}

.date-picker-mock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}
.date-picker-mock svg { width: 16px; color: var(--text-tertiary); }
.date-picker-mock svg.sm { width: 14px; }

/* Dashboard Grids */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}
.kpi-icon svg { width: 20px; }
.kpi-icon.blue { background: var(--accent-blue-dim); color: var(--accent-blue); }
.kpi-icon.green { background: var(--color-green-dim); color: var(--color-green); }
.kpi-icon.red { background: var(--color-red-dim); color: var(--color-red); }
.kpi-icon.purple { background: var(--color-purple-dim); color: var(--color-purple); }

.kpi-data { display: flex; flex-direction: column; }
.kpi-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1.2; font-family: var(--font-mono); }

.kpi-spark {
    width: 100%;
    height: 40px;
    margin-top: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

.dash-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.panel-header h3 { font-size: 1rem; font-weight: 600; }

.panel-body {
    padding: 20px;
    flex: 1;
}
.panel-body.p-0 { padding: 0; }
.center-content { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* Donut Chart Inner */
.donut-container { position: relative; width: 180px; height: 180px; }
.donut-inner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.donut-val { display: block; font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); }
.donut-label { font-size: 0.75rem; color: var(--text-secondary); }

.match-stats { width: 100%; display: flex; justify-content: space-around; }
.stat-pill { font-size: 0.85rem; color: var(--text-secondary); }
.stat-pill b { color: white; margin-left: 4px; font-family: var(--font-mono); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot.green { background: var(--color-green); }
.dot.red { background: var(--color-red); }

/* Lists */
.list-wrapper { padding: 10px 20px; }
.group-stats-list { list-style: none; }
.group-stats-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.group-stats-list li:last-child { border: none; }
.list-left { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; font-weight: 500; }
.list-left svg { width: 16px; }

.text-blue { color: var(--accent-blue); }
.text-green { color: var(--color-green); }

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: white;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-strong);
}

/* Tables */
.sleek-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.sleek-table th {
    padding: 12px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
}
.sleek-table td {
    padding: 14px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
}
.sleek-table tr:last-child td { border: none; }
.sleek-table tr:hover td { background: var(--bg-surface); }

.text-btn {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}
.text-btn svg { width: 14px; }
.text-btn:hover { text-decoration: underline; }

/* ACTION EXPLORER SPILIT PANE */
.filters {
    display: flex;
    gap: 12px;
}
.dark-select {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-sans);
    outline: none;
}
.search-input-wrapper {
    position: relative;
}
.search-input-wrapper svg {
    position: absolute;
    left: 10px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-tertiary);
}
.search-input-wrapper input {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 16px 8px 32px;
    color: white;
}

.explorer-layout {
    display: flex;
    height: 600px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
.explorer-list {
    width: 40%;
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto;
}
.log-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.2s;
}
.log-item:hover { background: var(--bg-surface); }
.log-item.selected { background: var(--accent-blue-dim); border-left: 3px solid var(--accent-blue); }
.log-item-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.85rem;}
.log-time { color: var(--text-tertiary); font-family: var(--font-mono); }
.log-action { font-weight: 600; color: white;}
.log-user { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-blue); }

.explorer-detail {
    width: 60%;
    padding: 32px;
    position: relative;
    overflow-y: auto;
}
.empty-state {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-tertiary);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.5;}
.hidden { display: none !important; }

.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle);}
.detail-header h3 { font-size: 1.5rem; font-weight: 600; }
.detail-meta { display: flex; gap: 24px; margin-bottom: 32px; color: var(--text-secondary); }
.meta-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.9rem;}
.meta-item svg { width: 16px; color: var(--text-tertiary); }

/* Diff Viewer */
.diff-viewer {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 16px;
}
.diff-header {
    background: var(--bg-surface);
    padding: 10px 16px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}
.diff-split { display: flex; }
.diff-side { width: 50%; padding: 16px; }
.diff-old { border-right: 1px solid var(--border-subtle); background: rgba(239, 68, 68, 0.05); }
.diff-new { background: rgba(16, 185, 129, 0.05); }
.diff-title { font-size: 0.75rem; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; font-weight: 600;}
.diff-val { font-family: var(--font-mono); font-size: 0.9rem; word-break: break-all; }
.diff-old .diff-val { color: rgba(255,255,255,0.7); text-decoration: line-through; }
.diff-new .diff-val { color: var(--color-green); font-weight: 500;}

/* USER 360 */
.u360-search {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    position: relative;
    max-width: 600px;
}
.u360-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); }
.u360-search input {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px 12px 48px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: #60a5fa; }
.btn-secondary {
    background: var(--bg-surface);
    color: white;
    border: 1px solid var(--border-strong);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { background: var(--bg-surface-hover); }

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-strong); transition: .2s; border-radius: 22px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-blue); }
input:checked + .slider:before { transform: translateX(18px); }

.user-profile-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.user-profile-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--color-purple));
}
.up-avatar {
    width: 80px; height: 80px; border-radius: 50%; background: var(--bg-surface);
    border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: var(--text-secondary); margin-right: 24px;
}
.up-info h2 { font-size: 1.5rem; margin-bottom: 4px; }
.up-info p { color: var(--text-tertiary); margin-bottom: 12px; }
.up-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-subtle { background: var(--bg-surface); color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px;}
.badge-subtle svg { width: 12px; }

.up-status {
    position: absolute; top: 24px; right: 24px;
    padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.up-status.active { background: var(--color-green-dim); color: var(--color-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.up-status.disabled { background: var(--color-red-dim); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Data properties list */
.prop-list { list-style: none; }
.prop-list li { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.prop-list li:last-child { border: none; }
.prop-label { width: 40%; color: var(--text-tertiary); font-size: 0.85rem; }
.prop-val { width: 60%; font-weight: 500; font-size: 0.9rem; }

/* Timeline */
.ad-sync-timeline {
    position: relative;
    padding-left: 20px;
}
.ad-sync-timeline::before {
    content: ''; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 2px;
    background: var(--border-strong);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item::before {
    content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--accent-blue);
    box-shadow: 0 0 0 4px var(--bg-panel);
}
.tl-time { font-size: 0.75rem; color: var(--text-tertiary); font-family: var(--font-mono); display: block; margin-bottom: 4px;}
.tl-content { background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 12px; border-radius: 8px; font-size: 0.85rem;}

.mt-4 { margin-top: 24px; }
.p-0 { padding: 0 !important; }

/* Utilities */
.badge.green { background: var(--color-green-dim); color: var(--color-green); border-color: rgba(16,185,129,0.3); }
.badge.blue { background: var(--accent-blue-dim); color: var(--accent-blue); border-color: rgba(59,130,246,0.3); }

/* Table Scroll Wrapper */
.table-scroll { width: 100%; overflow-x: auto; max-height: 600px; }
.raw-table th { background: var(--bg-panel); position: sticky; top: 0; z-index: 10; white-space: nowrap;}
.raw-table td { white-space: nowrap; font-family: var(--font-mono); font-size: 0.8rem; }

/* MODALS */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
    z-index: 1000; display: none;
    animation: fadeIn 0.2s ease;
}
.modal-container {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-panel); border: 1px solid var(--border-subtle);
    border-radius: 12px; z-index: 1001; width: 100%; max-width: 480px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: none; opacity: 0;
    transition: all 0.2s ease;
}
.modal-container.active {
    display: block; opacity: 1; transform: translate(-50%, -50%) scale(1);
}
.modal-overlay.active { display: block; }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-size: 1.25rem; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 12px;
    padding: 20px 24px; border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface); border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
}

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500;}
.form-input, .form-select {
    width: 100%; background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 8px; padding: 10px 14px; color: var(--text-primary);
    font-family: var(--font-sans); font-size: 0.95rem; outline: none; transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent-blue); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px;}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: var(--text-primary);
    min-width: 300px;
    max-width: 450px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast[data-type="success"] .toast-icon { color: var(--color-green); }
.toast[data-type="error"] .toast-icon { color: var(--color-red); }
.toast[data-type="info"] .toast-icon { color: var(--accent-blue); }
.toast[data-type="warning"] .toast-icon { color: #f59e0b; }

.toast-content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.toast-close:hover { color: var(--text-primary); }
