/* auth_ui.css — сторінка входу (login.html) і розділи «Мій доступ», «Користувачі», «Журнал дій» (auth_ui.js) */
.auth-page { min-height: 100vh; margin: 0; background: var(--bg-color); color: var(--text-main); font-family: var(--font-stack); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.auth-box { width: min(380px, 100%); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 28px; box-sizing: border-box; }
.auth-logo { display: block; margin: 0 auto 12px; border-radius: 10px; }
.auth-box h1 { text-align: center; font-size: 18px; margin: 0 0 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin: 0 0 18px; line-height: 1.5; }
.auth-f { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; text-align: left; gap: 4px; font-size: 12px; font-weight: 400; color: var(--text-muted); margin: 0 0 12px; }
.auth-f small { font-size: 11px; opacity: .85; }
.auth-f input { width: 100%; }
.auth-c { display: flex; gap: 8px; align-items: center; justify-content: flex-start; font-weight: 400; font-size: 13px; margin: 0 0 16px; color: var(--text-main); }
.auth-c input { width: auto; margin: 0; }
.auth-err { color: var(--danger); font-size: 12.5px; min-height: 16px; margin: -4px 0 10px; }
.auth-submit { width: 100%; height: 38px; justify-content: center; font-size: 14px; }
.auth-foot { text-align: center; font-size: 11.5px; color: var(--text-muted); margin-top: 16px; line-height: 1.6; }
.auth-foot code { font-size: 11px; background: var(--badge-bg); padding: 1px 5px; border-radius: 4px; }
.auth-foot a { color: var(--accent); }

/* шапка: користувач і меню */
.au-chip { gap: 8px !important; }
.au-ava { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.au-role { font-size: 10.5px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--border-color); color: var(--text-muted); }
.au-role.adm { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.au-menu { position: absolute; z-index: 1100; width: 240px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.au-menu.hidden { display: none; }
.au-menu-h { font-size: 11.5px; color: var(--text-muted); padding: 6px 10px 8px; }
.au-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: transparent; color: var(--text-main); font: inherit; font-size: 13px; text-align: left; border-radius: 6px; cursor: pointer; }
.au-menu button:hover { background: var(--badge-bg); }
.au-menu hr { border: 0; border-top: 1px solid var(--border-color); margin: 6px 0; }

/* розділи налаштувань */
.au .st-group + .st-group { margin-top: 12px; }
.au-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.au-table th { text-align: left; color: var(--text-muted); font-weight: 600; font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--border-color); }
.au-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.au-table select { width: auto; }
.au-table .btn { width: auto !important; }
.au-acts { white-space: nowrap; text-align: right; }
.au-acts .btn + .btn { margin-left: 4px; }
.au-off td { opacity: .55; }
.au-pill { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--border-color); color: var(--text-muted); white-space: nowrap; }
.au-pill.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.au-pill.warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.au-pill.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.au-muted { color: var(--text-muted); }
.au-nowrap { white-space: nowrap; }
.au-msg { font-size: 12px; color: var(--success); }
.au-msg.bad { color: var(--danger); }
.au-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 10px; line-height: 1.55; }
.au-hint code, .au-temp code { background: var(--badge-bg); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.au-add, .au-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.au-filters { margin: 0 0 10px; }
.au-add label, .au-filters label { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 4px; font-size: 12px; color: var(--text-muted); justify-content: flex-start; margin: 0; font-weight: 400; }
.au-add input, .au-add select, .au-filters input, .au-filters select { width: auto; min-width: 150px; }
.au-add .btn { width: auto !important; }
.au-temp { margin-top: 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); border-radius: 8px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.au-temp.hidden { display: none; }
.au-temp .btn { width: auto !important; }
@media (max-width: 700px) {
  .au-table { display: block; overflow-x: auto; }
  .au-acts { white-space: normal; }
}

/* кнопка «Кошик» над таблицею: кількість записів */
.trash-count:empty { display: none; }
.trash-count { font-size: 11px; min-width: 16px; padding: 0 5px; border-radius: 8px; background: var(--badge-bg); border: 1px solid var(--border-color); }

/* нагадування адміну про ключ шифрування */
.au-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--warning) 50%, transparent); border-radius: 8px; font-size: 13px; color: var(--warning); background: color-mix(in srgb, var(--warning) 8%, transparent); }
.au-banner .btn { width: auto !important; margin-left: auto; }

/* поле пароля з кнопкою «показати» (сторінка входу, «Мій доступ») */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { width: 100%; box-sizing: border-box; padding-right: 38px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 6px; padding: 0; }
.pw-eye:hover { color: var(--text-main); background: var(--badge-bg); }
/* журнал дій: скрол у блоці, заголовок таблиці на місці, роздільники днів */
.af-box { padding: 0; overflow: hidden; }
.af-box .au-filters { margin: 0; padding: 12px; border-bottom: 1px solid var(--border-color); }
.af-scroll { overflow: auto; resize: vertical; min-height: 160px; max-height: 90vh; }   /* кут унизу праворуч — тягнути; висоту задає auth_ui.js */
.af-table thead th { position: sticky; top: 0; z-index: 1; background: var(--card-bg); }
.af-table td { padding: 6px 10px; vertical-align: top; }
.af-table th { padding: 7px 10px; }
.af-day td { background: var(--badge-bg); color: var(--text-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; padding: 5px 10px; }
.af-day td span { font-weight: 400; margin-left: 6px; }
.af-r:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.af-tm { font-family: ui-monospace, Menlo, monospace; color: var(--text-muted); white-space: nowrap; width: 56px; }
.af-det { color: var(--text-muted); max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-load { text-align: center; font-size: 12px; padding: 10px; }
.af-load:empty { display: none; }
.af-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 8px 12px; border-top: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); }
.af-foot .au-msg:empty { display: none; }
.af-foot code { background: var(--badge-bg); padding: 1px 6px; border-radius: 4px; font-size: 11.5px; }
@media (max-width: 700px) {
  .af-scroll .au-table { display: table; }
  .af-ip { display: none; }
  .af-det { max-width: 120px; }
}
.af-sw { position: relative; }
.af-right { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.af-tip { padding: 0 2px; }
