/* Marquee Hire Dubai — dashboard styling (WordPress-inspired, brand-themed) */
:root {
  --gold: #b8912e;
  --gold-dark: #8f6f1f;
  --charcoal: #1c1a17;
  --charcoal-2: #26231f;
  --ink: #2b2723;
  --muted: #6b6459;
  --line: #e7e1d6;
  --bg: #f4f1ea;
  --card: #ffffff;
  --ivory: #faf7f1;
  --ok: #2e7d47;
  --warn: #b4482b;
  --sidebar: #201d19;
  --sidebar-2: #2b2723;
  --shadow: 0 1px 2px rgba(28, 26, 23, .06), 0 6px 20px rgba(28, 26, 23, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-dark); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #322c24, var(--charcoal));
}
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); padding: 34px 30px; text-align: center;
}
.login-logo {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ivory); border: 1px solid var(--line);
  color: var(--gold-dark);
}
.login-card h1 { font-size: 19px; margin: 0 0 2px; color: var(--charcoal); }
.login-card p { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.login-card .field { text-align: left; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar); color: #cfc7b8; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; color: #1c1a17; }
.brand b { font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.brand small { display: block; color: #9b9384; font-weight: 500; font-size: 11px; }
.nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
  color: #cfc7b8; font-weight: 600; font-size: 13.5px; margin-bottom: 2px;
}
.nav a .ic { width: 18px; height: 18px; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--gold); color: #1c1a17; }
.nav a.active .ic { opacity: 1; }
.nav .badge { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; border-radius: 20px; font-size: 11px; padding: 1px 8px; }
.nav a.active .badge { background: rgba(0,0,0,.18); }
.sidebar .foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar .foot button { width: 100%; background: transparent; border: 1px solid rgba(255,255,255,.18); color: #cfc7b8; padding: 9px; border-radius: 8px; font-weight: 600; }
.sidebar .foot button:hover { color: #fff; border-color: rgba(255,255,255,.35); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { margin: 0; font-size: 17px; color: var(--charcoal); font-weight: 700; }
.topbar .spacer { flex: 1; }
.content { padding: 26px; max-width: 1100px; width: 100%; }

/* ---------- Buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 9px 15px; border-radius: 9px; font-weight: 700; font-size: 13px; }
.btn:hover { border-color: #d5ccbc; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1c1a17; }
.btn.primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: #fff; background: var(--warn); border-color: var(--warn); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 7px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 12.5px; color: var(--charcoal); margin-bottom: 6px; }
.field .hint { color: var(--muted); font-weight: 500; font-size: 11.5px; margin-top: 5px; }
input[type=text], input[type=password], input[type=search], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px;
  background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,145,46,.15); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.counter { float: right; font-weight: 600; font-size: 11px; color: var(--muted); }
.counter.warn { color: var(--warn); }
.counter.good { color: var(--ok); }

/* ---------- Cards / grid ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 30px; font-weight: 800; color: var(--charcoal); line-height: 1; }
.stat .l { color: var(--muted); font-weight: 600; margin-top: 6px; font-size: 12.5px; }
.stat.gold { background: linear-gradient(140deg, #b8912e, #9a7826); border-color: transparent; }
.stat.gold .n, .stat.gold .l { color: #fff; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.panel .phead { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.panel .phead h3 { margin: 0; font-size: 14px; color: var(--charcoal); }
.panel .pbody { padding: 6px 0; }

/* ---------- Table ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.tabs { display: inline-flex; background: #ece6db; border-radius: 9px; padding: 3px; }
.tabs button { border: 0; background: transparent; padding: 7px 13px; border-radius: 7px; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--charcoal); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #faf8f3; }
.thumb { width: 56px; height: 42px; border-radius: 7px; object-fit: cover; background: #ece6db; border: 1px solid var(--line); }
.thumb.empty { display: grid; place-items: center; color: #b7ac99; font-size: 10px; text-align: center; }
.row .title { font-weight: 700; color: var(--charcoal); font-size: 13.5px; }
.row .sub { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { font-size: 10.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; }
.pill.page { background: #eef1f6; color: #3a4a63; }
.pill.post { background: #f3eefa; color: #5a3f7a; }
.pill.warnpill { background: #fbebe6; color: var(--warn); }
.row .actions { display: flex; gap: 7px; }
.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); }

/* ---------- Editor ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.imgbox { border: 1px dashed #cdc4b3; border-radius: 12px; overflow: hidden; background: #faf8f3; }
.imgbox .preview { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #ece6db; }
.imgbox .preview.empty { display: grid; place-items: center; color: #b0a48f; font-weight: 600; }
.imgbox .imgactions { display: flex; gap: 8px; padding: 12px; }

/* Google snippet preview */
.serp { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.serp .u { color: #4d5156; font-size: 12px; }
.serp .t { color: #1a0dab; font-size: 18px; line-height: 1.3; margin: 3px 0; }
.serp .d { color: #4d5156; font-size: 13px; line-height: 1.45; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--charcoal); color: #fff; padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--warn); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(28,26,23,.5); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.modal .mhead { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 800; color: var(--charcoal); }
.modal .mbody { padding: 20px; }
.modal .mfoot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .nav { display: flex; flex-wrap: wrap; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
}
