/* =====================================================================
   Админ-документация — стиль на основе ClownHost Wiki (тёмная тема)
   Оптимизировано под плавный скролл (GPU-анимации) + красивые анимации.
   ===================================================================== */

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: rgba(20, 20, 20, 0.9);
    --bg-tertiary: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.15);
    --border-hover: rgba(255, 255, 255, 0.2);
    --accent-color: #818cf8;
    --accent-bg: rgba(129, 140, 248, 0.2);
    --success-color: #34d399;

    --c-green:  #34d399;
    --c-green-bg: rgba(52, 211, 153, 0.12);
    --c-yellow: #fbbf24;
    --c-yellow-bg: rgba(251, 191, 36, 0.12);
    --c-red:    #f87171;
    --c-red-bg: rgba(248, 113, 113, 0.12);
    --c-blue:   #818cf8;
    --c-blue-bg: rgba(129, 140, 248, 0.12);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; }
code {
    background: var(--accent-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.88em;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

/* =====================================================================
   ЖИВОЙ ФОН («аврора») — отдельный фиксированный слой.
   Фон НЕ перерисовывается при скролле (нет background-attachment: fixed),
   поэтому прокрутка плавная. Анимация идёт через transform (GPU).
   ===================================================================== */
.bg-aurora {
    position: fixed;
    inset: -20vmax;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(38vmax 38vmax at 18% 12%, rgba(129, 140, 248, 0.18), transparent 60%),
        radial-gradient(34vmax 34vmax at 85% 18%, rgba(52, 211, 153, 0.12), transparent 60%),
        radial-gradient(30vmax 30vmax at 70% 90%, rgba(248, 113, 113, 0.10), transparent 60%);
    filter: blur(8px);
    animation: aurora 24s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes aurora {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1.02) rotate(0deg); }
    50%  { transform: translate3d(2%, 3%, 0)  scale(1.08) rotate(4deg); }
    100% { transform: translate3d(3%, -3%, 0) scale(1.03) rotate(-3deg); }
}

/* ============================ АНИМАЦИИ ============================ */
@keyframes rise   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pop    { from { opacity: 0; transform: scale(0.96); }      to { opacity: 1; transform: none; } }
@keyframes shake  {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-7px); }
    40%, 60% { transform: translateX(7px); }
}
@keyframes pulse  { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin   { to { transform: rotate(360deg); } }

/* ============================ ЭКРАН ПАРОЛЯ ============================ */
.gate {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.gate > * { width: 100%; max-width: 420px; }

.gate-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: rise 0.55s var(--ease) both;
}
.gate-card.shake { animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

.gate-logo { height: 44px; margin: 0 auto 20px; animation: pop 0.6s var(--ease) 0.05s both; }
.gate-title { font-size: 24px; font-weight: 700; animation: fadeUp 0.5s var(--ease) 0.12s both; }
.gate-sub { color: var(--text-secondary); font-size: 14px; margin-top: 8px; margin-bottom: 24px; animation: fadeUp 0.5s var(--ease) 0.18s both; }
.gate-field { position: relative; animation: fadeUp 0.5s var(--ease) 0.24s both; }
.gate-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.gate-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-hover);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}
.gate-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    border-radius: 8px;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.gate-eye:hover { background: var(--bg-hover); color: var(--text-primary); }

.gate-error {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--c-red-bg);
    border: 1px solid var(--c-red);
    color: var(--c-red);
    border-radius: 10px;
    font-size: 14px;
    animation: pop 0.3s var(--ease) both;
}

.gate-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #818cf8 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.18s var(--ease), box-shadow 0.25s ease;
    animation: fadeUp 0.5s var(--ease) 0.3s both;
}
.gate-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(129, 140, 248, 0.45); }
.gate-submit:active { transform: translateY(0) scale(0.99); }
.gate-submit.loading { pointer-events: none; color: transparent; }
.gate-submit.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.gate-foot { margin-top: 18px; font-size: 12px; color: var(--text-tertiary); animation: fadeUp 0.5s var(--ease) 0.36s both; }

/* ============================ ШАПКА ============================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 24px;
    background: rgba(12, 12, 14, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: rise 0.5s var(--ease) both;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-logo { height: 32px; }
.header-divider { width: 1px; height: 24px; background: var(--border-secondary); }
.header-name { font-weight: 600; font-size: 15px; color: var(--text-secondary); }

.header-right { display: flex; align-items: center; gap: 16px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success-color);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    animation: pulse 2s infinite;
}

.logout {
    padding: 8px 14px;
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.logout:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-hover); transform: translateY(-1px); }

/* ============================ КОНТЕНТ ============================ */
.main { padding: 0 24px; }
.article {
    max-width: 960px;
    margin: 24px auto;
    padding: 36px 36px 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    animation: fadeUp 0.6s var(--ease) 0.05s both;
}
.article-head { padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--border-primary); }
.article-title { font-size: 32px; font-weight: 700; line-height: 1.2; animation: fadeUp 0.6s var(--ease) 0.12s both; }
.article-sub { margin-top: 12px; color: var(--text-secondary); font-size: 16px; animation: fadeUp 0.6s var(--ease) 0.18s both; }

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-primary);
}

/* -------------------- цветные блоки (callout) -------------------- */
.callout {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid var(--border-primary);
    border-left-width: 4px;
    animation: fadeUp 0.55s var(--ease) both;
}
.callout:nth-of-type(1) { animation-delay: 0.20s; }
.callout:nth-of-type(2) { animation-delay: 0.28s; }
.callout:nth-of-type(3) { animation-delay: 0.36s; }
.callout-icon { font-size: 20px; line-height: 1.4; flex-shrink: 0; }
.callout-title { font-weight: 600; margin-bottom: 4px; }
.callout-body p { color: var(--text-secondary); font-size: 14.5px; }
.callout-green  { background: var(--c-green-bg);  border-left-color: var(--c-green); }
.callout-green  .callout-title { color: var(--c-green); }
.callout-yellow { background: var(--c-yellow-bg); border-left-color: var(--c-yellow); }
.callout-yellow .callout-title { color: var(--c-yellow); }
.callout-red    { background: var(--c-red-bg);    border-left-color: var(--c-red); }
.callout-red    .callout-title { color: var(--c-red); }

/* -------------------- панель инструментов (поиск + reveal all) -------------------- */
.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    animation: fadeUp 0.55s var(--ease) 0.42s both;
}
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap .search-ico {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-tertiary); font-size: 15px; pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 11px 14px 11px 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-hover);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}
.reveal-all {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 16px;
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13.5px;
    white-space: nowrap;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.reveal-all:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-hover); transform: translateY(-1px); }
.reveal-all.on { color: var(--accent-color); border-color: var(--accent-color); background: var(--accent-bg); }

.no-results {
    display: none;
    text-align: center;
    color: var(--text-tertiary);
    padding: 28px 0;
    font-size: 15px;
}
.no-results.show { display: block; animation: pop 0.3s var(--ease) both; }

/* -------------------- карточки панелей -------------------- */
.panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
}
.panel {
    position: relative;
    padding: 22px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-top: 3px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.28s var(--ease);
    animation: fadeUp 0.55s var(--ease) both;
    will-change: transform;
}
.panel[hidden] { display: none !important; }
.panel:nth-child(1) { animation-delay: 0.48s; }
.panel:nth-child(2) { animation-delay: 0.56s; }
.panel:nth-child(3) { animation-delay: 0.64s; }
.panel:nth-child(4) { animation-delay: 0.72s; }
/* мягкая тень-свечение через псевдоэлемент (анимируется opacity — дёшево) */
.panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}
.panel:hover { transform: translateY(-4px); }
.panel:hover::after { opacity: 1; }

.panel-green  { border-top-color: var(--c-green); }
.panel-yellow { border-top-color: var(--c-yellow); }
.panel-red    { border-top-color: var(--c-red); }
.panel-blue   { border-top-color: var(--c-blue); }

.panel-top {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.panel-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}
.panel-green  .panel-tag { color: var(--c-green);  border-color: var(--c-green);  background: var(--c-green-bg); }
.panel-yellow .panel-tag { color: var(--c-yellow); border-color: var(--c-yellow); background: var(--c-yellow-bg); }
.panel-red    .panel-tag { color: var(--c-red);    border-color: var(--c-red);    background: var(--c-red-bg); }
.panel-blue   .panel-tag { color: var(--c-blue);   border-color: var(--c-blue);   background: var(--c-blue-bg); }

.panel-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.panel-desc { color: var(--text-secondary); font-size: 14.5px; line-height: 1.6; margin-bottom: 18px; }

/* -------------------- доступы (blur) -------------------- */
.creds {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cred-row { display: flex; align-items: center; gap: 10px; }
.cred-label {
    flex-shrink: 0;
    width: 56px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}
.secret {
    position: relative;
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 14px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-secondary);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}
.secret:hover { background: var(--bg-hover); }
.secret .secret-value {
    display: inline-block;
    filter: blur(6px);
    transition: filter 0.22s ease;
    color: var(--text-primary);
}
.secret .secret-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, sans-serif;
    font-size: 11px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.secret.revealed { cursor: text; user-select: text; border-style: solid; border-color: var(--accent-color); }
.secret.revealed .secret-value { filter: none; }
.secret.revealed .secret-hint { opacity: 0; }

.copy-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 15px;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.12s ease;
}
.copy-btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-hover); }
.copy-btn:active { transform: scale(0.9); }
.copy-btn.copied { color: var(--success-color); border-color: var(--success-color); background: rgba(52, 211, 153, 0.15); }

/* -------------------- кнопка открытия -------------------- */
.open-btn {
    position: relative;
    overflow: hidden;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #818cf8 100%);
    color: #fff;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    transition: transform 0.2s var(--ease), box-shadow 0.25s ease;
}
/* блик, пробегающий по кнопке при наведении */
.open-btn::before {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.open-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(129, 140, 248, 0.45); }
.open-btn:hover::before { left: 130%; }
.open-btn:active { transform: translateY(0) scale(0.99); }
.open-arrow { font-size: 16px; transition: transform 0.2s ease; }
.open-btn:hover .open-arrow { transform: translate(2px, -2px); }
.panel-green  .open-btn { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.panel-green  .open-btn:hover { box-shadow: 0 8px 22px rgba(52, 211, 153, 0.45); }
.panel-yellow .open-btn { background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%); }
.panel-yellow .open-btn:hover { box-shadow: 0 8px 22px rgba(251, 191, 36, 0.45); }
.panel-red    .open-btn { background: linear-gradient(135deg, #dc2626 0%, #f87171 100%); }
.panel-red    .open-btn:hover { box-shadow: 0 8px 22px rgba(248, 113, 113, 0.45); }

.panel-note {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.article-foot {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--border-primary);
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
}

/* -------------------- индикатор статуса панели -------------------- */
.panel-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-tertiary);
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    border: 1px solid var(--border-secondary);
    background: var(--bg-hover);
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.panel-status .ps-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
}
.panel-status.is-checking .ps-dot { animation: pulse 1.1s ease-in-out infinite; }
.panel-status.is-up {
    color: var(--c-green); border-color: var(--c-green); background: var(--c-green-bg);
}
.panel-status.is-up .ps-dot {
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    animation: pulse-ring 1.8s ease-out infinite;
}
.panel-status.is-down { color: var(--c-red); border-color: var(--c-red); background: var(--c-red-bg); }
.panel-status.is-down .ps-dot { background: #f87171; }
.panel-status.is-unknown { color: var(--text-tertiary); }
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* -------------------- экран 2FA / доп. элементы входа -------------------- */
.gate-note {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(129, 140, 248, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.5);
    color: #c7d2fe;
    border-radius: 10px;
    font-size: 13.5px;
    animation: pop 0.3s var(--ease) both;
}
.code-input {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 26px;
    letter-spacing: 8px;
    font-weight: 700;
}
.gate-links {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: fadeUp 0.5s var(--ease) 0.42s both;
}
.inline-form { display: inline; margin: 0; }
.linkbtn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.18s ease;
}
.linkbtn:hover { color: var(--text-primary); text-decoration: underline; }
.dot-sep { color: var(--text-tertiary); }

/* -------------------- журнал входов -------------------- */
.logbox {
    margin-top: 28px;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
}
.logbox-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.logbox-title { font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.logbox-sub { font-size: 11.5px; color: var(--text-tertiary); }
.loglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.loglist li {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
    word-break: break-word;
    padding-left: 12px;
    border-left: 2px solid var(--border-secondary);
}

/* -------------------- предупреждение об авто-блокировке -------------------- */
.idle-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeUp 0.25s var(--ease) both;
}
.idle-overlay[hidden] { display: none; }
.idle-box {
    width: 100%;
    max-width: 360px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 26px 24px;
    animation: pop 0.3s var(--ease) both;
}
.idle-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.idle-text { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.idle-text #idle-countdown { color: var(--c-yellow); font-weight: 700; }
.idle-stay {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #818cf8 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.18s var(--ease), box-shadow 0.25s ease;
}
.idle-stay:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(129, 140, 248, 0.45); }

/* -------------------- адаптив (телефоны/планшеты) -------------------- */
@media (max-width: 900px) {
    .panels { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header { height: 56px; padding: 0 14px; }
    .header-name { font-size: 14px; }
    .status { display: none; }
    .main { padding: 0 12px; }
    .article { padding: 22px 16px; border-radius: 14px; }
    .article-title { font-size: 24px; }
    .article-sub { font-size: 14px; }
    .section-title { font-size: 19px; }
    .callout { padding: 14px; }
    /* поиск и кнопка — в столбик, во всю ширину, удобно для тапа */
    .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .reveal-all { width: 100%; justify-content: center; padding: 13px; }
    .search-input { font-size: 16px; } /* 16px — чтобы iOS не зумил при фокусе */
    .panel { padding: 18px 16px; }
    .panel-title { font-size: 18px; }
    /* крупные удобные тач-цели */
    .open-btn { padding: 14px 18px; font-size: 15px; }
    .copy-btn { width: 40px; height: 40px; }
    .secret { padding: 9px 12px; font-size: 15px; }
    .gate-card { padding: 28px 22px; }
    .code-input { font-size: 22px; letter-spacing: 6px; }
}
@media (max-width: 420px) {
    .header-logo { height: 22px; }
    .header-divider { display: none; }
    .article-title { font-size: 21px; }
    .cred-row { flex-wrap: wrap; }
    .cred-label { width: 100%; }
    .secret { flex: 1 1 auto; }
    .panel-status .ps-txt { display: none; } /* на узких экранах — только точка-индикатор */
    .panel-status { padding: 5px; }
    .gate { padding: 16px; }
}

/* всплывающее уведомление о копировании */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate3d(-50%, 20px, 0);
    background: var(--bg-secondary);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease);
    backdrop-filter: blur(12px);
    z-index: 200;
}
.toast.show { opacity: 1; transform: translate3d(-50%, 0, 0); }

/* уважение к настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .bg-aurora { animation: none !important; }
    html { scroll-behavior: auto; }
}
