/* ============================================================
   CrossHub Global — admin console styles
   Loaded after main.css; reuses .btn, .brand-mark tokens.
   ============================================================ */

.admin-body { background: var(--sand); }

.admin-shell { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.admin-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(170deg, #0E2A4D, #0A1F3A);
  color: rgba(255, 255, 255, .78);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  padding: 6px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 16px;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a, .admin-sidebar-foot a, .admin-sidebar-foot button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: .92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  transition: background .2s, color .2s;
  width: 100%;
  text-align: left;
}
.admin-nav a:hover, .admin-sidebar-foot a:hover, .admin-sidebar-foot button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.admin-nav a.active {
  background: linear-gradient(135deg, var(--amber), var(--amber-600));
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(245, 158, 11, .3);
}
.nav-ico {
  width: 22px;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
}
.admin-sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logout-form { display: block; }
.admin-sidebar-foot button { color: rgba(255, 255, 255, .72); }
.admin-sidebar-foot button:hover { color: #FFB4B4; }

/* ---------- main ---------- */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-topbar h1 { font-size: 1.25rem; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.admin-lang {
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  border: 1.5px solid var(--line);
  border-radius: 99px;
  padding: 5px 14px;
  transition: border-color .2s, background .2s;
}
.admin-lang:hover { border-color: var(--amber); background: var(--amber-soft); }

.admin-content { padding: 32px; display: flex; flex-direction: column; gap: 28px; }

/* ---------- stat cards ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.stat-card.stat-new {
  background: linear-gradient(150deg, #0E2A4D, #16406E);
  border-color: transparent;
}
.stat-card.stat-new .stat-num { color: var(--amber); }
.stat-card.stat-new .stat-label { color: rgba(255, 255, 255, .75); }

/* ---------- panels & tables ---------- */
.admin-panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 28px;
  overflow-x: auto;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 1.05rem; font-weight: 800; color: var(--navy); }

.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table thead th {
  text-align: left;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-bottom: 2px solid var(--line-soft);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: .9rem;
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background .2s; }
.admin-table tbody tr:hover { background: var(--sand); }
.admin-table small { display: block; font-size: .8rem; color: var(--ink-soft); }

.cell-product { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cell-product img {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--sand);
  flex-shrink: 0;
}
.cell-product strong { color: var(--navy); font-size: .92rem; }
.cell-message { max-width: 260px; color: var(--ink-soft); }
.cell-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- status pills ---------- */
.status-pill {
  display: inline-block;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
}
.status-new { background: var(--amber-soft); color: #9A6A0B; }
.status-contacted { background: #E4F0FC; color: #1E5A9E; }
.status-closed { background: #E4F5EC; color: #177A4E; }

/* ---------- mini buttons ---------- */
.mini-btn {
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 13px;
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.mini-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.mini-danger { color: #B03A3A; background: #FBEDED; border-color: #F0CFCF; }
.mini-danger:hover { background: #C94545; border-color: #C94545; color: #fff; }
.inline-form { display: inline-flex; }
.inline-form select {
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--sand);
  cursor: pointer;
}

/* ---------- forms ---------- */
.admin-form { display: flex; flex-direction: column; gap: 22px; }
.admin-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.admin-form label { display: flex; flex-direction: column; gap: 7px; }
.admin-form label > span { font-size: .84rem; font-weight: 700; color: var(--navy); }
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="password"],
.admin-form select,
.admin-form textarea {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}
.admin-form textarea { resize: vertical; }
.admin-form input[type="file"] {
  font-size: .86rem;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--sand);
  cursor: pointer;
}
.span-2 { grid-column: span 2; }
.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  background: var(--sand);
  border-radius: 10px;
  padding: 12px 16px;
}
.checkbox-label input { width: 17px; height: 17px; accent-color: var(--amber); }
.checkbox-label span { font-weight: 600; color: var(--ink); }
.image-preview img {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  aspect-ratio: 1;
  object-fit: cover;
}
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.form-ok {
  background: #E4F5EC;
  border: 1px solid #BFE8D2;
  color: #177A4E;
  font-size: .9rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

/* ---------- login ---------- */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 80% 0%, rgba(245, 158, 11, .22), transparent 60%),
    linear-gradient(150deg, #0E2A4D, #0A1F3A);
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-shell { width: min(430px, 100%); }
.login-card {
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 42px 40px;
}
.admin-brand.login-brand {
  color: var(--navy);
  border-bottom: none;
  padding: 0 0 20px;
  margin-bottom: 6px;
  font-size: .95rem;
}
.login-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.login-card .section-sub { font-size: .9rem; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-form label { display: flex; flex-direction: column; gap: 7px; }
.login-form label > span { font-size: .84rem; font-weight: 700; color: var(--navy); }
.login-form input {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 15px;
  transition: border-color .2s, box-shadow .2s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}
.login-back {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color .2s;
}
.login-back:hover { color: var(--amber-600); }

/* ---------- admin responsive ---------- */
@media (max-width: 1080px) {
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
  }
  .admin-brand { border-bottom: none; padding: 4px 8px; margin-bottom: 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .admin-sidebar-foot { border-top: none; padding-top: 0; flex-direction: row; }
  .admin-content { padding: 20px 16px; }
  .admin-topbar { padding: 14px 16px; }
  .admin-form .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
