/* ===== Alto account console: шрифт Montserrat ===== */
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/montserrat-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/montserrat-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-2019, U+2022, U+2212;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/montserrat-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/montserrat-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-2019, U+2022, U+2212;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/montserrat-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/montserrat-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-2019, U+2022, U+2212;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/montserrat-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/montserrat-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-2019, U+2022, U+2212;
}

:root, body, #app {
  --pf-v5-global--FontFamily--text: 'Montserrat', sans-serif !important;
  --pf-v5-global--FontFamily--heading: 'Montserrat', sans-serif !important;
  --pf-v5-global--FontFamily--sans-serif: 'Montserrat', sans-serif !important;
  --pf-v5-global--FontFamily--redhat--text: 'Montserrat', sans-serif !important;
  --pf-v5-global--FontFamily--redhatVF--text: 'Montserrat', sans-serif !important;
  --pf-v5-global--FontFamily--redhat--heading: 'Montserrat', sans-serif !important;
  --pf-v5-global--FontFamily--redhatVF--heading: 'Montserrat', sans-serif !important;
}

body, #app, input, button, select, textarea,
h1, h2, h3, label, a, p, span, div {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== Alto сервисы: пункт меню ===== */
/* нативный «Приложения» прячем — вместо него свой пункт сверху */
.pf-v5-c-nav__list > li.pf-v5-c-nav__item:has(> a[data-testid="applications"]) {
  display: none !important;
}
.alto-apps-navitem .pf-v5-c-nav__link { cursor: pointer; }

/* ===== Alto сервисы: таблица вместо нативного списка (js/apps-launcher.js) ===== */
/* нативный список Keycloak показывает клиента, только если с ним есть живая сессия —
   прячем его вместе со всеми секциями страницы, кроме заголовка и нашей */
body.alto-svc-on main.pf-v5-c-page__main > section.pf-v5-c-page__main-section:not(:first-child):not(.alto-svc-section) {
  display: none !important;
}
.alto-svc { max-width: 1280px; color: #15161a; font-size: 14px; }
.alto-svc-msg { color: #71727a; font-size: 15px; padding: 18px 2px; margin: 0; }
.alto-svc-msg.err { color: #c0392b; }
.alto-svc-hint { color: #71727a; font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.alto-svc-hint.desc { color: #45464d; font-size: 14px; white-space: pre-line; }

.alto-svc-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 22px; }
.alto-svc-card { background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; }
.alto-svc-card h2 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.alto-svc-card .alto-svc-btn.primary { align-self: flex-start; margin-top: auto; }
.alto-svc-card .alto-svc-input { margin-bottom: 8px; }
.alto-svc-card textarea.alto-svc-input { resize: vertical; min-height: 54px; }

.alto-svc-input { box-sizing: border-box; width: 100%; padding: 9px 12px; border: 1px solid #d6d7dd; border-radius: 8px; font-size: 14px; background: #fff; color: #15161a; }
.alto-svc-input:focus { outline: 2px solid rgba(0,102,204,.25); border-color: #0066cc; }
.alto-svc-input.search { max-width: 420px; }

.alto-svc-btn { display: inline-block; cursor: pointer; border-radius: 8px; padding: 7px 13px; font-size: 13px; line-height: 1.3; white-space: nowrap; text-decoration: none !important; border: 1px solid #c9cad1; background: #fff; color: #15161a !important; }
.alto-svc-btn:hover { background: #f1f2f4; }
.alto-svc-btn.primary { background: #0066cc; border-color: #0066cc; color: #fff !important; padding: 9px 16px; font-size: 14px; }
.alto-svc-btn.primary:hover { background: #0058b0; }
.alto-svc-btn.danger { color: #c0392b !important; border-color: #e3b3ab; }
.alto-svc-btn.danger:hover { background: #fdf1ef; }
.alto-svc-btn:disabled { opacity: .5; cursor: progress; }

.alto-svc-tablewrap { background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; overflow-x: auto; }
.alto-svc-table { border-collapse: collapse; width: 100%; }
.alto-svc-table th, .alto-svc-table td { padding: 12px 16px; border-bottom: 1px solid #eef0f2; text-align: left; vertical-align: top; }
.alto-svc-table tbody tr:last-child td { border-bottom: none; }
.alto-svc-table thead th { background: #fafafb; font-weight: 600; font-size: 13px; color: #45464d; white-space: nowrap; }
.alto-svc-table tbody tr:hover { background: #fafafb; }
.alto-svc-table td.desc { color: #45464d; max-width: 460px; white-space: pre-line; }
.alto-svc-table td.num, .alto-svc-table td.you { white-space: nowrap; color: #45464d; }
.alto-svc-table td.you.yes { color: #2f7d32; font-weight: 600; }
.alto-svc-table td.act { white-space: nowrap; text-align: right; }
.alto-svc-table td.act .alto-svc-btn + .alto-svc-btn { margin-left: 6px; }
.alto-svc-table th.c, .alto-svc-table td.c { text-align: center; }
.alto-svc-table tr.pending { background: #fffaf0; }
.alto-svc-name { font-weight: 600; font-size: 15px; color: #0066cc !important; text-decoration: none; }
a.alto-svc-name:hover { text-decoration: underline; }
.alto-svc-name.nolink { color: #15161a !important; }
.alto-svc-host { font-size: 12px; color: #8a8b93; margin-top: 2px; }
.alto-svc-kind { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 9px; white-space: nowrap; vertical-align: middle; }
.alto-svc-kind.client { color: #1f5f99; background: #e4eefa; }
.alto-svc-kind.link { color: #6b5a13; background: #f5edcf; }

.alto-svc-back { display: inline-block; margin-bottom: 14px; color: #0066cc !important; text-decoration: none; font-size: 14px; }
.alto-svc-back:hover { text-decoration: underline; }
.alto-svc-svchead { margin-bottom: 14px; }
.alto-svc-svchead h2 { margin: 0 0 4px; font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.alto-svc-notes { background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; padding: 14px 20px; margin: 0 0 16px; }
.alto-svc-notes h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.alto-svc-notes dl { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 8px 18px; margin: 0; }
.alto-svc-notes dt { color: #71727a; font-size: 13px; }
.alto-svc-notes dd { margin: 0; color: #15161a; font-size: 14px; line-height: 1.45; }
@media (max-width: 640px) {
  .alto-svc-notes dl { grid-template-columns: 1fr; gap: 2px; }
  .alto-svc-notes dd { margin-bottom: 8px; }
}
.alto-svc-url { display: inline-block; margin-bottom: 10px; font-size: 13px; color: #0066cc !important; word-break: break-all; }
.alto-svc-all { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 14px; background: #fff; border: 1px solid #e4e4e7; border-radius: 10px; cursor: pointer; }
.alto-svc-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.alto-svc-count { margin-left: auto; color: #71727a; font-size: 13px; font-variant-numeric: tabular-nums; }
.alto-svc-uname { font-weight: 600; }
.alto-svc-pend { margin-left: 8px; font-size: 11px; font-weight: 600; color: #a06a14; background: #fbe9c8; border-radius: 20px; padding: 2px 9px; }
.alto-svc-chk { width: 18px; height: 18px; cursor: pointer; accent-color: #0066cc; }
.alto-svc-chk.adm { accent-color: #e8a33d; }
.alto-svc-chk:disabled { cursor: not-allowed; opacity: .6; }

.alto-svc-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #15161a; color: #fff; padding: 13px 20px; border-radius: 10px; font-size: 14px; max-width: 520px; box-shadow: 0 8px 28px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: .25s; z-index: 1100; }
.alto-svc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 700px) {
  .alto-svc-blocks { grid-template-columns: 1fr; }
  .alto-svc-table th, .alto-svc-table td { padding: 10px; }
}
