/* ============================================================
   LOGINN GAMING CAFE — css/admin.css
   Revamped: Games + News management, mobile-first
============================================================ */

/* ── LOGIN ───────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 24px;
}

.login-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.login-title {
  font-family: var(--f-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-form { display: flex; flex-direction: column; gap: 18px; }

.lf-field { display: flex; flex-direction: column; gap: 8px; }

.lf-field label {
  font-family: var(--f-heading);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lf-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.lf-input:focus { border-color: var(--blue); }

.lf-input:-webkit-autofill,
.lf-input:-webkit-autofill:hover,
.lf-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  border-color: var(--blue) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.login-error {
  background: rgba(255,45,120,0.1);
  border: 1px solid rgba(255,45,120,0.3);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--pink);
  font-size: 0.85rem;
}

/* ── ADMIN NAV ───────────────────────────────────────────── */
.admin-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,16,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.admin-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 12px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-badge {
  font-size: 0.55rem;
  background: var(--pink-dim);
  color: var(--pink);
  border: 1px solid rgba(255,45,120,0.3);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.1em;
  vertical-align: middle;
  margin-left: 6px;
}

.admin-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.75rem;
  min-height: 36px;
}

.hide-mobile { display: none; }
@media (min-width: 768px) {
  .hide-mobile { display: inline; }
  .admin-nav-inner { padding: 0 28px; }
  .admin-email { max-width: 200px; }
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.admin-main {
  padding: 20px 0 100px;
  min-height: calc(100vh - 64px);
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

@media (min-width: 768px) {
  .admin-container { padding: 0 28px; }
  .admin-main { padding: 32px 0 80px; }
}

/* ── STATS ───────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.stat-card-icon.blue  { background: var(--blue-dim);  color: var(--blue);  }
.stat-card-icon.green { background: var(--green-dim); color: var(--green); }
.stat-card-icon.pink  { background: var(--pink-dim);  color: var(--pink);  }

.stat-card-num {
  font-family: var(--f-display);
  font-size: 1.4rem;
  color: #fff;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-card-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .stats-row { gap: 16px; }
  .stat-card { padding: 20px 24px; gap: 16px; }
  .stat-card-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .stat-card-num { font-size: 1.8rem; }
  .stat-card-label { font-size: 0.78rem; }
}

/* ── TABS ────────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 4px;
}

.admin-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: calc(var(--r) - 4px);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--f-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.admin-tab:hover { color: var(--text); }

.admin-tab.active {
  background: linear-gradient(135deg, var(--blue-dim), rgba(0,212,255,0.15));
  color: var(--blue);
  border: 1px solid rgba(0,212,255,0.3);
  box-shadow: 0 0 20px rgba(0,212,255,0.1);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PANELS ──────────────────────────────────────────────── */
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-title {
  font-family: var(--f-display);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .panel-header { padding: 20px 24px; }
  .panel-title { font-size: 1rem; }
  .panel-actions { gap: 8px; }
}

/* ── PANEL SEARCH ────────────────────────────────────────── */
.panel-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.panel-search i { font-size: 0.85rem; }

.panel-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.88rem;
}

.panel-search input::placeholder { color: var(--text-dim); }

/* ── ADMIN CARD LIST ─────────────────────────────────────── */
.admin-cards-list {
  max-height: calc(100vh - 340px);
  min-height: 200px;
  overflow-y: auto;
  padding: 8px;
}

.admin-cards-list::-webkit-scrollbar { width: 4px; }
.admin-cards-list::-webkit-scrollbar-track { background: transparent; }
.admin-cards-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.88rem;
}

/* ── GAME CARD (Admin) ───────────────────────────────────── */
.admin-game-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--bg);
  transition: all 0.2s ease;
}

.admin-game-card:hover {
  border-color: var(--border-hi);
  background: var(--bg-card-h);
}

.agc-cover {
  width: 44px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
}

.agc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agc-info {
  flex: 1;
  min-width: 0;
}

.agc-title {
  font-family: var(--f-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.agc-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.agc-platform {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-family: var(--f-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.agc-platform.pc { background: var(--blue-dim); color: var(--blue); }
.agc-platform.ps5 { background: var(--pink-dim); color: var(--pink); }
.agc-platform.xbox { background: var(--green-dim); color: var(--green); }
.agc-platform.sim { background: rgba(250,204,21,0.12); color: #facc15; }

.agc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.agc-actions .action-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.action-edit {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(0,212,255,0.2);
}
.action-edit:hover { background: var(--blue); color: #000; }

.action-delete {
  background: var(--pink-dim);
  color: var(--pink);
  border-color: rgba(255,45,120,0.2);
}
.action-delete:hover { background: var(--pink); color: #fff; }

/* ── NEWS CARD (Admin) ───────────────────────────────────── */
.admin-news-card {
  padding: 14px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--bg);
  transition: all 0.2s ease;
}

.admin-news-card:hover {
  border-color: var(--border-hi);
  background: var(--bg-card-h);
}

.anc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.anc-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: var(--f-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.anc-tag.tag-blue { background: var(--blue-dim); color: var(--blue); }
.anc-tag.tag-green { background: var(--green-dim); color: var(--green); }
.anc-tag.tag-pink { background: var(--pink-dim); color: var(--pink); }

.anc-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.anc-title {
  font-family: var(--f-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.anc-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.anc-cta {
  font-size: 0.72rem;
  color: var(--blue);
}

.anc-actions {
  display: flex;
  gap: 6px;
}

.anc-actions .action-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .modal-card {
    border-radius: var(--r);
    max-height: 85vh;
  }
  @keyframes slideUp {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.modal-title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover { color: var(--text); border-color: var(--border-hi); }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── MODAL FORM FIELDS ───────────────────────────────────── */
.mf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-field label {
  font-family: var(--f-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mf-field label .req { color: var(--pink); }

.mf-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.mf-input:focus { border-color: var(--blue); }

.mf-textarea { resize: vertical; min-height: 70px; }

.mf-color {
  padding: 4px;
  height: 42px;
  cursor: pointer;
}

.mf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mf-checkboxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mf-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}

.mf-check input[type="checkbox"],
.mf-check input[type="radio"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  padding: 14px 20px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--f-body);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.4s 2.6s ease forwards;
  pointer-events: auto;
  white-space: nowrap;
}

.toast i { font-size: 1rem; }
.toast.success i { color: var(--green); }
.toast.error i { color: var(--pink); }
.toast.info i { color: var(--blue); }

@keyframes toastIn {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
  to { transform: translateY(30px); opacity: 0; }
}

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .stat-card { padding: 10px 8px; flex-direction: column; text-align: center; gap: 4px; }
  .stat-card-icon { width: 32px; height: 32px; font-size: 0.8rem; }
  .stat-card-num { font-size: 1.1rem; }
  .stat-card-label { font-size: 0.58rem; }
  .admin-tab { font-size: 0.72rem; padding: 10px 8px; }
  .panel-header { padding: 12px; }
  .panel-actions { gap: 4px; }
  .btn-sm { padding: 6px 10px; font-size: 0.68rem; }
}

@media (max-width: 360px) {
  .admin-container { padding: 0 8px; }
  .stats-row { gap: 4px; }
  .stat-card { padding: 8px 4px; }
  .stat-card-num { font-size: 0.95rem; }
  .stat-card-label { font-size: 0.52rem; }
  .admin-tab { font-size: 0.62rem; padding: 8px 4px; gap: 3px; }
  .admin-tab i { font-size: 0.7rem; }
  .panel-header { padding: 10px 8px; }
  .panel-actions .btn-sm { padding: 5px 8px; font-size: 0.62rem; }
  .admin-game-card { padding: 8px; gap: 8px; }
  .agc-cover { width: 34px; height: 46px; }
  .agc-title { font-size: 0.78rem; }
  .agc-meta { font-size: 0.6rem; }
  .anc-title { font-size: 0.8rem; }
  .anc-desc { font-size: 0.72rem; }
  .modal-header { padding: 14px 14px 0; }
  .modal-body { padding: 14px; gap: 12px; }
  .mf-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Confirm dialog ──────────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.confirm-card h3 {
  font-family: var(--f-display);
  font-size: 1rem;
  margin-bottom: 8px;
}

.confirm-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ════════════ FEATURED PANEL ════════════ */
.featured-section {
  background: rgba(255,255,255,0.012);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.featured-section[open] {
  background: rgba(255,255,255,0.025);
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.featured-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  transition: background 0.2s;
}
.featured-cat-header:hover { background: rgba(255,255,255,0.02); }

.featured-cat-title {
  font-family: var(--f-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
}
.featured-cat-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--f-heading);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s;
}
.featured-section[open] .featured-cat-count { color: var(--blue); }
.featured-cat-count i { transition: transform 0.3s ease; }
.featured-section[open] .featured-cat-count i { transform: rotate(180deg); color: var(--blue); }
.featured-list-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.featured-section[open] .featured-list-wrap {
  grid-template-rows: 1fr;
}
.featured-list {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 20px;
}
.featured-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
.featured-item-title {
  flex: 1;
  font-family: var(--f-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}
.featured-empty {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 16px;
  text-align: center;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
}