/*
   I-Grid Portal — fixed viewer-first stylesheet
   Default mode is for Tasia Viewer / OpenSim embedded browser.
   Fancy desktop extras are opt-in with ?full=1.
*/

/* ---------- design tokens (used by admin panels and content) ---------- */
:root {
    --dark: #070714;
    --text: #e8e8ff;
    --text-dim: #aab3d2;
    --text-muted: #7777aa;
    --cyan: #00e5ff;
    --cyan-dim: rgba(0, 229, 255, 0.15);
    --purple: #b388ff;
    --purple-dim: rgba(179, 136, 255, 0.15);
    --pink: #ff6ec7;
    --green: #2bfca0;
    --green-dim: rgba(43, 252, 160, 0.06);
    --red: #ff5d8f;
    --red-dim: rgba(255, 93, 143, 0.06);
    --card-bg: rgba(9, 19, 35, 0.78);
    --card-edge: rgba(0, 229, 255, 0.18);
    --radius: 15px;
    --radius-sm: 11px;
    --glow-cyan: 0 0 18px rgba(0, 229, 255, 0.18);
    --font-body: 'Nunito', Arial, Verdana, sans-serif;
    --font-sci: 'Trebuchet MS', 'Nunito', Arial, sans-serif;
    --font-hand: 'Caveat', 'Patrick Hand', 'Comic Sans MS', cursive;
}

/* ---------- old-browser-safe base ---------- */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100%;
    padding-bottom: 155px; /* viewer login panel safe area */
    background: #070b15;
    color: #edf7ff;
    font-family: Arial, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

body.full-mode {
    padding-bottom: 28px;
    font-family: 'Nunito', Arial, Verdana, sans-serif;
}

img,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

iframe {
    width: 100%;
    border: 0;
}

a {
    color: #55f3ff;
}

/* ---------- background: pretty but cannot block content ---------- */
.bg-layer {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 229, 255, .13) 0 2px, transparent 3px),
        radial-gradient(circle at 42% 28%, rgba(255, 110, 199, .16) 0 1px, transparent 2px),
        radial-gradient(circle at 75% 12%, rgba(0, 229, 255, .10) 0 2px, transparent 3px),
        linear-gradient(135deg, #07111d 0%, #09071c 48%, #060912 100%);
    background-size: 190px 190px, 260px 260px, 310px 310px, auto;
}

#grid-canvas,
#particles,
#stars-canvas {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.viewer-mode #grid-canvas,
.viewer-mode #particles,
.viewer-mode #stars-canvas {
    display: none !important;
}

/* ---------- main wrapper ---------- */
.app-wrap {
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 1120px;
    margin: 8px auto 0 auto;
    padding: 0 8px;
}

.viewer-mode .app-wrap {
    max-width: none;
    margin: 6px 8px 0 8px;
    padding: 0;
}

/* ---------- header ---------- */
.site-header {
    width: 100%;
    min-height: 60px;
    padding: 8px 10px;
    margin: 0 0 8px 0;
    border: 1px solid rgba(0, 229, 255, .25);
    border-radius: 16px;
    background: rgba(6, 12, 25, .88);
    box-shadow: 0 0 22px rgba(0, 229, 255, .10), inset 0 0 18px rgba(179, 136, 255, .04);
}

.full-mode .site-header {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 10px;
    text-decoration: none;
    margin-right: 18px;
    white-space: nowrap;
}

.logo-badge {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(0, 229, 255, .35);
    box-shadow: 0 0 14px rgba(0, 229, 255, .28);
    overflow: hidden;
}

.logo-img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
}

.brand-text {
    color: #18f6ff;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 1.5px;
    text-shadow: 0 0 12px rgba(0, 229, 255, .38);
}

.main-nav {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.nav-item {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .10);
    color: #c9fbff;
    text-decoration: none;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    color: #ffffff;
    background: rgba(0, 229, 255, .18);
    border-color: rgba(0, 229, 255, .45);
    box-shadow: 0 0 12px rgba(0, 229, 255, .18);
}

.nav-admin {
    color: #d7b7ff;
    border-color: rgba(179, 136, 255, .25);
}

/* ---------- hero ---------- */
.hero-card {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 150px;
    margin: 0 0 8px 0;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(0, 229, 255, .22);
    background: linear-gradient(135deg, rgba(7, 19, 38, .88), rgba(15, 9, 38, .82));
    box-shadow: inset 0 0 26px rgba(0, 229, 255, .045), 0 0 24px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .55), rgba(255, 110, 199, .35), transparent);
    pointer-events: none;
}

.hero-text {
    flex: 1 1 auto;
    min-width: 260px;
}

.hero-text h1 {
    margin: 0 0 6px 0;
    color: #ffffff;
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: .4px;
    text-shadow: 0 0 12px rgba(179, 136, 255, .28);
}

.full-mode .hero-text h1 {
    font-family: 'Patrick Hand', 'Comic Sans MS', cursive;
    font-size: 40px;
}

.hero-sub {
    margin: 0 0 6px 0;
    color: #29f1ff;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.hero-info {
    margin: 0 0 12px 0;
    color: #b8bfd8;
    font-size: 14px;
}

.hero-info strong {
    color: #d3adff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-art {
    flex: 0 0 auto;
    width: 170px;
    text-align: center;
}

.aelita-img {
    display: block;
    width: auto;
    max-width: 170px;
    max-height: 165px;
    object-fit: contain !important;
    opacity: .96;
    border: 0;
    border-radius: 0;
    background: transparent;
    filter: drop-shadow(0 0 16px rgba(0, 229, 255, .16));
}

/* ---------- status strip ---------- */
.status-strip {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px 0;
    padding: 0;
}

.hud-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(7, 15, 30, .84);
    border: 1px solid rgba(255, 255, 255, .11);
    color: #dffaff;
    font-size: 13px;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

.hud-chip .dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    background: #8b93aa;
    box-shadow: 0 0 8px rgba(139, 147, 170, .6);
}

.chip-status.online { color: #9dffd5; border-color: rgba(43, 252, 160, .30); }
.chip-status.online .dot { background: #2bfca0; box-shadow: 0 0 10px rgba(43, 252, 160, .85); }
.chip-status.warning { color: #ffe49d; border-color: rgba(255, 209, 102, .32); }
.chip-status.warning .dot { background: #ffd166; box-shadow: 0 0 10px rgba(255, 209, 102, .85); }
.chip-status.offline { color: #ffb3ce; border-color: rgba(255, 93, 143, .34); }
.chip-status.offline .dot { background: #ff5d8f; box-shadow: 0 0 10px rgba(255, 93, 143, .85); }
.chip-status.unknown { color: #c8ccdd; }
.chip-guard { color: #dcbfff; border-color: rgba(179, 136, 255, .25); }
.chip-credit { color: #d3d8e8; opacity: .88; }

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 11px;
    text-decoration: none;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    color: #eafaff;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 229, 255, .22), rgba(179, 136, 255, .24));
    border-color: rgba(0, 229, 255, .38);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, .055);
    color: #d9e7ff;
}

.btn-ghost {
    background: transparent;
    color: #b9b1e8;
}

.btn:hover {
    box-shadow: 0 0 16px rgba(0, 229, 255, .18);
}

/* ---------- content ---------- */
.content-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 229, 255, .18);
    background: rgba(6, 12, 25, .76);
    box-shadow: inset 0 0 30px rgba(179, 136, 255, .04);
}

.full-mode .content-panel {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-header,
.page-head {
    margin: 0 0 14px 0;
    text-align: left;
}

.full-mode .page-header,
.full-mode .page-head {
    text-align: center;
}

.page-title {
    margin: 0 0 5px 0;
    color: #ffffff;
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
    font-size: 27px;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(0, 229, 255, .12);
}

.full-mode .page-title {
    font-family: 'Patrick Hand', 'Comic Sans MS', cursive;
    font-size: 36px;
}

.page-subtitle,
.page-sub {
    margin: 0;
    color: #aab3d2;
    font-size: 14px;
}

.section-title,
.section-heading {
    margin: 16px 0 8px 0;
    color: #55f3ff;
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
    font-size: 22px;
}

/* ---------- cards/common ---------- */
.status-overview,
.help-grid,
.about-grid,
.ovh-feed {
    display: block;
}

/* News gets a card grid by default on wide viewer screens. */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.news-card,
.status-card,
.help-card,
.profile-card,
.about-story,
.fallback-card,
.help-content,
.ovh-card,
.error-card {
    position: relative;
    margin: 0 0 10px 0;
    padding: 13px 15px;
    border-radius: 15px;
    border: 1px solid rgba(0, 229, 255, .18);
    background: rgba(9, 19, 35, .78);
    box-shadow: inset 0 0 18px rgba(0, 229, 255, .025);
}

.news-card.pinned {
    border-color: rgba(255, 209, 102, .38);
    box-shadow: inset 0 0 22px rgba(255, 209, 102, .035);
}

.pinned-badge {
    display: inline-block;
    margin: 0 0 7px 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 209, 102, .12);
    border: 1px solid rgba(255, 209, 102, .25);
    color: #ffd166;
    font-size: 12px;
    font-weight: 800;
}

.news-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 8px 0;
}

.news-category {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #bda7ff;
    background: rgba(179, 136, 255, .12);
    border: 1px solid rgba(179, 136, 255, .22);
}

.tag-update { color: #67f6ff; background: rgba(0, 229, 255, .12); border-color: rgba(0, 229, 255, .25); }
.tag-maintenance { color: #ffe49d; background: rgba(255, 209, 102, .12); border-color: rgba(255, 209, 102, .25); }
.tag-event { color: #ffb3df; background: rgba(255, 110, 199, .12); border-color: rgba(255, 110, 199, .25); }
.tag-release { color: #a6ffd9; background: rgba(43, 252, 160, .12); border-color: rgba(43, 252, 160, .25); }

.news-date {
    color: #9aa5c4;
    font-size: 13px;
}

.news-title,
.status-title,
.help-card h3,
.profile-name,
.ovh-group-title {
    margin: 0 0 8px 0;
    color: #f2f8ff;
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
    line-height: 1.2;
}

.news-title { font-size: 22px; }
.status-title,
.help-card h3,
.profile-name,
.ovh-group-title { font-size: 20px; }

.news-excerpt,
.help-card p,
.profile-bio,
.about-story p,
.fallback-card p,
.help-content,
.ovh-desc {
    color: #c3cce3;
    font-size: 14px;
    line-height: 1.55;
}

.empty-state {
    text-align: center;
    color: #aab3d2;
    padding: 24px 12px;
}

.empty-icon {
    font-size: 34px;
    opacity: .75;
}


/* ---------- polished news block ---------- */
.content-panel.page-news {
    padding: 22px 22px 28px 22px;
    background:
        radial-gradient(circle at 18% 18%, rgba(179, 136, 255, .08), transparent 28%),
        radial-gradient(circle at 82% 20%, rgba(0, 229, 255, .055), transparent 32%),
        rgba(8, 10, 27, .70);
    border-color: rgba(0, 229, 255, .14);
    box-shadow: inset 0 0 42px rgba(179, 136, 255, .05), 0 0 26px rgba(0, 0, 0, .16);
}

.page-news .page-header {
    text-align: center;
    margin: 0 auto 24px auto;
}

.page-news .page-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 34px;
    line-height: 1.05;
    margin-bottom: 7px;
    letter-spacing: .2px;
    text-shadow: 0 0 14px rgba(179, 136, 255, .22);
}

.page-news .page-subtitle {
    color: #b4aecb;
    letter-spacing: .03em;
}

.page-news .page-subtitle::after {
    content: '';
    display: block;
    width: 74px;
    height: 1px;
    margin: 12px auto 0 auto;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .35), rgba(179, 136, 255, .35), transparent);
}

.news-card {
    min-height: 230px;
    margin: 0;
    padding: 26px 28px 24px 28px;
    border-radius: 17px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 12%, rgba(0, 229, 255, .05), transparent 34%),
        linear-gradient(145deg, rgba(13, 12, 35, .90), rgba(10, 15, 32, .84));
    border-color: rgba(0, 229, 255, .14);
    box-shadow:
        inset 0 0 28px rgba(0, 229, 255, .025),
        0 0 0 1px rgba(255, 255, 255, .018);
}

.news-card.pinned {
    border-color: rgba(255, 209, 102, .34);
    background:
        radial-gradient(circle at 12% 6%, rgba(255, 209, 102, .10), transparent 32%),
        radial-gradient(circle at 92% 12%, rgba(179, 136, 255, .055), transparent 34%),
        linear-gradient(145deg, rgba(18, 14, 33, .93), rgba(10, 14, 31, .86));
    box-shadow:
        inset 0 0 30px rgba(255, 209, 102, .025),
        0 0 0 1px rgba(255, 209, 102, .06);
}

.news-card::before {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
    pointer-events: none;
}

.news-card-glow {
    position: absolute;
    right: -54px;
    bottom: -54px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, .08), transparent 68%);
    pointer-events: none;
}

.news-card.pinned .news-card-glow {
    background: radial-gradient(circle, rgba(255, 209, 102, .10), transparent 68%);
}

.pinned-badge {
    margin: 0 0 10px 0;
    padding: 4px 10px;
    color: #ffe277;
    background: rgba(255, 209, 102, .10);
    border-color: rgba(255, 209, 102, .24);
    box-shadow: 0 0 12px rgba(255, 209, 102, .06);
}

.news-card-top {
    margin-bottom: 15px;
}

.news-category {
    padding: 5px 12px;
    font-size: 10px;
    letter-spacing: .12em;
}

.news-date {
    color: #8d85c8;
    font-size: 12px;
}

.news-title {
    margin-bottom: 13px;
    font-size: 21px;
    color: #f7f4ff;
    text-shadow: 0 0 10px rgba(179, 136, 255, .13);
}

.news-excerpt {
    color: #b9b3d0;
    font-size: 14px;
    line-height: 1.72;
}

@media (max-width: 980px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .content-panel.page-news {
        padding: 14px;
    }

    .page-news .page-header {
        text-align: left;
        margin-bottom: 14px;
    }

    .page-news .page-title {
        justify-content: flex-start;
        font-size: 27px;
    }

    .page-news .page-subtitle::after {
        margin-left: 0;
    }

    .news-card {
        min-height: 0;
        padding: 14px 15px;
    }

    .news-excerpt {
        line-height: 1.55;
    }
}

/* ---------- status page ---------- */
.status-card.status-online { border-left: 4px solid #2bfca0; }
.status-card.status-warning { border-left: 4px solid #ffd166; }
.status-card.status-offline { border-left: 4px solid #ff5d8f; }
.status-card.status-unknown { border-left: 4px solid #8b93aa; }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.status-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.status-online .status-label { color: #2bfca0; }
.status-warning .status-label { color: #ffd166; }
.status-offline .status-label { color: #ff8bb1; }
.status-unknown .status-label { color: #aab3d2; }

.response-time {
    color: #55f3ff;
    font-weight: 800;
}

.status-error {
    color: #ff9ebd;
    font-size: 13px;
    margin-top: 4px;
}

.status-feed {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 8px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.status-feed li {
    margin: 0 0 6px 0;
}

.status-feed a {
    text-decoration: none;
    color: #cdeeff;
}

.status-feed small {
    display: block;
    color: #8893b1;
}

.status-footer-note {
    color: #aab3d2;
    font-size: 13px;
    text-align: center;
}

.status-hint { opacity: .7; }

/* ---------- OVH ---------- */
.ovh-group {
    margin: 0 0 18px 0;
}

.ovh-group-title {
    color: #55f3ff;
    border-bottom: 1px solid rgba(0, 229, 255, .16);
    padding-bottom: 6px;
}

.ovh-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ovh-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.ovh-date {
    color: #9aa5c4;
    font-size: 12px;
}

.ovh-title {
    margin: 4px 0 0 0;
    font-size: 15px;
}

.ovh-title a {
    color: #e8f7ff;
    text-decoration: none;
}

.ovh-empty {
    color: #aab3d2;
    font-style: italic;
}

/* ---------- embeds/help/about ---------- */
.fallback-card {
    text-align: center;
}

.embed-wrap,
.embed-box {
    margin: 0 0 12px 0;
}

.embed-box {
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, .20);
    border-radius: 15px;
    background: rgba(0, 0, 0, .20);
}

.embed-frame {
    display: block;
    width: 100%;
    height: 360px;
    border: 0;
}

.help-note {
    margin: 0 0 10px 0;
    padding: 8px 11px;
    border-radius: 12px;
    color: #ffe49d;
    background: rgba(255, 209, 102, .08);
    border: 1px solid rgba(255, 209, 102, .18);
}

.help-actions,
.about-links {
    text-align: center;
    margin-top: 12px;
}

.profile-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.profile-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    flex: 0 0 auto;
    overflow: hidden;
    border: 2px solid rgba(0, 229, 255, .32);
    background: rgba(255, 255, 255, .05);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.profile-role,
.tasia-badge {
    display: inline-block;
    margin: 0 0 6px 0;
    color: #55f3ff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.tasia-badge {
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #dcbfff;
    background: rgba(179, 136, 255, .12);
    border: 1px solid rgba(179, 136, 255, .25);
}

.rich-text h2,
.rich-text h3,
.help-content h2,
.help-content h3 {
    color: #55f3ff;
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
}

/* ---------- full mode, optional pretty desktop ---------- */
.full-mode .app-wrap {
    max-width: 1180px;
    padding: 0 16px;
}

.full-mode .site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px 18px;
}

.full-mode .content-panel {
    padding: 28px;
}

.full-mode .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.full-mode .status-overview,
.full-mode .help-grid,
.full-mode .about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.full-mode .about-grid {
    grid-template-columns: repeat(2, 1fr);
}

.full-mode .news-card:hover,
.full-mode .status-card:hover,
.full-mode .help-card:hover,
.full-mode .profile-card:hover,
.full-mode .ovh-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(0, 229, 255, .10);
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
    body {
        padding-bottom: 170px;
    }

    .site-header {
        padding: 8px;
    }

    .brand-link {
        display: flex;
        margin: 0 0 8px 0;
    }

    .main-nav {
        display: flex;
        width: 100%;
        gap: 5px;
    }

    .nav-item {
        padding: 7px 9px;
        font-size: 13px;
    }

    .hero-card {
        min-height: 0;
        padding: 12px;
    }

    .hero-text h1 {
        font-size: 25px;
    }

    .hero-art {
        width: 132px;
    }

    .aelita-img {
        max-width: 132px;
        max-height: 132px;
    }

    .full-mode .news-grid,
    .full-mode .status-overview,
    .full-mode .help-grid,
    .full-mode .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 14px;
        padding-bottom: 180px;
    }

    .app-wrap,
    .viewer-mode .app-wrap {
        margin-left: 6px;
        margin-right: 6px;
    }

    .logo-badge {
        width: 46px;
        height: 46px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .brand-text {
        font-size: 21px;
    }

    .hero-card {
        display: block;
    }

    .hero-text {
        min-width: 0;
    }

    .hero-art {
        width: auto;
        margin-top: 10px;
        text-align: center;
    }

    .aelita-img {
        margin: 0 auto;
        max-width: 118px;
        max-height: 118px;
    }

    .content-panel {
        padding: 11px;
    }

    .page-title {
        font-size: 24px;
    }

    .news-card,
    .status-card,
    .help-card,
    .profile-card,
    .about-story,
    .fallback-card,
    .help-content,
    .ovh-card,
    .error-card {
        padding: 11px 12px;
    }

    .profile-card {
        display: block;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto 10px auto;
    }

    .embed-frame {
        height: 280px;
    }
}

/* no fixed footer/chat in viewer */
.viewer-mode #tawk_59cfa447c28eca75e46234dd,
.viewer-mode iframe[src*="tawk.to"] {
    display: none !important;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, .12); }
::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, .25); border-radius: 8px; }
::selection { background: rgba(0, 229, 255, .25); color: #fff; }

/* ---------- vertical menu refinement ----------
   User requested: pionowe menu.
   Keep viewer-safe layout, but move navigation into a left sidebar.
*/
.app-wrap,
.viewer-mode .app-wrap,
.full-mode .app-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: auto;
    max-width: 1360px;
    margin: 8px auto 0 auto;
    padding: 0 8px;
}

.viewer-mode .app-wrap {
    max-width: none;
    margin: 6px 8px 0 8px;
    padding: 0;
}

.main-stack {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.site-header,
.viewer-mode .site-header,
.full-mode .site-header {
    flex: 0 0 196px;
    width: 196px;
    min-height: 0;
    margin: 0;
    padding: 12px 10px;
    display: block;
    border-radius: 18px;
    background:
        radial-gradient(circle at 35% 0%, rgba(0, 229, 255, .10), transparent 38%),
        linear-gradient(180deg, rgba(7, 16, 32, .92), rgba(9, 8, 26, .86));
    border: 1px solid rgba(0, 229, 255, .26);
    box-shadow:
        0 0 22px rgba(0, 229, 255, .12),
        inset 0 0 22px rgba(179, 136, 255, .035);
}

.brand-link,
.viewer-mode .brand-link,
.full-mode .brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px 0;
    padding: 4px;
    width: 100%;
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .065);
}

.logo-badge {
    flex: 0 0 auto;
}

.brand-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.main-nav,
.viewer-mode .main-nav,
.full-mode .main-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 7px;
    width: 100%;
}

.nav-item,
.viewer-mode .nav-item,
.full-mode .nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 13px;
    font-size: 14px;
    letter-spacing: .02em;
    white-space: normal;
    background:
        linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
    border: 1px solid rgba(255,255,255,.10);
}

.nav-item.active,
.nav-item:hover {
    transform: none;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, .20), rgba(179, 136, 255, .14));
    border-color: rgba(0, 229, 255, .46);
    box-shadow:
        inset 0 0 16px rgba(0, 229, 255, .06),
        0 0 14px rgba(0, 229, 255, .12);
}

.nav-admin {
    margin-top: 4px;
    justify-content: center;
    color: #ead7ff;
    background: rgba(179, 136, 255, .08);
}

.hero-card,
.status-strip,
.content-panel {
    width: 100%;
}

/* Keep the pretty 3-card news layout when there is room after the sidebar. */
.news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1080px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 760px) {
    .app-wrap,
    .viewer-mode .app-wrap,
    .full-mode .app-wrap {
        display: block;
        margin-left: 6px;
        margin-right: 6px;
        padding: 0;
    }

    .site-header,
    .viewer-mode .site-header,
    .full-mode .site-header {
        width: 100%;
        margin: 0 0 8px 0;
    }

    .brand-link,
    .viewer-mode .brand-link,
    .full-mode .brand-link {
        margin-bottom: 10px;
    }

    .main-nav,
    .viewer-mode .main-nav,
    .full-mode .main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .nav-admin {
        margin-top: 0;
    }
}

/* ---------- status sims matrix table ---------- */
.sim-matrix-card,
.status-feed-panel {
    position: relative;
    margin: 12px 0;
    padding: 13px 15px;
    border-radius: 15px;
    border: 1px solid rgba(0, 229, 255, .18);
    background: rgba(9, 19, 35, .78);
    box-shadow: inset 0 0 18px rgba(0, 229, 255, .025);
}

.matrix-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.matrix-head .section-heading {
    margin-top: 0;
}

.matrix-source {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, .22);
    background: rgba(0, 229, 255, .07);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.sim-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,.065);
    background: rgba(0,0,0,.12);
}

.sim-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.sim-table th,
.sim-table td {
    padding: 10px 11px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 14px;
}

.sim-table th {
    color: #7ff7ff;
    background: rgba(0,229,255,.055);
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sim-table tr:last-child td {
    border-bottom: 0;
}

.sim-table tr:hover td {
    background: rgba(0,229,255,.035);
}

.sim-name a {
    color: #edf7ff;
    text-decoration: none;
    font-weight: 700;
}

.sim-name a:hover {
    color: #55f3ff;
}

.sim-ping {
    color: #55f3ff;
    font-weight: 800;
}

.sim-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 82px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sim-status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b93aa;
    box-shadow: 0 0 8px rgba(139,147,170,.55);
}

.sim-status-pill.online { color: #99ffd2; border-color: rgba(43,252,160,.30); }
.sim-status-pill.online .dot { background: #2bfca0; box-shadow: 0 0 9px rgba(43,252,160,.80); }
.sim-status-pill.warning,
.sim-status-pill.stale { color: #ffe39a; border-color: rgba(255,209,102,.32); }
.sim-status-pill.warning .dot,
.sim-status-pill.stale .dot { background: #ffd166; box-shadow: 0 0 9px rgba(255,209,102,.80); }
.sim-status-pill.offline { color: #ffadc9; border-color: rgba(255,93,143,.34); }
.sim-status-pill.offline .dot { background: #ff5d8f; box-shadow: 0 0 9px rgba(255,93,143,.80); }

.status-mini-text {
    margin-left: 8px;
    color: #aab3d2;
    font-size: 13px;
}

.status-stale .status-label,
.status-warning .status-label { color: #ffd166; }

/* ---------- registration form ---------- */
.registration-card {
    position: relative;
    margin: 0;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(0, 229, 255, .20);
    background: linear-gradient(145deg, rgba(7, 19, 38, .86), rgba(10, 12, 31, .80));
    box-shadow: inset 0 0 26px rgba(0, 229, 255, .035);
}

.register-form label {
    display: block;
    margin: 10px 0 5px;
    color: #bcecff;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: 800;
    font-size: 13px;
}

.register-form label span {
    color: #9aa5c4;
    font-weight: 600;
}

.register-form input,
.register-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 11px;
    border-radius: 11px;
    border: 1px solid rgba(0,229,255,.18);
    background: rgba(0,0,0,.28);
    color: #edf7ff;
    font-family: Arial, Verdana, sans-serif;
    font-size: 14px;
    outline: none;
}

.register-form input:focus,
.register-form textarea:focus {
    border-color: rgba(0,229,255,.55);
    box-shadow: 0 0 12px rgba(0,229,255,.10);
}

.register-form textarea {
    min-height: 92px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.register-submit {
    margin-top: 14px;
    cursor: pointer;
}

.form-alert {
    margin: 0 0 12px 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.form-alert.ok {
    background: rgba(43,252,160,.10);
    color: #9dffd5;
    border: 1px solid rgba(43,252,160,.22);
}

.form-alert.err {
    background: rgba(255,93,143,.11);
    color: #ffb3ce;
    border: 1px solid rgba(255,93,143,.24);
}

@media (max-width: 760px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .sim-table {
        min-width: 0;
    }

    .sim-table thead {
        display: none;
    }

    .sim-table,
    .sim-table tbody,
    .sim-table tr,
    .sim-table td {
        display: block;
        width: 100%;
    }

    .sim-table tr {
        border-bottom: 1px solid rgba(255,255,255,.08);
        padding: 8px 0;
    }

    .sim-table tr:last-child {
        border-bottom: 0;
    }

    .sim-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 0;
        padding: 6px 10px;
        text-align: right;
    }

    .sim-table td::before {
        content: attr(data-label);
        color: #7ff7ff;
        font-weight: 800;
        text-align: left;
        flex: 0 0 auto;
    }
}

/* ---------- hero real logo replacement ----------
   The left hero slot must never be a handwritten "LOGO" placeholder.
   It now renders the actual I-Grid logo asset.
*/
.hero-card,
.viewer-mode .hero-card,
.full-mode .hero-card {
    display: grid !important;
    grid-template-columns: 210px minmax(0, 1fr) 150px;
    align-items: center;
    justify-content: stretch;
    gap: 16px;
}

.hero-logo-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 126px;
    padding: 10px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 40%, rgba(0, 229, 255, .14), transparent 58%),
        linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(179, 136, 255, .035));
    border: 1px solid rgba(0, 229, 255, .24);
    box-shadow:
        inset 0 0 18px rgba(0, 229, 255, .06),
        0 0 18px rgba(0, 229, 255, .10);
    overflow: hidden;
}

.hero-logo-img {
    display: block;
    width: auto;
    max-width: 185px;
    max-height: 112px;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 0 14px rgba(0, 229, 255, .22));
}

.hero-text {
    text-align: center;
    min-width: 0 !important;
}

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

.hero-art {
    width: auto !important;
    min-width: 0;
    text-align: center;
}

.aelita-img {
    margin: 0 auto;
}

@media (max-width: 1120px) {
    .hero-card,
    .viewer-mode .hero-card,
    .full-mode .hero-card {
        grid-template-columns: 170px minmax(0, 1fr) 125px;
        gap: 12px;
    }

    .hero-logo-panel {
        min-height: 112px;
    }

    .hero-logo-img {
        max-width: 150px;
        max-height: 96px;
    }

    .aelita-img {
        max-width: 115px;
        max-height: 130px;
    }
}

@media (max-width: 860px) {
    .hero-card,
    .viewer-mode .hero-card,
    .full-mode .hero-card {
        grid-template-columns: 140px minmax(0, 1fr);
        grid-template-areas:
            "logo text"
            "art text";
    }

    .hero-logo-panel { grid-area: logo; min-height: 92px; }
    .hero-text { grid-area: text; text-align: left; }
    .hero-actions { justify-content: flex-start; }
    .hero-art { grid-area: art; }

    .hero-logo-img {
        max-width: 122px;
        max-height: 76px;
    }

    .aelita-img {
        max-width: 92px;
        max-height: 105px;
    }
}

@media (max-width: 620px) {
    .hero-card,
    .viewer-mode .hero-card,
    .full-mode .hero-card {
        display: block !important;
    }

    .hero-logo-panel {
        max-width: 220px;
        min-height: 96px;
        margin: 0 auto 10px auto;
    }

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

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

    .hero-art {
        margin-top: 10px;
    }
}

/* ---------- bigger hero logo fill ----------
   Make the actual I-Grid logo fill its hero box instead of sitting tiny.
*/
.hero-card,
.viewer-mode .hero-card,
.full-mode .hero-card {
    grid-template-columns: minmax(230px, 285px) minmax(0, 1fr) 150px !important;
}

.hero-logo-panel {
    min-height: 154px !important;
    padding: 4px !important;
}

.hero-logo-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 148px !important;
    object-fit: contain !important;
}

@media (max-width: 1120px) {
    .hero-card,
    .viewer-mode .hero-card,
    .full-mode .hero-card {
        grid-template-columns: minmax(190px, 235px) minmax(0, 1fr) 125px !important;
    }
    .hero-logo-panel { min-height: 132px !important; }
    .hero-logo-img { max-height: 126px !important; }
}

@media (max-width: 860px) {
    .hero-card,
    .viewer-mode .hero-card,
    .full-mode .hero-card {
        grid-template-columns: 165px minmax(0, 1fr) !important;
        grid-template-areas:
            "logo text"
            "art text";
    }
    .hero-logo-panel { min-height: 116px !important; }
    .hero-logo-img { max-height: 108px !important; }
}

@media (max-width: 620px) {
    .hero-card,
    .viewer-mode .hero-card,
    .full-mode .hero-card {
        display: block !important;
    }
    .hero-logo-panel {
        width: min(300px, 100%);
        max-width: 300px !important;
        min-height: 140px !important;
    }
    .hero-logo-img { max-height: 132px !important; }
}

/* ---------- Tasia AI Registration Terminal ---------- */
.registration-terminal-card {
    --rg-panel: rgba(8, 14, 28, 0.92);
    --rg-text: #dfffea;
    --rg-muted: #8fe6bd;
    --rg-hot: #38ffac;
    --rg-cyan: #1be7ff;
    --rg-warn: #ffd479;
    --rg-bad: #ff7f9d;
    --rg-line: rgba(56,255,172,.28);
    --rg-bubble: rgba(24, 52, 43, 0.72);
    --rg-user: rgba(22, 36, 66, 0.78);
    position: relative;
    z-index: 2;
    color: var(--rg-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.reg-terminal-shell {
    position: relative;
    width: 100%;
    border: 1px solid var(--rg-line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 18% 18%, rgba(56,255,172,.12), transparent 30%),
        radial-gradient(circle at 86% 0%, rgba(27,231,255,.14), transparent 34%),
        linear-gradient(135deg, rgba(3, 7, 15, .96), rgba(9, 16, 32, .92));
    box-shadow:
        0 0 0 1px rgba(255,255,255,.05) inset,
        0 0 42px rgba(56,255,172,.14),
        0 20px 70px rgba(0,0,0,.45);
    overflow: hidden;
}

.reg-terminal-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,.024),
        rgba(255,255,255,.024) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 0;
}

.reg-terminal-shell::after {
    content: "";
    position: absolute;
    inset: -45%;
    background: conic-gradient(from 180deg, transparent, rgba(56,255,172,.065), transparent, rgba(87,134,255,.07), transparent);
    animation: reg-terminal-drift 20s linear infinite;
    pointer-events: none;
    opacity: .45;
    z-index: 0;
}

@keyframes reg-terminal-drift { to { transform: rotate(360deg); } }

.reg-terminal-topbar,
.reg-terminal-body {
    position: relative;
    z-index: 1;
}

.reg-terminal-topbar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid var(--rg-line);
    background: rgba(0,0,0,.24);
}

.reg-terminal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: .045em;
}

.reg-terminal-orb {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, #fff, var(--rg-hot) 25%, #0f6 55%, transparent 70%);
    box-shadow: 0 0 20px var(--rg-hot), 0 0 60px rgba(56,255,172,.45);
    animation: reg-terminal-pulse 1.8s ease-in-out infinite;
}

@keyframes reg-terminal-pulse {
    0%,100% { transform: scale(.92); filter: brightness(.9); }
    50% { transform: scale(1.07); filter: brightness(1.25); }
}

.reg-terminal-status {
    color: var(--rg-muted);
    font-size: 12px;
    text-align: right;
}

.reg-terminal-body {
    display: grid;
    grid-template-columns: minmax(230px, .72fr) minmax(320px, 1.28fr);
    gap: 14px;
    padding: 16px;
}

.reg-terminal-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.reg-avatar {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #00180d;
    background: var(--rg-hot);
    box-shadow: 0 0 18px rgba(56,255,172,.35);
    font-weight: 800;
    font-size: 13px;
}

.reg-bubble {
    white-space: pre-wrap;
    line-height: 1.48;
    padding: 11px 13px;
    border-radius: 16px;
    background: var(--rg-bubble);
    border: 1px solid rgba(56,255,172,.16);
    color: var(--rg-text);
    text-shadow: 0 0 12px rgba(56,255,172,.12);
    font-size: 13px;
}

.reg-msg.system .reg-bubble {
    color: var(--rg-warn);
    background: rgba(60, 45, 13, .38);
    border-color: rgba(255, 212, 121, .22);
}

.reg-msg.ok .reg-bubble {
    color: #9dffd5;
    background: rgba(8, 60, 48, .58);
    border-color: rgba(56,255,172,.28);
}

.reg-msg.bad .reg-bubble {
    color: var(--rg-bad);
    background: rgba(68, 12, 31, .36);
    border-color: rgba(255, 127, 157, .22);
}

.reg-terminal-panel {
    border: 1px solid rgba(27,231,255,.20);
    border-radius: 18px;
    background: rgba(0,0,0,.26);
    box-shadow: inset 0 0 24px rgba(27,231,255,.04);
    padding: 14px;
}

.reg-terminal-panel-title {
    margin: 0 0 12px;
    color: var(--rg-hot);
    text-shadow: 0 0 12px rgba(56,255,172,.45);
    letter-spacing: .04em;
    font-weight: 800;
}

.reg-terminal-form {
    display: block;
}

.reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reg-field label {
    display: block;
    margin: 10px 0 5px;
    color: #bfffe4;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .03em;
}

.reg-field label span {
    color: #8ba8b8;
    font-weight: 700;
}

.reg-field input,
.reg-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 13px;
    border: 1px solid rgba(56,255,172,.22);
    background: rgba(0,0,0,.36);
    color: #eafff4;
    outline: none;
    font: inherit;
    box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset;
}

.reg-field input:focus,
.reg-field textarea:focus {
    border-color: rgba(56,255,172,.65);
    box-shadow: 0 0 18px rgba(56,255,172,.12), 0 0 0 1px rgba(56,255,172,.14) inset;
}

.reg-field textarea {
    min-height: 96px;
    resize: vertical;
}

.reg-terminal-submit {
    margin-top: 14px;
    cursor: pointer;
    border-color: rgba(56,255,172,.45);
    box-shadow: 0 0 16px rgba(56,255,172,.12);
}

.reg-disabled-box {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 127, 157, .24);
    background: rgba(68, 12, 31, .28);
    color: #ffb3ce;
    font-weight: 800;
}

@media (max-width: 980px) {
    .reg-terminal-body {
        grid-template-columns: 1fr;
    }

    .reg-terminal-chat {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .reg-row,
    .reg-terminal-chat {
        grid-template-columns: 1fr;
    }

    .reg-terminal-body {
        padding: 12px;
        gap: 12px;
    }

    .reg-terminal-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }

    .reg-terminal-status {
        text-align: left;
    }
}

/* ---------- embedded original Tasia reset app ---------- */
.portal-terminal-embed-card {
    border: 1px solid rgba(56,255,172,.26);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(3, 7, 15, .92);
    box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 32px rgba(56,255,172,.12);
}
.terminal-embed-topbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(56,255,172,.22);
    background: rgba(0,0,0,.28);
}
.terminal-embed-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c9ffe2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing: .04em;
}
.terminal-embed-orb {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, #fff, #38ffac 25%, #0f6 55%, transparent 70%);
    box-shadow: 0 0 18px #38ffac, 0 0 48px rgba(56,255,172,.36);
}
.terminal-embed-frame {
    display: block;
    width: 100%;
    height: min(690px, calc(100vh - 260px));
    min-height: 520px;
    border: 0;
    background: #05060a;
}
.terminal-embed-note {
    margin: 0;
    padding: 10px 14px 12px;
    color: #91d7b4;
    font-size: 12px;
    border-top: 1px solid rgba(56,255,172,.14);
    background: rgba(0,0,0,.18);
}
.terminal-embed-note code {
    color: #d8ffe9;
}
@media (max-width: 760px) {
    .terminal-embed-topbar {
        display: block;
    }
    .terminal-embed-topbar .btn {
        margin-top: 8px;
    }
    .terminal-embed-frame {
        min-height: 560px;
    }
}


/* ---------- Tawk.to viewer-safe support button ---------- */
.chip-chat {
    text-decoration: none;
    border-color: rgba(56, 255, 172, .34);
    color: #dffff0;
    background: linear-gradient(135deg, rgba(56,255,172,.14), rgba(87,134,255,.12));
    box-shadow: 0 0 16px rgba(56,255,172,.10);
}
.chip-chat:hover,
.chip-chat:focus {
    color: #ffffff;
    border-color: rgba(56, 255, 172, .62);
    box-shadow: 0 0 20px rgba(56,255,172,.20);
}
.support-chat-card {
    margin: 0 0 14px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(56,255,172,.22);
    background: linear-gradient(135deg, rgba(8,18,34,.88), rgba(15, 32, 42, .72));
    box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 24px rgba(56,255,172,.10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.support-chat-card h2 {
    margin: 0 0 4px;
    color: #dffff0;
    font-size: 24px;
}
.support-chat-card p {
    margin: 0;
    color: #9fd7c0;
}
.support-chat-card .btn {
    white-space: nowrap;
}
@media (max-width: 760px) {
    .support-chat-card {
        display: block;
    }
    .support-chat-card .btn {
        margin-top: 10px;
        display: inline-flex;
    }
}


/* ---------- unsupported viewer warning ---------- */
.unsupported-viewer-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    padding: 10px 14px;
    background: linear-gradient(90deg, #b00020, #ff1744, #b00020);
    color: #fff;
    font-family: Arial, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    letter-spacing: .03em;
    box-shadow: 0 -3px 18px rgba(255, 23, 68, .38);
    border-top: 1px solid rgba(255,255,255,.28);
}

body.unsupported-viewer {
    padding-bottom: 198px;
}

body.full-mode.unsupported-viewer {
    padding-bottom: 62px;
}

/* ---------- admin maintenance controls ---------- */
.maintenance-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 1rem;
    padding: 12px;
    border-radius: var(--radius-sm, 10px);
    background: rgba(255, 93, 143, .08);
    border: 1px solid rgba(255, 93, 143, .20);
}
.maintenance-toggle-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.maintenance-toggle-row label {
    margin: 0;
    color: #ffd6df;
    font-weight: 800;
    text-transform: none;
    letter-spacing: normal;
    font-size: .95rem;
}

.gallery-embed-card {
  padding: 14px;
}

.portal-iframe.gallery-frame {
  width: 100%;
  min-height: 650px;
  border: 1px solid rgba(56,255,172,.24);
  border-radius: 16px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 0 24px rgba(56,255,172,.10);
}

.embed-actions {
  margin: 12px 0;
}

/* ---------- professional site footer ---------- */
.site-footer {
    margin: 14px 0 8px 0;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 229, 255, .16);
    background: linear-gradient(180deg, rgba(6, 12, 25, .88), rgba(8, 7, 22, .92));
    box-shadow: inset 0 0 24px rgba(179, 136, 255, .04);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
    font-size: 13px;
    color: #b8bfd8;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.footer-logo {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-weight: 900;
    font-size: 18px;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    color: #18f6ff;
    background: rgba(0, 229, 255, .10);
    border: 1px solid rgba(0, 229, 255, .30);
    box-shadow: 0 0 12px rgba(0, 229, 255, .22);
}

.footer-brand strong {
    color: #eafaff;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    letter-spacing: 1px;
}

.footer-sub {
    color: #8fb8d9;
    font-size: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
}

.footer-links a {
    color: #9fd9ff;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.footer-guard {
    color: #dcbfff;
    font-weight: 800;
}

@media (max-width: 860px) {
    .site-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand { justify-content: center; }
    .footer-meta { align-items: center; text-align: center; }
}

