/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-secondary:hover { background: rgba(115, 2, 255, 0.08); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #c03b30 100%);
    color: #fff;
}
.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #3fae34 100%);
    color: #0b1b0b;
}

/* Links */
.link {
    color: var(--secondary-accent);
    font-weight: 500;
}
.link:hover { color: #83d1ce; }

/* Cards */
.card {
    background: var(--bg-surface-1);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.surface-card {
    background: var(--bg-surface-1);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
}

.surface-subtle {
    background: var(--surface-subtle);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
}

.surface-elevated {
    background: var(--surface-elevated);
    border: var(--border-width) solid var(--border-strong);
    border-radius: var(--radius-md);
}

.text-title { color: var(--text-primary); }
.text-body { color: var(--text-secondary); }
.text-muted-ui { color: var(--text-muted); }

.surface-box {
    background: var(--bg-surface-2);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-md);
}

.demo-card {
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    opacity: 0.7;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(115, 2, 255, 0.18);
}

/* Badges */
.badge { 
    padding: 4px 12px; 
    border-radius: 999px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-primary { background: var(--primary); color: #fff; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #7a6400; }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-info { background: var(--info-bg); color: var(--info); }

.state-success { color: var(--success); }
.state-warning { color: var(--warning); }
.state-danger { color: var(--error); }
.state-info { color: var(--info); }

/* Progress */
.progress-bar {
    height: 8px;
    background: color-mix(in srgb, var(--border-color) 70%, transparent);
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
    transition: width 0.4s ease;
}

/* Toast container */
#toastContainer { pointer-events: none; }
#toastContainer > div { pointer-events: auto; }

/* Tables - Option B (soft purple accent) */
.table-shell {
    border: var(--border-width) solid var(--table-divider);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    overflow-x: auto;
}

.table-soft {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-soft thead {
    background: var(--table-header-bg);
}

.table-soft th {
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--table-text-muted);
    border-bottom: 1px solid var(--table-divider);
    padding: 0.85rem 0.75rem;
}

.table-soft td {
    color: var(--text-primary);
    border-bottom: 1px solid var(--table-divider);
    padding: 0.85rem 0.75rem;
    background: var(--table-row-bg);
}

.table-soft tbody tr:hover td {
    background: var(--table-row-hover-bg);
}

.table-soft tbody tr.is-active td {
    background: var(--row-selected-soft);
}

.table-soft-divider {
    border-top: 1px solid var(--table-divider);
}

.table-soft-compact th,
.table-soft-compact td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.table-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
}
