/*
 * Instrument Insight Studio — Bootstrap 5 Aviation Theme
 * Technology Demonstration - Copyright (c) 2025 Eugene Cartright
 *
 * Complements Bootstrap 5 with an aviation sky-gradient aesthetic,
 * preserving all original component styles.
 */

/* ─── Layout ─────────────────────────────────────────────────────────────── */

/*
 * Sky gradient lives on `html` so it spans the full document height as one paint.
 * Avoid `height: 100%` on html/body — that pins the layout to the viewport and
 * makes the gradient look “broken” or banded when content scrolls past one screen.
 */
html {
    min-height: 100%;
    background: linear-gradient(180deg, #87ceeb 0%, #ffffff 50%, #ffe5b4 100%);
    background-repeat: no-repeat;
}

.iss-body {
    background: transparent;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.iss-main {
    flex: 1 0 auto;
    background: transparent;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────── */

.iss-navbar {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/*
 * Shared chrome type scale (Studio, Search, Admin).
 * Brand 1.25rem / 700 · account .875rem · page title clamp(1.6rem, 2.5vw, 2.1rem).
 */
.iss-navbar .navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.iss-navbar .navbar-brand > [aria-hidden],
.iss-navbar .navbar-brand .fs-4,
.iss-navbar .navbar-brand .fs-5 {
    font-size: 1.25rem !important;
    line-height: 1;
}

.iss-navbar .navbar-brand .fw-bold,
.iss-navbar .navbar-brand .validation-admin-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Live connection chip — sits in the nav bar next to the brand */
.iss-connection-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 6px rgba(0, 0, 0, 0.12);
}

.iss-navbar .iss-nav-status-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Readable on dark nav (overrides light-page status-text colors) */
.iss-navbar .status-text.connected {
    color: rgba(190, 245, 205, 0.98);
}

.iss-navbar .status-text.disconnected {
    color: rgba(255, 186, 193, 0.98);
}

.iss-navbar .status-text.connecting {
    color: rgba(255, 230, 160, 0.98);
}

/* ─── Hero / Auth Card ───────────────────────────────────────────────────── */

.iss-card {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.55s ease-out both;
}

.iss-qr-enrollment-panel {
    background: #ffffff;
    border: 1px solid rgba(26, 58, 92, 0.12);
}

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

/* ─── Hero Floating Icon ─────────────────────────────────────────────────── */

.iss-hero-icon {
    font-size: 4.5rem;
    display: block;
    animation: floatIcon 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

/* ─── Primary / CTA Button ───────────────────────────────────────────────── */

.btn-iss-primary {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 0.6rem;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-iss-primary:hover {
    background: linear-gradient(135deg, #5ba0f2 0%, #458acd 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.45);
    color: #fff;
}

.btn-iss-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.btn-iss-primary:disabled {
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    box-shadow: none;
    color: #888;
}

/* ─── Form Inputs ────────────────────────────────────────────────────────── */

.iss-input {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iss-input:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
    outline: none;
}

.enrollment-key-input {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    font-size: 1.1rem;
}

.enrollment-key-input::placeholder {
    letter-spacing: 1px;
    text-transform: none;
}

.enrollment-key-input.valid  { border-color: #33cc77; background: #f0fff4; }
.enrollment-key-input.invalid { border-color: #cc3333; background: #fff5f5; animation: shake 0.3s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

.validation-message        { font-size: 0.85rem; text-align: center; font-weight: 600; }
.validation-message.valid  { color: #33cc77; }
.validation-message.invalid{ color: #cc3333; }

.key-format-hint { font-size: 0.82rem; color: #888; text-align: center; }

.form-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ─── Status Badges ──────────────────────────────────────────────────────── */

.status-badge {
    display: inline-block;
    padding: 0.25em 0.65em;
    border-radius: 0.4em;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge.available  { background: #d4edda; color: #155724; }
.status-badge.expired    { background: #fff3cd; color: #856404; }
.status-badge.missing    { background: #f8d7da; color: #721c24; }
.status-badge.error      { background: #f8d7da; color: #721c24; }
.status-badge.warning    { background: #fff3cd; color: #856404; }

/* ─── Connection Status Indicator ───────────────────────────────────────── */

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-indicator.connected    { background: #28a745; box-shadow: 0 0 6px rgba(40,167,69,0.6); }
.status-indicator.disconnected { background: #dc3545; box-shadow: 0 0 6px rgba(220,53,69,0.6); }
.status-indicator.connecting   { background: #ffc107; box-shadow: 0 0 6px rgba(255,193,7,0.6);
                                  animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.status-text.connected    { color: #28a745; font-weight: 600; font-size: 0.88rem; }
.status-text.disconnected { color: #dc3545; font-weight: 600; font-size: 0.88rem; }
.status-text.connecting   { color: #856404; font-weight: 600; font-size: 0.88rem; }

/* ─── Dashboard Status Cards ─────────────────────────────────────────────── */

.iss-status-card {
    background: #fff;
    border-radius: 0.9rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.iss-status-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }

.iss-status-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(74,144,226,0.07) 0%, rgba(53,122,189,0.05) 100%);
    border-bottom: 1px solid #e9ecef;
    user-select: none;
}

.iss-status-card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.iss-status-card-body {
    padding: 1.1rem 1.25rem;
}

.iss-status-card.collapsed .iss-status-card-body { display: none; }
.iss-status-card.collapsed .collapse-toggle-icon  { transform: rotate(-90deg); }

.collapse-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    color: #6c757d;
    transition: background 0.15s ease, transform 0.2s ease;
}

.collapse-toggle:hover { background: rgba(0, 0, 0, 0.07); }

.collapse-toggle-icon {
    display: inline-block;
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

/* ─── Status Details Grid ────────────────────────────────────────────────── */

.status-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem 1rem;
    margin-bottom: 0.9rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: #f8f9fa;
    border-radius: 0.4rem;
    font-size: 0.88rem;
}

.status-label { color: #6c757d; font-weight: 500; }
.status-value { font-weight: 600; color: #2c3e50; }

/* ─── Status Messages ────────────────────────────────────────────────────── */

.status-message {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.status-message.info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-message.warning { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.status-message.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ─── Progress Bar (CIFP) ────────────────────────────────────────────────── */

.progress-container {
    display: none;
    margin-top: 1rem;
}

.progress-container.active {
    display: block;
}

.progress-bar-container {
    background: #e9ecef;
    border-radius: 0.5rem;
    height: 24px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #4A90E2 0%, #357ABD 100%);
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 2.5rem;
    width: 0%;
}

.progress-text {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

/* ─── Process CIFP Button ────────────────────────────────────────────────── */

.process-button {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #fff;
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
    margin-bottom: 0.5rem;
}

.process-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(40, 167, 69, 0.4);
}

.process-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── CIFP MongoDB summary (start card) ─────────────────────────────────── */

.iss-cifp-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.iss-cifp-summary__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.iss-cifp-summary__title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.iss-cifp-summary__title > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.iss-cifp-summary__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.55rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(53, 122, 189, 0.12) 100%);
    color: #357abd;
    font-size: 1rem;
    flex-shrink: 0;
}

.iss-cifp-summary__icon--warn {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.14) 0%, rgba(220, 53, 69, 0.06) 100%);
    color: #c82333;
}

.iss-cifp-summary__label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.iss-cifp-summary__db {
    font-size: 0.88rem;
    color: #495057;
}

.iss-cifp-summary__db code {
    font-size: 0.85em;
    color: #357abd;
    background: rgba(74, 144, 226, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}

.iss-cifp-summary__hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: #868e96;
    background: #f1f3f5;
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
    flex-shrink: 0;
    align-self: center;
}

.iss-cifp-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 400px) {
    .iss-cifp-stat-grid {
        grid-template-columns: 1fr;
    }
}

.iss-cifp-stat {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    border: 1px solid #e9ecef;
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.iss-cifp-stat--accent {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(53, 122, 189, 0.06) 100%);
    border-color: rgba(74, 144, 226, 0.22);
}

.iss-cifp-stat__value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.iss-cifp-stat--accent .iss-cifp-stat__value {
    color: #2a5a9e;
}

.iss-cifp-stat__key {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

.iss-cifp-lines-banner {
    display: flex;
    align-items: center;
    font-size: 0.84rem;
    color: #495057;
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.09) 0%, rgba(74, 144, 226, 0.02) 100%);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: 0.55rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.75rem;
}

.iss-cifp-lines-banner__num {
    font-weight: 800;
    color: #357abd;
    font-variant-numeric: tabular-nums;
}

.iss-cifp-collections {
    border: 1px solid #e9ecef;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #fff;
    margin-bottom: 0.55rem;
}

.iss-cifp-collections__caption {
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
    border-bottom: 1px solid #e9ecef;
}

.iss-cifp-collections__scroll {
    max-height: 13.5rem;
    overflow-y: auto;
    padding: 0.45rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 144, 226, 0.45) #f1f3f5;
}

.iss-cifp-collections__scroll::-webkit-scrollbar {
    width: 7px;
}

.iss-cifp-collections__scroll::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.iss-cifp-collections__scroll::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.45);
    border-radius: 4px;
}

.iss-cifp-collection-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.48rem 0.6rem;
    margin-bottom: 0.3rem;
    border-radius: 0.45rem;
    border: 1px solid #eef1f4;
    background: #fafbfc;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.iss-cifp-collection-row:last-child {
    margin-bottom: 0;
}

.iss-cifp-collection-row::before {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--bar-pct, 0%);
    max-width: 100%;
    background: linear-gradient(
        90deg,
        rgba(74, 144, 226, 0.22) 0%,
        rgba(74, 144, 226, 0.07) 85%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}

.iss-cifp-collection-row:hover {
    border-color: rgba(74, 144, 226, 0.28);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
}

.iss-cifp-collection-row__name,
.iss-cifp-collection-row__count {
    position: relative;
    z-index: 1;
}

.iss-cifp-collection-row__name {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: #343a40;
    word-break: break-word;
    min-width: 0;
}

.iss-cifp-collection-row__count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #495057;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.iss-cifp-collections__empty {
    padding: 0.5rem 0.35rem;
}

.iss-cifp-summary__footnote {
    font-size: 0.72rem;
    line-height: 1.35;
    opacity: 0.92;
}

.iss-cifp-summary--error {
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #f5c6cb;
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
    margin-top: 1rem;
}

.iss-cifp-summary--error .iss-cifp-summary__head {
    margin-bottom: 0.55rem;
}

.iss-cifp-summary__errtext {
    color: #842029;
    line-height: 1.45;
    word-break: break-word;
}

/* ─── ATC Chat ───────────────────────────────────────────────────────────── */

.atc-chat-history {
    background: #f8f9fa;
    border-radius: 0.6rem;
    border: 1px solid #dee2e6;
    margin-bottom: 1rem;
    overflow: hidden;
}

.atc-chat-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.9rem;
    background: rgba(74,144,226,0.08);
    border-bottom: 1px solid #dee2e6;
    font-size: 0.85rem;
}

.atc-history-label { font-weight: 600; color: #495057; }

.atc-history-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.atc-clear-chat-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.42;
    transition: opacity 0.2s ease;
}

.atc-clear-chat-button:hover { opacity: 0.78; }

.atc-refresh-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 4px;
    transition: transform 0.3s ease;
}

.atc-refresh-button:hover { transform: rotate(180deg); }

.atc-simulate-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4A90E2;
    font-size: 0.95rem;
    padding: 0 4px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.atc-simulate-link:hover {
    color: #357abd;
    transform: translateY(-1px);
}

.atc-simulate-link.hidden {
    display: none;
}

.atc-simulate-locate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #4A90E2;
    font-size: 0.95rem;
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.atc-simulate-locate:hover {
    color: #357abd;
    transform: translateY(-1px);
}

.atc-simulate-locate:disabled {
    opacity: 0.5;
    cursor: wait;
}

.atc-simulate-locate.hidden {
    display: none;
}

.iss-sim-locate-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.iss-sim-locate-overlay.hidden {
    display: none;
}

.iss-sim-locate-modal {
    width: min(100%, 36rem);
    max-height: min(85vh, 38rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0.65rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.iss-sim-locate-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.iss-sim-locate-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
}

.iss-sim-locate-close {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0 0.25rem;
}

.iss-sim-locate-close:hover {
    color: #2c3e50;
}

.iss-sim-locate-body {
    padding: 0.85rem 1rem 1rem;
    overflow-y: auto;
}

.iss-sim-locate-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.iss-sim-locate-table-wrap {
    max-height: 16rem;
}

.iss-sim-locate-table {
    font-size: 0.82rem;
}

.iss-sim-locate-table .iss-sim-locate-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.iss-sim-locate-table .iss-sim-locate-channel code {
    font-size: 0.72rem;
    color: #495057;
}

.iss-sim-locate-commands {
    padding-left: 1.1rem;
    color: #495057;
}

.iss-sim-locate-section-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.iss-sim-locate-insights {
    margin-bottom: 0.85rem;
}

.iss-sim-locate-insight {
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(74, 144, 226, 0.18);
    border-radius: 0.45rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.iss-sim-locate-insight-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
}

.iss-sim-locate-insight-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2c3e50;
}

.iss-sim-locate-insight-summary {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1f4b7a;
}

.iss-sim-locate-insight-details dt {
    font-weight: 500;
}

.iss-sim-locate-insight-details dd {
    font-weight: 600;
    color: #2c3e50;
}

.atc-messages-container {
    max-height: 280px;
    overflow-y: auto;
    padding: 0.75rem;
}

.atc-message-placeholder {
    text-align: center;
    color: #adb5bd;
    font-size: 0.88rem;
    padding: 1rem 0;
}

.atc-message {
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    max-width: 85%;
    font-size: 0.88rem;
}

.atc-message.outgoing {
    background: #4A90E2;
    color: #fff;
    margin-left: auto;
}

.atc-message.incoming {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
    margin-right: auto;
}

.atc-message-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    opacity: 0.85;
}

.atc-message-timestamp { color: inherit; opacity: 0.75; }

.atc-message-text { white-space: pre-wrap; word-break: break-word; }

.atc-message-tts-text {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.86rem;
    line-height: 1.45;
}

.atc-message-tts-label {
    display: block;
    margin-bottom: 0.2rem;
    color: #74d8ee;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.atc-message-audio {
    width: min(100%, 360px);
    height: 34px;
    margin-top: 0.55rem;
}

.atc-message-play-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    padding: 0.28rem 0.62rem;
    border: 1px solid rgba(89, 203, 231, 0.38);
    border-radius: 999px;
    background: rgba(89, 203, 231, 0.10);
    color: var(--iss-accent, #59cbe7);
    font-size: 0.76rem;
    line-height: 1;
}

.atc-message-play-button:hover,
.atc-message-play-button:focus-visible {
    background: rgba(89, 203, 231, 0.18);
    border-color: rgba(89, 203, 231, 0.58);
}

.atc-communication-form { padding: 0 0.9rem 0.9rem; }

.atc-label { font-size: 0.88rem; font-weight: 600; color: #495057; margin-bottom: 0.35rem; display: block; }

.atc-textarea {
    width: 100%;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.atc-textarea:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.12);
}

.atc-send-button {
    width: 100%;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: #fff;
    border: none;
    padding: 0.65rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(74,144,226,0.3);
    margin-top: 0.6rem;
}

.atc-send-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(74,144,226,0.4);
}

.atc-send-button:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.atc-loading-indicator,
.atc-activity-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    padding: 0.4rem 0.9rem;
}

.atc-loading-indicator.hidden,
.atc-activity-indicator.hidden { display: none; }

.atc-loading-spinner,
.atc-activity-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top-color: #4A90E2;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ATC panel — de-emphasized wrapper; chat + compose are primary */
.iss-atc-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 0.75rem;
}

.iss-atc-panel:hover {
    box-shadow: none;
}

.iss-atc-workspace {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Prominent Chat History */
.atc-chat-history--primary {
    background: #fff;
    border: 2px solid rgba(74, 144, 226, 0.22);
    border-radius: 0.85rem;
    box-shadow: 0 6px 24px rgba(74, 144, 226, 0.1);
    margin-bottom: 0;
}

.atc-chat-history-header--primary {
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.12) 0%, rgba(53, 122, 189, 0.06) 100%);
    border-bottom: 1px solid rgba(74, 144, 226, 0.18);
}

.atc-history-label--primary {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.atc-history-label--primary i {
    color: #4A90E2;
}

.atc-messages-container--primary {
    max-height: min(48vh, 420px);
    min-height: 220px;
    padding: 1rem 1.1rem;
}

/* Prominent message composer */
.atc-composer {
    background: #fff;
    border: 2px solid rgba(74, 144, 226, 0.22);
    border-radius: 0.85rem;
    padding: 1.1rem 1.15rem 1.15rem;
    box-shadow: 0 6px 24px rgba(74, 144, 226, 0.1);
    margin-top: 0;
    gap: 0.85rem;
}

.atc-input-group--primary {
    gap: 0.55rem;
}

.atc-label--primary {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.atc-label--primary i {
    color: #4A90E2;
}

.atc-textarea--primary {
    min-height: 5rem;
    font-size: 1.02rem;
    line-height: 1.45;
    border: 2px solid #ced4da;
    border-radius: 0.65rem;
    padding: 0.75rem 0.95rem;
}

.atc-textarea--primary:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.14);
}

.atc-send-button--primary {
    width: 100%;
    font-size: 1.12rem;
    font-weight: 700;
    padding: 0.9rem 1.25rem;
    border-radius: 0.65rem;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
}

.atc-send-button--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(74, 144, 226, 0.45);
}

/* ─── Standby Overlay ────────────────────────────────────────────────────── */

.standby-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 50, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.standby-overlay.hidden { display: none; }

.standby-content {
    text-align: center;
    color: #fff;
    padding: 2.5rem 2rem;
    max-width: 380px;
}

.standby-icon-container {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.85;
    animation: pulse 2s ease-in-out infinite;
}

.standby-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.standby-message {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 1.2rem;
}

.standby-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.standby-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4A90E2;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.standby-status { font-size: 0.85rem; opacity: 0.6; }

/* ─── Welcome / Info Box ─────────────────────────────────────────────────── */

.iss-info-box {
    background: rgba(74, 144, 226, 0.08);
    border-left: 4px solid #4A90E2;
    border-radius: 0.5rem;
    padding: 1rem 1.2rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.iss-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

/* ─── QR Code ────────────────────────────────────────────────────────────── */

.qr-wrap {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 1.5rem;
    text-align: center;
}

.qr-wrap img { max-width: 240px; height: auto; display: block; margin: 0 auto; }
.qr-wrap .hint { margin-top: 0.75rem; font-size: 0.88rem; color: #6c757d; }

/* ─── Simulator installations (admin + mobile browser) ───────────────────── */

.iss-installations-page {
    max-width: 100%;
    overflow-x: hidden;
}

.iss-installations-page .iss-installation-id {
    word-break: break-all;
    white-space: normal;
    font-size: 0.82rem;
}

.iss-installations-table-wrap {
    border-radius: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.iss-installations-table-wrap table { min-width: 70rem; }
.iss-installations-page .card,
.iss-installations-page .iss-card {
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.iss-installation-cards {
    margin-bottom: 0.5rem;
}

.iss-installation-card {
    padding: 1rem 1.1rem;
}

.iss-installation-card .btn {
    min-height: 2.5rem;
}

@media (max-width: 767.98px) {
    .iss-installations-page h1 {
        font-size: 1.35rem;
    }

    .iss-installations-page .btn-outline-secondary {
        width: 100%;
    }
}

/* ─── Responsive helpers ─────────────────────────────────────────────────── */

@media (max-width: 576px) {
    .iss-hero-icon { font-size: 3.5rem; }
    .iss-status-card-header h2 { font-size: 0.95rem; }
    .atc-messages-container { max-height: 200px; }
    .status-details { grid-template-columns: 1fr; }

    /* ATC chat — reclaim horizontal space on phones */
    #atc-communication-card .iss-status-card-body {
        padding: 0;
    }

    .atc-history-label--primary {
        font-size: 1.05rem;
    }

    .atc-label--primary {
        font-size: 1rem;
    }

    .atc-messages-container--primary {
        max-height: min(42vh, 280px);
        min-height: 160px;
    }

    .atc-composer {
        padding: 0.85rem 0.75rem 0.9rem;
    }

    .atc-send-button--primary {
        font-size: 1.05rem;
        padding: 0.8rem 1rem;
    }

    .atc-chat-history {
        margin-bottom: 0.65rem;
        border-radius: 0.45rem;
    }

    .atc-chat-history-header {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }

    .atc-messages-container {
        padding: 0.4rem 0.45rem;
    }

    .atc-message-placeholder {
        padding: 0.65rem 0.35rem;
        font-size: 0.82rem;
    }

    .atc-message {
        padding: 0.45rem 0.55rem;
        margin-bottom: 0.45rem;
        font-size: 0.84rem;
    }

    .atc-communication-form {
        padding: 0 0.45rem 0.65rem;
    }

    .atc-loading-indicator,
    .atc-activity-indicator {
        padding: 0.3rem 0.45rem;
        font-size: 0.8rem;
    }
}

/* ─── Flight Simulate page ───────────────────────────────────────────────── */

.iss-simulate-panel {
    border: 1px solid rgba(74, 144, 226, 0.15);
}

.iss-simulate-airport-summary {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    line-height: 1.45;
}

.simulate-icao-input::placeholder {
    font-size: 0.75rem;
    color: #adb5bd;
    opacity: 1;
    text-transform: none;
}

.simulate-icao-input::-webkit-input-placeholder {
    font-size: 0.75rem;
    color: #adb5bd;
    text-transform: none;
}

.simulate-icao-input::-moz-placeholder {
    font-size: 0.75rem;
    color: #adb5bd;
    opacity: 1;
    text-transform: none;
}

.iss-sim-control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: left;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.45rem 0.55rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.iss-sim-control:hover {
    border-color: rgba(74, 144, 226, 0.45);
}

.iss-sim-control--active {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.iss-sim-control-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.iss-sim-control-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: #2c3e50;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.iss-sim-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.iss-sim-control--stepped {
    padding: 0.35rem 0.45rem;
    gap: 0.1rem;
    cursor: pointer;
}

.iss-sim-control--stepped .iss-sim-com1-part-wrap {
    width: 100%;
}

.iss-sim-stepper-value {
    display: block;
    width: 100%;
    font-size: 0.98rem;
    font-weight: 700;
    color: #2c3e50;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-align: center;
    padding: 0.12rem 0.2rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.iss-sim-control--stepped.iss-sim-control--active .iss-sim-stepper-value {
    border-color: #4A90E2;
    background: rgba(74, 144, 226, 0.08);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.12);
}

.iss-sim-control--com1 {
    cursor: default;
    padding: 0.35rem 0.45rem;
    gap: 0.1rem;
}

.iss-sim-com1-tuner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.05rem;
}

.iss-sim-com1-part-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.iss-sim-com1-arrow {
    border: none;
    background: transparent;
    color: #c5cdd5;
    font-size: 0.5rem;
    line-height: 1;
    padding: 0.02rem 0.3rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.iss-sim-com1-arrow:hover,
.iss-sim-com1-arrow:focus-visible {
    color: #4A90E2;
    outline: none;
}

.iss-sim-com1-arrow:active {
    color: #357abd;
}

.iss-sim-com1-part {
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding: 0.02rem 0.12rem;
    cursor: pointer;
    color: #2c3e50;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.iss-sim-com1-part--major {
    min-width: 2.1rem;
    text-align: center;
}

.iss-sim-com1-part--minor {
    min-width: 2.55rem;
    text-align: center;
}

.iss-sim-com1-part--active {
    border-color: #4A90E2;
    background: rgba(74, 144, 226, 0.08);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.12);
}

.iss-sim-com1-dot {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    padding: 0 0.02rem 0.05rem;
    line-height: 1;
}

.iss-sim-control--transponder {
    cursor: default;
    padding: 0.35rem 0.45rem;
    gap: 0.1rem;
}

.iss-sim-xpdr-code {
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
    line-height: 1;
    padding: 0.02rem 0.25rem;
    width: 4.2rem;
    text-align: center;
    color: #2c3e50;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.iss-sim-xpdr-code:read-only {
    cursor: pointer;
}

.iss-sim-xpdr-code--active {
    border-color: #4A90E2;
    background: rgba(74, 144, 226, 0.08);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.12);
    outline: none;
}

.iss-sim-xpdr-code--pulse {
    animation: iss-xpdr-pulse 0.35s ease-out;
}

.iss-sim-xpdr-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
}

.iss-sim-xpdr-ident-btn {
    border: 1px solid rgba(44, 62, 80, 0.18);
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.65);
    color: rgba(44, 62, 80, 0.72);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    padding: 0.28rem 0.42rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.iss-sim-xpdr-ident-btn:hover:not(:disabled) {
    background: rgba(74, 144, 226, 0.08);
    border-color: rgba(74, 144, 226, 0.35);
    color: #2c3e50;
}

.iss-sim-xpdr-ident-btn--active,
.iss-sim-xpdr-ident-btn[aria-pressed="true"] {
    background: rgba(74, 144, 226, 0.16);
    border-color: rgba(74, 144, 226, 0.55);
    color: #1f4f8a;
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.12);
}

.iss-sim-xpdr-ident-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@keyframes iss-xpdr-pulse {
    0% {
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.35);
        background: rgba(74, 144, 226, 0.18);
    }
    100% {
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.12);
        background: rgba(74, 144, 226, 0.08);
    }
}

@media (hover: none) and (pointer: coarse) {
    .iss-sim-com1-arrow {
        padding: 0.12rem 0.4rem;
        font-size: 0.55rem;
    }
}

.iss-simulate-status-grid dd {
    font-variant-numeric: tabular-nums;
}

/* User messaging overlays — tokens in :root; dark overrides in studio-color-theme.css */
:root {
    --iss-msg-inline-bg: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    --iss-msg-inline-text: #edf6ff;
    --iss-msg-inline-text-muted: rgba(237, 246, 255, 0.82);
    --iss-msg-inline-border: rgba(255, 255, 255, 0.18);
    --iss-msg-surface: #ffffff;
    --iss-msg-surface-muted: #f8f9fa;
    --iss-msg-text: #2c3e50;
    --iss-msg-text-secondary: #6c757d;
    --iss-msg-border: rgba(45, 106, 159, 0.22);
    --iss-msg-overlay: rgba(15, 23, 42, 0.45);
    --iss-msg-accent: #2d6a9f;
    --iss-msg-accent-text: #ffffff;
    --iss-msg-handle: rgba(45, 106, 159, 0.35);
    --iss-msg-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    --iss-msg-slide-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
    --iss-panel-bg: #ffffff;
}

#iss-message-root {
    position: relative;
    z-index: 1400;
}

.iss-message-inline {
    position: sticky;
    top: 0;
    z-index: 1400;
    margin: 0;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--iss-msg-inline-border);
    background: var(--iss-msg-inline-bg);
    color: var(--iss-msg-inline-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.iss-message-inline .iss-message-title {
    color: var(--iss-msg-inline-text);
}

.iss-message-inline .iss-message-text {
    color: var(--iss-msg-inline-text-muted);
}

.iss-message-inline .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.78;
}

.iss-message-inline-body {
    padding: 0.75rem 2.25rem 0.75rem 0.85rem;
}

.iss-message-seq {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.85rem;
}

.iss-message-seq-btn {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0 0.25rem;
    line-height: 1;
    opacity: 0.9;
}

.iss-message-seq-btn:disabled {
    opacity: 0.35;
}

.iss-message-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--iss-msg-overlay);
}

.iss-message-dialog {
    width: min(480px, 100%);
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 14px;
    background: var(--iss-msg-surface);
    color: var(--iss-msg-text);
    border: 1px solid var(--iss-msg-border);
    box-shadow: var(--iss-msg-shadow);
}

.iss-message-dialog .iss-message-title {
    color: var(--iss-msg-text);
}

.iss-message-dialog .iss-message-text {
    color: var(--iss-msg-text-secondary);
}

.iss-message-dialog .iss-message-seq-btn {
    color: var(--iss-msg-text);
}

.iss-message-dismiss {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #357abd 0%, var(--iss-msg-accent) 100%);
    color: var(--iss-msg-accent-text);
    font-weight: 600;
}

.iss-message-dismiss:hover {
    filter: brightness(1.05);
}

.iss-message-slideup {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 1450;
    width: min(520px, calc(100% - 2rem));
    transform: translate(-50%, 110%);
    transition: transform 0.35s ease;
    padding: 0.85rem 1rem 1.1rem;
    border-radius: 14px 14px 0 0;
    background: var(--iss-msg-surface);
    color: var(--iss-msg-text);
    border: 1px solid var(--iss-msg-border);
    box-shadow: var(--iss-msg-slide-shadow);
}

.iss-message-slideup .iss-message-title {
    color: var(--iss-msg-text);
}

.iss-message-slideup .iss-message-text {
    color: var(--iss-msg-text-secondary);
}

.iss-message-slideup-visible {
    transform: translate(-50%, 0);
}

.iss-message-slideup-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 0.65rem;
    border-radius: 99px;
    background: var(--iss-msg-handle);
}

.iss-message-slideup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.iss-message-slideup-header .iss-message-title {
    flex: 1;
    margin: 0;
}

.iss-messages-inbox-item {
    background: var(--iss-msg-surface);
    border-color: var(--iss-msg-border);
    color: var(--iss-msg-text);
}

/* Administration chrome stays usable when text is enlarged or windows narrow. */
.iss-admin-navbar .navbar-brand { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.iss-admin-navbar .navbar-brand > span { min-width: 0; }
.iss-admin-navbar .btn { white-space: normal; }
.iss-installations-page .qr-wrap img { max-width: min(240px, 100%); }
.iss-installations-page .qr-wrap {
    background: var(--iss-msg-surface);
    color: var(--iss-msg-text);
    border: 1px solid var(--iss-msg-border);
}
.iss-installations-page .qr-wrap .hint { color: var(--iss-msg-text-secondary); }
