/* ============================================================
   Admin stílus v2.1 (javított)
   ============================================================ */

.admin-body {
  background: #eef2f7;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ===== ADMIN HEADER ===== */
.adm-header {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff; padding: 13px 0;
  box-shadow: 0 3px 14px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.adm-hdr-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.adm-brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; }
.adm-brand i { font-size: 1.4rem; color: #60a5fa; }
.adm-nav { display: flex; align-items: center; gap: 12px; }
.adm-nav-link {
  color: #94a3b8; font-size: .88rem;
  display: flex; align-items: center; gap: 5px;
  text-decoration: none; transition: color .18s;
}
.adm-nav-link:hover { color: #fff; text-decoration: none; }
.adm-nav-btn {
  background: rgba(239,68,68,.2);
  border: 1px solid rgba(239,68,68,.35);
  color: #fca5a5 !important;
  padding: 6px 14px; border-radius: 7px;
  font-size: .85rem;
  display: flex; align-items: center; gap: 5px;
  text-decoration: none !important;
}
.adm-nav-btn:hover { background: rgba(239,68,68,.35) !important; }

/* ===== BODY ===== */
.adm-body {
  flex: 1;
  max-width: 1400px; margin: 0 auto;
  width: 100%; padding: 28px 24px;
}

/* ===== LOGIN ===== */
.login-screen {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
  padding: 20px; min-height: 100vh;
}
.login-card {
  background: #fff; border-radius: 20px; padding: 44px;
  width: 400px; max-width: 100%;
  box-shadow: 0 25px 70px rgba(0,0,0,.35);
}
.login-logo { text-align: center; font-size: 3.5rem; color: #2563eb; margin-bottom: 6px; }
.login-card h2 { text-align: center; margin-bottom: 4px; font-size: 1.4rem; color: #1e293b; }
.login-sub { text-align: center; color: #64748b; font-size: .85rem; margin-bottom: 24px; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; font-size: .84rem; font-weight: 600; color: #475569; margin-bottom: 6px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap > i {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%); color: #94a3b8; pointer-events: none;
}
.input-icon-wrap input { padding-left: 38px !important; }
.btn-login {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff; border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; transition: opacity .2s;
}
.btn-login:hover { opacity: .92; }
.login-back { text-align: center; margin-top: 18px; font-size: .85rem; color: #64748b; }

/* ===== STAT CARDS ===== */
.stat-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
  background: #fff; border-radius: 14px;
  padding: 20px 22px; flex: 1; min-width: 155px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  display: flex; align-items: center; gap: 16px;
  border-left: 5px solid transparent;
}
.stat-card.blue   { border-color: #2563eb; }
.stat-card.green  { border-color: #22c55e; }
.stat-card.orange { border-color: #f59e0b; }
.stat-card.purple { border-color: #8b5cf6; }
.stat-icon { font-size: 1.7rem; flex-shrink: 0; }
.stat-card.blue   .stat-icon { color: #2563eb; }
.stat-card.green  .stat-icon { color: #22c55e; }
.stat-card.orange .stat-icon { color: #f59e0b; }
.stat-card.purple .stat-icon { color: #8b5cf6; }
.stat-val { font-size: 1.7rem; font-weight: 800; color: #1e293b; line-height: 1; }
.stat-lbl { font-size: .77rem; color: #64748b; margin-top: 3px; }

/* ===== TYPE DIST ===== */
.type-dist {
  background: #fff; border-radius: 14px;
  padding: 18px 22px; margin-bottom: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.dist-title {
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: #64748b; margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.dist-bars { display: flex; flex-direction: column; gap: 7px; }
.dist-bar-row { display: flex; align-items: center; gap: 10px; }
.dist-type { width: 90px; flex-shrink: 0; }
.dist-bar-bg { flex: 1; height: 9px; background: #f1f5f9; border-radius: 5px; overflow: hidden; }
.dist-bar-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #0ea5e9); border-radius: 5px; }
.dist-cnt { width: 28px; text-align: right; font-size: .8rem; color: #64748b; font-weight: 600; }

/* ===== LIST HEADER ===== */
.list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 12px;
}
.list-header h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.list-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-form .form-control {
  padding: 8px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: .88rem;
  background: #fff; color: #1e293b;
}
.btn-filter { background: #2563eb; color: #fff; border: none; padding: 8px 13px; border-radius: 8px; cursor: pointer; }
.btn-clear  {
  background: #ef4444; color: #fff;
  padding: 8px 11px; border-radius: 8px;
  font-size: .85rem; text-decoration: none !important;
}
.btn-new-qr {
  background: #22c55e; color: #fff !important;
  padding: 9px 18px; border-radius: 8px;
  font-weight: 600; font-size: .88rem;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none !important; white-space: nowrap;
}
.btn-new-qr:hover { background: #16a34a; text-decoration: none !important; }

/* ===== TABLE ===== */
.tbl-wrap { overflow-x: auto; border-radius: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.adm-tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: .86rem; }
.adm-tbl thead th {
  background: #f8fafc; padding: 12px 14px;
  text-align: left; font-weight: 700; color: #475569;
  border-bottom: 2px solid #e2e8f0; white-space: nowrap;
}
.adm-tbl tbody td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.adm-tbl tbody tr:hover { background: #f8fafc; }
.adm-tbl tbody tr:last-child td { border-bottom: none; }
.tc { text-align: center !important; }
.qr-thumb { width: 52px; height: 52px; object-fit: contain; border-radius: 7px; border: 1px solid #e2e8f0; display: block; }
.no-thumb { width: 52px; height: 52px; background: #f1f5f9; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #94a3b8; }
.logo-mini { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; display: block; }
.row-id { font-size: .72rem; color: #94a3b8; font-family: monospace; margin-top: 2px; }
.td-cont { max-width: 220px; }
.td-cont span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-date { white-space: nowrap; font-size: .8rem; color: #64748b; }
.td-ua   { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-acts { white-space: nowrap; }
.scan-badge {
  display: inline-block; padding: 3px 12px;
  border-radius: 20px; font-weight: 700; font-size: .88rem;
  background: #f1f5f9; color: #64748b;
}
.scan-badge.active { background: #dbeafe; color: #1d4ed8; }
.tbl-footer { text-align: right; padding: 9px 4px; font-size: .82rem; color: #64748b; }

/* ===== BADGES ===== */
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 20px;
  font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.badge-link      { background: #dbeafe; color: #1d4ed8; }
.badge-location  { background: #dcfce7; color: #15803d; }
.badge-email     { background: #fef9c3; color: #854d0e; }
.badge-text      { background: #f1f5f9; color: #475569; }
.badge-tel       { background: #e0e7ff; color: #3730a3; }
.badge-sms       { background: #ede9fe; color: #5b21b6; }
.badge-whatsapp  { background: #dcfce7; color: #15803d; }
.badge-wifi      { background: #e0f2fe; color: #0369a1; }
.badge-vcard     { background: #fce7f3; color: #9d174d; }
.badge-paypal    { background: #dbeafe; color: #0c4a6e; }
.badge-bitcoin   { background: #fef3c7; color: #92400e; }

/* ===== ACTION BUTTONS ===== */
.act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  margin: 0 2px; background: #f1f5f9; color: #475569;
  text-decoration: none !important; transition: all .15s; font-size: .88rem;
}
.act-btn:hover { background: #e2e8f0; color: #1e293b; text-decoration: none !important; }
.act-del:hover { background: #fef2f2 !important; color: #ef4444 !important; }

/* ===== EMPTY ===== */
.empty-box {
  background: #fff; border-radius: 14px;
  text-align: center; padding: 60px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.empty-box i { font-size: 3.5rem; color: #cbd5e1; display: block; margin-bottom: 14px; }
.empty-box p { color: #64748b; margin-bottom: 18px; }

/* ===== DETAIL ===== */
.detail-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 22px;
  gap: 12px; flex-wrap: wrap;
}
.detail-header h2 { font-size: 1.2rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.detail-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-box {
  background: #fff; border-radius: 14px;
  padding: 22px; box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.detail-box-title {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: #64748b; margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.info-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.info-table th, .info-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.info-table th { width: 130px; color: #64748b; font-weight: 600; font-size: .8rem; white-space: nowrap; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.chart-wrap { margin-top: 14px; }
.scan-stat-row { display: flex; gap: 10px; margin-bottom: 6px; }
.scan-stat-card { flex: 1; text-align: center; background: #f8fafc; border-radius: 10px; padding: 12px 6px; }
.scan-big { font-size: 1.7rem; font-weight: 800; color: #2563eb; }
.scan-lbl { font-size: .71rem; color: #64748b; margin-top: 2px; }
.top-ips { margin-top: 10px; }
.ip-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; background: #f8fafc;
  border-radius: 6px; margin-bottom: 4px; font-size: .82rem;
}
.ip-cnt { font-weight: 700; color: #2563eb; }
.content-code {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 10px 12px;
  word-break: break-all; font-size: .8rem;
  color: #2563eb; font-family: monospace;
}

/* ===== LOGOS PAGE ===== */
.logo-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.logo-card {
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 14px 10px;
  text-align: center; width: 105px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.logo-img-wrap { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.logo-img-wrap img { max-width: 56px; max-height: 56px; object-fit: contain; border-radius: 6px; }
.logo-name { font-size: .69rem; color: #475569; word-break: break-all; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-del { font-size: .72rem; color: #ef4444; text-decoration: none; display: flex; align-items: center; gap: 3px; }
.logo-del:hover { text-decoration: underline; }

/* ===== ALERTS (admin) ===== */
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; font-size: .88rem; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.muted { color: #64748b; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .stat-row { gap: 10px; }
  .stat-card { min-width: 130px; padding: 14px; }
  .adm-body { padding: 16px; }
}
