:root {
    --bg-color: #0d0e15;
    --panel-bg: rgba(25, 27, 40, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #ff3366;
    --accent-secondary: #7e57c2;
    --text-primary: #f0f0f5;
    --text-muted: #8b8d99;
    --green: #00e676;
    --red: #ff3b3b;
    --yellow: #ffb83b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ambient blobs */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(126, 87, 194, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 51, 102, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

/* ── App shell ──────────────────────────────────────────────── */
.app-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

.glass-inset {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 12px;
}

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    margin: 12px;
    flex-shrink: 0;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-weight: 800;
    font-size: 1.4rem;
}

.logo-icon {
    font-size: 20px;
}

.version-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 2px 7px;
    letter-spacing: 0.5px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-badge {
    background: var(--red);
    color: white;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    animation: blink 1.4s infinite;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent-primary);
}

/* ── Properties Panel ────────────────────────────────────────── */
.properties-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--panel-border);
}

.prop-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.prop-label {
    width: 60px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.prop-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.prop-input:focus {
    border-color: var(--accent-primary);
}

.source-item.active-source>.source-item-top {
    background: rgba(126, 87, 194, 0.15);
    /* Soft purple highlight */
    border-radius: 4px;
    padding-left: 4px;
    margin-left: -4px;
    box-shadow: inset 2px 0 0 var(--accent-secondary);
}

#stream-timer {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    font-family: monospace;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.indicator.red {
    background: var(--red);
    box-shadow: 0 0 7px var(--red);
}

.indicator.yellow {
    background: var(--yellow);
    box-shadow: 0 0 7px var(--yellow);
}

.indicator.green {
    background: var(--green);
    box-shadow: 0 0 7px var(--green);
}

/* ── Workspace ──────────────────────────────────────────────── */
.workspace {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 0 12px 12px;
    gap: 12px;
    overflow: hidden;
}

/* ── Sidebars ───────────────────────────────────────────────── */
.sidebar {
    width: 272px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.panel-section {
    margin-bottom: 16px;
}

.panel-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

.divider {
    height: 1px;
    background: var(--panel-border);
    margin: 14px 0;
    flex-shrink: 0;
}

.item-list {
    list-style: none;
    margin-bottom: 10px;
}

.item-list li {
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background 0.18s;
    font-size: 13px;
}

.item-list li:hover {
    background: rgba(255, 255, 255, 0.07);
}

.item-list li.active {
    background: linear-gradient(90deg, rgba(126, 87, 194, 0.22), transparent);
    border-left: 3px solid var(--accent-secondary);
}

.badge {
    background: rgba(126, 87, 194, 0.28);
    color: var(--accent-secondary);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

.btn.small {
    padding: 7px 11px;
    font-size: 12px;
}

.btn.huge {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 800;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 14px rgba(255, 51, 102, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 51, 102, 0.5);
    filter: brightness(1.08);
}

.btn.danger {
    background: #c0392b;
    color: white;
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.3);
}

.btn.danger:hover {
    background: #e74c3c;
}

.btn.accent {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn.accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    filter: brightness(1.08);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.09);
}

.source-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ── Input groups ───────────────────────────────────────────── */
.input-group {
    margin-bottom: 9px;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--panel-border);
    padding: 9px 11px;
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.18);
}

/* ── Canvas area ────────────────────────────────────────────── */
.preview-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.canvas-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    background: #000;
    padding: 0;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.canvas-overlays {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.resolution-badge {
    background: rgba(0, 0, 0, 0.65);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.recording-indicator {
    color: #ff5555;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    animation: blink 1.4s infinite;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 9px;
    border-radius: 4px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.2
    }
}

.hidden {
    display: none !important;
}

/* ── A/V Controls Bar ───────────────────────────────────────── */
.av-controls-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.av-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.av-group label {
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.av-divider {
    width: 1px;
    height: 24px;
    background: var(--panel-border);
}

.vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(255, 51, 102, 0.5);
}

.vol-label {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 34px;
}

.av-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.15s;
}

.av-btn:hover {
    background: rgba(255, 255, 255, 0.13);
}

.av-btn.muted {
    color: var(--red);
}

.av-select {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 5px 8px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.av-select:focus {
    border-color: var(--accent-secondary);
}

/* ── Keys Managed Section ───────────────────────────────────── */
.keys-section {
    margin-bottom: 20px;
}

.keys-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--panel-border);
}

.keys-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.keys-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.keys-toggle-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: transparent;
}

/* ── Sidebar Layout & Toggles ───────────────────────────────── */
.sidebar.right {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar.right::-webkit-scrollbar {
    width: 4px;
}

.sidebar.right::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.chat-section {
    flex: 1;
    /* Default expandable */
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.sidebar-resizer {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    cursor: ns-resize;
    transition: background 0.2s;
    margin: 0 10px;
    border-radius: 2px;
}

.sidebar-resizer:hover {
    background: var(--accent-primary);
}

.controls-section {
    flex-shrink: 0;
    padding-top: 15px !important;
}

.log-section {
    flex-shrink: 0;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.log-header:hover {
    opacity: 1;
}

.log-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.log-content.expanded {
    max-height: 300px;
}

/* ── Platform Switches (ON/OFF) ─────────────────────────────── */
.platform-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.sidebar-button-grid .btn {
    padding: 7px 4px;
    font-size: 10px;
}

.platform-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.platform-toggle .toggle-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
}

.platform-toggle .toggle-status {
    font-size: 10px;
    font-weight: 900;
}

.platform-toggle.active {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.2);
}

.platform-toggle.active .toggle-status {
    color: #00ff88;
}

/* ── Platform cards ─────────────────────────────────────────── */
.platform-cards-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.platform-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    transition: border-color 0.2s, background 0.2s;
}

.platform-card.configured {
    border-color: rgba(0, 230, 118, 0.25);
    background: rgba(0, 230, 118, 0.04);
}

.platform-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-dot-lg {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.platform-name {
    font-size: 13px;
    font-weight: 600;
}

.platform-status {
    font-size: 10px;
    margin-top: 2px;
}

.platform-status.ok {
    color: var(--green);
}

.platform-status.empty {
    color: var(--text-muted);
}

.platform-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
    opacity: 0.8;
}

.platform-dot-twitch {
    background: #9146ff;
    box-shadow: 0 0 6px #9146ff80;
}

.platform-dot-youtube {
    background: #ff0000;
    box-shadow: 0 0 6px #ff000080;
}

.platform-dot-facebook {
    background: #1877f2;
    box-shadow: 0 0 6px #1877f280;
}

.platform-dot-tiktok {
    background: #00f2ea;
    box-shadow: 0 0 6px #00f2ea80;
}

.platform-dot-kick {
    background: #53fc18;
    box-shadow: 0 0 6px #53fc1880;
}

.platform-dot-custom {
    background: #7e57c2;
    box-shadow: 0 0 6px #7e57c280;
}

.key-modal-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(126, 87, 194, 0.1);
    border: 1px solid rgba(126, 87, 194, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    line-height: 1.5;
    text-align: left;
}

.key-set-btn {
    background: rgba(126, 87, 194, 0.2);
    border: 1px solid rgba(126, 87, 194, 0.35);
    color: #c5b3f0;
    border-radius: 6px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.key-set-btn:hover {
    background: rgba(126, 87, 194, 0.35);
}

.key-clear-btn {
    background: rgba(255, 59, 59, 0.1);
    border: 1px solid rgba(255, 59, 59, 0.25);
    color: #ff8080;
    border-radius: 6px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.key-clear-btn:hover {
    background: rgba(255, 59, 59, 0.2);
}

/* ── Source list item controls ──────────────────────────────── */
.source-item {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.source-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

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

.source-label strong {
    font-size: 13px;
    font-weight: 600;
}

.source-label small {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.layer-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 4px;
    font-weight: 700;
    transition: color 0.15s, transform 0.15s, text-shadow 0.15s;
    line-height: 1;
}

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

/* ── Source A/V Controls ────────────────────────────────────── */
.source-av-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.source-mute-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.source-mute-btn:hover {
    background: rgba(255, 255, 255, 0.13);
}

.source-mute-btn.muted {
    color: var(--red);
}

.source-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.source-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
}

.vu-bar-container {
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

.vu-bar {
    height: 100%;
    width: 0%;
    transition: width 0.1s linear, background-color 0.1s linear;
}

/* ── Console ────────────────────────────────────────────────── */
.debug-console {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.console-output {
    flex: 1;
    min-height: 70px;
    max-height: 180px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 10.5px;
    line-height: 1.6;
    color: #50fa7b;
    white-space: pre-wrap;
    word-break: break-all;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.console-output::-webkit-scrollbar {
    width: 4px;
}

.console-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ── Destinations Modal Grid ─────────────────────────────────── */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 5px;
}

.destination-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.destination-card.configured {
    border-color: rgba(0, 255, 136, 0.15);
    background: rgba(0, 255, 136, 0.015);
}

.dest-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-dot-lg {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.platform-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
}

.platform-status-tag {
    margin-left: auto;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.configured .platform-status-tag {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.dest-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-group label {
    display: block;
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.secure-input-group {
    display: flex;
    flex-direction: column; /* VERTICAL STACK for compactness */
    gap: 5px;
}

.secure-input-group .av-input {
    font-size: 11px;
    padding: 6px 10px;
}

.secure-input-group .btn {
    padding: 4px;
    font-size: 10px;
    height: 28px;
}

.dest-clear-btn {
    margin-top: 2px;
    background: transparent;
    border: 1px solid rgba(255, 51, 102, 0.15);
    color: var(--danger);
    font-size: 9px;
    font-weight: 800;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
}

.destination-card.configured {
    border-color: rgba(0, 255, 136, 0.2);
    background: rgba(0, 255, 136, 0.02);
}

.dest-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-dot-lg {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.platform-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.platform-status-tag {
    margin-left: auto;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.configured .platform-status-tag {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.dest-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-group label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.secure-input-group {
    display: flex;
    gap: 6px;
}

.dest-clear-btn {
    margin-top: 5px;
    background: transparent;
    border: 1px solid rgba(255, 51, 102, 0.2);
    color: var(--danger);
    font-size: 10px;
    font-weight: 800;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.dest-clear-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--danger);
}
/* -- Modals / Overlays ----------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 9, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-content {
    background: rgba(25, 27, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h1, 
.modal-content h2 {
    margin-bottom: 20px;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
