/* Generated by Trae Work */
/* YurevoTech admin console styles */

:root {
  --primary: #165DFF;
  --primary-dark: #1149CC;
  --gold: #D4AF37;
  --bg: #FFFFFF;
  --bg-alt: #F1F5F9;
  --dark: #0F172A;
  --dark-2: #1E293B;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --danger: #DC2626;
  --success: #16A34A;
  --warning: #D97706;
  --radius: 8px;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-alt);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; }

a { color: var(--primary); text-decoration: none; }

input, select, textarea, button { font-family: inherit; font-size: 14px; }

/* ---------- Login ---------- */

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at 20% 20%, rgba(22, 93, 255, 0.35), transparent 55%);
  z-index: 500;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}

.login-brand h1 { font-size: 1.05rem; }
.login-brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.login-error {
  display: none;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  font-size: 12.5px;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.login-error.show { display: block; }

/* ---------- Layout ---------- */

.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--dark);
  color: #fff;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.35rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.sidebar-brand strong { font-size: 15px; display: block; }
.sidebar-brand span { font-size: 11px; color: #94A3B8; letter-spacing: 0.06em; text-transform: uppercase; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #CBD5E1;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-item .count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 7px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  font-size: 12px;
  color: #94A3B8;
}

.sidebar-footer a { display: block; color: #CBD5E1; margin-bottom: 0.4rem; }
.sidebar-footer a:hover { color: #fff; }

.logout-btn {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12.5px;
}

.logout-btn:hover { background: rgba(255, 255, 255, 0.08); }

.main {
  padding: 1.5rem 1.75rem 3rem;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-head h2 { font-size: 1.35rem; }
.page-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

.head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.view { display: none; }
.view.active { display: block; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-gold { background: var(--gold); color: #1F2937; }
.btn-gold:hover { background: #C19F2E; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; border-color: #FCA5A5; color: var(--danger); }
.btn-danger:hover { background: #FEF2F2; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 12px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards / tables ---------- */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card + .card { margin-top: 1rem; }

.card-pad { padding: 1.1rem 1.25rem; }

.toolbar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.toolbar input[type="search"],
.toolbar select {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  min-width: 200px;
}

.toolbar input[type="search"]:focus,
.toolbar select:focus { outline: none; border-color: var(--primary); }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: #F8FAFC;
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

tbody tr:hover { background: #F8FAFC; }
tbody tr:last-child td { border-bottom: 0; }

.cell-model { font-weight: 700; color: var(--primary); font-size: 12px; letter-spacing: 0.03em; }
.cell-name { font-weight: 600; }
.cell-muted { color: var(--muted); font-size: 12px; }
.cell-nowrap { white-space: nowrap; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-live { background: #DCFCE7; color: #15803D; }
.badge-draft { background: #E2E8F0; color: #475569; }
.badge-unread { background: #DBEAFE; color: #1D4ED8; }
.badge-following { background: #FEF3C7; color: #B45309; }
.badge-won { background: #DCFCE7; color: #15803D; }
.badge-invalid { background: #F1F5F9; color: #64748B; }

.row-actions { display: flex; gap: 0.35rem; }

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Forms ---------- */

.field { margin-bottom: 0.9rem; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.08);
}

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

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  font-size: 12.5px;
  cursor: pointer;
  background: #fff;
  user-select: none;
}

.chip.checked { border-color: var(--primary); background: #EFF6FF; color: var(--primary-dark); font-weight: 600; }
.chip input { margin: 0; accent-color: var(--primary); }

.spec-rows { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }

.spec-row { display: grid; grid-template-columns: 1fr 1.5fr 34px; gap: 0.4rem; }

.spec-row .input { padding: 0.4rem 0.55rem; }

.mini-remove {
  width: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.mini-remove:hover { color: var(--danger); border-color: #FCA5A5; background: #FEF2F2; }

.image-row { display: flex; gap: 1rem; align-items: flex-start; }

.image-preview {
  width: 148px;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  flex-shrink: 0;
}

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

.toggle-row { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; }

/* ---------- Drawer / modal ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 200;
}

.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 720px;
  max-width: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 200ms ease;
  z-index: 210;
  display: flex;
  flex-direction: column;
}

.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-head h3 { font-size: 1rem; }
.drawer-head .close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #F8FAFC;
  flex-shrink: 0;
}

.drawer-foot .right { display: flex; gap: 0.5rem; margin-left: auto; }

/* ---------- Inquiries detail ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.detail-item span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 2px;
}

.detail-item strong, .detail-item a { font-size: 13.5px; word-break: break-word; }

.message-box {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}

.note-box { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 6px; padding: 0.7rem 0.85rem; font-size: 12.5px; margin-bottom: 1rem; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 12px);
  background: var(--dark);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 400;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #B91C1C; }

/* ---------- Category rows ---------- */

.cat-group { border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; }
.cat-group:last-child { border-bottom: 0; }

.cat-parent {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.cat-parent input { font-weight: 700; }

.cat-sub {
  display: grid;
  grid-template-columns: 1fr 110px 90px auto;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1.1rem;
  margin-bottom: 0.45rem;
}

.cat-slug { font-size: 11.5px; color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 1rem;
  }
  .sidebar-brand { border: 0; margin: 0; padding: 0; flex-shrink: 0; }
  .nav-item { white-space: nowrap; width: auto; }
  .nav-item .count { margin-left: 6px; }
  .sidebar-footer { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; gap: 0.5rem; align-items: center; }
  .sidebar-footer a { display: none; }
  .logout-btn { margin: 0; width: auto; padding: 0.4rem 0.7rem; }
  .main { padding: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .cat-sub { grid-template-columns: 1fr 90px; }
  .cat-sub .btn-sm { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
}
