/* ============================================
   TravelFusion XML API Tester
   Aviation Blue Theme - Unified with CheckRouting Table
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Core palette - Soft & Warm (reduced brightness) */
    --bg-primary: #f5f5f4;
    --bg-secondary: #e7e5e4;
    --bg-tertiary: #d6d3d1;
    --bg-elevated: #fafaf9;
    --bg-hover: #d4d4d4;

    /* Accent colors - Aviation Blue (from checkrouting-table) */
    --accent-primary: #4a7fc1;
    --accent-secondary: #3d6ba8;
    --accent-tertiary: #5a8fd1;
    --accent-light: #eff6ff;
    --accent-lighter: #dbeafe;
    --accent-glow: rgba(74, 127, 193, 0.12);
    --accent-glow-strong: rgba(74, 127, 193, 0.2);

    /* Header gradient - Aviation Blue */
    --header-gradient-start: #5a8fd1;
    --header-gradient-end: #3d6ba8;

    /* Status colors */
    --status-success: #059669;
    --status-success-bg: #d1fae5;
    --status-error: #dc2626;
    --status-error-bg: #fee2e2;
    --status-warning: #d97706;
    --status-warning-bg: #fef3c7;
    --status-info: #4a7fc1;
    --status-info-bg: #dbeafe;

    /* Text hierarchy - Softer contrast */
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-tertiary: #78716c;
    --text-muted: #a8a29e;

    /* Borders and dividers */
    --border-default: #d6d3d1;
    --border-strong: #a8a29e;
    --border-accent: var(--accent-primary);

    /* Typography */
    --font-display: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows - Softer */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px var(--accent-glow);

    /* Panel dimensions */
    --header-height: 44px;
    --border-radius: 8px;
}

/* ============================================
   Global Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    padding: 12px;
    position: relative;
    z-index: 1;
}

/* ============================================
   App Header
   ============================================ */
.app-header {
    background: var(--accent-primary);
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-logo i {
    font-size: 20px;
    color: white;
    opacity: 0.9;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.logo-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 var(--space-xs);
}

.logo-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

/* Adjust main content to account for header */
.main-content {
    flex: 1;
    height: auto !important;
    min-height: 0;
}

/* ============================================
   Panel System
   ============================================ */
.panel-header {
    background: var(--accent-primary);
    color: white;
    padding: 0 var(--space-md);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    height: var(--header-height);
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.panel-header i {
    opacity: 0.9;
}

.panel-header span {
    position: relative;
    z-index: 1;
}

.panel-body {
    background-color: var(--bg-primary);
    overflow: auto;
    position: relative;
    border: 1px solid var(--border-default);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ============================================
   Layout: Top and Bottom Rows
   ============================================ */
.top-row {
    min-height: 60px !important;
    flex: 0 0 auto !important;
    overflow: visible;
    height: 40%;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;
}

.top-row>.col-2 {
    flex: 0 0 auto;
}

/* Library panel needs more width for saved request names */
.top-row>.col-2.library-panel {
    width: calc(20% - 24px);
}

.top-row>.col-8 {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.bottom-row {
    min-height: 150px !important;
    flex: 1 1 auto !important;
    overflow: hidden;
    margin-top: 12px;
}

/* ============================================
   Resize Border
   ============================================ */
.output-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.resize-border {
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 12px;
    cursor: ns-resize;
    z-index: 10;
    transition: all var(--transition-fast);
}

.resize-border::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.resize-border:hover::before {
    background: var(--accent-primary);
    width: 80px;
}

.resize-border.dragging::before {
    background: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    width: 100px;
}

/* Prevent text selection during resize */
.resizing {
    cursor: ns-resize !important;
}

.resizing * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: none !important;
}

.resizing .resize-border {
    pointer-events: auto !important;
}

/* ============================================
   Input Parameters Panel
   ============================================ */
.parameters-panel {
    border-radius: var(--border-radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-default);
}

.parameters-panel .panel-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.parameters-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.input-parameters {
    padding: var(--space-md);
    background-color: transparent;
}

.input-parameters .form-group {
    margin-bottom: var(--space-md);
}

.input-parameters .form-group:last-child {
    margin-bottom: 0;
}

.input-parameters label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.input-parameters label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.input-parameters .form-control {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.input-parameters .form-control:hover {
    border-color: var(--border-strong);
    background-color: var(--bg-primary);
}

.input-parameters .form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: var(--bg-primary);
}

.input-parameters .form-control::placeholder {
    color: var(--text-muted);
    font-size: 11px;
}

/* Input with Action Button */
.input-with-action {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-with-action .form-control {
    flex: 1;
    min-width: 0;
    padding-right: 60px;
}

/* Apply Button - Integrated Style */
.btn-apply {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    border-radius: 5px;
    background: var(--accent-primary);
    color: white;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
}

.btn-apply:hover {
    background: var(--accent-secondary);
}

.btn-apply:active {
    opacity: 0.8;
}

/* ============================================
   Library Panel
   ============================================ */
.library-panel {
    border-radius: var(--border-radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-default);
}

.library-panel .panel-header {
    flex-wrap: wrap;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.library-panel .panel-header input {
    flex: 1;
    min-width: 80px;
}

.library-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm) 0;
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* API Category */
.api-category {
    margin-bottom: 2px;
}

.category-header {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.category-header:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.category-header i {
    color: var(--accent-primary);
    width: 14px;
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.category-header[aria-expanded="true"] i::before,
.category-header:not(.collapsed) i::before {
    content: "\f146";
}

/* API List */
.api-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-item {
    padding: var(--space-xs) var(--space-md);
    padding-left: 32px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-secondary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    position: relative;
}

.api-item::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: var(--accent-tertiary);
    border-radius: 50%;
    opacity: 0.6;
    transition: all var(--transition-fast);
}

.api-item:hover {
    background-color: var(--accent-light);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.api-item:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.api-item.active {
    background-color: var(--accent-light);
    color: var(--accent-primary);
    font-weight: 600;
    border-left-color: var(--accent-primary);
}

.api-item.active::before {
    opacity: 1;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
}

.api-item.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.api-item.disabled:hover {
    background-color: transparent;
    border-left-color: transparent;
}

.api-item.disabled::before {
    opacity: 0.3;
}

/* Saved Request Item */
.saved-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-request-item span {
    flex: 1;
    word-break: break-all;
}

.saved-request-item .btn-delete-request {
    color: var(--status-error);
    cursor: pointer;
    padding: 2px 6px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: var(--border-radius);
}

.api-item:hover .btn-delete-request {
    opacity: 0.6;
}

.saved-request-item .btn-delete-request:hover {
    opacity: 1;
    background: var(--status-error-bg);
}

/* ============================================
   Edit Request Panel
   ============================================ */
.edit-request-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-default);
}

.edit-request-panel .panel-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.edit-request-panel .panel-body {
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ============================================
   Output Panel
   ============================================ */
.output-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-default);
}

.output-panel .panel-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.output-panel .panel-body {
    border: none;
}

/* ============================================
   Editor Container & Code Display
   ============================================ */
.editor-container {
    position: relative;
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: var(--bg-primary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Line Numbers */
.line-numbers {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    padding: var(--space-sm) var(--space-sm);
    text-align: right;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 19.2px;
    min-width: 48px;
    border-right: 1px solid var(--border-default);
    user-select: none;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre;
}

/* Hide scrollbar for line numbers */
.line-numbers::-webkit-scrollbar {
    display: none;
}

.line-numbers {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* XML Editor - Transparent overlay */
.xml-editor {
    position: absolute;
    top: 0;
    left: 49px;
    right: 0;
    bottom: 0;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 19.2px;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: transparent;
    caret-color: var(--accent-primary);
    z-index: 2;
    white-space: pre;
    overflow: auto;
}

/* XML Highlight - Syntax colored display */
.xml-highlight {
    position: absolute;
    top: 0;
    left: 49px;
    right: 0;
    bottom: 0;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 19.2px;
    margin: 0;
    background: var(--bg-primary);
    overflow: auto;
    z-index: 1;
    white-space: pre;
    pointer-events: none;
}

.output-display {
    pointer-events: auto;
    color: var(--text-primary);
}

/* ============================================
   XML Syntax Highlighting - Light Theme
   ============================================ */
.xml-tag {
    color: #d6336c;
}

.xml-tag-error {
    color: #fc0808;
    font-weight: 700;
}

.xml-tag-first-error {
    color: #0539f5;
    font-weight: 700;
}

.xml-attr-name {
    color: #4a7fc1;
}

.xml-attr-value {
    color: #0d9488;
}

.xml-text {
    color: var(--text-primary);
}

.xml-comment {
    color: var(--text-muted);
    font-style: italic;
}

.xml-declaration {
    color: var(--text-tertiary);
}

/* ============================================
   Buttons - Glass Morphism Style
   ============================================ */
.btn-group .btn {
    border-radius: 6px;
    margin-left: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 600;
    padding: 4px 12px;
    font-size: 15px;
    letter-spacing: 0.4px;
}

/* Glass effect base for header buttons */
.btn-outline-primary {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-outline-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline-primary:active:not(:disabled) {
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-outline-primary:disabled {
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.5;
    backdrop-filter: none;
}

.btn-outline-primary i {
    margin-right: 6px;
    font-size: 15px;
}

/* Active state for toggle buttons (XML/Table) */
#btnXML.active,
#btnTable.active {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--accent-secondary) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 -2px 0 var(--accent-primary);
    font-weight: 700;
}

#btnXML.active i,
#btnTable.active i {
    color: var(--accent-primary);
}

/* Primary filled button */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    color: white;
}

/* Danger button */
.btn-danger {
    background: linear-gradient(135deg, var(--status-error) 0%, #dc2626 100%);
    border: none;
    color: white;
}

.btn-danger:hover {
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #dc2626 0%, var(--status-error) 100%);
    color: white;
}

/* ============================================
   Table Container
   ============================================ */
.table-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-md);
    overflow: auto;
    background: var(--bg-primary);
}

.table-container table {
    font-size: 12px;
    font-family: var(--font-mono);
}

.table-container th {
    background-color: var(--bg-tertiary);
    color: var(--accent-primary);
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--border-default);
}

.table-container td {
    white-space: nowrap;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

/* ============================================
   Custom Scrollbars
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

::-webkit-scrollbar-corner {
    background: var(--bg-tertiary);
}

/* ============================================
   Loading Spinner
   ============================================ */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.spinner-border {
    width: 40px;
    height: 40px;
    border-width: 3px;
    border-color: var(--accent-primary);
    border-right-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Loading text */
.loading-overlay::after {
    content: 'Processing...';
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: var(--space-md);
}

/* ============================================
   XML Tree View
   ============================================ */
.xml-tree-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    margin: 0;
    overflow: auto;
    background: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
}

.xml-tree-line {
    display: flex;
    align-items: stretch;
    line-height: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: default;
    white-space: nowrap;
    min-height: 20px;
    transition: background-color var(--transition-fast);
}

.xml-tree-line:hover {
    background-color: var(--bg-tertiary);
}

.xml-tree-line:hover .xml-line-num {
    background-color: var(--bg-hover);
    color: var(--text-secondary);
}

/* Line number column */
.xml-line-num {
    display: inline-block;
    min-width: 40px;
    padding: 0 var(--space-sm);
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    text-align: right;
    user-select: none;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

/* Toggle icon */
.xml-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    user-select: none;
    color: var(--text-tertiary);
    font-size: 20px;
    flex-shrink: 0;
    margin: 0 2px;
    border-radius: 3px;
    transition: all var(--transition-fast);
}

.xml-toggle:hover {
    color: var(--accent-primary);
    background-color: var(--accent-light);
}

.xml-toggle-spacer {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin: 0 2px;
}

/* Line content */
.xml-line-content {
    display: inline-block;
    padding: 0 var(--space-md);
    flex: 1;
}

.xml-tree-children {
    display: block;
}

/* Tree view syntax colors */
.xml-tree-view .xml-tag {
    color: #d6336c;
}

.xml-tree-view .xml-attr-name {
    color: #4a7fc1;
}

.xml-tree-view .xml-attr-value {
    color: #0d9488;
}

.xml-tree-view .xml-text {
    color: var(--text-primary);
}

/* ============================================
   Status Message
   ============================================ */
.status-message {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 4px 16px;
    border-radius: var(--border-radius);
    margin: 0 var(--space-md);
    transition: all var(--transition-normal);
    position: relative;
}

.status-message:empty {
    display: none;
}

.status-message.status-success {
    color: var(--status-success);
    background: rgba(255, 255, 255, 0.9);
}

.status-message.status-success i {
    color: var(--status-success);
}

.status-message.status-error {
    color: var(--status-error);
    background: rgba(255, 255, 255, 0.9);
}

.status-message.status-error i {
    color: var(--status-error);
}

.status-message.status-warning {
    color: var(--status-warning);
    background: rgba(255, 255, 255, 0.9);
}

.status-message.status-warning i {
    color: var(--status-warning);
}

.status-message.status-info {
    color: var(--status-info);
    background: rgba(255, 255, 255, 0.9);
}

.status-message.status-info i {
    color: var(--status-info);
}

.status-message.status-loading {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.status-message.status-loading i {
    color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Auto-fill Highlight Animation
   ============================================ */
.input-parameters .form-control.auto-filled {
    animation: autoFillPulse 1.5s ease-out;
}

@keyframes autoFillPulse {
    0% {
        background-color: var(--status-success);
        border-color: var(--status-success);
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    }

    30% {
        background-color: var(--status-success-bg);
        border-color: var(--status-success);
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
    }

    100% {
        background-color: var(--bg-secondary);
        border-color: var(--border-default);
        box-shadow: none;
    }
}

/* Label highlight when auto-filled */
.input-parameters .form-group.auto-filled-group label {
    color: var(--status-success);
}

.input-parameters .form-group.auto-filled-group label::before {
    background: var(--status-success);
}

/* ============================================
   Modal
   ============================================ */
.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--accent-primary);
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
}

.modal-body {
    padding: var(--space-lg);
    color: var(--text-primary);
}

.modal-body label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.modal-body .form-control {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.modal-body .form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: var(--bg-primary);
}

.modal-body .text-danger {
    color: var(--status-error) !important;
    font-family: var(--font-mono);
    font-size: 11px;
}

.modal-body .text-muted {
    color: var(--text-tertiary) !important;
    font-family: var(--font-mono);
    font-size: 11px;
}

.modal-footer {
    border-top: 1px solid var(--border-default);
    padding: var(--space-xs);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.btn-close {
    filter: invert(1);
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.btn-close:hover {
    opacity: 1;
}

/* ============================================
   Animations - Entrance Effects
   ============================================ */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.parameters-panel,
.library-panel,
.edit-request-panel,
.output-panel {
    animation: fadeSlideIn 0.4s ease-out;
}

.library-panel {
    animation-delay: 0.05s;
}

.edit-request-panel {
    animation-delay: 0.1s;
}

.output-panel {
    animation-delay: 0.15s;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1200px) {
    .container-fluid {
        padding: 8px;
    }

    .top-row {
        gap: 8px;
    }

    .bottom-row {
        margin-top: 8px;
    }
}
