/* =========================
   ALAPOK / THEME (egységes)
========================= */
:root{
  --bg-0:#050505;
  --bg-1:#141414;
  --bg-2:#1a1a1a;
  --card: rgba(25,25,25,0.96);
  --card-2: rgba(24,24,24,0.96);

  --text:#e3e3e3;
  --muted:#a6a6a6;

  --blue:#4da6ff;
  --blue-2:#1a8cff;

  --border-soft: rgba(255,255,255,0.06);
  --border-blue: rgba(77,166,255,0.25);

  --danger: rgba(220, 53, 69, 1);
  --success: rgba(25, 135, 84, 1);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;

  --shadow-lg: 0 18px 45px rgba(0,0,0,0.75);
  --shadow-md: 0 12px 32px rgba(0,0,0,0.65);

  --container-pad: clamp(14px, 3vw, 26px);
  --tap: 44px; /* mobil érintési méret */
}

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

html, body{
  height: 100%;
}

body{
  margin:0;
  padding:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #303030 0, var(--bg-1) 45%, var(--bg-0) 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a{
  color: var(--blue);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

/* Animációk: mobilon kicsit finomabb */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================
   AUTH (login/reg/2fa) - mobil-first
========================= */
.auth-wrapper{
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--container-pad);
  animation: fadeInUp 0.6s ease-out;
}

.auth-card{
  width: 100%;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(77, 166, 255, 0.15);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3.2vw, 28px) clamp(16px, 3vw, 26px);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover:hover){
  .auth-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(0,0,0,0.85);
    border-color: rgba(77,166,255,0.4);
  }
}

.logo-wrapper{
  display:flex;
  justify-content:center;
  margin-bottom: 10px;
}
.logo{
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--blue), #0052a3);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:700;
  font-size:26px;
  box-shadow: 0 0 25px rgba(77, 166, 255, 0.5);
  border: 2px solid rgba(255,255,255,0.15);
}

.auth-title{
  text-align:center;
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--blue);
}
.auth-subtitle{
  text-align:center;
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: #b0b0b0;
}

/* inputok – mobilon nagyobb érintési felület */
.form-control{
  background-color: #2f2f2f;
  border-radius: var(--radius-sm);
  border: 1px solid #444;
  color: #ffffff;
  font-size: 1rem;
  min-height: var(--tap);
  padding: 10px 12px;
}

.form-control::placeholder{ color:#9a9a9a; }

.form-control:focus{
  background-color:#333333;
  border-color: var(--blue);
  box-shadow: 0 0 0 0.18rem rgba(77, 166, 255, 0.4);
  color:#fff;
  outline: none;
}

/* gomb – mobilon full width barátságos */
.btn-primary{
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 12px 16px;
  font-size: 1rem;
  min-height: var(--tap);
  width: 100%;
  box-shadow: 0 0 18px rgba(26, 140, 255, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}
.btn-primary:hover{
  background: linear-gradient(135deg, #64b3ff, #0077e6);
}
.btn-primary:active{
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(45, 166, 255, 0.4);
}

.alert-custom-error,
.alert-custom-success{
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  padding: 10px 12px;
}
.alert-custom-error{
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #ff7272;
}
.alert-custom-success{
  background: rgba(25, 135, 84, 0.12);
  border: 1px solid rgba(25, 135, 84, 0.5);
  color: #7bffb2;
}

.auth-footer{
  text-align:center;
  margin-top: 14px;
  font-size: 0.9rem;
  color: #a0a0a0;
}

/* =========================
   APP LAYOUT (dashboard/ügyfélkapu)
   Mobil-first: felül "topbar" jelleg, nagy képernyőn oldalmenü
========================= */
.app-container{
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* mobilon egymás alatt */
  animation: fadeInUp 0.55s ease-out;
}

/* Sidebar mobilon: teljes szélesség, "top panel" */
.sidebar{
  width: 100%;
  background: rgba(12, 12, 12, 0.96);
  border-bottom: 1px solid var(--border-blue);
  display: flex;
  flex-direction: column;
  padding: 14px 14px;
  gap: 10px;
}

.sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.sidebar-brand{
  margin-left: 0;
}
.sidebar-brand-title{
  font-weight: 700;
  font-size: 1.05rem;
  color: #f5f5f5;
  line-height: 1.2;
}
.sidebar-brand-subtitle{
  font-size: 0.85rem;
  color: #9f9f9f;
}

/* Menü: mobilon rácsosabb, jól tapintható */
.sidebar-nav{
  display: grid;
  grid-template-columns: 1fr; /* alapból 1 oszlop */
  gap: 6px;
}

.sidebar-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #d0d0d0;
  font-size: 0.98rem;
  min-height: var(--tap);
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.sidebar-link span.icon{
  width: 22px;
  display: inline-block;
  text-align: center;
}

.sidebar-link:hover{
  background: rgba(77, 166, 255, 0.12);
  color: #ffffff;
  transform: translateX(1px);
  text-decoration: none;
}

.sidebar-link.active{
  background: linear-gradient(135deg, rgba(77, 166, 255, 0.4), rgba(26, 140, 255, 0.6));
  color: #ffffff;
  box-shadow: 0 0 18px rgba(45, 166, 255, 0.55);
}

.sidebar-link.disabled{
  opacity: 0.4;
  pointer-events: none;
}

.sidebar-footer{
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.logout-btn{
  width: 100%;
  background: transparent;
  border-radius: 10px;
  border: 1px solid rgba(255, 80, 80, 0.6);
  color: #ff7b7b;
  font-size: 0.95rem;
  min-height: var(--tap);
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.logout-btn:hover{
  background: rgba(220, 53, 69, 0.2);
  box-shadow: 0 0 16px rgba(220, 53, 69, 0.5);
  color: #ffe5e5;
}

/* Tartalom */
.content-area{
  flex-grow: 1;
  padding: var(--container-pad);
}

/* Panel kártyák: mobilon szellősebb, max szélesség korlát */
.panel-card{
  background: var(--card-2);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}

.panel-header-title{
  font-size: 1.1rem;
  font-weight: 650;
  color: #f4f4f4;
  margin: 0;
}
.panel-header-subtitle{
  font-size: 0.9rem;
  color: var(--muted);
  margin: 6px 0 0;
}

/* Táblázat */
.table-dark-custom{
  color: var(--text);
  border-color: #343434;
  font-size: 0.95rem;
}

/* =========================
   BREAKPOINTOK
========================= */

/* Kisebb mobil: nav 2 oszlop, hogy ne legyen túl hosszú a lista */
@media (max-width: 420px){
  .sidebar-nav{
    grid-template-columns: 1fr 1fr;
  }
  .sidebar-link{
    justify-content: center;
  }
  .sidebar-link span.icon{
    margin: 0;
  }
}

/* Tablet+ : vissza klasszikus oldalmenüre */
@media (min-width: 768px){
  .app-container{
    flex-direction: row;
  }

  .sidebar{
    width: 260px;
    border-bottom: none;
    border-right: 1px solid var(--border-blue);
    padding: 18px 16px;
  }

  .sidebar-header{
    justify-content: flex-start;
    margin-bottom: 20px;
  }

  .sidebar-nav{
    display: block;
    margin-top: 10px;
  }

  .sidebar-link{
    font-size: 0.92rem;
    padding: 8px 10px;
    min-height: auto;
  }

  .content-area{
    padding: 20px 26px;
  }

  .panel-card{
    padding: 18px 18px 16px;
    margin-bottom: 18px;
  }
}

/* Akik mozgásra érzékenyek */
@media (prefers-reduced-motion: reduce){
  *{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
