:root {
    /* Color Palette */
    --bg-dark: #0f1115;
    --bg-panel: rgba(26, 29, 36, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    /* Accents */
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);

    /* Status Colors */
    --success: #10b981;
    --error: #dc2626;

    /* Framework Colors */
    --fw-postman: #ff6c37;
    --fw-playwright: #2ebd59;
    --fw-restassured: #f89820;
    --fw-jmeter: #d22128;
    --fw-pytest: #0093d5;
    --fw-karate: #333333;
    /* Has a white glow on dark bg */
    --fw-cypress: #17202C;
    --fw-k6: #7d64ff;
    --fw-robot: #00c0b5;

    /* Metrics */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-fast: 0.2s ease;
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="cyberpunk"] {
    --bg-dark: #0a0518;
    --bg-panel: rgba(22, 13, 48, 0.7);
    --border-color: rgba(217, 70, 239, 0.25);
    --accent-primary: #d946ef;
    --accent-hover: #c026d3;
    --accent-gradient: linear-gradient(135deg, #d946ef, #06b6d4, #f43f5e);
}

[data-theme="emerald"] {
    --bg-dark: #06140f;
    --bg-panel: rgba(10, 32, 24, 0.7);
    --border-color: rgba(16, 185, 129, 0.25);
    --accent-primary: #10b981;
    --accent-hover: #059669;
    --accent-gradient: linear-gradient(135deg, #10b981, #14b8a6, #3b82f6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    /* Create a subtle background glow */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.15) 0%, transparent 50%);
    background-attachment: fixed;
    height: 100vh;
    overflow: hidden;
}

/* ── Typography & Utilities ── */
h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hidden {
    display: none !important;
}

/* ── Layout ── */
.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 285px;
    min-width: 285px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    z-index: 10;
    box-sizing: border-box;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ── Glassmorphism ── */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* ── Sidebar Elements ── */
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-groups-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.nav-groups-wrapper::-webkit-scrollbar {
    width: 4px;
}
.nav-groups-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.nav-group-section {
    margin-bottom: 1.25rem;
}

.nav-group-header {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 0.75rem 0.35rem 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.nav-links li {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
}

.nav-links li:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    transform: translateX(2px);
}

.nav-links li.active {
    background: rgba(99, 102, 241, 0.12);
    color: #ffffff;
    font-weight: 600;
    border-left: 3px solid var(--accent-primary);
}

.nav-links li.active i {
    color: var(--accent-primary);
}

.nav-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}

.nav-badge.badge-primary { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.nav-badge.badge-success { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.nav-badge.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fde047; }
.nav-badge.badge-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.nav-badge.badge-info { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }

.topbar-session-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.4rem 0.95rem;
    border-radius: 20px;
    font-size: 0.8rem;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-session-chip:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
}

.loading-fade {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

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

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* ── Main Topbar ── */
.topbar {
    margin-bottom: 3rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* ── Content Grid ── */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
}

.dashboard-header-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 3rem;
    max-width: 1400px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ── Drop Zone ── */
.drop-zone {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.drop-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.drop-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.supported-formats {
    display: flex;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* ── File Details Card ── */
.file-details {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-type-icon {
    font-size: 1.5rem;
    color: var(--success);
}

.file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Format Detection Badge ── */
.format-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    animation: badgeFadeIn 0.4s ease;
}

.format-badge--openapi {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.format-badge--postman {
    background: rgba(255, 108, 55, 0.15);
    color: var(--fw-postman);
    border: 1px solid rgba(255, 108, 55, 0.3);
}

.format-badge--synthesized {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(217, 70, 239, 0.15));
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

@keyframes badgeFadeIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    color: var(--error);
}

/* ── Framework Selection ── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.framework-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.framework-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-bounce);
    border: 2px solid transparent;
}

.framework-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
}

.framework-card.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.fw-icon {
    font-size: 2rem;
}

.postman-color {
    color: var(--fw-postman);
}

.playwright-color {
    color: var(--fw-playwright);
}

.restassured-color {
    color: var(--fw-restassured);
}

.jmeter-color {
    color: var(--fw-jmeter);
}

.pytest-color {
    color: var(--fw-pytest);
}

.karate-color {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.cypress-color {
    color: #fff;
}

.k6-color {
    color: var(--fw-k6);
}

.robot-color {
    color: var(--fw-robot);
}

/* Just white for cypress dark theme */

.fw-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.checkbox-ring {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: var(--transition-fast);
}

.framework-card.selected .checkbox-ring {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary);
    /* Checkmark icon via pseudo-element */
}

.framework-card.selected .checkbox-ring::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ── Buttons ── */
.action-section {
    display: flex;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 38px;
    padding: 0 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--accent-gradient);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-primary:hover:not(.disabled) {
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary.disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(80%);
    box-shadow: none;
    transform: none;
}

.btn-success {
    background: var(--success);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.btn-success:hover:not(.disabled) {
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover:not(.disabled) {
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}


/* ── Progress Area ── */
.progress-area {
    margin-top: 2rem;
    padding: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.terminal-view {
    background: #000;
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--success);
    height: 120px;
    overflow-y: auto;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.term-line {
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.term-line.highlight {
    color: #fff;
    font-weight: bold;
}

.term-line.error {
    color: var(--error);
}

/* ── SPA Views ── */
.view-section {
    display: none;
    animation: fadeIn var(--transition-fast);
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Utility Classes ── */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-auto {
    flex: 1 1 auto;
}

.flex-none {
    flex: none;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.items-center,
.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }


.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 2rem;
}

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

.mr-3 {
    margin-right: 0.75rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.p-6 {
    padding: 1.5rem;
}

.max-w-md {
    max-width: 28rem;
}

.w-full {
    width: 100%;
}

.border-b {
    border-bottom: 1px solid var(--border-color);
}

.border-dark {
    border-color: rgba(255, 255, 255, 0.05);
}

.text-white {
    color: #fff;
}

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

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

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

.text-xs {
    font-size: 0.75rem;
}

.text-xl {
    font-size: 1.25rem;
}

/* ── Forms & Inputs ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input,
.form-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    min-height: 38px;
    box-sizing: border-box;
    transition: var(--transition-fast);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236366f1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 9px auto;
    padding-right: 32px;
}

.form-input-sm,
.form-select-sm {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.82rem !important;
    height: 36px !important;
    min-height: 36px !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
}

.form-select-sm {
    padding-right: 28px !important;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.4);
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-main);
    padding: 6px 10px;
}

/* ── Corporate Styled File Upload Inputs (Browse Button) ── */
input[type="file"],
.form-input[type="file"] {
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.82rem;
    transition: var(--transition-fast);
    line-height: 1.6;
}

input[type="file"]:hover,
.form-input[type="file"]:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-main);
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    margin-right: 0.85rem;
    padding: 0.4rem 0.95rem;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.4));
    border: 1px solid rgba(99, 102, 241, 0.6);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

input[type="file"]:hover::file-selector-button,
input[type="file"]:hover::-webkit-file-upload-button {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #a5b4fc;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

input[type="file"]:active::file-selector-button,
input[type="file"]:active::-webkit-file-upload-button {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

input[type="file"]:focus-visible,
input[type="file"]:focus-visible::file-selector-button {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Theme Adaptations for File Upload Selector */
[data-theme="cyberpunk"] input[type="file"]::file-selector-button,
[data-theme="cyberpunk"] input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.35), rgba(6, 182, 212, 0.35));
    border: 1px solid rgba(217, 70, 239, 0.7);
    color: #ffffff;
}

[data-theme="cyberpunk"] input[type="file"]:hover::file-selector-button,
[data-theme="cyberpunk"] input[type="file"]:hover::-webkit-file-upload-button {
    background: linear-gradient(135deg, #d946ef, #06b6d4);
    border-color: #f472b6;
    box-shadow: 0 4px 14px rgba(217, 70, 239, 0.5);
}

[data-theme="emerald"] input[type="file"]::file-selector-button,
[data-theme="emerald"] input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(20, 184, 166, 0.35));
    border: 1px solid rgba(16, 185, 129, 0.7);
    color: #ffffff;
}

[data-theme="emerald"] input[type="file"]:hover::file-selector-button,
[data-theme="emerald"] input[type="file"]:hover::-webkit-file-upload-button {
    background: linear-gradient(135deg, #10b981, #14b8a6);
    border-color: #6ee7b7;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    color: #fff;
}

.btn-sm,
.btn-primary.btn-sm,
.btn-secondary.btn-sm,
.btn-success.btn-sm,
.btn-danger.btn-sm {
    height: 32px;
    padding: 0 0.85rem;
    font-size: 0.78rem;
    gap: 0.35rem;
    font-weight: 500;
}

.btn-xs,
.btn-primary.btn-xs,
.btn-secondary.btn-xs {
    height: 26px;
    padding: 0 0.55rem;
    font-size: 0.72rem;
    gap: 0.25rem;
    border-radius: 6px;
}

.btn-lg {
    height: 44px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    gap: 0.5rem;
}

/* ── Segmented Control & Toolbars ── */
.btn-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.segmented-control {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100%;
}

.segmented-control .seg-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.25;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
    text-decoration: none;
}

.segmented-control .seg-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.segmented-control .seg-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* ── Provider Health Badges & Metrics ── */
.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.25;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0.6rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* ── Badge Chips ── */
.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.badge-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}


/* ── Toggle Switch ── */
.toggle-container {
    display: flex;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    position: absolute;
    opacity: 0.0001;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}


.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
}

input:checked+.slider {
    background: var(--accent-gradient);
    border-color: transparent;
}

input:checked+.slider:before {
    background-color: white;
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

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

/* ── Topology Graph UI ── */
.topology-container {
    display: flex;
    gap: 1.5rem;
    height: 600px;
    /* Fixed height for the canvas area */
}

/* ── Grid Layout Utilities ── */
.grid {
    display: grid;
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.col-span-12 {
    grid-column: span 12 / span 12;
}

@media (min-width: 1024px) {
    .lg\:col-span-7 {
        grid-column: span 7 / span 7;
    }
    .lg\:col-span-5 {
        grid-column: span 5 / span 5;
    }
    .lg\:col-span-6 {
        grid-column: span 6 / span 6;
    }
    .lg\:col-span-8 {
        grid-column: span 8 / span 8;
    }
    .lg\:col-span-4 {
        grid-column: span 4 / span 4;
    }
}

.topology-toolbar {
    width: 250px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.topology-canvas-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 540px;
    height: 540px;
    width: 100%;
}

.topology-canvas {
    width: 100%;
    height: 540px;
    min-height: 540px;
    display: block;
    position: relative;
}

/* Colors for specific node types */
.text-restassured {
    color: var(--fw-restassured);
}

.text-playwright {
    color: var(--fw-playwright);
}

/* ── Node State & Object Flow Inspector Styles ── */
.node-state-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.85rem;
    transition: all 0.2s ease;
}

.node-state-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.node-state-card.active-hop {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

.node-state-card.error-hop {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

.state-transition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    font-family: monospace;
}

.financial-delta-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.delta-item {
    display: flex;
    justify-content: space-between;
}

.delta-label {
    color: #94a3b8;
}

.delta-val-plus {
    color: #34d399;
    font-weight: 600;
}

.delta-val-minus {
    color: #f87171;
    font-weight: 600;
}

.delta-val-neutral {
    color: #e2e8f0;
    font-weight: 600;
}

.json-snapshot-block {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #a5b4fc;
    overflow-x: auto;
    max-height: 140px;
}

/* ── Auth Modal Overlay ── */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.auth-modal-content {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.justify-center {
    justify-content: center;
}

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

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Adapter Dashboard ── */
.adapter-dashboard {
    margin-top: 2rem;
}

.adapter-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.summary-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.adapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.adapter-card {
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
}

.adapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Deployed glow effect */
.adapter-card.deployed {
    border-color: rgba(16, 185, 129, 0.25);
}

.adapter-card.deployed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Not deployed — amber accent */
.adapter-card.not-deployed {
    border-color: rgba(245, 158, 11, 0.2);
}

.adapter-card.not-deployed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0.6;
}

.adapter-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.adapter-emoji {
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.adapter-card-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.adapter-fw-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: capitalize;
}

.adapter-lang {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adapter-model-name {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.72rem;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adapter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.adapter-meta-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    white-space: nowrap;
}

.adapter-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.adapter-deploy-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.adapter-deploy-badge.live {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.adapter-deploy-badge.live .status-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: statusPulse 2s ease-in-out infinite;
}

.adapter-deploy-badge.offline {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.adapter-deploy-badge.training {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}

.adapter-status-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
    }
}

/* ── Skeleton Loading ── */
.skeleton-card {
    pointer-events: none;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    animation: skeletonShimmer 1.5s infinite;
    margin-bottom: 0.5rem;
}

@keyframes skeletonShimmer {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.4;
    }
}

/* ── Adapter Error State ── */
.adapter-error {
    text-align: center;
}

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

.text-warning {
    color: #f59e0b;
}

.mb-0 {
    margin-bottom: 0;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

/* ── Stagger entrance animation ── */
.adapter-card.fade-in {
    animation: adapterCardIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes adapterCardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .adapter-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .adapter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        padding: 1rem 1.25rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content {
        padding: 1.25rem 1rem;
    }

    .header-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Corporate User Profile & Prominent Logout Button
   ========================================================================== */
.sidebar-footer .user-profile {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-footer .user-profile:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.user-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #d946ef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.user-profile-role-badge {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    margin-top: 0.2rem;
}

.logout-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.logout-action-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   Accessibility (a11y) & WCAG 2.2 Standards Styles
   ========================================================================== */

/* 1. Skip to main content link (WCAG 2.4.1 Bypass Blocks) */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 1rem;
    z-index: 100000;
    padding: 0.75rem 1.25rem;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transition: top 0.2s ease-in-out;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 1rem;
    outline: 3px solid #38bdf8;
    outline-offset: 3px;
}

/* 2. Global Focus Visible Indicators (WCAG 2.4.7 Focus Visible, 2.4.11 Focus Appearance) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #818cf8 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25) !important;
}

/* Custom switch focus styling */
.switch input:focus-visible + .slider {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

/* 3. Screen Reader Only Utility */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 4. Motion Sensitivity (WCAG 2.3.3 Animation from Interactions) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fa-spin {
        animation: none !important;
    }
}

/* ── Modern Table System & Sticky Headers ── */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-responsive table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #94a3b8);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
}

.table-responsive table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.table-responsive table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-responsive table tbody td {
    padding: 10px 14px;
    font-size: 0.8rem;
    color: #cbd5e1;
    vertical-align: middle;
}

/* ── Truncation & Text Helpers ── */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.max-w-xs { max-width: 200px; }
.max-w-sm { max-width: 280px; }
.max-w-md { max-width: 400px; }
.max-w-lg { max-width: 600px; }

/* ── Custom Dark Glassmorphism Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ══════════════════════════════════════════════════════════════════════
   ENTERPRISE FOOTER & ECOSYSTEM STYLING
   ══════════════════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════════════
   ENTERPRISE FOOTER (SINGLE-LINE DOCK) & PLATFORM INFO MODAL STYLING
   ══════════════════════════════════════════════════════════════════════ */
.enterprise-footer-singleline {
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    background: rgba(10, 15, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.footer-singleline-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.status-dot-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: statusPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.footer-info-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.footer-info-chip:hover,
.footer-info-chip:focus-visible {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* Platform Information Hub Modal Styles */
#platform-info-modal {
    z-index: 99999 !important;
}

#platform-info-modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#platform-info-modal.active .auth-modal-content {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    max-width: 860px !important;
    width: 92% !important;
}

.platform-info-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    outline: none;
}

.platform-info-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.platform-info-tab.active {
    background: rgba(99, 102, 241, 0.2);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

.platform-info-panel {
    display: none;
}

.platform-info-panel.active {
    display: block;
    animation: fadeInTab 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.info-hub-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-hub-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ══════════════════════════════════════════════════════════════════════
   LIVING REQUIREMENTS TEMPLATES & MULTI-PROJECT STYLES
   ══════════════════════════════════════════════════════════════════════ */
.template-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.template-tab-btn.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.template-placeholder-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 1rem;
}

.template-preview-code {
    background: #080c14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.76rem;
    line-height: 1.5;
    max-height: 380px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.project-profile-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.project-profile-card.active-project {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}

/* ══════════════════════════════════════════════════════════════════════
   MODEL CONTEXT PROTOCOL (MCP) STYLES
   ══════════════════════════════════════════════════════════════════════ */
.mcp-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mcp-tab-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.mcp-tool-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mcp-tool-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}