/* ═══════════════════════════════════════════════
   DubaiHousing Publisher — Global Stylesheet
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:          #0b0f1c;
  --bg2:         #111827;
  --bg3:         #161e30;
  --bg4:         #1a2438;
  --border:      #1e2d45;
  --border2:     #253552;
  --text:        #e2e8f0;
  --text2:       #94a3b8;
  --text3:       #64748b;
  --gold:        #d4a832;
  --gold2:       #f0c040;
  --gold-bg:     rgba(212,168,50,.09);
  --gold-border: rgba(212,168,50,.28);
  --green:       #22c55e;
  --green-bg:    rgba(34,197,94,.09);
  --red:         #ef4444;
  --red-bg:      rgba(239,68,68,.09);
  --blue:        #3b82f6;
  --warn:        #f59e0b;
  --r:           10px;
  --mono:        'DM Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── TOPBAR ──────────────────────────────────── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.3px;
  margin-right: 16px;
  flex-shrink: 0;
}
.logo em { color: var(--gold); font-style: normal; }
.logo-sub { color: var(--text3); font-weight: 400; }
.logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}

.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: all .15s;
}
.nav-link:hover { background: var(--bg3); color: var(--text); }
.nav-link.active { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-border); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-ext {
  font-size: 12px; color: var(--text3); text-decoration: none;
  padding: 5px 10px; border: 1px solid var(--border2); border-radius: 6px;
  transition: all .15s;
}
.nav-ext:hover { color: var(--gold); border-color: var(--gold-border); }
.nav-logout {
  font-size: 12px; color: var(--text3); text-decoration: none;
  padding: 5px 10px; border: 1px solid var(--border2); border-radius: 6px;
  transition: all .15s;
}
.nav-logout:hover { color: var(--red); border-color: rgba(239,68,68,.4); }

.main-content { min-height: calc(100vh - 56px); }

/* ── PAGE HEADER ─────────────────────────────── */
.page-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.page-header p  { font-size: 13px; color: var(--text3); margin-top: 3px; }
.page-header-actions { display: flex; gap: 10px; }

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
}
.card-title {
  font-size: 13px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 14px;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  text-decoration: none; transition: all .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #0a0f1a;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(212,168,50,.3); }
.btn-secondary {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger {
  background: var(--red-bg); color: var(--red);
  border: 1px solid rgba(239,68,68,.3);
}
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }

/* ── FORMS ───────────────────────────────────── */
.field { margin-bottom: 14px; }
.field-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px;
}
.af-tag {
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  background: var(--gold-bg); color: var(--gold);
  border: 1px solid var(--gold-border); font-weight: 700; letter-spacing: .04em;
}
input[type=text], input[type=password], input[type=email],
textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 70px; }
select option { background: var(--bg2); }
.slug-row { display: flex; gap: 6px; }
.slug-row input { flex: 1; font-family: var(--mono); font-size: 12px; }
.btn-auto {
  padding: 0 12px; background: var(--bg3);
  border: 1px solid var(--border2); border-radius: 8px;
  color: var(--gold); font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  font-family: 'DM Sans', sans-serif; transition: all .15s;
}
.btn-auto:hover { background: var(--gold-bg); border-color: var(--gold); }
.char-count { font-size: 10px; color: var(--text3); text-align: right; margin-top: 3px; }
.char-count.ok  { color: var(--green); }
.char-count.over { color: var(--red); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── SECTION LABELS ──────────────────────────── */
.sec-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text3);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.step-badge {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--text3);
  flex-shrink: 0; transition: all .3s;
}
.step-badge.done { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }

/* ── DROP ZONES ──────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--border2);
  border-radius: var(--r); padding: 22px 16px;
  text-align: center; cursor: pointer;
  transition: all .2s; background: var(--bg3);
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--gold); background: var(--gold-bg); }
.drop-zone.has-file { border-color: var(--green); background: var(--green-bg); border-style: solid; }
.drop-zone h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 7px 0 4px; }
.drop-zone p  { font-size: 11px; color: var(--text3); }
.drop-icon { font-size: 26px; }

.file-badge {
  display: none; align-items: center; gap: 8px;
  margin-top: 10px; padding: 7px 10px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 7px; font-size: 11px; color: var(--text2);
}
.file-badge .fname { font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.img-zone {
  border: 1.5px dashed var(--border2);
  border-radius: var(--r); min-height: 80px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
  background: var(--bg3); overflow: hidden;
}
.img-zone:hover { border-color: var(--gold); }
.img-zone.has-img { border-style: solid; border-color: var(--green); }
.img-zone img { width: 100%; height: 120px; object-fit: cover; }
.img-placeholder { text-align: center; padding: 16px; font-size: 11px; color: var(--text3); }

/* ── PARSE BAR ───────────────────────────────── */
.parse-bar { display: none; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.pchip {
  padding: 3px 8px; border-radius: 5px; font-size: 11px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text3); font-family: var(--mono);
}
.pchip.ok   { background: var(--green-bg); border-color: rgba(34,197,94,.3); color: var(--green); }
.pchip.warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); color: var(--warn); }

/* ── PUBLISH LAYOUT ──────────────────────────── */
.publish-layout {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}
.pub-left {
  width: 320px; flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.pub-right { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.pub-section { padding: 16px; border-bottom: 1px solid var(--border); }

/* ── PUBLISH BUTTONS ─────────────────────────── */
.pub-bar {
  padding: 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; margin-top: auto;
}
.btn-publish {
  width: 100%; padding: 12px;
  border-radius: 9px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all .2s;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #0a0f1a;
}
.btn-publish:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,168,50,.3); }
.btn-publish:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-draft {
  width: 100%; padding: 11px;
  border-radius: 9px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border2);
  background: var(--bg3); color: var(--text2); transition: all .15s;
}
.btn-draft:hover { border-color: var(--gold); color: var(--gold); }
.pub-status { font-size: 12px; text-align: center; min-height: 18px; color: var(--text3); }
.pub-status.ok      { color: var(--green); }
.pub-status.err     { color: var(--red); }
.pub-status.loading { color: var(--gold); }

/* ── TABS ────────────────────────────────────── */
.tab-bar {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--bg2); padding: 0 20px; flex-shrink: 0;
}
.tab {
  padding: 13px 17px; font-size: 13px; font-weight: 500;
  color: var(--text3); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .15s;
  user-select: none;
}
.tab:hover { color: var(--text2); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.preview-area { flex: 1; overflow-y: auto; padding: 26px 34px; background: var(--bg); }

/* ── PREVIEW CONTENT ─────────────────────────── */
.prev-content h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 14px; line-height: 1.3; }
.prev-content h2 { font-size: 17px; font-weight: 700; color: var(--gold); margin: 22px 0 9px; padding-bottom: 7px; border-bottom: 1px solid var(--gold-border); }
.prev-content h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 16px 0 7px; }
.prev-content p  { color: var(--text2); line-height: 1.7; margin-bottom: 11px; }
.prev-content ul, .prev-content ol { padding-left: 18px; color: var(--text2); margin-bottom: 11px; }
.prev-content li { margin-bottom: 4px; line-height: 1.6; }
.prev-content strong { color: var(--text); }
.prev-content blockquote {
  border-left: 3px solid var(--gold); padding: 10px 15px;
  background: var(--gold-bg); border-radius: 0 8px 8px 0;
  color: var(--text2); margin: 14px 0; font-style: italic;
}

/* ── DPI TABLE STYLE ─────────────────────────── */
.prev-content table {
  width: 100%; border-collapse: collapse;
  border-radius: 10px; overflow: hidden;
  margin: 18px 0; box-shadow: 0 2px 14px rgba(0,0,0,.4); font-size: 13px;
}
.prev-content table th { padding: 12px 15px; font-weight: 700; color: #fff; text-align: left; }
.prev-content table thead tr th:nth-child(1) { background: #1a3a52; }
.prev-content table thead tr th:nth-child(2) { background: #1a4a2e; text-align: center; }
.prev-content table thead tr th:nth-child(3) { background: #4a3e10; text-align: center; }
.prev-content table thead tr th:nth-child(n+4) { background: #2a1a4a; text-align: center; }
.prev-content table tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
.prev-content table tbody tr:nth-child(odd)  { background: rgba(255,255,255,.015); }
.prev-content table tbody tr:hover { background: rgba(212,168,50,.06); }
.prev-content table td {
  padding: 10px 15px; border-bottom: 1px solid var(--border);
  color: var(--text2); vertical-align: top; line-height: 1.5;
}
.prev-content table td:first-child { color: #7ab4d4; font-weight: 600; }

/* ── POST MANAGER ────────────────────────────── */
.posts-page { padding: 0 28px 28px; }
.posts-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 0; flex-wrap: wrap;
}
.posts-toolbar h2 { font-size: 17px; font-weight: 700; }
.post-count { font-size: 12px; color: var(--text3); }
.filter-group { display: flex; gap: 6px; margin-left: auto; }
.filter-btn {
  padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border2);
  background: var(--bg3); color: var(--text3); transition: all .15s;
  font-family: 'DM Sans', sans-serif;
}
.filter-btn.active { background: var(--gold-bg); border-color: var(--gold-border); color: var(--gold); }
.search-input {
  padding: 7px 12px; background: var(--bg);
  border: 1px solid var(--border2); border-radius: 8px;
  color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 13px; outline: none; width: 220px;
}
.search-input:focus { border-color: var(--gold); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.post-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; transition: all .2s;
}
.post-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.pc-img { position: relative; height: 120px; background: var(--bg3); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--text3); }
.pc-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.pc-badge.active   { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.pc-badge.deactive { background: rgba(100,116,139,.15); color: var(--text3); border: 1px solid var(--border); }
.pc-body { padding: 14px; }
.pc-cat   { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin-bottom: 5px; }
.pc-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta  { font-size: 10px; color: var(--text3); margin-bottom: 10px; font-family: var(--mono); }
.pc-actions { display: flex; gap: 6px; }
.pc-btn {
  flex: 1; padding: 6px 0; border-radius: 7px; font-size: 11px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text2); text-align: center; transition: all .15s;
  font-family: 'DM Sans', sans-serif; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.pc-btn:hover  { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }
.pc-btn.del:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.pc-btn.edit   { flex: 2; }
.posts-empty   { text-align: center; padding: 60px; color: var(--text3); grid-column: 1/-1; }

/* ── DASHBOARD ───────────────────────────────── */
.dashboard-page { padding: 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
}
.stat-num  { font-size: 32px; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; }
.recent-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.recent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recent-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.recent-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
.recent-table tr:hover td { background: var(--bg3); }
.recent-table td:first-child { color: var(--text3); font-family: var(--mono); font-size: 11px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; }
.status-dot.active   { background: var(--green); }
.status-dot.deactive { background: var(--text3); }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }

/* ── LOGIN PAGE ──────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg);
}
.login-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px; width: 380px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon { width: 48px; height: 48px; font-size: 22px; margin: 0 auto 10px; }
.login-logo h1 { font-size: 20px; font-weight: 700; }
.login-logo h1 em { color: var(--gold); font-style: normal; }
.login-logo p  { font-size: 12px; color: var(--text3); margin-top: 4px; }
.login-error { background: var(--red-bg); border: 1px solid rgba(239,68,68,.3); color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.login-btn { width: 100%; padding: 12px; border-radius: 9px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; border: none; background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #0a0f1a; transition: all .2s; }
.login-btn:hover { opacity: .9; }

/* ── WEBP ────────────────────────────────────── */
.webp-controls { display: none; flex-direction: column; gap: 7px; margin-top: 10px; }
.webp-controls.visible { display: flex; }
.webp-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text3); }
.webp-row input[type=range] { flex: 1; accent-color: var(--gold); }
.compress-stats { display: none; gap: 7px; padding: 7px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; font-size: 11px; align-items: center; }
.compress-stats.visible { display: flex; }
.cs-saved { margin-left: auto; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 10px; border: 1px solid; }
.spinner { display: none; font-size: 11px; color: var(--gold); text-align: center; padding: 5px; }
.spinner.visible { display: block; }

/* ── EDIT BANNER ─────────────────────────────── */
.edit-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(59,130,246,.1);
  border-bottom: 1px solid rgba(59,130,246,.25);
  font-size: 12px; color: #93c5fd; flex-shrink: 0;
}
.edit-banner strong { color: var(--blue); }

/* ── META / SEO TAB ──────────────────────────── */
.meta-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px; }
.mc-label  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 4px; }
.mc-val    { font-size: 13px; color: var(--text); }
.mc-val.slug  { font-family: var(--mono); color: var(--gold); font-size: 12px; }
.mc-val.green { color: var(--green); }
.serp-preview { background: var(--bg2); border: 1px solid var(--green); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.serp-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--green); margin-bottom: 9px; }
.serp-url   { font-size: 12px; color: #22c55e; margin-bottom: 3px; }
.serp-title { font-size: 16px; color: #8ab4f8; margin-bottom: 5px; line-height: 1.3; }
.serp-desc  { font-size: 13px; color: #bdc1c6; line-height: 1.5; }

/* ── FAQ TAB ─────────────────────────────────── */
.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.faq-num  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin-bottom: 7px; }
.faq-q    { font-weight: 600; color: var(--text); margin-bottom: 6px; line-height: 1.4; font-size: 13px; }
.faq-a    { color: var(--text2); line-height: 1.6; font-size: 13px; }

/* ── PROGRESS OVERLAY ────────────────────────── */
.progress-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 1000; align-items: center; justify-content: center; }
.progress-overlay.show { display: flex; }
.progress-box { background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; padding: 28px 36px; text-align: center; min-width: 320px; }
.progress-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.progress-msg   { font-size: 13px; color: var(--text2); margin-bottom: 18px; }
.progress-bar   { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill  { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 2px; transition: width .4s; }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 999; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--bg2); border: 1px solid var(--border2); border-radius: 13px; padding: 26px; width: 360px; text-align: center; }
.modal-box h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.modal-box p  { font-size: 13px; color: var(--text2); margin-bottom: 18px; line-height: 1.5; }
.modal-btns { display: flex; gap: 10px; }
.btn-modal { flex: 1; padding: 10px; border-radius: 9px; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid var(--border2); background: var(--bg3); color: var(--text2); transition: all .15s; }
.btn-modal.danger { background: var(--red-bg); border-color: rgba(239,68,68,.4); color: var(--red); }
.btn-modal.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── TOAST ───────────────────────────────────── */
.toast { position: fixed; bottom: 22px; right: 22px; padding: 11px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; z-index: 9999; transform: translateY(80px); opacity: 0; transition: all .25s; pointer-events: none; max-width: 320px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green-bg); border: 1px solid rgba(34,197,94,.4); color: var(--green); }
.toast.error   { background: var(--red-bg);   border: 1px solid rgba(239,68,68,.4); color: var(--red); }
.toast.warn    { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.4); color: var(--warn); }

/* ── RAW HTML ────────────────────────────────── */
.raw-area { font-family: var(--mono); font-size: 11px; color: #7fba9a; white-space: pre-wrap; line-height: 1.6; background: var(--bg2); border-radius: 8px; padding: 16px; }

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state { text-align: center; padding: 55px 20px; color: var(--text3); }
.empty-state .ei { font-size: 44px; margin-bottom: 12px; }
.empty-state h3  { font-size: 15px; color: var(--text2); margin-bottom: 6px; }

/* ── MISC ────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
input[type=file] { display: none; }
a { color: inherit; }

.badge {
  display: inline-block; padding: 1px 6px;
  border-radius: 4px; font-size: 10px; font-weight: 700;
}
.badge.gold { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-border); }
