/* ==========================================================================
   Skill Constructor Workspace UI - Premium Design System (Project-Aligned)
   ========================================================================== */

/* Core Layout */
#skill-constructor-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-color, #0a0a0f);
    position: relative;
    z-index: 10;
}

.sc-workspace-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Sidebar Refinement */
.sc-workspace-sidebar {
    width: 280px;
    background: var(--sidebar-bg, rgba(14, 14, 22, 0.98));
    border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 20;
}

.sc-sb-header {
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-sb-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sc-sb-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.sc-sb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md, 12px);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 6px;
    border: 1px solid transparent;
    position: relative;
}

.sc-sb-item:hover {
    background: var(--hover-bg, rgba(255, 255, 255, 0.05));
    transform: translateX(2px);
}

.sc-sb-item.active {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.1);
    border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

.sc-sb-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    background: var(--primary-color, #6366f1);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--primary-color);
}

.sc-sb-item-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.sc-sb-item.active .sc-sb-item-icon {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.sc-sb-item-info {
    flex: 1;
    overflow: hidden;
}

.sc-sb-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-sb-item-desc {
    font-size: 11px;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Workspace Main Content */
.sc-workspace-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--chat-bg, #0a0a0f);
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Catalog View & Grid */
.sc-skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.sc-skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sc-skill-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

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

.sc-card-icon {
    font-size: 32px;
}

.sc-card-badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sc-status-active { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.sc-status-draft { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }
.sc-status-paused { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }

.sc-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.sc-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-card-keywords {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sc-card-keywords span {
    font-size: 11px;
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.sc-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

.sc-card-uses {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

#sc-ws-delete-btn {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.1) !important;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#sc-ws-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.sc-status-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    outline: none;
}

.sc-status-toggle-btn.btn-activate {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.sc-status-toggle-btn.btn-activate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.sc-status-toggle-btn.btn-pause {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-status-toggle-btn.btn-pause:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.sc-skill-card:hover .sc-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.sc-card-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.sc-card-btn:hover {
    background: var(--hover-bg);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.sc-card-btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Empty State Styling */
.sc-content-empty, .sc-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.sc-content-empty-icon, .sc-empty-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.sc-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.sc-empty-text {
    max-width: 450px;
    font-size: 15px;
    line-height: 1.6;
}

.sc-empty-examples {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 32px;
}

.sc-example-chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.sc-example-chip:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #6366f1;
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* Proactivity Banner in Catalog */
.sc-proactivity-banner {
    margin-top: 40px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sc-banner-body {
    flex: 1;
}

.sc-banner-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}


.sc-ws-header {
    margin-bottom: 40px;
}

.sc-ws-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.sc-ws-title-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sc-ws-icon {
    font-size: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sc-ws-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    color: #fff;
    letter-spacing: -0.02em;
}

.sc-ws-subtitle {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin-top: 6px;
}

/* Premium Tabs (Pill style) */
.sc-ws-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.sc-ws-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: none;
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sc-ws-tab:hover {
    color: var(--text-primary, #e2e8f0);
    background: rgba(255, 255, 255, 0.04);
}

.sc-ws-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.sc-ws-tab .material-symbols-outlined {
    font-size: 20px;
}

/* Inputs & Forms Overhaul */
.sc-form-group {
    margin-bottom: 24px;
}

.sc-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 8px;
}

.sc-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md, 12px);
    padding: 12px 16px;
    color: var(--text-primary, #e2e8f0);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sc-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color, #6366f1);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sc-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Redesigned Cards */
.sc-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg, 16px);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.sc-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.sc-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Premium Buttons */
.sc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-md, 12px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.sc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.sc-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md, 12px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Skill Creation Flow (Choose, Auto, Wizard screens)
   ========================================================================== */

.skill-constructor {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.sc-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.sc-btn-back {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.sc-btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateX(-4px);
}

.sc-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.sc-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Mode Selection Cards */
.sc-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.sc-mode-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(10px);
}

.sc-mode-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.sc-mode-card.sc-mode-auto {
    border-color: rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
}

.sc-mode-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary-color);
    transition: var(--transition);
}

.sc-mode-card:hover .sc-mode-icon {
    background: var(--accent-gradient);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
}

.sc-mode-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.sc-mode-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.sc-mode-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: var(--accent-gradient);
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.sc-badge-advanced {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Template Cards */
.sc-template-card {
    cursor: pointer;
    transition: var(--transition);
}

.sc-template-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.3);
}

/* Auto creation form */
.sc-auto-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 40px;
}

.sc-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.sc-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.sc-example-chips {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.sc-chip {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.sc-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.sc-btn-full {
    width: 100%;
    margin-top: 32px;
    justify-content: center;
}

/* Visibility Options */
.sc-visibility-option input[type="radio"] {
    margin-right: 6px;
    accent-color: var(--primary-color);
}

/* Result Preview */
.sc-auto-result {
    margin-top: 40px;
    animation: fadeIn 0.4s ease-out;
}

.sc-result-preview {
    margin: 24px 0;
}

.sc-preview-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
}

.sc-preview-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-preview-icon {
    font-size: 32px;
}

.sc-preview-cat {
    display: block;
    font-size: 11px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}

.sc-preview-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.sc-preview-row {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.sc-result-actions {
    display: flex;
    gap: 16px;
}

/* Generating state */
.sc-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 20px;
}

.sc-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: sc-spin 1s linear infinite;
}

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

/* Wizard */
.sc-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 40px;
}

.sc-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.5);
}

.sc-wizard-step {
    min-height: 300px;
    animation: fadeIn 0.4s ease-out;
}

.sc-wizard-actions {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
}

/* Animations */
.sc-animate-in {
    animation: sc-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sc-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbars */
.sc-sb-list::-webkit-scrollbar,
.sc-workspace-content::-webkit-scrollbar {
    width: 6px;
}

.sc-sb-list::-webkit-scrollbar-track,
.sc-workspace-content::-webkit-scrollbar-track {
    background: transparent;
}

.sc-sb-list::-webkit-scrollbar-thumb,
.sc-workspace-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sc-sb-list::-webkit-scrollbar-thumb:hover,
.sc-workspace-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Mobile back button (hidden on desktop) */
.sc-mobile-back {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-muted, #94a3b8);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.sc-mobile-back .material-symbols-outlined {
    font-size: 18px;
}

@media (max-width: 768px) {

    /* ── Workspace layout: stack sidebar + content ── */
    .sc-workspace-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 60px);
    }

    /* Sidebar: full-width, collapsible when skill selected */
    .sc-workspace-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
        max-height: none;
        flex-shrink: 0;
    }

    /* When a skill is active, hide sidebar on mobile */
    .sc-workspace-container.sc-has-active-skill .sc-workspace-sidebar {
        display: none;
    }

    .sc-workspace-container.sc-has-active-skill .sc-mobile-back {
        display: flex;
    }

    .sc-sb-header {
        padding: 16px;
    }

    .sc-sb-list {
        padding: 8px;
        max-height: none;
    }

    .sc-sb-item {
        padding: 10px;
    }

    .sc-sb-item:hover {
        transform: none;
    }

    /* ── Content area ── */
    .sc-workspace-content {
        padding: 16px;
        max-width: 100%;
    }

    .sc-ws-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .sc-ws-title {
        font-size: 22px;
    }

    .sc-ws-icon {
        font-size: 24px;
    }

    .sc-ws-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sc-ws-tab {
        padding: 8px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* ── Cards ── */
    .sc-card {
        padding: 20px;
    }

    /* ── Buttons (standalone only — not inside inline flex rows) ── */
    .sc-result-actions .sc-btn-primary,
    .sc-result-actions .sc-btn-secondary,
    .sc-editor-actions .sc-btn-primary,
    .sc-editor-actions .sc-btn-secondary,
    .sc-btn-full {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .sc-btn-primary:hover {
        transform: none;
    }

    /* Telegram Digest: phone/code input rows → stack vertically */
    #tgd-step-phone > div,
    #tgd-step-code > div {
        flex-direction: column !important;
    }

    #tgd-step-phone .sc-input,
    #tgd-step-code .sc-input {
        width: 100% !important;
        min-width: 0;
    }

    /* ── Fullscreen screens (choose / auto / wizard / editor) ── */
    .skill-constructor {
        padding: 16px;
    }

    .sc-header {
        gap: 12px;
    }

    .sc-title {
        font-size: 20px;
    }

    /* Choose screen: mode cards stack */
    .sc-modes {
        flex-direction: column;
    }

    .sc-mode-card {
        width: 100%;
    }

    /* Template grid: single column */
    .sc-skill-grid {
        grid-template-columns: 1fr !important;
    }

    /* Auto screen */
    .sc-auto-form {
        padding: 0;
    }

    .sc-example-chips {
        flex-wrap: wrap;
    }

    /* Editor: 2-col grid → single column */
    .sc-editor-grid {
        grid-template-columns: 1fr !important;
    }

    .sc-editor-actions {
        flex-direction: column;
        gap: 8px;
    }

    .sc-result-actions {
        flex-direction: column;
        gap: 8px;
    }

    /* ── Content empty state ── */
    .sc-content-empty {
        padding: 40px 20px;
    }

    .sc-content-empty-icon {
        font-size: 48px;
    }

    /* ── Telegram Digest workspace ── */
    .sc-tgd-channels-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Status Indicators & Animations */
.sc-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    margin-right: 6px;
    vertical-align: middle;
}

.sc-status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

@keyframes rotating {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: rotating 2s linear infinite;
}

#sc-ws-delete-btn .material-symbols-outlined {
    font-size: 22px;
}

/* ── Skill Type Badges ─────────────────────────────────────────── */

.sc-type-badge {
    display: inline-block;
    font-size: 12px;
    margin-right: 4px;
    vertical-align: middle;
}

.sc-mode-example {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.35));
    font-style: italic;
}

.sc-mode-card.sc-mode-quick {
    border-color: rgba(250, 204, 21, 0.3);
}
.sc-mode-card.sc-mode-quick:hover {
    border-color: rgba(250, 204, 21, 0.6);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.1);
}

/* ── Quick Action & Template Forms ─────────────────────────────── */

.sc-quick-form,
.sc-template-form {
    padding: 24px;
}

.sc-form-hint {
    font-size: 14px;
    line-height: 1.5;
}

.sc-btn-large {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    min-height: 48px;
}

.spin {
    animation: rotating 1s linear infinite;
}

/* ── Data Collection Dialog ───────────────────────────────────── */

.sc-dc-dialog {
    background: var(--card-bg, rgba(255, 255, 255, 0.04));
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.sc-dc-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.sc-dc-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color, rgba(255, 255, 255, 0.15));
}

.sc-dc-progress-dot.filled {
    background: var(--primary-color, #2A6659);
}

.sc-dc-progress-dot.current {
    background: var(--accent-color, #facc15);
}

