/* ============================================================
   Antigravity — Premium Dark Mode Design System
   ============================================================ */

/* ─── CSS Variables ───────────────────────────────────────── */
:root {
    /* Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(24, 34, 56, 0.8);
    --bg-input: rgba(15, 23, 42, 0.8);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f97316;

    --gradient-brand: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    --gradient-card: linear-gradient(145deg, rgba(30,41,59,0.5), rgba(15,23,42,0.3));

    --border-default: rgba(148, 163, 184, 0.1);
    --border-active: rgba(59, 130, 246, 0.3);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

    /* Layout */
    --sidebar-width: 240px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--accent-cyan); }

/* ─── Typography ──────────────────────────────────────────── */
.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-text-sm {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

/* ─── Glass Card ──────────────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-active);
    color: var(--accent-blue);
}
.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

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

/* ─── Forms ───────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ─── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* ─── Auth Pages ──────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(139,92,246,0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.link-primary {
    color: var(--accent-blue);
    font-weight: 500;
}

/* ─── Landing Page ────────────────────────────────────────── */
.landing-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(139,92,246,0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-active);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.landing-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.landing-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2rem;
}

.landing-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    width: 100%;
}

.feature-card {
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─── Dashboard Layout ────────────────────────────────────── */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-right: 1px solid var(--border-default);
    border-left: none;
    border-top: none;
    border-bottom: none;
    z-index: 100;
}

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

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.nav-item.active {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.12);
}

.nav-icon { font-size: 1.1rem; }

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-default);
}

.logout-btn:hover {
    color: var(--accent-red) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Main Content */
.dashboard-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.plan-badge {
    padding: 0.3rem 0.75rem;
    background: var(--gradient-brand);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ─── Stats Grid ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

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

/* ─── Progress Bar ────────────────────────────────────────── */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: 99px;
    transition: width 1s ease;
}

.progress-bar.progress-danger {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ─── Status Indicators ──────────────────────────────────── */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.25rem;
}

.status-connected, .status-dot.status-connected { background: var(--accent-green); }
.status-pending, .status-dot.status-pending { background: var(--accent-orange); animation: pulse 2s infinite; }
.status-disconnected, .status-dot.status-disconnected { background: var(--text-muted); }
.status-error, .status-dot.status-error { background: var(--accent-red); }

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
}

.status-badge.status-connected { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.status-badge.status-pending { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); }

/* ─── Channel Section ─────────────────────────────────────── */
.channel-section {
    transition: border-color 0.3s;
}
.channel-section:hover {
    border-color: var(--border-active);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.channel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.channel-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.channel-logo { font-size: 1.5rem; }
.channel-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }
.channel-actions { display: flex; gap: 0.75rem; }

.channel-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.channel-type-icon { font-size: 1.2rem; }
.channel-type-label { font-weight: 500; flex: 1; text-transform: capitalize; }
.channel-status { font-size: 0.85rem; color: var(--text-secondary); text-transform: capitalize; }
.channel-number { font-size: 0.85rem; color: var(--text-muted); }

/* ─── QR Container ────────────────────────────────────────── */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-active);
}

.qr-instruction {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.qr-image {
    width: 256px;
    height: 256px;
    border-radius: var(--radius-sm);
    background: white;
    padding: 8px;
}

/* ─── Telegram Bot UI ─────────────────────────────────────── */

/* Bağlı bot bilgi kartı */
.channel-connected-info {
    margin: 1rem 0;
}

.bot-info-card,
.bot-preview-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 136, 204, 0.06);
    border: 1px solid rgba(0, 136, 204, 0.15);
    border-radius: var(--radius-md);
}

.bot-avatar {
    font-size: 2rem;
    line-height: 1;
}

.bot-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bot-details strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bot-username {
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.bot-username:hover {
    text-decoration: underline;
}

.preview-valid {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-green);
    white-space: nowrap;
}

/* Telegram bağla formu */
.channel-form {
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.form-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step-info {
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--radius-md);
}

.step-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-list {
    padding-left: 1.25rem;
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-list li {
    margin-bottom: 0.25rem;
}

.step-list a {
    color: var(--accent-blue);
    font-weight: 500;
}

.step-list code {
    padding: 0.15rem 0.45rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'SF Mono', monospace;
    color: var(--accent-blue);
}

/* Input + inline action button */
.input-with-action {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-with-action .form-input {
    flex: 1;
}

.input-with-action .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Bot preview card */
.bot-preview {
    animation: fadeIn 0.3s ease;
}

.bot-preview-card {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
}

/* Form error */
.form-error {
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-red);
    font-size: 0.88rem;
    font-weight: 500;
    animation: fadeIn 0.2s ease;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

/* ─── Settings ────────────────────────────────────────────── */
.settings-form {
    max-width: 600px;
}

.plan-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.plan-detail {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    text-align: center;
}

.plan-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.plan-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
}

/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 1rem;
}

/* ─── Animations ──────────────────────────────────────────── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.dashboard-content > * {
    animation: fadeIn 0.4s ease forwards;
}

.dashboard-content > *:nth-child(1) { animation-delay: 0s; }
.dashboard-content > *:nth-child(2) { animation-delay: 0.1s; }
.dashboard-content > *:nth-child(3) { animation-delay: 0.2s; }
.dashboard-content > *:nth-child(4) { animation-delay: 0.3s; }

/* ─── Admin Panel ─────────────────────────────────────────── */
.admin-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    color: white;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-default);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(59, 130, 246, 0.03);
}

.admin-table .row-inactive td {
    opacity: 0.5;
}

.tenant-name {
    font-weight: 500;
}

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

.plan-tag {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}
.plan-starter { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.plan-pro { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.plan-enterprise { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}
.btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Checkbox */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
}

/* Select */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Back link */
.back-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: inline-block;
}
.back-link:hover { color: var(--accent-blue); }

/* Prompt display */
.prompt-display {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}

.prompt-text {
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ─── Usage Page ──────────────────────────────────────────── */
.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.channel-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breakdown-label {
    width: 180px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.breakdown-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

.breakdown-bar {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: 99px;
    transition: width 0.8s ease;
}

.breakdown-pct {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.daily-chart {
    padding: 1rem 0;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 150px;
    padding-bottom: 24px;
    position: relative;
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    min-width: 16px;
}

.chart-bar {
    width: 100%;
    max-width: 32px;
    background: var(--gradient-brand);
    border-radius: 4px 4px 0 0;
    transition: height 0.6s ease;
}
.chart-bar:hover {
    opacity: 0.8;
}

.chart-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
}

/* ─── Toast Notifications ────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-card);
    animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(12px);
}

.toast.toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary);
}

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

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: toastProgress linear forwards;
}

.toast-success .toast-progress { background: var(--accent-green); }
.toast-error .toast-progress   { background: var(--accent-red); }
.toast-warning .toast-progress { background: var(--accent-orange); }
.toast-info .toast-progress    { background: var(--accent-blue); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ─── Mobile Hamburger Menu ──────────────────────────────── */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    z-index: 1001;
}

.hamburger-btn:hover {
    background: var(--bg-card-hover);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Auto-refresh indicator ────────────────────────────── */
.refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

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

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

/* ─── Landing Footer ──────────────────────────────────────── */
.landing-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-default);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-separator {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 0.8rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
        align-items: center;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .dashboard-main {
        margin-left: 0;
        padding: 1rem;
    }

    .dashboard-header {
        padding-top: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-actions {
        flex-direction: column;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}
