/* =========================================================
   HQCRM – Dark / Trade-in style alap (v2 – szélesített layout)
   ========================================================= */
:root {
  --bg: #0f172a;
  --bg-dark: #0b1220;
  --panel: #111827;
  --panel-light: #1f2937;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --radius: 14px;
  --sidebar-width: 240px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ================= Sidebar ================= */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  padding: 1.2rem 1rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand { margin-bottom: 1.4rem; }
.brand-title { font-weight: 700; font-size: 1.2rem; }
.brand-sub { font-size: .7rem; color: var(--text-muted); }

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: .4rem; }

.sidebar-nav a {
  display: block;
  padding: .55rem .7rem;
  border-radius: .5rem;
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  transition: .15s ease;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(34, 197, 94, 0.17);
  color: #fff;
}
.sidebar-nav a.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fee2e2;
}
.sidebar-section {
  margin-top: .8rem;
  margin-bottom: .3rem;
  font-size: .65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .08em;
}

/* ================= Main layout ================= */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.25);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(8px);
  padding: .9rem 1.6rem;
}
.page-title { margin: 0; font-size: 1.1rem; }

.user-badge {
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 9999px;
  padding: .4rem .8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.user-name { font-weight: 600; font-size: .8rem; }
.user-role { font-size: .6rem; color: var(--text-muted); }

/* ================= Content & Cards ================= */
.content {
  padding: 1.5rem 2.2rem 2.4rem;
  width: 100%;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.card {
  background: radial-gradient(circle at 10% 20%, rgba(15,23,42,0.35) 0%, rgba(15,23,42,0.1) 45%), rgba(15,23,42,.35);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.19);
  width: 100%;
  max-width: 100%;
}
.card h2, .card h3 { margin-top: 0; }

/* ================= Quick links ================= */
.quick-links { list-style: none; padding: 0; margin: 0; }
.quick-links li { margin-bottom: .4rem; }
.quick-links a {
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
}
.quick-links a:hover { text-decoration: underline; }

/* ================= Footer ================= */
.footer {
  margin-top: auto;
  padding: 1rem 2rem;
  font-size: .7rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* ================= Login page ================= */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #0f172a 0%, #020617 100%);
  min-height: 100vh;
}
.login-wrapper { width: 100%; max-width: 420px; padding: 1.2rem; }
.login-box {
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1.2rem;
  padding: 1.4rem 1.5rem 1.6rem;
  backdrop-filter: blur(15px);
  text-align: center;
}
.login-box h1 { margin: 0 0 .4rem; }
.login-subtitle {
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  font-size: .8rem;
}
label {
  display: block;
  text-align: left;
  font-size: .75rem;
  margin-bottom: .25rem;
}
input[type="email"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: .6rem;
  padding: .5rem .6rem;
  color: #fff;
  margin-bottom: .75rem;
}
select option { background: var(--panel-light); color: #fff; }

.btn {
  display: inline-block;
  border: 0;
  outline: 0;
  background: var(--accent);
  color: #0f172a;
  border-radius: .6rem;
  padding: .5rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn:hover { filter: brightness(1.1); }

.alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(248, 113, 113, .4);
  color: #fee2e2;
  border-radius: .5rem;
  padding: .4rem .6rem;
  margin-bottom: .75rem;
  font-size: .75rem;
}
.login-footer {
  margin-top: 1.1rem;
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: .08em;
}

/* ================= Tables ================= */
.table-wrap { overflow-x:auto; width:100%; }
.table-dark {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
.table-dark th, .table-dark td {
  padding: .65rem .8rem;
  border-bottom: 1px solid rgba(148,163,184,.06);
}
.table-dark th {
  text-align:left;
  font-size:.7rem;
  text-transform:uppercase;
  color:rgba(226,232,240,.6);
  letter-spacing:.04em;
}

.badge { display:inline-block; padding:.25rem .6rem; border-radius:.5rem; font-size:.65rem; }
.badge-success { background:rgba(34,197,94,.15); color:#bbf7d0; }
.badge-muted { background:rgba(148,163,184,.15); color:#cbd5f5; }

.btn-small {
  display:inline-block;
  background:rgba(15,23,42,.3);
  border:1px solid rgba(148,163,184,.12);
  padding:.35rem .65rem;
  border-radius:.4rem;
  font-size:.72rem;
  color:#fff;
  text-decoration:none;
}
.btn-small:hover { background:rgba(15,23,42,.6); }
.btn-danger { background:rgba(239,68,68,.2); border-color:rgba(248,113,113,.5); }

.text-muted { color:rgba(148,163,184,.7); font-size:.75rem; }

/* ================= Widen layout for admin lists ================= */
.card {
  width: 100%;
  max-width: 100%;
}
.content .card {
  margin-bottom: 1.5rem;
}
.content {
  max-width: 1600px;
  margin: 0 auto;
}


.alert.ok {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.35);
  color: #bbf7d0;
  border-radius: .5rem;
  padding: .5rem .7rem;
  margin-bottom: .8rem;
  font-size: .8rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #16a34a;
  padding: 0.4rem 1rem;
  border-radius: 0.6rem;
  margin-bottom: 1rem;
}

.filter-bar select {
  background: #0f172a;
  color: #fff;
  border: 1px solid #15803d;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-buttons .btn {
  padding: 0.3rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.btn-filter {
  background: #a7f3d0;
}

.btn-add {
  background: #22c55e;
}


