/* AuctionBidder24 — Office admin styles */
:root {
  --bg: #0b0f17;
  --bg-2: #0f1524;
  --surface: #131b2c;
  --surface-2: #182238;
  --border: #24304a;
  --text: #e7ecf5;
  --muted: #9aa7bd;
  --faint: #6b7890;
  --brand: #4f8cff;
  --brand-2: #7c5cff;
  --ok: #2fbf71;
  --ok-bg: rgba(47, 191, 113, 0.14);
  --warn: #e6a23c;
  --warn-bg: rgba(230, 162, 60, 0.14);
  --danger: #ef5f6b;
  --danger-bg: rgba(239, 95, 107, 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(124, 92, 255, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  font-size: 12px; font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 14px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  transition: transform 0.06s ease, filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-block { width: 100%; }

/* action buttons in rows */
.act {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease;
}
.act:disabled { opacity: 0.5; cursor: not-allowed; }
.act-approve { color: var(--ok); border-color: rgba(47,191,113,0.35); }
.act-approve:hover { background: var(--ok-bg); }
.act-reject { color: var(--warn); border-color: rgba(230,162,60,0.35); }
.act-reject:hover { background: var(--warn-bg); }
.act-note:hover { border-color: var(--brand); }
.act-delete { color: var(--danger); border-color: rgba(239,95,107,0.35); }
.act-delete:hover { background: var(--danger-bg); }

/* ---------- Gate ---------- */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px 28px;
}
.gate-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 20px; }
.gate-card h1 { font-size: 22px; margin: 0 0 6px; }
.gate-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.gate-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 14px;
}
.gate-card input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}
.gate-hint { min-height: 20px; font-size: 13px; margin: 12px 0 0; color: var(--danger); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 15, 23, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.filter select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.filter select:focus { outline: none; border-color: var(--brand); }

/* ---------- Tabs ---------- */
.tabs {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 21, 36, 0.5);
}
.tabs-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  gap: 4px;
}
.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--brand); }

/* ---------- Content ---------- */
.content { max-width: 1200px; margin: 0 auto; padding: 28px 22px 60px; }
.content-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.content-head h1 { font-size: 24px; margin: 0; }
.count { color: var(--faint); font-size: 14px; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.grid { width: 100%; border-collapse: collapse; }
.grid thead th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--faint);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
.grid tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
.grid tbody tr:last-child td { border-bottom: none; }
.grid tbody tr:hover { background: rgba(255,255,255,0.02); }
.cell-login { font-weight: 700; }
.cell-muted { color: var(--muted); }
.cell-date { color: var(--faint); font-size: 13px; white-space: nowrap; }
.cell-note { color: var(--muted); max-width: 260px; }
.cell-note.empty { color: var(--faint); font-style: italic; }
.actions-col { text-align: right; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }

/* status pill */
.pill {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}
.pill-pending { color: var(--warn); background: var(--warn-bg); border: 1px solid rgba(230,162,60,0.3); }
.pill-approved { color: var(--ok); background: var(--ok-bg); border: 1px solid rgba(47,191,113,0.3); }
.pill-rejected { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(239,95,107,0.3); }
.pill-other { color: var(--muted); background: rgba(107,120,144,0.12); border: 1px solid var(--border); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.svc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.svc-head { display: flex; align-items: center; gap: 12px; }
.svc-preview {
  flex: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  overflow: hidden;
}
.svc-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-preview.empty { color: var(--faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.svc-head-text { min-width: 0; }
.svc-slug { font-weight: 700; font-size: 15px; word-break: break-word; }
.svc-updated { color: var(--faint); font-size: 12px; margin-top: 2px; }

.svc-meta {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.svc-meta-row { display: flex; gap: 8px; }
.svc-meta-key { color: var(--faint); flex: none; min-width: 62px; }
.svc-meta-val { color: var(--muted); word-break: break-all; }

.svc-fields { display: flex; flex-direction: column; gap: 11px; }
.svc-field { display: flex; flex-direction: column; gap: 5px; }
.svc-field label {
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.svc-field input,
.svc-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.svc-field textarea { min-height: 70px; line-height: 1.45; }
.svc-field input:focus,
.svc-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}
.svc-foot { display: flex; justify-content: flex-end; }

/* state rows */
.state { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.state-err { color: var(--danger); }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.18s ease;
}
.toast.leaving { animation: toast-out 0.2s ease forwards; }
.toast-ok { border-color: rgba(47,191,113,0.4); }
.toast-ok .toast-ico { color: var(--ok); }
.toast-err { border-color: rgba(239,95,107,0.4); }
.toast-err .toast-ico { color: var(--danger); }
.toast-info .toast-ico { color: var(--brand); }
.toast-ico { font-weight: 800; }
.toast-msg { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .grid thead { display: none; }
  .grid, .grid tbody, .grid tr, .grid td { display: block; width: 100%; }
  .grid tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 6px 4px;
  }
  .grid tbody td { border-bottom: none; padding: 8px 14px; display: flex; justify-content: space-between; gap: 12px; }
  .grid tbody td::before {
    content: attr(data-label);
    color: var(--faint);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
  }
  .actions-col, .row-actions { justify-content: flex-start; }
  .cell-note { max-width: none; text-align: right; }
}
