/* ═══════════════════════════════════════════════════════════
   Дархан-Уул аймаг — Худалдан авах ажиллагаа
   System fonts only — no external dependencies
   ═══════════════════════════════════════════════════════════ */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Courier, monospace;

  --navy:     #0d1f3c;
  --navy-mid: #183560;
  --navy-lt:  #254a8a;
  --gold:     #c8922a;
  --gold-lt:  #dfa93e;
  --red:      #c0392b;
  --green:    #1a7a4a;
  --green-bg: #e6f4ed;
  --blue-bg:  #e8f0fb;

  --g50:  #f7f8fc;
  --g100: #edf0f7;
  --g200: #d5dae8;
  --g400: #8892a8;
  --g600: #4a5568;
  --g800: #1a202c;
  --white: #ffffff;

  --radius:    8px;
  --radius-lg: 12px;
  --shadow:    0 1px 8px rgba(13,31,60,.10);
  --shadow-md: 0 4px 16px rgba(13,31,60,.13);
  --tr: .15s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--g50); color: var(--g800); min-height: 100vh; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: var(--font); font-size: inherit; }
ul { list-style: none; }

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 14px; height: 62px;
}
.logo-wrap {
  display: flex; align-items: center; gap: 11px; flex-shrink: 0;
  color: #fff;
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.logo-text strong {
  display: block; font-size: .9rem; font-weight: 700;
  color: #fff; line-height: 1.25; white-space: nowrap;
}
.logo-text span {
  font-size: .62rem; color: rgba(255,255,255,.5);
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.header-search {
  flex: 1; max-width: 400px; margin-left: auto;
  display: flex; align-items: center;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--radius); overflow: hidden;
}
.header-search input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; padding: 9px 14px; font-size: .85rem; min-width: 0;
}
.header-search input::placeholder { color: rgba(255,255,255,.42); }
.header-search button {
  background: var(--gold); border: none; cursor: pointer;
  padding: 9px 14px; color: #fff; font-size: .95rem;
  transition: var(--tr); flex-shrink: 0; line-height: 1;
}
.header-search button:hover { background: var(--gold-lt); }
.btn-login {
  background: var(--gold); color: #fff; border: none; cursor: pointer;
  padding: 8px 20px; border-radius: var(--radius);
  font-weight: 700; font-size: .84rem; transition: var(--tr);
  white-space: nowrap; flex-shrink: 0;
}
.btn-login:hover { background: var(--gold-lt); }
.mobile-menu-btn {
  display: none; background: none; border: none;
  color: #fff; padding: 6px; cursor: pointer;
  font-size: 1.3rem; flex-shrink: 0; line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════════════════════ */
.page-wrap {
  max-width: 1320px; margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: 252px 1fr 262px;
  gap: 24px;
  align-items: start;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR LEFT
══════════════════════════════════════════════════════════ */
.sidebar-left {
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 82px;
}

/* Org card */
.org-card {
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.org-card h2 { font-size: .95rem; font-weight: 700; }
.org-card p  { font-size: .65rem; color: rgba(255,255,255,.48); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.org-search {
  margin-top: 13px; display: flex; align-items: center;
  background: rgba(255,255,255,.1); border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius); overflow: hidden;
}
.org-search input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; padding: 8px 12px; font-size: .83rem; min-width: 0;
}
.org-search input::placeholder { color: rgba(255,255,255,.38); }
.org-search button { background: none; border: none; color: rgba(255,255,255,.5); padding: 8px 11px; cursor: pointer; font-size: .9rem; line-height: 1; }

/* Docs card */
.docs-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.docs-card-head {
  font-size: .68rem; font-weight: 700; color: var(--g400);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 12px 16px; border-bottom: 1px solid var(--g100);
  background: var(--g50);
}
.docs-card ul { list-style: none; }
.docs-card li { border-bottom: 1px solid var(--g100); }
.docs-card li:last-child { border: none; }
.docs-card a {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 15px; font-size: .77rem; color: var(--g600);
  transition: var(--tr); line-height: 1.4;
}
.docs-card a:hover { background: var(--g50); color: var(--navy); }
.doc-num {
  background: var(--navy); color: #fff; border-radius: 50%;
  min-width: 20px; height: 20px; font-size: .63rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

/* Digital button */
.btn-digital {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: 13px;
  font-weight: 700; font-size: .85rem; transition: var(--tr);
}
.btn-digital:hover { background: var(--navy-lt); }

/* Address card */
.address-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 13px 16px;
  font-size: .78rem; color: var(--g600); line-height: 1.6;
  border-left: 3px solid var(--gold);
}
.address-card strong { color: var(--navy); display: block; margin-bottom: 3px; font-size: .81rem; }

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════ */
.main-content { min-width: 0; }

.page-title {
  font-size: 1.55rem; font-weight: 800; color: var(--navy);
  margin-bottom: 18px; letter-spacing: -.022em;
}

/* Filter tabs */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.filter-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid var(--g200);
  background: #fff; color: var(--g600);
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: var(--tr); white-space: nowrap;
}
.filter-tab:hover { border-color: var(--navy-lt); color: var(--navy); background: var(--blue-bg); }
.filter-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── TENDER CARDS ── */
.tender-list { display: flex; flex-direction: column; gap: 12px; }

.tender-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); box-shadow: var(--shadow);
  padding: 18px 20px; transition: var(--tr);
  position: relative; overflow: hidden;
}
.tender-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--green); border-radius: 4px 0 0 4px;
}
.tender-card.expired::before { background: var(--red); }
.tender-card:hover {
  border-color: rgba(37,74,138,.28);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 9px; flex-wrap: wrap;
}
.ref-badge {
  font-family: var(--mono); font-size: .7rem; font-weight: 700;
  color: var(--navy-mid); background: var(--blue-bg);
  border: 1px solid #c5d5f0; padding: 3px 10px;
  border-radius: 4px; white-space: nowrap;
}
.method-badge {
  font-size: .7rem; font-weight: 700; padding: 3px 10px;
  border-radius: 4px; white-space: nowrap;
}
.method-badge.direct { background: var(--green-bg); color: var(--green); }
.method-badge.tender { background: var(--blue-bg); color: var(--navy-lt); }

.card-title {
  font-size: .97rem; font-weight: 700; color: var(--navy);
  margin-bottom: 14px; line-height: 1.45;
}
.card-title a:hover { color: var(--gold); }

.card-meta {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; margin-bottom: 14px;
}
.meta-item label {
  display: block; font-size: .64rem; color: var(--g400);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px;
}
.meta-item .val { font-size: .9rem; font-weight: 700; color: var(--navy); }
.meta-item .val.budget { font-size: .98rem; color: var(--navy-mid); }
.meta-item .val.sm { font-size: .81rem; font-weight: 500; color: var(--g600); }
.meta-item .val.red { color: var(--red); }

.card-footer {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--g100); padding-top: 11px;
  font-size: .71rem; color: var(--g400);
}
.bar-wrap {
  flex: 1; height: 5px; background: var(--g100);
  border-radius: 3px; overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 3px; background: var(--green); transition: width .3s; }
.bar-fill.warn { background: var(--gold); }
.bar-fill.over  { background: var(--red); }
.expired-tag { color: var(--red); font-weight: 700; }
.days-tag    { color: var(--navy); font-weight: 600; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--g400); background: #fff;
  border-radius: var(--radius-lg); border: 1.5px dashed var(--g200);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state strong { color: var(--navy); font-size: 1rem; }

/* Pagination */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a,
.pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius);
  border: 1.5px solid var(--g200);
  font-size: .82rem; font-weight: 600; transition: var(--tr);
}
.pagination a { color: var(--navy); background: #fff; }
.pagination a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination span { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ══════════════════════════════════════════════════════════
   SIDEBAR RIGHT
══════════════════════════════════════════════════════════ */
.sidebar-right { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 82px; }

.alert-card {
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: 20px;
  position: relative; overflow: hidden;
}
.alert-card::after {
  content: ''; position: absolute; right: -24px; bottom: -24px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(200,146,42,.12);
}
.alert-card h4 { font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.alert-card p  { font-size: .79rem; color: rgba(255,255,255,.68); line-height: 1.55; margin-bottom: 14px; }
.btn-more {
  display: inline-block; background: var(--gold); color: #fff;
  padding: 7px 16px; border-radius: var(--radius);
  font-size: .79rem; font-weight: 700; transition: var(--tr);
}
.btn-more:hover { background: var(--gold-lt); }

.stats-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); box-shadow: var(--shadow); padding: 16px;
}
.stats-card h4 {
  font-size: .65rem; font-weight: 700; color: var(--g400);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px;
}
.stat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--g100);
}
.stat-row:last-child { border: none; padding-bottom: 0; }
.stat-icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.stat-icon.blue { background: var(--blue-bg); }
.stat-icon.red-bg { background: #fdecea; }
.stat-num { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-label { font-size: .67rem; color: var(--g400); margin-top: 2px; }
.stat-badge {
  margin-left: auto; font-size: .66rem; font-weight: 700;
  padding: 2px 9px; border-radius: 10px; white-space: nowrap;
}
.stat-badge.live { background: var(--green-bg); color: var(--green); }
.stat-badge.red  { background: #fdecea; color: var(--red); }

.map-card {
  background: var(--navy); border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.map-card-inner { color: rgba(255,255,255,.28); text-align: center; font-size: .82rem; line-height: 2; }
.map-pin {
  position: absolute; background: var(--red); color: #fff;
  padding: 5px 13px; border-radius: 20px; font-size: .72rem; font-weight: 700;
  box-shadow: 0 4px 14px rgba(192,57,43,.45);
  bottom: 38%; right: 26%;
}

/* ══════════════════════════════════════════════════════════
   DETAIL PAGE
══════════════════════════════════════════════════════════ */
.detail-wrap { max-width: 1060px; margin: 26px auto; padding: 0 20px 52px; }
.breadcrumb {
  font-size: .75rem; color: var(--g400); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--gold); }
.detail-title { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 22px; line-height: 1.4; }
.detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 22px; }

.info-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 18px;
}
.info-card-head {
  background: var(--g50); border-bottom: 1px solid var(--g100);
  padding: 13px 18px; font-size: .86rem; font-weight: 700; color: var(--navy);
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--g100); }
.info-table tr:last-child { border: none; }
.info-table td { padding: 11px 18px; font-size: .84rem; }
.info-table td:first-child { color: var(--g400); width: 42%; }
.info-table td:last-child { color: var(--navy); font-weight: 600; }

.budget-card {
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px;
}
.budget-card label { font-size: .63rem; color: rgba(255,255,255,.5); letter-spacing: .07em; text-transform: uppercase; }
.budget-amount { font-size: 1.7rem; font-weight: 800; margin: 6px 0 4px; }
.budget-note { font-size: .71rem; color: rgba(255,255,255,.45); }

.doc-panel {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); box-shadow: var(--shadow);
}
.doc-panel h4 {
  font-size: .69rem; font-weight: 700; color: var(--gold);
  letter-spacing: .07em; text-transform: uppercase;
  padding: 13px 16px; border-bottom: 1px solid var(--g100);
  display: flex; align-items: center; gap: 7px;
}
.doc-panel ol { list-style: none; padding: 5px 0; }
.doc-panel li {
  display: flex; gap: 9px; padding: 9px 16px;
  border-bottom: 1px solid var(--g100);
  font-size: .78rem; color: var(--g600); line-height: 1.45;
}
.doc-panel li:last-child { border: none; }
.doc-n {
  background: var(--navy); color: #fff; width: 20px; height: 20px;
  border-radius: 50%; font-size: .62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

.pdf-wrap {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); overflow: hidden; margin-top: 18px;
}
.pdf-toolbar {
  background: var(--g50); border-bottom: 1px solid var(--g100);
  padding: 10px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.pdf-toolbar span { font-size: .83rem; font-weight: 700; color: var(--navy); }
.btn-dl {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy); color: #fff; padding: 7px 14px;
  border-radius: var(--radius); font-size: .79rem; font-weight: 700; transition: var(--tr);
}
.btn-dl:hover { background: var(--navy-lt); }
.pdf-embed { width: 100%; height: 510px; border: none; display: block; }

/* ══════════════════════════════════════════════════════════
   ADMIN
══════════════════════════════════════════════════════════ */
.admin-body { background: var(--g50); min-height: 100vh; }

.admin-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 214px;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; z-index: 100; overflow-y: auto;
}
.admin-logo { padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-logo a { display: flex; align-items: center; gap: 10px; color: #fff; }
.admin-logo a span { font-size: .74rem; font-weight: 700; line-height: 1.4; }
.admin-user { padding: 11px 18px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .68rem; color: rgba(255,255,255,.45); }
.admin-user strong { display: block; color: #fff; font-size: .84rem; margin-top: 1px; }
.admin-nav { flex: 1; padding: 8px 0; }
.admin-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 18px; font-size: .83rem; color: rgba(255,255,255,.65); transition: var(--tr);
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav a.active { border-left: 3px solid var(--gold); padding-left: 15px; }
.admin-nav svg { width: 17px; height: 17px; flex-shrink: 0; }

.admin-main { margin-left: 214px; padding: 26px; min-height: 100vh; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.admin-topbar h1 { font-size: 1.28rem; font-weight: 800; color: var(--navy); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--navy); color: #fff;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: .85rem; font-weight: 700; border: none; cursor: pointer; transition: var(--tr);
}
.btn-primary:hover { background: var(--navy-lt); }

.data-table-wrap {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); box-shadow: var(--shadow); overflow: hidden;
}
.data-table-head { padding: 16px 22px; border-bottom: 1px solid var(--g100); }
.data-table-head h2 { font-size: .95rem; font-weight: 700; color: var(--navy); }
.data-table-head p  { font-size: .74rem; color: var(--g400); margin-top: 2px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: .67rem; font-weight: 700; color: var(--g400);
  letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 1px solid var(--g100); white-space: nowrap; background: var(--g50);
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--g50); font-size: .82rem; vertical-align: middle; }
.data-table tr:last-child td { border: none; }
.data-table tr:hover td { background: var(--g50); }
.title-cell strong { font-weight: 700; color: var(--navy); display: block; margin-bottom: 2px; }
.title-cell span { font-size: .72rem; color: var(--g400); }
.ref-code {
  font-family: var(--mono); font-size: .7rem;
  color: var(--navy-mid); background: var(--blue-bg);
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.budget-col { font-weight: 700; color: var(--navy); white-space: nowrap; }
.status-pill { padding: 3px 10px; border-radius: 12px; font-size: .69rem; font-weight: 700; display: inline-block; }
.status-pill.active { background: var(--green-bg); color: var(--green); }
.status-pill.closed { background: #fdecea; color: var(--red); }
.action-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.btn-edit {
  background: none; border: 1.5px solid var(--g200); color: var(--g600);
  padding: 5px 11px; border-radius: 4px; font-size: .74rem; cursor: pointer; transition: var(--tr);
}
.btn-edit:hover { border-color: var(--navy); color: var(--navy); }
.btn-delete {
  background: var(--red); border: none; color: #fff;
  padding: 5px 11px; border-radius: 4px; font-size: .74rem; cursor: pointer; transition: var(--tr);
}
.btn-delete:hover { background: #a93226; }

/* Form */
.form-wrap {
  background: #fff; border-radius: var(--radius-lg);
  border: 1.5px solid var(--g100); box-shadow: var(--shadow);
  padding: 24px; max-width: 840px;
}
.form-wrap h2 { font-size: 1.02rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.form-sub { font-size: .76rem; color: var(--g400); margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .74rem; font-weight: 700; color: var(--navy); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--g200); border-radius: var(--radius);
  padding: 9px 12px; font-size: .85rem; color: var(--g800); outline: none; transition: var(--tr); width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(13,31,60,.07); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-file-info { font-size: .69rem; color: var(--g400); margin-top: 3px; }
.form-actions { display: flex; gap: 9px; margin-top: 22px; flex-wrap: wrap; }
.btn-save {
  background: var(--navy); color: #fff; border: none;
  padding: 10px 22px; border-radius: var(--radius);
  font-weight: 700; font-size: .87rem; cursor: pointer;
  display: flex; align-items: center; gap: 7px; transition: var(--tr);
}
.btn-save:hover { background: var(--navy-lt); }
.btn-cancel {
  background: none; border: 1.5px solid var(--g200); color: var(--g600);
  padding: 10px 18px; border-radius: var(--radius);
  font-weight: 600; font-size: .87rem; cursor: pointer; transition: var(--tr);
  display: inline-flex; align-items: center;
}
.btn-cancel:hover { border-color: var(--red); color: var(--red); }
.msg { padding: 11px 16px; border-radius: var(--radius); font-size: .83rem; margin-bottom: 16px; }
.msg.success { background: var(--green-bg); color: var(--green); border: 1px solid #a5d6a7; }
.msg.error   { background: #fdecea; color: var(--red); border: 1px solid #ef9a9a; }

/* Login */
.login-body { background: var(--navy); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: var(--radius-lg); padding: 36px; width: 100%; max-width: 360px; box-shadow: var(--shadow-md); }
.login-card h1 { font-size: 1.03rem; font-weight: 800; color: var(--navy); text-align: center; margin-bottom: 3px; }
.login-card > p { font-size: .74rem; color: var(--g400); text-align: center; margin-bottom: 22px; }
.login-card .form-group { margin-bottom: 13px; }
.btn-login-submit {
  width: 100%; background: var(--navy); color: #fff; border: none;
  padding: 12px; border-radius: var(--radius);
  font-weight: 700; font-size: .92rem; cursor: pointer; transition: var(--tr); margin-top: 5px;
}
.btn-login-submit:hover { background: var(--navy-lt); }

/* News */
.news-card { background: #fff; border-radius: var(--radius-lg); border: 1.5px solid var(--g100); box-shadow: var(--shadow); overflow: hidden; }
.news-item { padding: 13px 17px; border-bottom: 1px solid var(--g100); }
.news-item:last-child { border: none; }
.news-item p { font-size: .8rem; color: var(--g600); line-height: 1.5; }
.news-item time { font-size: .68rem; color: var(--g400); margin-top: 5px; display: block; }

/* ══════════════════════════════════════════════════════════
   MOBILE OVERLAY
══════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,31,60,.55); z-index: 150;
}
.sidebar-overlay.open { display: block; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1140px) {
  .page-wrap { grid-template-columns: 240px 1fr; }
  .sidebar-right { display: none; }
}

@media (max-width: 800px) {
  .page-wrap { grid-template-columns: 1fr; padding: 14px 14px 48px; gap: 16px; }
  .sidebar-left {
    display: none;
    position: fixed; top: 0; left: 0; bottom: 0; width: 285px;
    z-index: 160; overflow-y: auto; padding: 72px 14px 24px;
    background: var(--g50); box-shadow: var(--shadow-md);
  }
  .sidebar-left.open { display: flex; }
  .mobile-menu-btn { display: flex; }
  .logo-text span { display: none; }
  .header-search { max-width: none; }
  .page-title { font-size: 1.22rem; }
  .card-meta { grid-template-columns: 1fr 1fr; gap: 8px; }
  .detail-grid { grid-template-columns: 1fr; }
  /* Admin bottom nav on mobile */
  .admin-sidebar {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0;
    width: 100%; height: 54px; flex-direction: row; overflow: visible;
  }
  .admin-logo, .admin-user { display: none; }
  .admin-nav {
    display: flex; flex-direction: row; width: 100%;
    justify-content: space-around; padding: 0;
  }
  .admin-nav a {
    flex-direction: column; gap: 2px; padding: 6px 4px;
    font-size: .58rem; text-align: center; flex: 1; justify-content: center;
  }
  .admin-nav a.active { border-left: none; border-top: 3px solid var(--gold); padding-left: 4px; padding-top: 3px; }
  .admin-nav svg { width: 20px; height: 20px; }
  .admin-main { margin-left: 0; margin-bottom: 58px; padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 12px; gap: 9px; }
  .logo-text strong { font-size: .8rem; }
  .filter-tab { font-size: .72rem; padding: 6px 11px; }
  .tender-card { padding: 14px 15px; }
  .card-title { font-size: .92rem; }
  .meta-item .val.budget { font-size: .9rem; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .form-wrap { padding: 16px; }
}
