/* Enhanced CSS Variables with Apify Branding */
:root {
    /* Base colors */
    --background: hsl(0, 0%, 100%);
    --background-subtle: hsl(0, 0%, 98%);
    --foreground: hsl(210, 13%, 10%);
    
    /* Card system */
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(210, 13%, 10%);
    --card-hover: hsl(0, 0%, 98%);
    
    /* Primary accent: requested green */
    --primary: #1EA34D;
    --primary-hover: #198a41;
    --primary-foreground: hsl(0, 0%, 98%);
    --primary-light: rgba(30, 163, 77, 0.15);
    
    /* Secondary colors */
    --secondary: hsl(210, 20%, 96%);
    --secondary-hover: hsl(210, 20%, 93%);
    --secondary-foreground: hsl(210, 13%, 10%);
    
    /* Accent aligned with primary (green) */
    --accent: #1EA34D;
    --accent-hover: #198a41;
    --accent-foreground: hsl(0, 0%, 98%);
    --accent-light: rgba(30, 163, 77, 0.12);
    
    /* Muted colors */
    --muted: hsl(210, 20%, 96%);
    --muted-hover: hsl(210, 20%, 93%);
    --muted-foreground: hsl(210, 10%, 45%);
    
    /* Success/Error states */
    --success: hsl(142, 71%, 45%);
    --success-foreground: hsl(0, 0%, 98%);
    --success-light: hsl(142, 71%, 95%);
    
    --destructive: hsl(0, 84%, 60%);
    --destructive-hover: hsl(0, 84%, 55%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --destructive-light: hsl(0, 84%, 95%);
    
    /* Borders and inputs */
    --border: hsl(210, 20%, 88%);
    --border-hover: hsl(210, 30%, 75%);
    --input: hsl(210, 20%, 92%);
    --input-focus: var(--primary);
    
    /* Focus ring */
    --ring: var(--primary);
    
    /* Geometric properties */
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    
    /* Sidebar specific */
    --sidebar-background: hsl(210, 25%, 97%);
    --sidebar-foreground: hsl(210, 15%, 25%);
    --sidebar-primary: var(--primary);
    --sidebar-primary-foreground: hsl(0, 0%, 98%);
    --sidebar-accent: hsl(210, 25%, 93%);
    --sidebar-accent-foreground: hsl(210, 15%, 25%);
    --sidebar-border: hsl(210, 20%, 88%);
    --sidebar-ring: var(--primary);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 2px 8px 0 rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 12px 0 rgb(0 0 0 / 0.12);
    --shadow-lg: 0 8px 24px 0 rgb(0 0 0 / 0.16);
    --shadow-xl: 0 12px 32px 0 rgb(0 0 0 / 0.20);
}

.dark {
    /* Base colors */
    --background: hsl(210, 20%, 5%);
    --background-subtle: hsl(210, 20%, 7%);
    --foreground: hsl(210, 15%, 92%);
    
    /* Card system */
    --card: hsl(210, 20%, 8%);
    --card-foreground: hsl(210, 15%, 92%);
    --card-hover: hsl(210, 20%, 10%);
    
    /* Primary accent: requested green */
    --primary: #1EA34D;
    --primary-hover: #198a41;
    --primary-foreground: hsl(210, 20%, 5%);
    --primary-light: rgba(30, 163, 77, 0.15);
    
    /* Secondary colors */
    --secondary: hsl(210, 20%, 12%);
    --secondary-hover: hsl(210, 20%, 15%);
    --secondary-foreground: hsl(210, 15%, 85%);
    
    /* Orange accent */
    --accent: hsl(24, 100%, 63%);
    --accent-hover: hsl(24, 100%, 68%);
    --accent-foreground: hsl(210, 20%, 5%);
    --accent-light: hsl(24, 100%, 15%);
    
    /* Muted colors */
    --muted: hsl(210, 20%, 12%);
    --muted-hover: hsl(210, 20%, 15%);
    --muted-foreground: hsl(210, 10%, 55%);
    
    /* Success/Error states */
    --success: hsl(142, 71%, 50%);
    --success-foreground: hsl(210, 20%, 5%);
    --success-light: hsl(142, 71%, 15%);
    
    --destructive: hsl(0, 84%, 65%);
    --destructive-hover: hsl(0, 84%, 70%);
    --destructive-foreground: hsl(210, 20%, 5%);
    --destructive-light: hsl(0, 84%, 15%);
    
    /* Borders and inputs */
    --border: hsl(210, 20%, 18%);
    --border-hover: hsl(210, 20%, 25%);
    --input: hsl(210, 20%, 15%);
    --input-focus: var(--primary);
    
    /* Focus ring */
    --ring: var(--primary);
    
    /* Sidebar specific */
    --sidebar-background: hsl(210, 25%, 6%);
    --sidebar-foreground: hsl(210, 15%, 85%);
    --sidebar-primary: var(--primary);
    --sidebar-primary-foreground: hsl(210, 20%, 5%);
    --sidebar-accent: hsl(210, 25%, 10%);
    --sidebar-accent-foreground: hsl(210, 15%, 85%);
    --sidebar-border: hsl(210, 20%, 18%);
    --sidebar-ring: var(--primary);
    
    /* Shadows (enhanced for dark mode) */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 2px 8px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 12px 0 rgb(0 0 0 / 0.5);
    --shadow-lg: 0 8px 24px 0 rgb(0 0 0 / 0.6);
    --shadow-xl: 0 12px 32px 0 rgb(0 0 0 / 0.7);
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global link styles */
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

/* Layout */
.app {
    display: flex;
    height: 100vh;
    background-color: var(--background);
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--sidebar-border);
    background: linear-gradient(180deg, var(--sidebar-background) 0%, var(--background-subtle) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
}

.sidebar-content {
    flex: 1;
    padding: 2rem 0;
}

.sidebar-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--sidebar-foreground);
    letter-spacing: -0.025em;
}

.sidebar-description {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.sidebar-info {
    margin-top: 2rem;
}

.sidebar-info + .sidebar-info {
    margin-top: 0.75rem;
}

/* Docs callout styles removed - now using btn-secondary styling */

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0;
}

.logo {
    height: 2rem;
    width: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--foreground);
    letter-spacing: -0.05em;
}

.sidebar-actions {
    padding: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-footer {
    padding-top: 0.75rem;
    margin-top: auto;
    border-top: none; /* remove line */
    display: block; /* default on desktop */
}

/* Make feedback button and docs button match width and keep native btn visuals but without glow */
.feedback-button,
.docs-button {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

.feedback-button::before,
.docs-button::before { content: none !important; }
.feedback-button::after,
.docs-button::after { content: none !important; }
.feedback-button:hover,
.docs-button:hover { transform: none; box-shadow: none; text-decoration: none !important; }

/* Prevent icon scaling/animation on hover */
.feedback-button svg,
.docs-button svg { transition: none; transform: none; }
.feedback-button:hover svg,
.docs-button:hover svg { transform: none; }

/* Ensure no glow/ring/shadow on any interaction state */
.feedback-button:focus,
.feedback-button:focus-visible,
.feedback-button:active,
.docs-button:focus,
.docs-button:focus-visible,
.docs-button:active {
    box-shadow: none !important; /* strip glow */
    transform: none !important;
}
/* Keep transitions normal for consistency, just remove the glow and shine */


/* Also neutralize the generic button focus styles for these specific buttons */
.feedback-button:focus-visible,
.docs-button:focus-visible { outline: none !important; }

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(ellipse at top, var(--background-subtle) 0%, var(--background) 50%);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, 
        hsla(210, 100%, 95%, 0.3) 0%, 
        hsla(24, 100%, 95%, 0.1) 50%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Remove top navbar spacing entirely */
.main-header { display: none !important; }

.main-header .container {
    max-width: 72rem;
    margin: 0 auto;
}

.main-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--foreground);
    letter-spacing: -0.05em;
    line-height: 1.2;
}

.main-description {
    font-size: 1rem;
    color: var(--muted-foreground);
    margin: 0 0 2rem 0;
    line-height: 1.5;
    max-width: 42rem;
}

.content-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem; /* slightly tighter to reduce large voids between top/bottom adjacent cards */
    max-width: 72rem;
    margin: 0 auto;
}

.main-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem; /* slightly increase top space above first card */
    position: relative;
    z-index: 1;
}

.main-body .container {
    max-width: 72rem;
    margin: 0 auto;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    height: 2.75rem;
    padding: 0.75rem 1.25rem;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.6;
    transform: none;
}

.btn svg {
    pointer-events: none;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn:hover svg {
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--border);
    background-color: var(--background);
    color: var(--foreground);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--background) 100%);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-ghost {
    background-color: transparent;
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background-color: var(--muted);
    color: var(--foreground);
    transform: translateY(-1px);
}

.btn-sm {
    height: 2.25rem;
    border-radius: var(--radius);
    padding: 0 0.75rem;
}

.btn-icon {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0;
}

/* Server List */
.server-item {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    group: true;
}

.server-button {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

.server-button.active {
    background-color: hsla(0, 0%, 9%, 0.1);
    color: var(--primary);
}

.server-button.active:hover {
    background-color: hsla(0, 0%, 9%, 0.15);
    color: var(--primary);
}

.server-button.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.25rem;
    background-color: var(--primary);
    border-radius: 0 9999px 9999px 0;
}

.server-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.25rem;
    color: var(--muted-foreground);
}

.server-button.active .server-icon {
    color: var(--primary);
}

.server-name {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.server-menu {
    position: absolute;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.server-item:hover .server-menu {
    opacity: 1;
}

.server-menu-btn {
    height: 1.75rem;
    width: 1.75rem;
    padding: 0;
}

/* Gallery Button */
.gallery-btn {
    width: 100%;
    justify-content: flex-start;
    background: linear-gradient(to right, hsla(0, 0%, 9%, 0.05), hsla(0, 0%, 9%, 0.1));
    border-color: hsla(0, 0%, 9%, 0.2);
    color: var(--primary);
}

.gallery-btn:hover {
    background: linear-gradient(to right, hsla(0, 0%, 9%, 0.1), hsla(0, 0%, 9%, 0.15));
    border-color: hsla(0, 0%, 9%, 0.3);
    color: var(--primary);
}

.gallery-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.gallery-title {
    font-weight: 500;
}

.gallery-subtitle {
    font-size: 0.75rem;
    color: hsla(0, 0%, 9%, 0.7);
}

/* Enhanced Tabs */
.tabs {
    display: flex;
    gap: 0.125rem;
    background: linear-gradient(135deg, var(--muted) 0%, var(--secondary) 100%);
    padding: 0.375rem;
    border-radius: var(--radius-lg);
    width: fit-content;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    position: relative;
    letter-spacing: -0.025em;
    z-index: 1;
}

.tab-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--background) 0%, var(--card-hover) 100%);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: var(--shadow);
    z-index: -1;
}

.tab-button:hover {
    color: var(--foreground);
    transform: translateY(-1px);
}

.tab-button:hover::before {
    opacity: 0.5;
}

.tab-button.active {
    color: var(--primary);
    transform: translateY(-1px);
}

.tab-button.active::before {
    opacity: 1;
    background: linear-gradient(135deg, var(--background) 0%, var(--primary-light) 100%);
    border: 1px solid var(--primary);
}

.tab-button svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
    z-index: 1;
    position: relative;
}

.tab-button:hover svg,
.tab-button.active svg {
    transform: scale(1.1);
}

/* Unified content: show sections without tabs */
.tab-content {
    display: flex;
    margin-top: 0;
    gap: 1.5rem;
    flex-direction: column;
}
.tab-content:first-of-type { padding-top: 0; }
.tab-content + .tab-content { margin-top: 1rem; }

.tab-content.active { display: flex; }

/* Enhanced Cards */
.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--card) 0%, var(--background-subtle) 100%);
    color: var(--card-foreground);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 20%, var(--accent) 80%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card:hover::before {
    opacity: 0.8;
}

.card-header {
    padding: 1.25rem 1.25rem 0 1.25rem; /* consistent compact header padding */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--foreground);
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.card-content {
    padding: 1.25rem; /* consistent compact content padding */
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Selected Actors */
.selected-actors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.selected-actor-card {
    position: relative;
    background: linear-gradient(135deg, var(--background) 0%, var(--secondary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.selected-actor-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.selected-actor-card:hover .remove-actor-btn {
    opacity: 1;
}

.selected-actor-content {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selected-actor-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    object-fit: cover;
}

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

.selected-actor-title {
    font-size: 0.875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-actor-path {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-actor-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    height: 1.5rem;
    width: 1.5rem;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Search Loading */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    text-align: center;
}

.search-loading .loading-spinner {
    width: 40px;
    height: 40px;
}

.search-loading p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.empty-server-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 1rem;
}

.empty-server-state svg {
    width: 3rem;
    height: 3rem;
    color: hsla(0, 0%, 45.1%, 0.5);
}

.empty-server-state h3 {
    margin: 1rem 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 500;
}

.empty-server-state p {
    margin: 0.25rem 0 1.5rem 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Add Actors Button */
.add-actors-btn {
    width: 100%;
    background: transparent;
}

/* Dynamic Actors Option */
.dynamic-actors-option {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s ease;
    cursor: pointer;
    background-color: var(--card);
}

.checkbox-label:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-top: 0.125rem;
    position: relative;
    flex-shrink: 0;
    background-color: var(--background);
    transition: all 0.2s ease;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "";
    position: absolute;
    display: block;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0);
    }
    50% {
        opacity: 1;
        transform: rotate(45deg) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

.checkbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.checkbox-title {
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
}

.checkbox-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

/* Tools Grid - New Layout */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Legacy tools-section */
.tools-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* New compact tools styling */
.tools-category {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--foreground);
}

.select-all {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    cursor: pointer;
}

.select-all input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin: 0;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.select-all input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.select-all input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    display: block;
    left: 3px;
    top: 1px;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tools-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--foreground);
}

.tools-section-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin: 0;
    line-height: 1.5;
}

/* Legacy tool-item */
.tool-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background-color: var(--card);
    transition: all 0.15s ease;
}

/* New compact tool-item styling */
.tools-list .tool-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    margin: 0;
}

.tools-list .tool-item:hover {
    background: var(--muted);
}

.tools-list .tool-item.selected {
    border-color: rgba(30, 163, 77, 0.4);
}

.tool-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tool-info .tool-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--foreground);
    margin: 0;
}

.tool-desc {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.3;
}

.tools-list .tool-item input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.tools-list .tool-item input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.tools-list .tool-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    display: block;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tool-item.optional {
    cursor: pointer;
}

.tool-item.optional:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-checkbox {
    position: relative;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.tool-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.tool-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.tool-item:has(input[type="checkbox"]:disabled) {
    cursor: not-allowed;
}

.tool-item:has(input[type="checkbox"]:disabled):hover {
    border-color: var(--border);
    box-shadow: none;
}

/* Keep text active/readable for disabled default tools */
.tool-item:has(input[type="checkbox"]:disabled) .tool-name {
    color: var(--foreground);
}

.tool-item:has(input[type="checkbox"]:disabled) .tool-description {
    color: var(--muted-foreground);
}

.tool-checkbox input[type="checkbox"]:disabled + .checkmark {
    background-color: var(--muted);
    border-color: var(--muted-foreground);
    opacity: 0.5;
}

.tool-checkbox input[type="checkbox"]:checked:disabled + .checkmark {
    background-color: var(--muted-foreground);
    border-color: var(--muted-foreground);
}

.tool-checkbox input[type="checkbox"]:checked:disabled + .checkmark:after {
    border-color: var(--background);
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1rem;
    width: 1rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    background-color: var(--background);
    pointer-events: none;
}

.tool-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.tool-checkbox input[type="checkbox"]:checked + .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 0.25rem;
    top: 0.125rem;
    width: 0.25rem;
    height: 0.5rem;
    border: solid var(--primary-foreground);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tool-content {
    flex: 1;
    min-width: 0;
}

.tool-name {
    font-weight: 500;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.tool-description {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    line-height: 1.4;
}


/* Config Sections */
.config-section {
    margin-bottom: 0.5rem;
}

.config-section h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.code-block-container {
    position: relative;
    display: block;
    width: 100%;
}

.code-block {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    background: var(--background);
}

/* Override Prism.js theme for better integration */
.code-block pre[class*="language-"] {
    margin: 0;
    padding: 1rem;
    padding-right: 3.5rem;
    background: #f8f9fa;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    border: none;
}

.code-block code[class*="language-"] {
    background: none;
    text-shadow: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    color: #2d3748;
}

/* Light theme syntax colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #708090;
}

.token.punctuation {
    color: #999;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #d73a49;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #22863a;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #e36209;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #005cc5;
}

.token.function,
.token.class-name {
    color: #6f42c1;
}

.token.regex,
.token.important,
.token.variable {
    color: #e36209;
}

/* Dark mode support */
.dark .code-block pre[class*="language-"] {
    background: #1e293b;
}

.dark .code-block code[class*="language-"] {
    color: #e2e8f0;
}

/* Force operators/punctuation to have no chip-like background in code blocks */
.code-block .token.operator,
.code-block .token.punctuation {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.dark .token.comment,
.dark .token.prolog,
.dark .token.doctype,
.dark .token.cdata {
    color: #94a3b8;
}

.dark .token.punctuation {
    color: #cbd5e1;
}

.dark .token.property,
.dark .token.tag,
.dark .token.boolean,
.dark .token.number,
.dark .token.constant,
.dark .token.symbol,
.dark .token.deleted {
    color: #f87171;
}

.dark .token.selector,
.dark .token.attr-name,
.dark .token.string,
.dark .token.char,
.dark .token.builtin,
.dark .token.inserted {
    color: #86efac;
}

.dark .token.operator,
.dark .token.entity,
.dark .token.url,
.dark .language-css .token.string,
.dark .style .token.string {
    color: #fbbf24;
}

.dark .token.atrule,
.dark .token.attr-value,
.dark .token.keyword {
    color: #60a5fa;
}

.dark .token.function,
.dark .token.class-name {
    color: #c084fc;
}

.dark .token.regex,
.dark .token.important,
.dark .token.variable {
    color: #fb923c;
}

.copy-btn-inline {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    z-index: 10;
}

.copy-btn-inline:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.copy-btn-inline:active {
    transform: scale(0.95);
}

.copy-btn-inline svg {
    width: 16px;
    height: 16px;
}

/* Legacy copy button styles for backwards compatibility */
.copy-btn {
    position: static;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    align-self: flex-start;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Usage Content */
.usage-session {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

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

.usage-session-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.usage-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #10b981;
    border-radius: 50%;
}

.usage-date {
    font-weight: 500;
    font-size: 0.875rem;
}

.usage-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.usage-badge {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.usage-tools {
    margin-top: 0.75rem;
}

.usage-tools h4 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.usage-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.usage-tool-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
}

.usage-tool-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.usage-tool-count {
    background-color: var(--background);
    border: 1px solid var(--border);
    padding: 0 0.25rem;
    border-radius: 2px;
    font-size: 0.75rem;
    height: 1rem;
    display: flex;
    align-items: center;
}

/* Enhanced Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(8px) saturate(180%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: linear-gradient(145deg, var(--card) 0%, var(--background-subtle) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90vw;
    max-width: 72rem;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.modal-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: linear-gradient(135deg, var(--background) 0%, var(--card-hover) 100%);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    letter-spacing: -0.025em;
}

/* Integration modal title with icon */
.integration-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.integration-modal-title-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.modal-header p {
    font-size: 1rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--background);
    border: 2px solid var(--border);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--muted-foreground);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
}

.modal-close:hover {
    background-color: var(--destructive);
    border-color: var(--destructive);
    color: var(--destructive-foreground);
    transform: scale(1.05);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: linear-gradient(135deg, var(--card-hover) 0%, var(--background) 100%);
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
    z-index: 1;
}

.search-container input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--input);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--background) 0%, var(--card-hover) 100%);
    color: var(--foreground);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.search-container input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--background) 0%, var(--primary-light) 100%);
    transform: translateY(-1px);
}

.search-container input:focus + svg,
.search-container:focus-within svg {
    color: var(--primary);
}

.search-container input::placeholder {
    color: var(--muted-foreground);
    font-weight: 400;
}

.search-help {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.search-help a {
    color: var(--primary);
    text-decoration: none;
}

.search-help a:hover {
    text-decoration: underline;
}

/* Actors Grid */
.actors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.actor-modal-card {
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s ease;
    padding: 1rem;
    background-color: var(--card);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 180px;
    text-align: left;
    position: relative;
}

.actor-modal-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.actor-modal-card.selected {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.actor-card-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.actor-card-icon img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    display: block;
}

.actor-icon-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    font-weight: 600;
    font-size: 0.875rem;
}

.actor-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 40px; /* Reserve space for external link icon */
}

.actor-card-title-section {
    flex: 1;
    min-width: 0;
}

.actor-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-height: 0;
    flex: 1;
}

.actor-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    margin: 0;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actor-card-path {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0;
    margin-top: 2px;
    line-height: 1.2;
    opacity: 0.8;
}

.actor-modal-card.selected .actor-card-path {
    color: var(--primary-foreground);
    opacity: 0.7;
}

.actor-card-description {
    flex: 1;
    margin: 0.5rem 0;
}

.actor-card-description p {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actor-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
}

.actor-card-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-logo {
    width: 20px;
    height: 20px;
    border-radius: 100%;
    object-fit: cover;
}

.company-name {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.actor-card-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.run-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.run-count svg {
    color: var(--muted-foreground);
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.rating svg {
    color: #FFBF00; /* amber */
}

.actor-modal-card.selected .run-count,
.actor-modal-card.selected .company-name,
.actor-modal-card.selected .rating {
    color: var(--primary-foreground);
    opacity: 0.8;
}

.actor-modal-card.selected .actor-card-description p {
    color: var(--primary-foreground);
    opacity: 0.8;
}

/* Small external link icon to Apify Store */
.actor-store-link {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--muted-foreground);
    border: 1px solid transparent;
    background: transparent;
    z-index: 5;
}

.actor-store-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--card-hover);
}

.actor-modal-card.selected .actor-store-link {
    color: var(--primary-foreground);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
}

.actor-store-link svg {
    width: 14px;
    height: 14px;
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .content-grid {
        max-width: 64rem;
    }
}

@media (max-width: 768px) {
    .app {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.5rem;
    }
    
    .sidebar::before {
        display: none;
    }
    
    .sidebar-header h2 {
        font-size: 1.25rem;
    }
    
    .sidebar-content h3 {
        font-size: 1.125rem;
    }
    
    .main-content {
        height: calc(100vh - 280px);
    }
    
    .main-content::before {
        height: 100px;
    }
    
    .main-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .main-header h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .main-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }
    
    .main-body {
        padding: 1rem 1rem 1.25rem; /* keep a touch more space above first card on mobile */
    }
    
    .content-grid { gap: 1rem; }
    
    .card-header {
        padding: 1.5rem 1.5rem 0;
    }
    
    .card-content { padding: 1rem; padding-top: 0.75rem; gap: 1rem; }
    
    .selected-actors {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .tools-grid {
        gap: 1rem;
    }
    
    .actors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .modal {
        width: 95vw;
        height: 95vh;
        border-radius: var(--radius);
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .tabs {
        width: 100%;
        justify-content: center;
    }
    
    /* Responsive code block containers */
    .code-block-container {
        display: block;
        width: 100%;
    }
    
    .copy-btn-inline {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
        min-height: 44px;
        min-width: 44px;
    }
}

/* Additional responsive rules for medium mobile screens */
@media (max-width: 640px) {
    .main-body {
        padding: 1rem 0.75rem;
    }
    
    .card {
        margin: 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    .card-content {
        padding: 1rem;
        max-width: 100%;
    }
    
    .code-block-container {
        display: block;
        width: 100%;
        max-width: 100%;
    }
    
    .code-block pre[class*="language-"] {
        padding: 0.75rem;
        padding-right: 3rem;
        font-size: 0.875rem;
    }
    
    .copy-btn-inline {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
        min-height: 44px;
        min-width: 44px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 1rem;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .main-header h1 {
        font-size: 1.5rem;
    }
    
    .main-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem 1rem 0;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .checkbox-label {
        padding: 1rem;
    }
    
    .docs-callout {
        padding: 1rem;
    }
    
    .actors-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container input {
        font-size: 0.9375rem;
        padding: 0.75rem 0.875rem 0.75rem 2.75rem;
    }
    
    .search-container svg {
        left: 0.875rem;
        width: 1rem;
        height: 1rem;
    }
    
    /* Enhanced code block responsiveness for small screens */
    .main-body {
        padding: 1rem 0.5rem;
    }
    
    .code-block pre[class*="language-"] {
        padding: 0.625rem;
        padding-right: 2.75rem;
        font-size: 0.8125rem;
    }
    
    .copy-btn-inline {
        top: 0.375rem;
        right: 0.375rem;
        padding: 0.375rem;
        min-height: 40px;
        min-width: 40px;
    }
}

/* Hide elements by default */
.hidden {
    display: none !important;
}

/* Simple mobile top bar and sidebar visibility */
.topbar-mobile { display: none; }

@media (max-width: 768px) {
    /* Show simple top bar with logo and title */
    .topbar-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: transparent; /* no special background */
        border: none; /* no border */
    }
    .topbar-mobile .logo { height: 1.5rem; width: 1.5rem; }
    .topbar-mobile .topbar-title { font-size: 1.125rem; font-weight: 700; margin: 0; }
    .topbar-left { display: inline-flex; align-items: center; gap: 0.5rem; }
    .topbar-right { display: inline-flex; align-items: center; gap: 0.5rem; }
    /* add subtle bottom border on mobile */
    .topbar-mobile { border-bottom: 1px solid var(--border); }
}

/* On mobile hide the sidebar entirely */
@media (max-width: 768px) {
    .sidebar { display: none; }
}

/* Mobile: sidebar reads like normal content */
@media (max-width: 768px) {
    .app { flex-direction: column; }
    .mobile-intro { display: block; margin: 0 .25rem 2rem .25rem; background: transparent; border: none; box-shadow: none; padding: 0; }
}

/* Hide mobile-intro on desktop */
@media (min-width: 769px) {
    .mobile-intro { display: none; }
    
    .sidebar-info + .sidebar-info {
        margin-top: 1.25rem;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.transition-opacity {
    transition: opacity 0.15s ease;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Helper text styles */
.text-sm {
    font-size: 0.875rem;
}

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

.mb-2 {
    margin-bottom: 0.5rem;
}

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

.hover\:underline:hover {
    text-decoration: underline;
}

/* Search functionality styles */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
}

.loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.75rem;
}

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

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

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -8px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -1px, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-bounce {
    animation: bounce 0.6s ease-out;
}

.search-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--destructive);
}

.empty-search-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
}

/* Integrations Page Styles */
.integrations-container {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem; /* keep same rhythm as .content-grid */
}

/* Connection sections now use .card class for consistency */

/* URL Display */
.url-display {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    width: 100%;
}

.url-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.url-field span {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--foreground);
    /* Show full URL by wrapping lines rather than truncating */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    min-height: 2.5rem;
    flex-shrink: 0; /* Keep fixed size so text never overlaps */
}

.copy-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Integration Sections */
.integration-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem; /* align with card spacing rhythm */
}

.integration-section:last-child {
    margin-bottom: 0;
}

.integration-subheading {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--foreground);
}

/* Integration Grid */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.integration-card {
    background: linear-gradient(135deg, var(--background) 0%, var(--secondary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.integration-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.integration-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.integration-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

.integration-icon::after {
    content: attr(data-fallback);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-foreground);
    display: none;
}

.integration-icon img[src*="error"], .integration-icon img:not([src]) {
    display: none;
}

.integration-icon img[src*="error"] + ::after, 
.integration-icon img:not([src]) + ::after {
    display: block;
}

.integration-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integration-card p {
    display: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Platform Tabs (used in JSON Config modal) */
.platform-tabs {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-tab:hover {
    background: var(--card-hover);
    color: var(--foreground);
}

.platform-tab.active {
    color: var(--primary);
    background: var(--card-hover);
    border-color: rgba(30,163,77,0.35);
}

.platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.platform-icon-img {
    width: 14px;
    height: 14px;
    display: block;
    object-fit: contain;
    filter: saturate(0.9) brightness(1.05);
}

/* Masked monochrome icons that inherit text color */
.platform-mask {
    display: inline-block !important;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    /* Inline styles set mask-image directly for reliability across bundlers */
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.platform-content {
    margin-top: 0.25rem;
    width: 100%;
    box-sizing: border-box;
}

.platform-panel {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.platform-panel.active {
    display: block;
}

.platform-panel h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}


.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--foreground);
    /* Reserve space for the copy button so long lines don't slide under it */
    padding: 1rem;
    padding-right: 3.5rem; /* keep space for copy button */
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.code-block code {
    display: block;
    /* Allow wrapping of long lines (e.g., long URLs) while preserving whitespace */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    min-height: 2.5rem;
}

.copy-code-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.copy-code-btn.copied {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.copy-code-btn svg {
    width: 16px;
    height: 16px;
}

/* Integration Modal */
.integration-modal {
    max-width: 52rem;
    border-radius: var(--radius-lg);
}

.integration-modal .modal-body {
    padding: 2rem 2rem 2.5rem;
    background: linear-gradient(145deg, var(--card) 0%, var(--background-subtle) 100%);
}

.integration-step {
    margin-bottom: 1rem;
    padding: 1rem 1rem 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.integration-step h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.integration-step p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.integration-step ol {
    margin: 0.75rem 0;
    /* Align list text with other elements (checkbox, tabs, code blocks) */
    list-style-position: inside;
    padding-left: 0;
}

/* Ensure nested lists (like platform paths) still indent slightly */
.integration-step ol ul,
.integration-step ul {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    padding-left: 1.25rem;
}

.integration-step li {
    font-size: 0.875rem;
    color: var(--foreground);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.warning-box {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    margin: 0.75rem 0;
}

.warning-box svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.warning-box p {
    font-size: 0.8125rem;
    color: var(--foreground);
    line-height: 1.4;
}

.mt-3 {
    margin-top: 0.75rem;
}

/* Responsive adjustments for Integrations page */
@media (max-width: 768px) {
    .integrations-container {
        gap: 1.5rem;
    }
    
    .integration-grid {
        grid-template-columns: 1fr;
    }
    
    .platform-tabs {
        flex-wrap: wrap;
    }
    
    .url-field {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn {
        width: auto;
        justify-content: center;
    }
}

/* === Apify Console style overrides (visual-only) === */
/* Placed at the end to win the cascade without touching markup */

/* Dark theme tokens closer to Console palette */
.dark {
    --background: #161718;             /* Apify neutral dark */
    --background-subtle: #1f2123;      /* header/panel */
    --foreground: #f4f4f5;

    --card: #1b1c1d;                   /* card surface */
    --card-foreground: #f4f4f5;
    --card-hover: #1f2123;

    /* Primary: Apify-like green */
    --primary: #1EA34D;
    --primary-hover: #198a41;
    --primary-foreground: #161718;
    --primary-light: rgba(30, 163, 77, 0.15);

    --secondary: #242528;
    --secondary-hover: #292b2e;
    --secondary-foreground: #c9cbcf;

    --accent: #1EA34D;
    --accent-hover: #198a41;
    --accent-foreground: #161718;
    --accent-light: rgba(30, 163, 77, 0.12);

    --muted: #242528;
    --muted-hover: #292b2e;
    --muted-foreground: #9ea2a8;

    --success: #22c55e;
    --success-foreground: #052e16;
    --success-light: rgba(34, 197, 94, 0.12);

    --destructive: #ef6045;
    --destructive-hover: #ff7157;
    --destructive-foreground: #672523;
    --destructive-light: rgba(239, 96, 69, 0.15);

    --border: #3d3f43;
    --border-hover: #4f5257;
    --input: #0a0a0b;
    --input-focus: var(--primary);
    --ring: var(--primary);

    --sidebar-background: #161718;
    --sidebar-foreground: #bfc1c5;
    --sidebar-primary: var(--primary);
    --sidebar-primary-foreground: #0a0a0b;
    --sidebar-accent: #1f2123;
    --sidebar-accent-foreground: #c9cbcf;
    --sidebar-border: #3d3f43;
    --sidebar-ring: var(--primary);
}

/* Sidebar: flatter and tighter */
.sidebar {
    width: 280px !important;
    background: var(--sidebar-background) !important;
    padding: 1.5rem !important;
}
.sidebar::before { content: none !important; }

/* Main content and header */
.main-content { background: var(--background) !important; }
.main-content::before { content: none !important; display: none !important; }
.main-header {
    background: var(--background-subtle) !important;
    padding: 1rem 1.25rem 0.75rem !important;
}
.main-header h1 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
    letter-spacing: -0.02em !important;
}

/* Tabs: text-only with underline for active */
.tabs { background: transparent !important; border: none !important; box-shadow: none !important; gap: 1rem !important; padding: 0 !important; }
.tab-button { border-radius: 8px !important; padding: 0.5rem 0.6rem !important; color: var(--muted-foreground) !important; position: relative; border: 1px solid transparent; }
.tab-button::before { content: none !important; }
.tab-button::after { content: none !important; }
.tab-button.active { color: var(--primary) !important; background: linear-gradient(180deg, rgba(30,163,77,0.08), rgba(30,163,77,0.02)); border-color: rgba(30,163,77,0.35); }
.tab-button.active::after { content: none !important; }

/* Cards: flat with subtle borders */
.card { background: var(--card) !important; box-shadow: 0 2px 10px rgba(8,8,10,.21), 0 1px 1px rgba(8,8,10,.2) !important; }
.card::before { content: none !important; }
.card-header { padding: 1rem 1rem 0 1rem !important; gap: 0.25rem !important; }
.card-title { font-size: 1.1rem !important; font-weight: 600 !important; }
.card-content { padding: 1rem !important; gap: 1rem !important; }

/* Buttons */
.btn-primary { background: var(--primary) !important; color: #161718 !important; border: 1px solid var(--primary-hover) !important; box-shadow: 0 1px 2px rgba(0,0,0,.2) !important; }
.btn-primary:hover { background: var(--primary-hover) !important; }
.btn-outline { border: 1px solid var(--border) !important; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) !important; color: var(--foreground) !important; }
.btn-outline:hover { background: linear-gradient(180deg, rgba(30,163,77,0.12), rgba(30,163,77,0.05)) !important; color: var(--primary) !important; border-color: rgba(30,163,77,0.4) !important; }

/* Callouts */
.docs-callout { background: linear-gradient(180deg, rgba(30,163,77,0.08), rgba(30,163,77,0.02)) !important; border: 1px solid rgba(30,163,77,0.25) !important; padding: 0.75rem !important; border-radius: 10px !important; }
.docs-callout::before { content: none !important; }
.docs-callout:hover { background: linear-gradient(180deg, rgba(30,163,77,0.12), rgba(30,163,77,0.04)) !important; border-color: var(--primary) !important; }

/* Search field */
.search-container input { border: 1px solid var(--border) !important; background: var(--background) !important; box-shadow: none !important; padding-left: 2.75rem !important; }
.search-container input:focus { border-color: var(--input-focus) !important; box-shadow: 0 0 0 3px rgba(30,163,77,.25) !important; }

/* Make "Add or remove Actors" more prominent by default */
.add-actors-btn { 
    background: linear-gradient(180deg, rgba(30,163,77,0.12), rgba(30,163,77,0.05)) !important; 
    color: var(--primary) !important; 
    border-color: rgba(30,163,77,0.4) !important; 
}
.add-actors-btn:hover { 
    background: linear-gradient(180deg, rgba(30,163,77,0.18), rgba(30,163,77,0.08)) !important; 
    border-color: var(--primary) !important; 
}

/* Code block background override */
.code-block { background: #161718 !important; }
.code-block pre[class*="language-"],
.dark .code-block pre[class*="language-"] { background: #161718 !important; }

/* Force wrapping in Prism blocks so long URLs are fully visible and don't sit under copy button */
.code-block pre[class*="language-"],
.code-block code[class*="language-"],
.code-toolbar pre[class*="language-"],
.code-toolbar code[class*="language-"] {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* Tabs: flatten and remove motion to avoid visual jitter */
.tabs { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; gap: 1rem !important; }
.tab-button { background: transparent !important; border-radius: 8px !important; padding: 0.5rem 0.6rem !important; color: var(--muted-foreground) !important; position: relative; border: 1px solid transparent; }
.tab-button:hover, .tab-button.active { transform: none !important; }
.tab-button.active { color: var(--primary) !important; background: var(--card-hover) !important; border-color: rgba(30,163,77,0.35) !important; }

/* Ensure Integrations tab content uses same max width as Configuration */
#integrations.tab-content {
    width: 100% !important;
    max-width: 72rem !important;
    margin: 0 auto !important;
}

/* Align numbered list content visually with cards in integration modal */
.integration-modal .integration-step ol,
.integration-modal .integration-step ul,
.integration-modal .platform-tabs,
.integration-modal .platform-content,
.integration-modal .code-block {
    margin-left: 0.125rem; /* subtle alignment tweak to match card gutters */
}

/* Reduce gap between platform tabs and code block inside integration modal */
.integration-modal .platform-tabs { margin-top: 0.5rem !important; margin-bottom: 0.25rem !important; }
.integration-modal .platform-content { margin-top: 0 !important; }
.integration-modal .platform-panel .code-block { margin: 0.25rem 0 0.75rem 0 !important; }


/* Removed mobile sidebar-as-topbar compaction. Sidebar should behave as normal content on mobile. */