/*
 * Prudent Consultant Suite - Styles
 * Theme: Prudent Blue (prudentconsulting.com). Dark default with optional light theme.
 * Architect: Jaswanth
 */
/* --- PRUDENT CONSULTING THEME (PrudentBlue from prudentconsulting.com) --- */
:root {
    --primary: #1d4ed8; /* Prudent Blue - professional blue from brand */
    --primary-hover: #1e40af;
    --brand-blue: #2563eb;
    
    /* Backgrounds - dark slate */
    --bg-body: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    
    /* Text - high contrast */
    --text-main: #f8fafc;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Glass - visible surfaces */
    --glass-surface: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(148, 163, 184, 0.2);
    --glass-input: rgba(15, 23, 42, 0.8);
    
    --success: #10b981;
    --error: #ef4444;
}

/* Skip link: visible on focus for keyboard/screen reader users */
.skip-link { position: absolute; top: -100px; left: 12px; padding: 10px 16px; background: var(--primary); color: #fff; border-radius: 8px; font-size: 0.9rem; font-weight: 600; text-decoration: none; z-index: 9999; transition: top 0.2s; }
.skip-link:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }
body.light-theme .skip-link { background: var(--primary); color: #fff; }
body.light-theme .skip-link:focus { outline-color: #0f172a; }

/* Respect user motion preference (enterprise a11y) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Base: full-viewport app with gradient background; prevent horizontal scroll on any viewport */
body { margin: 0; font-family: 'Inter', sans-serif; background: var(--bg-body); background-image: var(--bg-gradient); height: 100vh; overflow-x: hidden; overflow-y: hidden; color: var(--text-main); }
.app-container { min-width: 0; }
.content-area { min-width: 0; }
.view-section { min-width: 0; box-sizing: border-box; }

/* Checkbox and toggle controls (used in Conf Generator, cURL Generator, etc.) */
.checkbox-wrapper { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.checkbox-wrapper input[type="checkbox"] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--primary); cursor: pointer; background: var(--glass-input); border: 1px solid var(--glass-border); }

.toggle-wrapper { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle-input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 24px; transition: 0.25s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 2px; bottom: 2px; background: var(--text-muted); border-radius: 50%; transition: 0.25s; }
.toggle-input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle-input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }
.toggle-input:focus-visible + .toggle-slider { box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.4); }
.toggle-label { font-size: 0.85rem; font-weight: 500; color: var(--text-light); }

/* Conf Generator "other" attributes: key-value rows with remove button */
.conf-other-attributes label { display: block; margin-bottom: 8px; }
.conf-other-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.conf-other-row input { margin: 0; }
.conf-other-row .conf-other-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 8px; }
.conf-other-row .conf-other-remove:hover { color: var(--error); }
#conf-other-rows:empty + .clipboard-add-pane-btn { margin-top: 8px; }

/* App layout: sidebar + main content; sidebar can collapse */
.app-container { display: flex; height: 100vh; background: var(--bg-body); background-image: var(--bg-gradient), radial-gradient(at 0% 0%, rgba(29, 78, 216, 0.1) 0, transparent 45%), radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.08) 0, transparent 45%); background-size: cover; }
.sidebar { position: relative; width: 260px; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); display: flex; flex-direction: column; padding: 25px; border-right: 1px solid var(--glass-border); z-index: 10; transition: width 0.2s ease, padding 0.2s ease; overflow: visible; flex-shrink: 0; }
.sidebar-collapsed { width: 56px; padding: 12px 8px; min-width: 56px; }
.sidebar-collapsed .brand-text,
.sidebar-collapsed .nav-menu,
.sidebar-collapsed .sidebar-footer-text,
.sidebar-collapsed .sidebar-footer p { display: none !important; }
.sidebar-header { display: flex; align-items: center; margin-bottom: 24px; flex-shrink: 0; }
.sidebar-collapsed .sidebar-header { justify-content: center; margin-bottom: 20px; }
.sidebar-collapsed .brand { margin-bottom: 0; justify-content: center; padding-right: 0; }
.sidebar-collapsed .brand-logo { grid-row: auto; }
.sidebar-collapsed .sidebar-footer { display: flex; justify-content: center; }
.sidebar-toggle { position: fixed; top: 24px; right: 24px; z-index: 100; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border); color: var(--text-light); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.sidebar-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }
body.light-theme .sidebar-toggle { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); color: #475569; }
body.light-theme .sidebar-toggle:hover { background: rgba(0,0,0,0.1); color: #0f172a; }
.top-bar { position: fixed; top: 24px; right: 24px; z-index: 100; display: flex; align-items: center; gap: 8px; }
.top-bar .sidebar-toggle { position: static; }
.icon-btn { width: 40px; height: 40px; padding: 0; border: none; border-radius: 12px; background: rgba(255,255,255,0.08); color: var(--text-light); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.icon-btn[aria-expanded="true"] { background: rgba(29, 78, 216, 0.25); color: var(--primary); }
body.light-theme .icon-btn { background: rgba(0,0,0,0.06); color: #475569; }
body.light-theme .icon-btn:hover { background: rgba(0,0,0,0.1); color: #0f172a; }
body.light-theme .icon-btn[aria-expanded="true"] { background: rgba(29, 78, 216, 0.15); color: var(--primary); }
.top-bar-settings-wrap { position: relative; }
.sidebar-settings-wrap { position: relative; width: 100%; }
.sidebar-gear-btn { width: 100%; border-radius: 10px; }
.settings-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.4); padding: 8px 0; z-index: 200; }
.settings-dropdown-from-sidebar { top: auto; bottom: calc(100% + 8px); right: 0; left: 0; min-width: 200px; }
.sidebar-collapsed .settings-dropdown-from-sidebar { left: auto; min-width: 200px; }
.settings-dropdown.hidden { display: none !important; }
.settings-dropdown-section { padding: 0 4px; }
.settings-dropdown-label { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 8px 12px 4px; }
.settings-dropdown-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: none; border-radius: 8px; background: transparent; color: var(--text-light); font-size: 0.9rem; font-family: inherit; cursor: pointer; text-align: left; transition: background 0.15s; }
.settings-dropdown-item:hover { background: rgba(255,255,255,0.08); }
.settings-dropdown-item i { font-size: 1rem; color: var(--text-muted); width: 20px; text-align: center; }
.settings-dropdown-item[aria-checked="true"] { color: var(--primary); }
.settings-dropdown-item[aria-checked="true"] i { color: var(--primary); }
.settings-dropdown-item-signout { color: #f87171; }
.settings-dropdown-item-signout:hover { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.settings-dropdown-item-signout i { color: #f87171; }
.signout-disabled { pointer-events: none; opacity: 0.5; cursor: not-allowed; }
body.light-theme .signout-disabled { opacity: 0.5; }
.settings-dropdown-divider { height: 1px; background: var(--glass-border); margin: 6px 12px; }
body.light-theme .settings-dropdown { background: #fff; border-color: #e2e8f0; box-shadow: 0 20px 50px rgba(0,0,0,0.12); }
body.light-theme .settings-dropdown-item { color: #334155; }
body.light-theme .settings-dropdown-item:hover { background: #f1f5f9; }
body.light-theme .settings-dropdown-item-signout { color: #dc2626; }
body.light-theme .settings-dropdown-item-signout:hover { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }
body.light-theme .settings-dropdown-item-signout i { color: #dc2626; }
.theme-toggle-top { width: auto; min-width: 40px; padding: 8px 14px; }
.signout-btn-header { display: none; }
.signout-btn-sidebar { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }
.signout-btn-sidebar:hover { background: rgba(239, 68, 68, 0.35); color: #fff; }
.signout-btn-sidebar i { color: #f87171; }
body.light-theme .signout-btn-sidebar { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #b91c1c; }
body.light-theme .signout-btn-sidebar:hover { background: rgba(239, 68, 68, 0.25); color: #991b1b; }
body.light-theme .signout-btn-sidebar i { color: #dc2626; }
.sidebar-collapsed .signout-btn-sidebar { min-width: 36px; padding: 8px; justify-content: center; }
.sidebar-collapsed .sidebar-gear-btn { min-width: 36px; width: 36px; }
.sidebar .brand { position: relative; padding-right: 0; text-decoration: none; color: inherit; }
.brand-link:hover { color: #fff; }

/* --- UPDATED BRAND STYLES --- */
.brand { 
    display: grid; 
    grid-template-columns: auto 1fr; 
    column-gap: 12px;
    margin-bottom: 40px; 
    color: #fff; 
    letter-spacing: 0.5px; 
}
.brand-logo { 
    width: 26px; 
    height: 26px; 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); 
    color: #fff; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.9rem; 
    box-shadow: 0 0 12px rgba(29, 78, 216, 0.35);
    grid-row: span 1; 
    align-self: center;
    overflow: hidden;
}
.brand-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-logo-fallback { display: none; }
.brand-logo-fallback.show { display: inline-block; }
.brand span {
    display: block;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.2;
    align-self: center;
}
.brand span::after {
    content: none;
}
/* --- END UPDATED BRAND STYLES --- */

.nav-menu { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.nav-btn { background: transparent; border: none; color: var(--text-light); padding: 14px 16px; text-align: left; font-size: 0.95rem; font-weight: 500; cursor: pointer; border-radius: 12px; transition: all 0.2s; display: flex; align-items: center; gap: 12px; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-btn.active { background: linear-gradient(90deg, rgba(29, 78, 216, 0.2) 0%, transparent 100%); color: var(--primary); border-left: 3px solid var(--primary); border-radius: 4px; }
.sidebar-footer { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: auto; }
.shortcut-hint { font-size: 0.7rem; color: var(--text-muted); margin: 6px 0 0 0; text-align: center; }
.theme-toggle { background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); color: var(--text-light); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center; transition: 0.2s; }
.theme-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
.theme-toggle i { color: var(--primary); }

/* Main content area: scrollable; only the active view-section is visible */
.content-area { flex: 1; padding: 40px; overflow-y: auto; position: relative; display: flex; flex-direction: column; align-items: center; }
.view-section { display: none; width: 100%; max-width: 1100px; animation: fadeIn 0.5s ease-out; }
.view-section.active { display: block; }

/* Shared components: section headers, cards, inputs, textareas */
/* Section headings: title left, Clear all button right; wrap on narrow screens */
.section-header-wrap { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.section-header-wrap .header-pill { margin: 0; flex: 1; min-width: 0; }
.section-header-actions { flex-shrink: 0; align-self: center; }
.btn-clear-tab { padding: 10px 18px; font-size: 0.85rem; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); color: var(--text-light); border-radius: 10px; }
.btn-clear-tab:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.2); }
body.light-theme .btn-clear-tab { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.12); color: #475569; }
body.light-theme .btn-clear-tab:hover { background: rgba(0,0,0,0.1); color: #0f172a; }
.header-pill { background: transparent; border: none; padding: 0; border-radius: 0; display: inline-flex; align-items: center; gap: 16px; margin-bottom: 0; color: #fff; max-width: 100%; }
#view-editor .editor-card { width: 100%; max-width: 100%; }
.pill-icon { font-size: 1.5rem; opacity: 1; color: var(--primary); flex-shrink: 0; }
.header-pill-text { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; flex: 1; min-width: 0; }
.header-pill h1 { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
.header-desc-toggle { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px 6px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: color 0.2s; flex-shrink: 0; }
.header-desc-toggle:hover { color: var(--primary); }
.header-pill .header-desc { margin: 0; font-size: 0.85rem; color: var(--text-light); width: 100%; flex-basis: 100%; display: none; padding-top: 4px; padding-left: 0; }
.header-pill.show-desc .header-desc { display: block; }

.dashboard-grid { display: grid; gap: 40px; }
.bulk-grid { grid-template-columns: 300px 1fr; }
.card { background: transparent; border-radius: 0; padding: 0; box-shadow: none; border: none; }
.card-title { font-size: 0.9rem; font-weight: 700; color: var(--text-light); margin-bottom: 25px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
.card-title i { color: var(--primary); }

.input-group { margin-bottom: 20px; }
.clipboard-textarea, .conf-textarea { width: 100%; min-height: 120px; padding: 14px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-input); color: var(--text-main); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; resize: vertical; box-sizing: border-box; }
.clipboard-textarea:focus, .conf-textarea:focus { outline: none; border-color: var(--primary); }
.readonly-input { background: var(--glass-bg) !important; color: var(--text-muted); cursor: default; }
.util-panel.hidden { display: none !important; }
.util-panel .action-btn { margin-right: 10px; margin-bottom: 10px; }
.editor-card { max-width: 800px; }
.editor-card .card-title { margin-bottom: 16px; }
.editor-card .input-group { margin-bottom: 16px; }
.editor-card .input-group label { display: block; margin-bottom: 6px; }
.editor-card .select-wrapper { width: 100%; }
.cron-options-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cron-opt { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.cron-opt.hidden { display: none !important; }
.cron-expression { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; padding: 12px 16px; margin: 0; min-height: 24px; }
.cron-description { margin: 0; color: var(--text-light); font-size: 0.9rem; }
body.light-theme .cron-description { color: #475569 !important; }
.cron-card .mono-input { font-family: 'JetBrains Mono', monospace; }

/* Observability form */
.observability-card .input-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.observability-card .input-row .input-group { flex: 1; min-width: 140px; }
.observability-card .conf-collapse-section { margin-bottom: 8px; }
.observability-card .conf-collapse-content { padding-left: 12px; border-left: 2px solid var(--glass-border); margin-top: 8px; }
.observability-card .conf-collapse-content.hidden { display: none !important; }
.observability-card .conf-collapse-icon { transition: transform 0.2s; display: inline-block; }
.observability-card .conf-collapse-trigger[aria-expanded="true"] .conf-collapse-icon { transform: rotate(90deg); }
.observability-card .input-group .select-wrapper { min-width: 160px; width: 100%; max-width: 220px; }
.observability-card .input-group select { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 12px; font-size: 0.9rem; }
.observability-card .input-row .input-group { min-width: 140px; }
/* Simple Enable/Disable rows: one label + one dropdown per row */
.observability-card .o11y-enable-disable-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.observability-card .o11y-enable-disable-row { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.observability-card .o11y-enable-disable-row label { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--text-light); min-width: 0; flex: 0 0 auto; max-width: 280px; }
.observability-card .o11y-enable-disable-row .o11y-enable-disable-select { flex: 0 0 auto; width: 100px; }
.observability-card .o11y-enable-disable-row .o11y-enable-disable-select select { width: 100%; padding: 8px 10px; font-size: 0.9rem; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-input); color: var(--text-main); cursor: pointer; }
body.light-theme .observability-card .o11y-enable-disable-row .o11y-enable-disable-select select { background: #fff; border-color: rgba(0,0,0,0.15); color: #0f172a; }
.editor-card #clipboard-separator-custom { box-sizing: border-box; }
.editor-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.editor-toolbar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.editor-toolbar-row-main { align-items: center; }
.editor-toolbar-row-delimiter { align-items: center; }
.editor-toolbar-row-actions { align-items: center; }
.editor-toolbar-row .card-title { margin: 0; }
.editor-separator-group { display: flex; align-items: center; gap: 12px; margin: 0; flex-shrink: 0; }
.editor-separator-group .editor-separator-label { margin: 0; font-weight: 500; white-space: nowrap; }
.editor-separator-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.editor-separator-select { width: auto; min-width: 160px; max-width: 200px; margin: 0; }
.editor-separator-custom { width: 100px; min-width: 80px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-surface); color: var(--text-light); font-size: 0.9rem; }
.editor-separator-custom:focus { outline: none; border-color: var(--primary); }
.editor-separator-custom.hidden { display: none !important; }
.editor-replace-wrap { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.editor-replace-wrap.hidden { display: none !important; }
.editor-replace-input { width: 120px; min-width: 100px; max-width: 140px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-surface); color: var(--text-light); font-size: 0.9rem; box-sizing: border-box; }
.editor-replace-input:focus { outline: none; border-color: var(--primary); }
.editor-replace-wrap .action-btn { flex-shrink: 0; }
.editor-replace-regex-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.editor-replace-regex-label input { width: auto; margin: 0; accent-color: var(--primary); }
.editor-combined-wrap { position: relative; }
.editor-combined-stats { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; min-height: 1.2em; }
.editor-combined-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.editor-tool-btn { margin: 0 !important; padding: 6px 12px; font-size: 0.8rem; }
.editor-check-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.85rem; color: var(--text-light); cursor: pointer; }
.editor-check-label input { width: auto; margin: 0; accent-color: var(--primary); }
/* Match play (Apply) button size to Add pane: same padding, font-size, border-radius, width */
.editor-replace-apply-btn { padding: 8px 14px !important; font-size: 0.85rem !important; border-radius: 8px !important; min-width: auto; width: 7.5em; max-width: 7.5em; min-height: auto; line-height: 1; font-weight: 500; box-shadow: none; text-transform: none; letter-spacing: normal; }
.editor-replace-apply-btn:hover { transform: none; }
.editor-replace-apply-btn i { margin: 0; font-size: 0.85rem; }

/* Text Editor: keep custom/replace controls aligned on mobile (no horizontal overflow) */
@media (max-width: 700px) {
    .editor-card { overflow-x: hidden; min-width: 0; }
    .editor-toolbar-row-main { flex-direction: column; align-items: stretch; gap: 12px; }
    .editor-separator-group { flex-wrap: wrap; flex-shrink: 1; min-width: 0; width: 100%; }
    .editor-separator-group .editor-separator-label { width: 100%; }
    .editor-separator-controls { flex-wrap: wrap; width: 100%; min-width: 0; flex: 1 1 100%; gap: 8px; }
    .editor-separator-select { min-width: 0; width: 100%; max-width: none; }
    .editor-separator-custom { min-width: 0; flex: 1 1 80px; max-width: none; box-sizing: border-box; }
    .editor-replace-wrap { flex-wrap: wrap; width: 100%; flex: 1 1 100%; gap: 8px; }
    .editor-replace-input { min-width: 0; flex: 1 1 80px; max-width: none; box-sizing: border-box; }
    .editor-replace-wrap .action-btn:not(.editor-replace-apply-btn) { flex: 1 1 auto; min-width: 80px; }
.editor-replace-apply-btn { flex: 0 0 auto; width: 7.5em; max-width: 7.5em; padding: 8px 14px !important; font-size: 0.85rem !important; border-radius: 8px !important; }
}

.paths-mode-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.paths-mode-label { font-weight: 600; font-size: 0.9rem; color: var(--text-light); }
.toggle-pill { display: inline-flex; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 10px; padding: 2px; }
.toggle-pill-btn { padding: 8px 18px; border: none; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.toggle-pill-btn:hover { color: var(--text-light); }
.toggle-pill-btn.active { background: var(--primary); color: #fff; }
.toggle-pill-btn[aria-pressed="true"] { background: var(--primary); color: #fff; }
body.light-theme .paths-mode-label { color: #475569; }
body.light-theme .toggle-pill { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); }
.editor-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-card .clipboard-panes-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.editor-card .clipboard-pane-wrap { margin-bottom: 0; }
@media (max-width: 700px) { .editor-card .clipboard-panes-list { grid-template-columns: 1fr; } }
.editor-card .clipboard-add-pane-btn { margin: 0; }
.editor-card .divider-text { margin-bottom: 10px; }
.editor-card #clipboard-combined { min-height: 160px; }
.editor-card .action-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.editor-card .action-row .action-btn { margin: 0; flex: 0 0 auto; }
.editor-card .editor-action-row { flex-direction: column; align-items: flex-start; gap: 12px; }
.editor-action-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.editor-action-group-expanded { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.editor-action-group-expanded .action-btn { margin: 0; flex: 1; min-width: 0; }
@media (max-width: 480px) { .editor-action-group-expanded { grid-template-columns: 1fr; } }
.clipboard-pane-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clipboard-pane-label { font-weight: 600; }
.clipboard-pane-stats { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.clipboard-pane-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; padding: 4px 8px; border-radius: 6px; }
.clipboard-pane-clear:hover { color: var(--primary); background: rgba(255,255,255,0.06); }
label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px; }
input, select { width: 100%; padding: 14px 16px; border: 1px solid var(--glass-border); border-radius: 12px; font-size: 0.95rem; color: #fff; background: var(--glass-input); font-family: 'Inter'; transition: 0.2s; box-sizing: border-box; }
input:focus, select:focus { outline: none; border-color: var(--primary); background: rgba(0,0,0,0.4); box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.25); }
input::placeholder { color: rgba(255,255,255,0.2); }

.advanced-toggle { background: none; border: none; color: var(--primary); font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 10px 0; display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; }
.advanced-toggle:hover { color: #fff; }
.advanced-toggle i { transition: transform 0.3s; }
.advanced-toggle.open i { transform: rotate(180deg); }
.advanced-section { margin-top: 15px; padding-left: 15px; border-left: 1px solid var(--glass-border); animation: slideDown 0.3s ease-out; }
.divider-text { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin: 25px 0 15px 0; }
.conf-collapse-section { margin-top: 12px; }
.conf-collapse-trigger { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 10px; color: var(--text-light); font-size: 0.9rem; font-weight: 600; cursor: pointer; text-align: left; transition: 0.2s; }
.conf-collapse-trigger:hover { background: rgba(255,255,255,0.08); color: #fff; }
.conf-collapse-icon { font-size: 0.75rem; transition: transform 0.2s; width: 14px; text-align: center; }
.conf-collapse-content { margin-top: 10px; padding-top: 10px; padding-left: 12px; border-left: 2px solid var(--glass-border); }
.conf-collapse-content.hidden { display: none !important; }
.conf-collapse-content .input-group { margin-bottom: 12px; }
.conf-collapse-content .input-group:last-of-type { margin-bottom: 0; }

.upload-card { display: flex; flex-direction: column; }
.drop-zone { border: 2px dashed rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; cursor: pointer; transition: 0.2s; min-height: 180px; margin-bottom: 25px; }
.drop-zone:hover { border-color: var(--primary); background: rgba(29, 78, 216, 0.06); }
.cloud-icon { width: 60px; height: 60px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--primary); margin-bottom: 15px; }
.drop-zone h3 { margin: 0 0 5px 0; font-size: 1.1rem; color: #fff; }
.drop-zone p { margin: 0; color: var(--text-light); font-size: 0.9rem; }

.sample-link-wrapper { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--glass-border); width: 100%; text-align: center; }
.sample-link { color: #cbd5e1; font-weight: 600; font-size: 0.85rem; text-decoration: none; margin-left: 5px; transition: all 0.2s; }
.sample-link:hover { color: var(--primary); text-decoration: underline; }

.file-list-container { margin-bottom: 25px; max-height: 400px; overflow-y: auto; }
.file-item { background: rgba(255,255,255,0.03); color: var(--text-main); padding: 12px 15px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; border: 1px solid var(--glass-border); }
.file-item-with-preview { flex-wrap: wrap; align-items: flex-start; }
.file-item-with-preview .file-preview { width: 100%; flex-basis: 100%; margin-top: 8px; padding: 0; border-radius: 6px; background: rgba(0,0,0,0.25); border: 1px solid var(--glass-border); max-height: 140px; overflow: auto; color: var(--text-light); }
.file-preview-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; font-family: 'JetBrains Mono', monospace; table-layout: fixed; }
.file-preview-table td { padding: 4px 8px; border: 1px solid var(--glass-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.file-preview-table tr:first-child td { font-weight: 600; background: rgba(255,255,255,0.06); }
.file-preview-empty { font-size: 0.8rem; color: var(--text-muted); font-style: italic; padding: 6px 8px; display: block; }
.file-info-group { display: flex; align-items: center; gap: 10px; }
.file-info-group i { color: var(--primary); }
.remove-file-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 5px; transition: color 0.2s; display: flex; align-items: center; }
.remove-file-btn:hover { color: var(--error); }

/* Primary and secondary buttons (Generate, Copy, Download, etc.) */
.primary-btn { width: 100%; background: var(--primary); color: #fff; border: none; border-radius: 12px; font-weight: 800; cursor: pointer; transition: all 0.2s; box-shadow: 0 0 20px rgba(29, 78, 216, 0.3); text-transform: uppercase; letter-spacing: 0.5px; }
.big-btn { padding: 18px; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
.primary-btn:hover { background: var(--brand-blue); color: #fff; box-shadow: 0 0 30px rgba(37, 99, 235, 0.4); transform: translateY(-2px); }

.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 25px; }
/* Keep Copy, Send to Editor, Download on one line; match combined width to Generate button */
.action-row.bulk-result-actions,
.action-row.action-row-inline { display: flex; flex-wrap: nowrap; grid-template-columns: unset; gap: 10px; align-items: stretch; width: 100%; }
.action-row.bulk-result-actions .action-btn,
.action-row.action-row-inline .action-btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.action-btn { padding: 16px; border-radius: 12px; font-weight: 600; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s ease; border: 1px solid transparent; }
.btn-copy { background: rgba(255,255,255,0.05); color: #fff; border-color: var(--glass-border); }
.btn-copy:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
.btn-send-to-editor { background: rgba(29, 78, 216, 0.15); color: var(--primary); border-color: rgba(29, 78, 216, 0.3); }
.btn-send-to-editor:hover { background: rgba(29, 78, 216, 0.25); color: #fff; border-color: var(--primary); }
.btn-send-to-editor-tiny { background: rgba(29, 78, 216, 0.2); border: 1px solid rgba(29, 78, 216, 0.4); color: #a5b4fc; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 0.65rem; margin-left: 6px; transition: 0.2s; }
.btn-send-to-editor-tiny:hover { background: var(--primary); color: #fff; }
.btn-download { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
.btn-download:hover { background: var(--success); color: #020617; }

.export-section { background: rgba(255,255,255,0.02); border: 1px solid var(--glass-border); border-radius: 16px; padding: 20px; margin-top: 30px; }
.filename-input-wrapper { display: flex; align-items: center; position: relative; }
.filename-input-wrapper input { border-radius: 10px; padding-right: 60px; background: rgba(0,0,0,0.3); } 
.extension { position: absolute; right: 15px; color: var(--text-muted); font-weight: 600; pointer-events: none; }
.save-hint { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }
.save-hint span { color: var(--primary); font-weight: 600; }

.result-box { margin-top: 30px; animation: slideDown 0.3s ease-out; }
.code-window { background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.code-header { background: rgba(255,255,255,0.05); padding: 12px 20px; color: var(--text-light); font-size: 0.75rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); }
.code-block { margin: 0; padding: 25px; color: #a5b4fc; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; overflow-x: auto; white-space: pre-wrap; width: 100%; box-sizing: border-box; display: block; line-height: 1.6; }
.copy-tiny { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 0.7rem; transition: 0.2s; }
.copy-tiny:hover { background: #fff; color: #000; }

.horizontal-row { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; }
.curl-card { max-width: 900px; }
.curl-config-layout { display: flex; flex-direction: column; gap: 28px; }
.curl-config-group { display: flex; flex-direction: column; gap: 14px; }
.curl-config-group-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); opacity: 0.9; margin-bottom: 2px; }
.curl-config-url .curl-config-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.curl-config-auth .curl-auth-type { max-width: 200px; }
.curl-config-auth .auth-row { margin-bottom: 0; }
.curl-config-request .curl-config-row.curl-endpoint-method-row { display: grid; grid-template-columns: 1fr 140px; gap: 20px; }
.curl-config-request .curl-endpoint-content { margin-top: 6px; }
.curl-config-request .endpoint-hint { margin: 14px 0 0; font-size: 0.85rem; color: var(--text-light); opacity: 0.9; }
.curl-config-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.curl-baseurl-row { margin-top: 16px; }
.curl-spl-trigger { width: 100%; padding: 12px 16px; text-align: left; font-size: 0.95rem; font-weight: 600; color: var(--primary); background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 12px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.curl-spl-trigger .curl-spl-icon { font-size: 0.85rem; width: 1em; }
.curl-spl-trigger:hover { background: rgba(29, 78, 216, 0.1); }
.curl-spl-wrap .card.curl-card { margin-top: 12px; }
.auth-row { background: rgba(255,255,255,0.02); padding: 20px; border-radius: 12px; border: 1px solid var(--glass-border); display: grid; gap: 20px; grid-template-columns: 1fr 1fr; animation: slideDown 0.3s; }
.full { grid-column: 1 / -1; }

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

/* Toast notification (triggered by script.js showToast); centered at bottom */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #fff; color: #000; padding: 12px 30px; border-radius: 50px; opacity: 0; transition: 0.3s; pointer-events: none; font-weight: 700; box-shadow: 0 0 20px rgba(255,255,255,0.3); z-index: 100; }
.toast.show { opacity: 1; bottom: 50px; }

/* ACS / Bulk panels: collapsible sections and entry rows */
.acs-task-panel.hidden { display: none !important; }
.acs-op-form-fields { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.acs-op-form-fields .input-group { min-width: 180px; }
.acs-op-extra-fields-wrap { width: 100%; margin-top: 8px; }
.acs-op-extra-content { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); display: flex; flex-wrap: wrap; gap: 16px; }
.acs-op-extra-content[hidden] { display: none !important; }
.acs-op-slider-group .acs-op-slider-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.acs-op-slider-group input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--primary); }
.acs-op-slider-value { min-width: 2.5em; font-weight: 600; color: var(--text-light); }
.bulk-manual-wrap.hidden { display: none !important; }
.bulk-entries-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; margin-bottom: 0; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 10px; color: var(--text-light); font-size: 0.95rem; font-weight: 600; cursor: pointer; text-align: left; transition: 0.2s; }
.bulk-entries-toggle:hover { background: rgba(255,255,255,0.08); color: #fff; }
.bulk-entries-toggle .bulk-entries-icon { font-size: 0.8rem; transition: transform 0.2s; }
.bulk-entries-toggle[aria-expanded="true"] .bulk-entries-icon { transform: rotate(45deg); }
.bulk-entries-content { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); }
.bulk-entries-content[hidden] { display: none !important; }
.bulk-entries-list { margin-bottom: 12px; }
.bulk-index-defaults-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.bulk-index-defaults-grid .input-group label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.bulk-entries-empty { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin: 12px 0; padding: 10px 14px; background: rgba(255,255,255,0.04); border-radius: 8px; border: 1px dashed var(--glass-border); }
body.light-theme .bulk-entries-empty { background: rgba(0,0,0,0.04); color: #64748b; border-color: #e2e8f0; }
.bulk-entry-row { display: grid; gap: 10px; padding: 12px; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 10px; margin-bottom: 10px; position: relative; }
.bulk-entry-row .bulk-entry-remove { position: absolute; top: 10px; right: 10px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.bulk-entry-row .bulk-entry-remove:hover { color: var(--error); }
.bulk-entry-row .bulk-entry-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; align-items: end; padding-right: 32px; }
.bulk-index-more-wrap { grid-column: 1 / -1; margin-top: 4px; }
.bulk-index-more-wrap .bulk-index-more-icon { transform: none; }
.bulk-index-more-content { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.bulk-index-more-content[hidden] { display: none !important; }
.bulk-entry-row .bulk-entry-fields label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; }
.clipboard-add-pane-btn { margin-top: 8px; padding: 8px 14px; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text-light); cursor: pointer; font-size: 0.85rem; }
.clipboard-add-pane-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
/* Dev Stack bulk result: tabbed ACS Command | JSON Download */
.bulk-result-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--glass-border); }
.bulk-result-tab { padding: 10px 18px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.bulk-result-tab:hover { color: var(--text-light); }
.bulk-result-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.bulk-tab-pane { margin-top: 0; }
.bulk-tab-pane.hidden { display: none !important; }
.bulk-result-code-window { max-height: 70vh; display: flex; flex-direction: column; }
.bulk-result-code-window .code-block { max-height: calc(70vh - 50px); overflow: auto; }
.bulk-code-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.bulk-header-actions { display: flex; gap: 8px; margin-left: auto; }
.bulk-header-actions .action-btn { flex: 0 0 auto; padding: 6px 12px; font-size: 0.8rem; }
.bulk-json-filename { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.bulk-json-filename code { background: var(--glass-surface); padding: 2px 8px; border-radius: 6px; color: var(--text-light); }
.bulk-result-mode.hidden { display: none !important; }
.bulk-result-actions-inline { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.tips-box { margin-top: 16px; padding: 14px; background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 10px; }
.tips-title { font-weight: 600; color: var(--primary); margin-bottom: 10px; font-size: 0.9rem; }
.tips-list { margin: 0; padding-left: 20px; color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }
.tips-list li { margin-bottom: 4px; }
.tips-list code { font-size: 0.85em; background: rgba(0,0,0,0.2); padding: 2px 6px; border-radius: 4px; }
.util-selector { width: 100%; max-width: 360px; padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; }
.util-selector optgroup { font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); padding: 6px 0 2px 0; }
.util-selector option { font-weight: 400; padding: 4px 0; }
.clipboard-panes-list { margin-bottom: 16px; }
.clipboard-pane-wrap { margin-bottom: 16px; border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; background: var(--glass-surface); }
.clipboard-pane-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--glass-border); font-size: 0.8rem; font-weight: 600; color: var(--text-light); }
.clipboard-pane-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.clipboard-pane-remove:hover { color: var(--error); }
.clipboard-pane-wrap .clipboard-pane-input { border: none; border-radius: 0; min-height: 100px; background: transparent; }
.clipboard-run-hint { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.reference-card { max-width: 1000px; }
.utils-card { max-width: 1000px; }
.util-panel-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 16px 0; padding: 12px 14px; background: var(--glass-surface); border-radius: 10px; border-left: 3px solid var(--primary); }
.util-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; align-items: center; }
.util-btn-row .action-btn { margin: 0; }
.util-btn-row-expanded { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.util-btn-row-expanded .action-btn { flex: 1; min-width: 0; }
.util-subsection { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--glass-border); }
.util-subsection-title { font-size: 1rem; font-weight: 700; color: var(--text-light); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.util-subsection-title i { color: var(--primary); }

/* Storage Sizing */
.sizing-card { max-width: 920px; padding: 24px; }
.sizing-card #sizing-form { display: flex; flex-direction: column; gap: 0; }
.sizing-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--glass-border); }
.sizing-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sizing-section-title { font-size: 0.85rem; font-weight: 700; color: var(--text-light); margin: 0 0 16px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.sizing-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 24px; align-items: end; }
.sizing-row .input-group { margin-bottom: 0; min-width: 0; }
.sizing-card .sizing-section .input-group { min-width: 0; }
.sizing-card .sizing-section .input-group label { display: block; margin-bottom: 6px; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.sizing-card .sizing-section .input-group input,
.sizing-card .sizing-section .input-group select { width: 100%; min-width: 0; box-sizing: border-box; padding: 14px 16px; min-height: 48px; }
.sizing-card .sizing-section .select-wrapper { display: block; width: 100%; max-width: none; min-width: 0; }
.sizing-card .sizing-section .select-wrapper select { width: 100%; min-width: 0; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
body.light-theme .sizing-card .sizing-section .select-wrapper select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); }
.sizing-hint { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 12px 0; line-height: 1.45; }
.sizing-indexes-list { margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.sizing-index-row { display: grid; grid-template-columns: 1fr 80px auto; gap: 12px; align-items: center; max-width: 400px; }
.sizing-index-row input[type="text"] { min-width: 0; width: 100%; }
.sizing-index-row input[type="number"] { width: 100%; min-width: 0; }
.sizing-index-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; flex-shrink: 0; }
.sizing-index-remove:hover { color: var(--error); }
.sizing-add-index { margin-top: 4px; }
.sizing-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: stretch; margin: 24px 0 0 0; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.sizing-actions .primary-btn,
.sizing-actions .action-btn { min-width: 0; width: 100%; height: 52px; min-height: 52px; padding: 0 20px; margin: 0; display: flex; justify-content: center; align-items: center; gap: 10px; box-sizing: border-box; font-size: 0.9rem; line-height: 1.2; border-radius: 12px; }
.sizing-actions .primary-btn:hover { transform: none; }
.sizing-output { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--glass-border); }
.sizing-output .sizing-section-title { margin-bottom: 16px; }
.sizing-summary { margin-bottom: 20px; }
.sizing-table { width: 100%; max-width: 440px; border-collapse: collapse; font-size: 0.9rem; }
.sizing-table th, .sizing-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--glass-border); }
.sizing-table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.3px; }
.sizing-table tr:last-child td, .sizing-table tr:last-child th { border-bottom: none; }
.sizing-daily { font-size: 0.85rem; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }
.sizing-output .input-group { margin-bottom: 0; }
.sizing-output .input-group label { display: block; margin-bottom: 8px; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.sizing-conf-preview { font-size: 0.8rem; max-height: 320px; overflow: auto; white-space: pre; margin: 0; padding: 16px; border-radius: 10px; background: var(--glass-input); border: 1px solid var(--glass-border); }
body.light-theme .sizing-conf-preview { background: rgba(0,0,0,0.04); border-color: #e2e8f0; }
@media (max-width: 640px) {
    .sizing-row { grid-template-columns: 1fr; }
    .sizing-index-row { grid-template-columns: 1fr 72px auto; max-width: none; }
    .sizing-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .sizing-actions { grid-template-columns: 1fr; }
}

/* Regex & Field Extraction */
.regex-textarea { font-family: ui-monospace, monospace; font-size: 0.9rem; }
.regex-sample-load-row { margin-bottom: 10px; }
.regex-sample-select { width: 100%; max-width: 320px; padding: 10px 14px; font-size: 0.9rem; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-input); color: #fff; cursor: pointer; }
.regex-sample-select:focus { outline: none; border-color: var(--primary); }
.regex-presets { margin: 16px 0; }
.regex-preset-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.regex-chip { padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: 1px solid var(--glass-border); background: var(--glass-surface); color: var(--text-light); transition: all 0.2s; }
.regex-chip:hover { background: rgba(29, 78, 216, 0.2); border-color: rgba(29, 78, 216, 0.4); color: var(--primary); }
.regex-preset-extra { margin-top: 12px; padding: 12px; background: rgba(0,0,0,0.2); border-radius: 10px; border: 1px solid var(--glass-border); }
.regex-extra-inline { width: 120px; display: inline-block; margin: 0 4px; padding: 6px 10px; font-size: 0.85rem; }
.regex-hint { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.regex-how-to { margin-bottom: 16px; }
.regex-how-to-trigger { width: 100%; padding: 10px 14px; text-align: left; font-size: 0.9rem; font-weight: 600; color: var(--primary); background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.regex-how-to-trigger:hover { background: rgba(29, 78, 216, 0.1); }
.regex-how-to-content { padding: 14px 16px; margin-top: 8px; background: rgba(0,0,0,0.2); border-radius: 10px; border: 1px solid var(--glass-border); }
.regex-steps { margin: 0; padding-left: 1.25rem; color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }
.regex-steps li { margin-bottom: 8px; }
.regex-steps li:last-child { margin-bottom: 0; }
.regex-steps code { font-size: 0.85em; background: var(--glass-surface); padding: 2px 6px; border-radius: 4px; }
.regex-pattern-input { width: 100%; font-family: ui-monospace, monospace; font-size: 0.95rem; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-input); color: #fff; box-sizing: border-box; }
.regex-pattern-input:focus { outline: none; border-color: var(--primary); }
.regex-flags-group { margin-top: 12px; }
.regex-flags-select { max-width: 220px; padding: 10px 14px; font-size: 0.9rem; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-input); color: #fff; cursor: pointer; }
.regex-flags-select:focus { outline: none; border-color: var(--primary); }
.epoch-converter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .epoch-converter-row { grid-template-columns: 1fr; } }
.runbook-placeholders { display: flex; flex-wrap: wrap; gap: 10px; }
.runbook-ph { padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; cursor: pointer; border: 1px solid var(--glass-border); background: var(--glass-surface); color: var(--text-light); transition: all 0.2s; }
.runbook-ph:hover { background: rgba(29, 78, 216, 0.2); border-color: rgba(29, 78, 216, 0.4); color: var(--primary); }
.runbook-ph code { font-size: 0.9em; }
.regex-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 700px) { .regex-results-grid { grid-template-columns: 1fr; } }
.regex-highlight-pre, .regex-captures-pre { white-space: pre-wrap; word-break: break-all; font-size: 0.85rem; line-height: 1.5; min-height: 80px; }
.regex-highlight-pre .regex-match { background: rgba(29, 78, 216, 0.35); border-radius: 2px; padding: 0 2px; }
.regex-highlight-pre .regex-group { background: rgba(16, 185, 129, 0.25); border-radius: 2px; padding: 0 2px; }
.regex-count { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; }
.util-output-box { background: var(--glass-surface); border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px; }
.util-output-box label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.util-output-box .code-block { margin: 0; background: rgba(0,0,0,0.25); border-radius: 8px; padding: 16px; }
.util-output-box .clipboard-textarea { margin: 0; background: rgba(0,0,0,0.25); border: 1px solid var(--glass-border); border-radius: 8px; }
.util-btn-hint { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 12px 0; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
.reference-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.reference-table th, .reference-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--glass-border); }
.reference-table th { color: var(--primary); font-weight: 600; background: rgba(255,255,255,0.03); }
.reference-table td code { font-size: 0.85em; background: var(--glass-surface); padding: 2px 8px; border-radius: 6px; color: var(--text-light); }
.reference-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.ref-table-spl-block .reference-spl-block { margin: 0; padding: 12px 14px; font-size: 0.82rem; line-height: 1.45; white-space: pre; overflow-x: auto; background: rgba(0,0,0,0.2); border-radius: 8px; font-family: var(--font-mono), monospace; color: var(--text-light); }
.ref-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: normal; }
/* Universal search (File Path Guide & Quick Reference) */
.universal-search-section { margin-bottom: 16px; }
.search-section-label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.ref-filter-input { width: 100%; max-width: 320px; padding: 10px 14px; margin-bottom: 0; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-input); color: var(--text-main); font-size: 0.9rem; box-sizing: border-box; }
.ref-filter-input::placeholder { color: var(--text-muted); }

/* File Path Guide */
.paths-cards { display: flex; flex-direction: column; gap: 24px; }
.paths-cards.hidden { display: none !important; }
.path-filter-input { width: 100%; max-width: 320px; padding: 10px 14px; margin-bottom: 0; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-input); color: var(--text-main); font-size: 0.9rem; box-sizing: border-box; }
.path-filter-input::placeholder { color: var(--text-muted); }
.table-container { width: 100%; overflow-x: auto; margin-top: 10px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.guide-table th { text-align: left; padding: 12px; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--glass-border); }
.guide-table td { padding: 14px 12px; border-bottom: 1px solid var(--glass-border); font-size: 0.9rem; color: var(--text-main); }
.guide-table .path-cell { position: relative; padding-right: 36px; }
.guide-table .path-copy-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--glass-surface); border: 1px solid var(--glass-border); color: var(--text-muted); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; transition: 0.2s; }
.guide-table .path-copy-btn:hover { color: var(--primary); background: rgba(29,78,216,0.15); }
.guide-table code { background: rgba(0,0,0,0.3); color: #a5b4fc; padding: 4px 8px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.guide-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.guide-table tbody tr.hidden-row { display: none !important; }
.reference-table tbody tr.hidden-row { display: none !important; }

.ctrl-enter-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.validation-hint { font-size: 0.85rem; color: var(--error); margin-top: 8px; min-height: 1.2em; }
.endpoint-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.endpoint-path-hint { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 10px 0; }
.endpoint-path-hint code { font-size: 0.9rem; }
.body-section.hidden { display: none !important; }
.curl-kv-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.curl-kv-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.curl-kv-row .curl-kv-key { flex: 1; min-width: 120px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-input); color: var(--text-main); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }
.curl-kv-row .curl-kv-value { flex: 2; min-width: 160px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-input); color: var(--text-main); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }
.curl-kv-row .curl-kv-remove { flex-shrink: 0; padding: 8px 12px; border: none; border-radius: 8px; background: rgba(239,68,68,0.15); color: var(--error, #ef4444); cursor: pointer; }
.curl-kv-row .curl-kv-remove:hover { background: rgba(239,68,68,0.25); }
.curl-kv-add-btn { margin-top: 4px; }
.curl-subnets-wrap { margin-top: 12px; }
.curl-subnets-wrap label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-main); }
.curl-subnets-wrap.hidden { display: none !important; }
.curl-outbound-body-wrap { margin-top: 12px; }
.curl-outbound-body-wrap.hidden { display: none !important; }
.curl-outbound-ports-label { display: block; margin: 12px 0 8px 0; font-size: 0.9rem; color: var(--text-main); }
.curl-outbound-entries { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.curl-outbound-port-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); }
.curl-outbound-row-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; flex: 1; }
.curl-outbound-row-fields .input-group { min-width: 100px; }
.curl-outbound-subnets-wrap { flex: 1; min-width: 180px; }
.curl-outbound-subnets-wrap textarea { min-height: 60px; }
.curl-outbound-remove-port { flex-shrink: 0; padding: 8px; border: none; border-radius: 8px; background: rgba(239,68,68,0.15); color: var(--error, #ef4444); cursor: pointer; }
.curl-outbound-remove-port:hover { background: rgba(239,68,68,0.25); }
.curl-outbound-add-port { margin-top: 4px; }
.curl-export-query-row { margin-top: 12px; }
.curl-export-query-row > label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-main); }
.curl-export-query-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.curl-export-query-fields .input-group { min-width: 100px; }
.curl-query-wrap { margin-top: 12px; }
.curl-query-wrap > label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-main); }
.curl-query-wrap .curl-query-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.curl-query-wrap .input-group { min-width: 100px; }
.curl-perms-patch-wrap { margin-top: 12px; }
.curl-perms-patch-wrap > label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-main); }
.curl-perms-patch-wrap .input-group { margin-bottom: 8px; }

/* Index Migration Query utility */
.indexquery-upload-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.indexquery-file-input { position: absolute; width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; z-index: -1; }
.indexquery-file-label { cursor: pointer; }
.indexquery-file-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; background: var(--glass-surface); border: 1px solid var(--glass-border); color: var(--text-main); font-size: 0.9rem; transition: background 0.15s, border-color 0.15s; }
.indexquery-file-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--primary); }
.indexquery-filename { font-size: 0.85rem; color: var(--text-muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indexquery-manual-wrap { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.indexquery-manual-label { font-size: 0.85rem; font-weight: 600; color: var(--text-light); display: block; margin-bottom: 12px; }
.indexquery-manual-rows { display: flex; flex-direction: column; gap: 12px; }
.indexquery-manual-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.indexquery-manual-row .indexquery-manual-remove { min-width: 36px; height: 38px; padding: 0; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-surface); color: var(--text-muted); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.indexquery-manual-row .indexquery-manual-remove:hover { color: var(--error); border-color: var(--error); }
.indexquery-manual-add { margin-top: 10px; }
.indexquery-result-wrap .code-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.indexquery-line-count { font-size: 0.8rem; color: var(--text-muted); margin-left: 4px; }
.indexquery-actions { display: flex; gap: 8px; margin-left: auto; }
.indexquery-preview { min-height: 100px; max-height: 240px; overflow: auto; font-size: 0.82rem; white-space: pre; }
.indexquery-hint { margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); }
.indexquery-tabs { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--glass-border); }
.indexquery-tab { padding: 10px 16px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; border-radius: 8px 8px 0 0; transition: color 0.15s, background 0.15s; }
.indexquery-tab:hover { color: var(--text-main); background: rgba(255,255,255,0.04); }
.indexquery-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(255,255,255,0.05); }

/* Bucket Migration Validation utility */
.bucket-migration-steps { display: flex; flex-direction: column; gap: 20px; }
.bucket-migration-step { padding: 14px 0; border-bottom: 1px solid var(--glass-border); }
.bucket-migration-step:last-child { border-bottom: none; }
.bucket-migration-step-title { font-size: 0.95rem; font-weight: 600; color: var(--text-main); margin: 0 0 8px 0; }
.bucket-migration-pre { min-height: 60px; max-height: 200px; overflow: auto; font-size: 0.82rem; white-space: pre; margin: 0; }

.pane-count { font-size: 0.8rem; color: var(--text-muted); margin-left: 8px; }
.conf-panel.hidden { display: none !important; }
.conf-indexes-platform-content.hidden { display: none !important; }
.conf-indexes-cloud-size-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.conf-indexes-cloud-size-row input { flex: 0 1 120px; }
.conf-indexes-cloud-size-row select { flex: 0 0 auto; min-width: 80px; }

.hidden { display: none !important; }

/* ========== LIGHT THEME (full overrides for readability; toggled via theme-toggle) ========== */
body.light-theme {
    --bg-body: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    --text-main: #0f172a;
    --text-light: #334155;
    --text-muted: #64748b;
    --glass-surface: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.12);
    --glass-input: #ffffff;
}
body.light-theme,
body.light-theme .app-container {
    background: var(--bg-body) !important;
    background-image: var(--bg-gradient) !important;
    color: var(--text-main) !important;
}
body.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-right-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .brand,
body.light-theme .brand span { color: #0f172a !important; }
body.light-theme .brand span::after { color: #475569 !important; }
body.light-theme .nav-btn { color: #334155 !important; }
body.light-theme .nav-btn:hover { background: rgba(0, 0, 0, 0.06); color: #0f172a !important; }
body.light-theme .nav-btn.active { background: rgba(29, 78, 216, 0.15); color: var(--primary) !important; }
body.light-theme .sidebar-footer,
body.light-theme .shortcut-hint { color: #64748b !important; }
body.light-theme .theme-toggle {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}
body.light-theme .theme-toggle:hover { background: #cbd5e1 !important; color: #0f172a !important; }
body.light-theme .theme-toggle i { color: var(--primary); }

body.light-theme .header-pill {
    background: transparent !important;
    color: #0f172a !important;
}
body.light-theme .header-pill h1 { color: #0f172a !important; }
body.light-theme .header-pill .header-desc { color: #475569 !important; }
body.light-theme .header-desc-toggle { color: #94a3b8 !important; }
body.light-theme .header-desc-toggle:hover { color: var(--primary) !important; }
body.light-theme .card-title { color: #334155 !important; border-bottom-color: rgba(0, 0, 0, 0.1); }
body.light-theme label { color: #475569 !important; }
body.light-theme input,
body.light-theme select {
    color: #0f172a !important;
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}
body.light-theme input:focus,
body.light-theme select:focus {
    background: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.25);
}
body.light-theme input::placeholder { color: #94a3b8 !important; }
body.light-theme .divider-text { color: #64748b !important; }
body.light-theme .advanced-toggle { color: var(--primary); }
body.light-theme .advanced-toggle:hover { color: #0f172a !important; }

body.light-theme .sample-link-text,
body.light-theme .sample-link-sep { color: #475569 !important; opacity: 1; }
body.light-theme .sample-link { color: #334155 !important; }
body.light-theme .sample-link:hover { color: var(--primary) !important; }
body.light-theme .drop-zone { border-color: rgba(0,0,0,0.2); background: rgba(255,255,255,0.9) !important; }
body.light-theme .drop-zone h3 { color: #1e293b !important; }
body.light-theme .drop-zone p { color: #475569 !important; }
body.light-theme .cloud-icon { background: rgba(29, 78, 216, 0.1); }
body.light-theme .file-item {
    background: rgba(255,255,255,0.9); color: #0f172a; border-color: rgba(0,0,0,0.1);
}
body.light-theme .file-item-with-preview .file-preview {
    background: #f1f5f9 !important; border-color: #e2e8f0;
}
body.light-theme .file-preview-table td { border-color: #e2e8f0; color: #0f172a !important; }
body.light-theme .file-preview-table tr:first-child td { background: #e2e8f0 !important; color: #0f172a !important; }
body.light-theme .file-preview-empty { color: #64748b !important; }
body.light-theme .export-section { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
body.light-theme .filename-input-wrapper input { background: #fff !important; color: #0f172a !important; }
body.light-theme .extension { color: #64748b !important; }
body.light-theme .save-hint { color: #64748b !important; }

body.light-theme .btn-copy {
    background: #e2e8f0 !important; color: #0f172a !important; border-color: #cbd5e1 !important;
}
body.light-theme .btn-copy:hover { background: #cbd5e1 !important; border-color: #94a3b8 !important; }
body.light-theme .btn-send-to-editor { background: rgba(29, 78, 216, 0.12); color: var(--primary); border-color: rgba(29, 78, 216, 0.3); }
body.light-theme .btn-send-to-editor:hover { background: var(--primary); color: #fff !important; }
body.light-theme .btn-send-to-editor-tiny { background: rgba(29, 78, 216, 0.15); color: var(--primary); border-color: rgba(29, 78, 216, 0.35); }
body.light-theme .btn-send-to-editor-tiny:hover { background: var(--primary); color: #fff; }
body.light-theme .btn-download { background: rgba(16, 185, 129, 0.15) !important; color: #047857 !important; }
body.light-theme .btn-download:hover { background: var(--success) !important; color: #fff !important; }

body.light-theme .code-window {
    background: #1e293b !important; border-color: rgba(0,0,0,0.2);
}
body.light-theme .code-header {
    background: rgba(0,0,0,0.2); color: #e2e8f0 !important; border-bottom-color: rgba(255,255,255,0.1);
}
body.light-theme .code-block {
    color: #e2e8f0 !important;
    background: #1e293b !important;
    font-family: 'JetBrains Mono', monospace;
}
body.light-theme .util-output-box .code-block { color: #0f172a !important; background: #f1f5f9 !important; }
body.light-theme .util-output-box .clipboard-textarea { color: #0f172a !important; background: #f1f5f9 !important; border-color: #cbd5e1; }
body.light-theme .util-output-box { background: #f8fafc !important; border-color: #e2e8f0; }
body.light-theme .util-output-box label { color: #475569 !important; }
body.light-theme .util-btn-hint { color: #64748b !important; }
body.light-theme .copy-tiny {
    background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); color: #fff;
}
body.light-theme .copy-tiny:hover { background: #fff; color: #000; }
body.light-theme .auth-row { background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.1); }

body.light-theme .bulk-entries-toggle {
    background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); color: #334155 !important;
}
body.light-theme .bulk-entries-toggle:hover { background: #f1f5f9; color: #0f172a !important; }
body.light-theme .bulk-entry-row {
    background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1);
}
body.light-theme .bulk-entry-row .bulk-entry-fields label { color: #64748b !important; }
body.light-theme .bulk-entry-row .bulk-entry-remove { color: #64748b; }
body.light-theme .bulk-entry-row .bulk-entry-remove:hover { color: var(--error); }
body.light-theme .tips-box { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
body.light-theme .tips-list { color: #334155 !important; }
body.light-theme .tips-list code { background: rgba(0,0,0,0.08); color: #475569; }
body.light-theme .clipboard-add-pane-btn { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); color: #334155 !important; }
body.light-theme .clipboard-add-pane-btn:hover { background: #f1f5f9; color: #0f172a !important; }
body.light-theme .clipboard-pane-wrap { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); }
body.light-theme .clipboard-pane-header { background: rgba(0,0,0,0.06); color: #334155 !important; border-bottom-color: rgba(0,0,0,0.1); }
body.light-theme .clipboard-pane-wrap .clipboard-pane-input { background: #fff !important; color: #0f172a !important; }
body.light-theme .clipboard-run-hint { color: #64748b !important; }
body.light-theme .clipboard-textarea,
body.light-theme .conf-textarea { background: #fff !important; color: #0f172a !important; border-color: #cbd5e1; }

body.light-theme .reference-table th { color: var(--primary); background: rgba(0,0,0,0.04) !important; }
body.light-theme .reference-table td { color: #0f172a !important; border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme .reference-table td code { background: #e2e8f0; color: #334155 !important; }
body.light-theme .reference-table tbody tr:hover { background: rgba(0,0,0,0.04); }
body.light-theme .guide-table th { color: #64748b !important; border-bottom-color: rgba(0,0,0,0.1); }
body.light-theme .guide-table td { color: #0f172a !important; border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme .guide-table code { background: #1e293b; color: #a5b4fc !important; }
body.light-theme .guide-table tbody tr:hover { background: rgba(0,0,0,0.04); }

body.light-theme .metadata-tip { background: rgba(29, 78, 216, 0.1); border-color: rgba(29, 78, 216, 0.3); color: #0f172a !important; }
body.light-theme .metadata-tip i { color: var(--primary); }
body.light-theme .bulk-preview-hint { color: #475569 !important; }
body.light-theme #props-output-filename { color: #334155 !important; }
body.light-theme .select-wrapper select { color: #0f172a !important; background: #fff !important; }
body.light-theme .path-filter-input,
body.light-theme .ref-filter-input { background: #fff !important; color: #0f172a !important; border-color: #cbd5e1; }
body.light-theme .guide-table .path-copy-btn { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
body.light-theme .guide-table .path-copy-btn:hover { color: var(--primary); background: rgba(29,78,216,0.15); }
body.light-theme .validation-hint { color: var(--error) !important; }
body.light-theme .ctrl-enter-hint { color: #64748b !important; }
body.light-theme .endpoint-hint { color: #64748b !important; }
body.light-theme .pane-count { color: #64748b !important; }

/* ========== RESPONSIVE: 5" phone to 100" screen — no overlapping buttons/options ========== */

/* Prevent overflow: flexible widths and wrap */
.action-row.bulk-result-actions,
.action-row.action-row-inline { flex-wrap: wrap; }
.action-row.bulk-result-actions .action-btn,
.action-row.action-row-inline .action-btn { min-width: 120px; }
.bulk-code-header { flex-wrap: wrap; }
.bulk-header-actions { flex-wrap: wrap; margin-left: 0; margin-top: 4px; }
.section-header-wrap { gap: 8px; }
.header-pill h1 { font-size: clamp(1.25rem, 4vw, 2rem); word-break: break-word; }
.util-selector { max-width: 100%; }
input, select, textarea { max-width: 100%; box-sizing: border-box; }

/* Tablet and below: stack grids, reduce padding */
@media (max-width: 900px) {
    body { height: auto; overflow-y: auto; }
    .app-container { flex-direction: column; height: auto; min-height: 100vh; }
    .sidebar { width: 100%; height: auto; padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--glass-border); box-sizing: border-box; backdrop-filter: blur(20px); background: rgba(2, 6, 23, 0.95); position: sticky; top: 0; z-index: 100; flex-shrink: 0; }
    body.light-theme .sidebar { background: rgba(255, 255, 255, 0.98) !important; border-bottom-color: rgba(0, 0, 0, 0.1); }
    .sidebar-collapsed { width: 100%; min-width: 100%; }
    .sidebar-collapsed .nav-menu { display: flex; flex-direction: row; flex-wrap: wrap; }
    .sidebar-footer { display: none; }
    .nav-menu { flex-direction: row; flex-wrap: wrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .nav-btn { white-space: nowrap; flex: 1 1 auto; min-width: 0; justify-content: center; padding: 10px 12px; font-size: 0.85rem; }
    .nav-btn.active { border-left: none; border-bottom: 3px solid var(--primary); border-radius: 8px; }
    .content-area { padding: 20px 16px; height: auto; overflow: visible; }
    .dashboard-grid, .bulk-grid { grid-template-columns: 1fr; gap: 24px; }
    .horizontal-row { grid-template-columns: 1fr; gap: 16px; }
    .auth-row { grid-template-columns: 1fr; }
    .curl-config-url .curl-config-row { grid-template-columns: 1fr; }
    .curl-config-request .curl-config-row.curl-endpoint-method-row { grid-template-columns: 1fr; }
    .curl-config-row { grid-template-columns: 1fr; }
    .indexquery-manual-row { grid-template-columns: 1fr; }
    .action-row { grid-template-columns: 1fr; gap: 12px; }
    .conf-other-row { grid-template-columns: 1fr auto; gap: 8px; }
    .input-group input, .input-group select, .input-group textarea { font-size: 16px; min-width: 0; }
    .top-bar { top: 12px; right: 12px; }
    .section-header-wrap { margin-bottom: 24px; }
}

/* Phone: overlay sidebar (drawer), full-width content, no overlapping */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; max-width: 85vw; transform: translateX(-100%); transition: transform 0.2s ease; z-index: 1000; border-right: 1px solid var(--glass-border); flex-direction: column; height: 100vh; padding: 20px; overflow-y: auto; }
    .sidebar-collapsed { width: 260px; max-width: 85vw; min-width: 0; transform: translateX(-100%); }
    body.sidebar-mobile-open .sidebar { transform: translateX(0); }
    body.sidebar-mobile-open .sidebar-collapsed { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
    .sidebar-overlay.hidden { display: none !important; }
    body.sidebar-mobile-open .sidebar-overlay { display: block !important; pointer-events: auto; opacity: 1; }
    .nav-menu { flex-direction: column; flex-wrap: nowrap; overflow-x: visible; overflow-y: auto; }
    .nav-btn { justify-content: flex-start; flex: 0 0 auto; }
    .nav-btn.active { border-left: 3px solid var(--primary); border-bottom: none; }
    .sidebar-footer { display: block; }
    .content-area { padding: 16px 12px; padding-top: 56px; }
    .top-bar { top: 12px; right: 12px; }
    .section-header-wrap { flex-direction: column; align-items: stretch; gap: 10px; }
    .section-header-actions { align-self: stretch; }
    .btn-clear-tab { width: 100%; }
    .primary-btn.big-btn { padding: 14px; font-size: 0.9rem; }
    .sizing-actions { grid-template-columns: 1fr; }
}

/* Small phone: tighter padding, single-column actions */
@media (max-width: 480px) {
    .content-area { padding: 12px 10px; padding-top: 52px; }
    .header-pill h1 { font-size: 1.25rem; }
    .card-title { font-size: 0.85rem; }
    .action-btn { padding: 12px; font-size: 0.85rem; }
    .conf-other-row { grid-template-columns: 1fr; }
    .observability-card .o11y-enable-disable-row { flex-wrap: wrap; }
    .observability-card .o11y-enable-disable-row label { max-width: 100%; }
    .bulk-entry-row .bulk-entry-fields { grid-template-columns: 1fr; }
    .indexquery-manual-row .input-group { min-width: 0; }
}

/* Large screens: cap width so content doesn't stretch too far on 100" */
@media (min-width: 1400px) {
    .view-section { max-width: 1200px; }
    .content-area { padding: 48px 56px; }
}
