/* ─── DataMiner Design System ────────────────────────────────────────────── */
/* Premium dark theme with glassmorphism, gradients, and micro-animations */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── CSS Custom Properties ──────────────────────────────────────────────── */
:root {
    /* Core palette */
    --bg-primary: hsl(228, 25%, 8%);
    --bg-secondary: hsl(228, 22%, 11%);
    --bg-tertiary: hsl(228, 20%, 14%);
    --bg-elevated: hsl(228, 18%, 17%);
    --bg-hover: hsl(228, 18%, 20%);

    /* Glass */
    --glass-bg: hsla(228, 22%, 14%, 0.6);
    --glass-border: hsla(228, 30%, 40%, 0.2);
    --glass-blur: 20px;

    /* Accent */
    --accent-primary: hsl(258, 90%, 66%);
    --accent-primary-dim: hsla(258, 90%, 66%, 0.15);
    --accent-secondary: hsl(176, 80%, 50%);
    --accent-secondary-dim: hsla(176, 80%, 50%, 0.15);
    --accent-gradient: linear-gradient(135deg, hsl(258, 90%, 66%), hsl(200, 90%, 60%));
    --accent-gradient-hover: linear-gradient(135deg, hsl(258, 90%, 72%), hsl(200, 90%, 66%));

    /* Text */
    --text-primary: hsl(220, 20%, 93%);
    --text-secondary: hsl(220, 15%, 65%);
    --text-tertiary: hsl(220, 12%, 45%);
    --text-accent: hsl(258, 90%, 76%);

    /* Status */
    --success: hsl(152, 70%, 50%);
    --success-dim: hsla(152, 70%, 50%, 0.15);
    --warning: hsl(38, 95%, 60%);
    --warning-dim: hsla(38, 95%, 60%, 0.15);
    --error: hsl(0, 80%, 62%);
    --error-dim: hsla(0, 80%, 62%, 0.15);
    --info: hsl(210, 90%, 60%);
    --info-dim: hsla(210, 90%, 60%, 0.15);

    /* Borders & Shadows */
    --border: hsl(228, 20%, 20%);
    --border-focus: hsl(258, 60%, 55%);
    --shadow-sm: 0 2px 8px hsla(0, 0%, 0%, 0.3);
    --shadow-md: 0 4px 16px hsla(0, 0%, 0%, 0.4);
    --shadow-lg: 0 8px 32px hsla(0, 0%, 0%, 0.5);
    --shadow-glow: 0 0 20px hsla(258, 90%, 66%, 0.2);

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

    /* Timing */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 200ms;
    --duration-slow: 400ms;
}

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

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: hsla(228, 20%, 35%, 0.5);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: hsla(228, 20%, 45%, 0.7);
}

/* ─── App Layout ─────────────────────────────────────────────────────────── */
#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: transform var(--duration-slow) var(--ease);
}

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

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

.sidebar-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-glow);
}

.sidebar-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.sidebar-logo .version {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 400;
    display: block;
    -webkit-text-fill-color: var(--text-tertiary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 8px 12px 4px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
    position: relative;
    user-select: none;
}

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

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

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 0 2px 2px 0;
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-item .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.badge-success {
    background: var(--success-dim);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-dim);
    color: var(--warning);
}

.badge-info {
    background: var(--info-dim);
    color: var(--info);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    transition: background var(--duration) var(--ease);
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 8px hsla(152, 70%, 50%, 0.5);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 8px hsla(152, 70%, 50%, 0.5); }
    50% { box-shadow: 0 0 16px hsla(152, 70%, 50%, 0.8); }
}

/* ─── Main Content ───────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

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

.page-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

.page-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.card:hover {
    border-color: hsla(228, 30%, 50%, 0.3);
}

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title .icon {
    font-size: 1.1rem;
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    transition: all var(--duration) var(--ease);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px hsla(258, 60%, 55%, 0.15);
}

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

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

.form-select {
    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 d='M3 4.5L6 7.5L9 4.5' stroke='%237a7f9a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

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

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    user-select: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

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

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: hsla(228, 30%, 50%, 0.4);
}

.btn-success {
    background: var(--success);
    color: hsl(152, 70%, 10%);
}

.btn-success:hover {
    background: hsl(152, 70%, 55%);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-dim);
    color: var(--error);
    border: 1px solid hsla(0, 80%, 62%, 0.3);
}

.btn-danger:hover {
    background: hsla(0, 80%, 62%, 0.25);
}

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

.btn-lg {
    padding: 12px 28px;
    font-size: 0.95rem;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

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

/* ─── Toggle / Checkbox ──────────────────────────────────────────────────── */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle {
    position: relative;
    width: 42px;
    height: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--duration) var(--ease);
    cursor: pointer;
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--duration) var(--ease);
}

.toggle.active {
    background: var(--accent-primary-dim);
    border-color: var(--accent-primary);
}

.toggle.active::after {
    left: 21px;
    background: var(--accent-primary);
}

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

/* ─── Radio Group ────────────────────────────────────────────────────────── */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
}

.radio-option:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.radio-option.active {
    background: var(--accent-primary-dim);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.radio-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration) var(--ease);
}

.radio-option.active .radio-dot {
    border-color: var(--accent-primary);
}

.radio-option.active .radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* ─── Chips / Tags ───────────────────────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
}

.chip-provider {
    background: var(--accent-primary-dim);
    color: var(--accent-primary);
    border-color: hsla(258, 90%, 66%, 0.3);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.chip-provider:hover {
    background: hsla(258, 90%, 66%, 0.25);
}

.chip-provider.active {
    background: var(--accent-primary);
    color: white;
}

.chip-remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 0.9rem;
}

.chip-remove:hover {
    opacity: 1;
}

/* ─── Column Builder ─────────────────────────────────────────────────────── */
.column-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
    cursor: grab;
}

.column-item:hover {
    border-color: var(--accent-primary);
}

.column-item .drag-handle {
    color: var(--text-tertiary);
    cursor: grab;
    font-size: 1rem;
}

.column-item .col-number {
    width: 28px;
    height: 28px;
    background: var(--accent-primary-dim);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.column-item .col-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.column-item .col-type {
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    appearance: none;
    font-family: 'Inter', sans-serif;
}

.column-item .col-remove {
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--duration) var(--ease);
}

.column-item .col-remove:hover {
    color: var(--error);
    background: var(--error-dim);
}

.ai-notes-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--accent-secondary-dim);
    border: 1px dashed hsla(176, 80%, 50%, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── Progress Bar ───────────────────────────────────────────────────────── */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.5s var(--ease);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.3));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

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

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: all var(--duration) var(--ease);
}

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

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    font-weight: 600;
}

/* ─── Log Viewer ─────────────────────────────────────────────────────────── */
.log-viewer {
    background: hsl(228, 30%, 6%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.log-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: hsla(228, 25%, 10%, 0.8);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.log-toolbar .title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.log-entries {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    max-height: 400px;
    min-height: 200px;
}

.log-entry {
    display: flex;
    gap: 10px;
    padding: 2px 0;
    animation: fadeIn 0.2s var(--ease);
}

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

.log-time {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.log-level {
    width: 60px;
    flex-shrink: 0;
    font-weight: 600;
}

.log-level.INFO { color: var(--info); }
.log-level.SUCCESS { color: var(--success); }
.log-level.WARNING { color: var(--warning); }
.log-level.ERROR { color: var(--error); }
.log-level.DEBUG { color: var(--text-tertiary); }

.log-message {
    color: var(--text-secondary);
    word-break: break-word;
}

/* ─── Data Table ─────────────────────────────────────────────────────────── */
.data-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    background: var(--bg-elevated);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid hsla(228, 20%, 20%, 0.5);
    color: var(--text-primary);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--duration) var(--ease);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table .status-approved {
    color: var(--success);
}

.data-table .status-flagged {
    color: var(--warning);
}

.data-table .status-corrected {
    color: var(--info);
}

/* ─── Sheets Config Panel ────────────────────────────────────────────────── */
.share-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--info-dim);
    border: 1px solid hsla(210, 90%, 60%, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.share-notice .notice-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.share-notice .notice-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.share-notice .email-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    margin-top: 8px;
}

.share-notice .email-copy:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-secondary);
}

/* ─── Provider Selector ──────────────────────────────────────────────────── */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.provider-card {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-align: center;
}

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

.provider-card.active {
    background: var(--accent-primary-dim);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.provider-card .provider-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.provider-card .provider-model {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

.provider-card .provider-status {
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}

.provider-card .provider-status.available {
    color: var(--success);
}

.provider-card .provider-status.unavailable {
    color: var(--text-tertiary);
}

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

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.3s var(--ease);
}

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

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

/* ─── Empty State ────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.85rem;
    max-width: 400px;
    margin: 0 auto;
}

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

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

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .page-body {
        padding: 16px;
    }

    .form-row,
    .form-row-3,
    .provider-grid {
        grid-template-columns: 1fr;
    }

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