/* ========================================
   Preisträger Scout — Design System
   ======================================== */

:root {
    /* Dark Theme (default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a27;
    --bg-card: #15151f;
    --bg-hover: #1e1e2e;
    --bg-input: #1a1a27;
    --bg-message-user: #2563eb;
    --bg-message-bot: #1e1e2e;
    --bg-sidebar: #0e0e16;

    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-tertiary: #5a5a72;
    --text-on-accent: #ffffff;

    --border: #252538;
    --border-light: #1e1e2e;

    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-glow: rgba(59, 130, 246, 0.25);

    --green: #10b981;
    --green-soft: rgba(16, 185, 129, 0.12);
    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.12);
    --orange: #f59e0b;
    --orange-soft: rgba(245, 158, 11, 0.12);
    --purple: #8b5cf6;
    --purple-soft: rgba(139, 92, 246, 0.12);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --sidebar-width: 240px;
    --transition: 0.2s ease;
}

[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f1f5;
    --bg-card: #ffffff;
    --bg-hover: #f0f1f5;
    --bg-input: #f0f1f5;
    --bg-message-user: #2563eb;
    --bg-message-bot: #f0f1f5;
    --bg-sidebar: #ffffff;

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-on-accent: #ffffff;

    --border: #e5e7eb;
    --border-light: #f0f1f5;

    --accent-soft: rgba(59, 130, 246, 0.08);
    --accent-glow: rgba(59, 130, 246, 0.15);

    --green-soft: rgba(16, 185, 129, 0.08);
    --red-soft: rgba(239, 68, 68, 0.08);
    --orange-soft: rgba(245, 158, 11, 0.08);
    --purple-soft: rgba(139, 92, 246, 0.08);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

/* ========================================
   Reset & Base
   ======================================== */

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================================
   Sidebar
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    width: 100%;
    text-align: left;
}

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

.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-item.active svg {
    stroke: var(--accent);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}

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

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

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

/* ========================================
   Main Content
   ======================================== */

.main-content {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.view {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.view.active {
    display: block;
}

/* ========================================
   Chat View
   ======================================== */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.chat-header {
    padding: 24px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.chat-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-header-status.loading .status-dot {
    background: var(--orange);
}

.chat-header-status.error .status-dot {
    background: var(--red);
    animation: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    flex: 1;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.welcome-screen h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-screen > p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 500px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.quick-action:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* Chat Messages */
.message {
    display: flex;
    gap: 12px;
    animation: messageIn 0.3s ease;
    max-width: 100%;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.message.user .message-avatar {
    background: var(--accent);
    color: white;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
    color: var(--accent);
}

.message-content {
    max-width: 70%;
    min-width: 0;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--bg-message-user);
    color: var(--text-on-accent);
    border-bottom-right-radius: 4px;
}

.message.bot .message-bubble {
    background: var(--bg-message-bot);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
    padding: 0 4px;
}

.message.user .message-time {
    text-align: right;
}

/* Progress indicator inside message */
.progress-container {
    margin-top: 12px;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.progress-step.active {
    color: var(--accent);
}

.progress-step.done {
    color: var(--green);
}

.progress-step .step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
}

.progress-step.active .step-icon {
    background: var(--accent-soft);
    border: 2px solid var(--accent);
}

.progress-step.done .step-icon {
    background: var(--green-soft);
    color: var(--green);
}

.progress-step.pending .step-icon {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Download button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 12px;
    font-family: inherit;
}

.download-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Results table preview */
.results-preview {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.results-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.results-preview th {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.results-preview td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-light);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-preview tr:last-child td {
    border-bottom: none;
}

.results-count {
    font-size: 12px;
    color: var(--text-tertiary);
    padding: 6px 12px;
    background: var(--bg-tertiary);
    text-align: center;
}

/* Chat Input */
.chat-input-area {
    padding: 16px 0 24px;
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    transition: all var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.send-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.input-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
    text-align: center;
}

/* ========================================
   Dashboard View
   ======================================== */

.dashboard-container {
    padding: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 28px;
}

.dashboard-header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--accent-soft); color: var(--accent); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }

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

.stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.dashboard-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart */
.chart-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-chart, .empty-activity, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    height: 200px;
    padding-top: 20px;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 48px;
    background: linear-gradient(180deg, var(--accent), var(--purple));
    border-radius: 6px 6px 0 0;
    transition: height 0.6s ease;
    min-height: 4px;
    position: relative;
}

.bar-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.bar-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.success { background: var(--green); }
.activity-dot.pending { background: var(--orange); }
.activity-dot.error { background: var(--red); }

.activity-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-time {
    font-size: 11px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* Top Categories */
.top-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

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

.category-name {
    font-size: 13px;
    font-weight: 600;
}

.category-bar-bg {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    border-radius: 3px;
    transition: width 0.6s ease;
}

.category-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Success Rate */
.success-rate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

.rate-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.rate-ring svg {
    width: 100%;
    height: 100%;
}

.rate-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

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

/* ========================================
   History View
   ======================================== */

.history-container {
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
}

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

.history-header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: default;
}

.history-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.history-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon.success {
    background: var(--green-soft);
    color: var(--green);
}

.history-icon.error {
    background: var(--red-soft);
    color: var(--red);
}

.history-icon.pending {
    background: var(--orange-soft);
    color: var(--orange);
}

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

.history-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.history-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-download {
    flex-shrink: 0;
}

/* ========================================
   Settings View
   ======================================== */

.settings-container {
    padding: 32px;
    max-width: 700px;
    margin: 0 auto;
}

.settings-header {
    margin-bottom: 28px;
}

.settings-header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.settings-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
}

.settings-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
    line-height: 1.5;
}

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

.theme-options {
    display: flex;
    gap: 8px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-option:hover,
.theme-option.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* Workflow Steps */
.about-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.workflow-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-info strong {
    display: block;
    font-size: 14px;
}

.step-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

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

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-danger:hover {
    background: var(--red);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    animation: toastIn 0.3s ease;
    min-width: 280px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }
.toast.warning { border-left: 3px solid var(--orange); }

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

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

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .logo-text, .nav-item span, .version-info {
        display: none;
    }
    .sidebar-header {
        padding: 16px;
        display: flex;
        justify-content: center;
    }
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    .sidebar-footer {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .chat-container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .message-content {
        max-width: 85%;
    }
}
