/* Ügyfélkapu - modern, mobil-első dizájn, szándékosan függetlenül az
   ügyintézői (AdminLTE-alapú) felülettől. */

:root {
  --uk-primary: #2563eb;
  --uk-primary-dark: #1d4ed8;
  --uk-bg: #f4f6fb;
  --uk-card: #ffffff;
  --uk-text: #1e293b;
  --uk-muted: #64748b;
  --uk-border: #e2e8f0;
  --uk-success: #16a34a;
  --uk-danger: #dc2626;
  --uk-radius: 16px;
}

* { box-sizing: border-box; }

body.uk-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--uk-bg);
  color: var(--uk-text);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.uk-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--uk-primary);
  color: #fff;
  padding: 14px 16px calc(14px + env(safe-area-inset-top, 0px));
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.uk-topbar a { color: #fff; text-decoration: none; opacity: 0.9; font-size: 0.85rem; }

.uk-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 90px;
}

.uk-card {
  background: var(--uk-card);
  border-radius: var(--uk-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  padding: 16px;
  margin-bottom: 14px;
}
.uk-card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--uk-text);
}

.uk-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--uk-border);
  font-size: 0.92rem;
}
.uk-row:last-child { border-bottom: none; }
.uk-row .uk-label { color: var(--uk-muted); }
.uk-row .uk-value { text-align: right; font-weight: 500; }

.uk-empty { color: var(--uk-muted); font-size: 0.9rem; text-align: center; padding: 18px 0; }

.uk-btn {
  display: inline-block;
  background: var(--uk-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.uk-btn:active { background: var(--uk-primary-dark); }
.uk-btn.uk-btn-outline { background: transparent; color: var(--uk-primary); border: 1px solid var(--uk-primary); }
.uk-btn.uk-btn-sm { width: auto; padding: 8px 14px; font-size: 0.85rem; }

.uk-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--uk-border);
  border-radius: 12px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  background: #fafbfd;
}
.uk-input:focus { outline: none; border-color: var(--uk-primary); background: #fff; }

.uk-alert {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.uk-alert-danger { background: #fef2f2; color: var(--uk-danger); }
.uk-alert-success { background: #f0fdf4; color: var(--uk-success); }

.uk-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}
.uk-badge-danger { background: var(--uk-danger); }
.uk-badge-primary { background: var(--uk-primary); }
.uk-badge-muted { background: var(--uk-muted); }

/* Alsó, mobil-app-szerű navigáció */
.uk-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--uk-border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.uk-bottomnav a {
  flex: 1;
  text-align: center;
  padding: 9px 4px 8px;
  text-decoration: none;
  color: var(--uk-muted);
  font-size: 0.68rem;
  position: relative;
}
.uk-bottomnav a i { display: block; font-size: 1.25rem; margin-bottom: 2px; }
.uk-bottomnav a.uk-active { color: var(--uk-primary); }
.uk-bottomnav a .uk-nav-badge {
  position: absolute;
  top: 3px;
  right: 22%;
  background: var(--uk-danger);
  color: #fff;
  border-radius: 999px;
  font-size: 0.62rem;
  padding: 1px 5px;
  font-weight: 700;
}

/* Chat buborékok */
.uk-chat-list { list-style: none; margin: 0; padding: 0; }
.uk-chat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--uk-border);
  text-decoration: none;
  color: var(--uk-text);
}
.uk-chat-item:last-child { border-bottom: none; }

.uk-bubble-row { display: flex; margin-bottom: 8px; }
.uk-bubble-row.mine { justify-content: flex-end; }
.uk-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.35;
}
.uk-bubble-row.mine .uk-bubble { background: var(--uk-primary); color: #fff; border-bottom-right-radius: 4px; }
.uk-bubble-row.theirs .uk-bubble { background: #eef1f6; color: var(--uk-text); border-bottom-left-radius: 4px; }
.uk-bubble-time { font-size: 0.65rem; opacity: 0.7; margin-top: 3px; }

.uk-chat-inputbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--uk-border);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 8px;
}
.uk-chat-inputbar input {
  flex: 1;
  border: 1px solid var(--uk-border);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 0.9rem;
}
.uk-chat-inputbar button {
  background: var(--uk-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.uk-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.uk-login-box { width: 100%; max-width: 380px; }
.uk-login-logo { text-align: center; margin-bottom: 22px; color: var(--uk-primary); font-weight: 800; font-size: 1.3rem; }

/* ============================================================
   Asztali (PC) nézet - kb. tablet mérettől felfelé.
   A HTML-ben a .uk-bottomnav a topbar UTÁN, a tartalom ELŐTT áll
   (lásd az egyes oldalakat) - mobilon ez position:fixed-del a
   képernyő aljára kerül (a DOM-sorrend itt nem számít), asztalon
   viszont ITT jelenik meg, egy rendes, felső tab-sávként.
   ============================================================ */
@media (min-width: 768px) {
  .uk-content { max-width: 640px; padding-bottom: 30px; }

  .uk-bottomnav {
    position: static;
    max-width: 640px;
    margin: 0 auto;
    border-top: none;
    border-bottom: 2px solid var(--uk-border);
    justify-content: center;
    box-shadow: none;
  }
  .uk-bottomnav a {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 20px;
    font-size: 0.85rem;
    position: relative;
  }
  .uk-bottomnav a i { display: inline; font-size: 1rem; margin-bottom: 0; }
  .uk-bottomnav a.uk-active { box-shadow: inset 0 -2px 0 var(--uk-primary); }
  .uk-bottomnav a .uk-nav-badge { top: 6px; right: 6px; }

  /* Chat: az input-sáv és a beszélgetés ne fusson a teljes böngésző-
     szélességben, hanem kövesse a tartalom oszlop szélességét. */
  .uk-chat-inputbar {
    position: sticky;
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid var(--uk-border);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  .uk-bubble { max-width: 60%; }

  .uk-login-box { max-width: 420px; }
}
