/* Source: resources/views/test/netshow_iq1/personal_orchestrator_agent.blade.php (block 1) */
:root {
    --bg: #0F1216;
    --surface: #171B21;
    --card: #21262E;
    --border: #2A313A;
    --separator: #2F3640;
    --text: #E7ECF2;
    --text-secondary: #A9B2BF;
    --text-muted: #7D8896;
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --primary-pressed: #1D4ED8;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow: 0 8px 24px rgba(0,0,0,.25);
    --focus: 0 0 0 2px #3B82F6, 0 0 0 6px rgba(59,130,246,.24);
    --inner-glow: inset 0 1px 0 rgba(255,255,255,.05);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Header */
.hero-header {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 48px 0 32px;
    margin-bottom: 32px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
}

.hero-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Cards */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow), var(--inner-glow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--separator);
}

.section-icon {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex-grow: 1;
}

.section-number {
    color: var(--primary);
    margin-right: 8px;
}

/* Help Button */
.help-btn {
    width: 28px;
    height: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 180ms ease;
    flex-shrink: 0;
}

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

/* Popover Styling */
.popover {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    max-width: 320px;
}

.popover-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.popover-body {
    color: var(--text-secondary);
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
}

.popover-arrow::after {
    border-bottom-color: var(--card) !important;
}

.bs-popover-bottom > .popover-arrow::after {
    border-bottom-color: var(--surface) !important;
}

/* Form Elements */
.form-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control, .form-select {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 16px;
    font-size: 14px;
    min-height: 46px;
    transition: all 180ms ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--surface);
    border-color: var(--primary);
    box-shadow: var(--focus);
    color: var(--text);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Fixed Select Dropdown Arrow */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23A9B2BF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-select option {
    background: var(--card);
    color: var(--text);
    padding: 12px;
}

.form-text {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
}

/* Input Groups */
.input-group-text {
    background: var(--surface);
    border: 1px solid var(--border);
    border-right: none;
    color: var(--text-muted);
    padding: 12px 14px;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

/* Custom Checkboxes */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    user-select: none;
}

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

.checkbox-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 180ms ease;
}

.checkbox-box i {
    color: white;
    font-size: 12px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 180ms ease;
}

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

.custom-checkbox input[type="checkbox"]:checked + .checkbox-box i {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox input[type="checkbox"]:disabled + .checkbox-box {
    opacity: 0.6;
}

.checkbox-label {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* Custom Toggle Switches */
.custom-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

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

.toggle-track {
    width: 44px;
    height: 24px;
    min-width: 44px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 24px;
    position: relative;
    transition: all 180ms ease;
}

.toggle-thumb {
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 180ms ease;
}

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

.custom-toggle input[type="checkbox"]:checked + .toggle-track .toggle-thumb {
    background: white;
    left: 22px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.toggle-label i {
    font-size: 16px;
}

/* Tags Input */
.tags-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    min-height: 46px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    cursor: text;
    transition: all 180ms ease;
}

.tags-container:focus-within {
    border-color: var(--primary);
    box-shadow: var(--focus);
}

.tag {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-remove {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 150ms;
    font-size: 16px;
    line-height: 1;
}

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

.tags-input {
    border: none;
    background: transparent;
    color: var(--text);
    outline: none;
    flex: 1;
    min-width: 120px;
    font-size: 14px;
}

.tags-input::placeholder {
    color: var(--text-muted);
}

/* Range Slider */
.range-container {
    padding: 8px 0;
}

.form-range {
    width: 100%;
    height: 6px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    border: 1px solid var(--border);
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid var(--card);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    margin-top: -8px;
    cursor: pointer;
}

.form-range::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    border: 1px solid var(--border);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid var(--card);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.range-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.range-value {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

/* Domain Cards */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.domain-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    cursor: pointer;
    transition: all 180ms ease;
    text-align: center;
    user-select: none;
}

.domain-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.domain-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.domain-card input {
    display: none;
}

.domain-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.domain-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 14px;
}

.domain-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .mode-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mode-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    cursor: pointer;
    transition: all 180ms ease;
    text-align: center;
    user-select: none;
}

.mode-card:hover {
    border-color: var(--text-muted);
}

.mode-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.mode-card input {
    display: none;
}

.mode-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.mode-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.mode-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active { background: var(--success); }
.status-dot.pending { background: var(--warning); }
.status-dot.inactive { background: var(--text-muted); }

/* Two Column Layout */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .two-col-layout {
        grid-template-columns: 1fr;
    }
}

/* Sticky Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 24px;
}

.summary-card {
    background: linear-gradient(180deg, var(--card) 0%, rgba(33, 38, 46, 0.8) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--separator);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-muted);
    font-size: 13px;
}

.summary-value {
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}

.summary-value.highlight {
    color: var(--primary);
}

/* Quick Command Pills */
.quick-commands {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.quick-cmd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 150ms ease;
}

.quick-cmd:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Floating Submit Bar (Mobile) */
.floating-submit {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    z-index: 100;
    box-shadow: 0 -4px 24px rgba(0,0,0,.3);
}

@media (max-width: 768px) {
    .floating-submit {
        display: block;
    }
    .desktop-submit {
        display: none;
    }
    body {
        padding-bottom: 120px;
    }
}

/* Accordion */
.accordion-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-button {
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    padding: 16px 20px;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: var(--card);
    color: var(--primary);
}

.accordion-button::after {
    filter: invert(0.7);
}

.accordion-body {
    background: var(--card);
    padding: 20px;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 200ms ease;
    color: var(--text-muted);
}

.step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--text);
}

/* Output Preview */
.output-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
}

.output-preview pre {
    margin: 0;
    white-space: pre-wrap;
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border: none;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 180ms ease;
    background-image: linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 100%);
    color: white;
}

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

.btn-primary:active {
    background-color: var(--primary-pressed);
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 14px 28px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 180ms ease;
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--text-muted);
    color: var(--text);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-card {
    animation: fadeIn 300ms ease-out;
}

/* Responsive */
@media (max-width: 576px) {
    .hero-header {
        padding: 32px 0 24px;
    }
    .hero-title {
        font-size: 22px;
        flex-wrap: wrap;
    }
    .form-card {
        padding: 20px 16px;
    }
    .section-header {
        flex-wrap: wrap;
    }
    .progress-steps {
        display: none;
    }
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Copy Button */
.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 150ms ease;
}

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

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

/* Utility classes for extracted inline styles */
.text-small {
    font-size: 13px;
    color: var(--text-secondary);
}
