/* =========================================================
   DialBharat — Blog dashboard  (/css/blog-dashboard.css)
   Separate stylesheet for BlogDashboard.cshtml.
   Loaded after style.css (uses its colours and fonts).
   ========================================================= */
.bd { padding: 40px 16px 72px; background: var(--soft, #F6F4EF); min-height: 60vh; }
.bd [hidden] { display: none !important; }
.bd-wrap { max-width: 1100px; margin: 0 auto; display: grid; gap: 22px; }

/* ---------- title bar ---------- */
.bd-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.bd-bar h1 { font-size: 30px; font-weight: 800; }
.bd-bar p { margin-top: 2px; color: var(--slate); font-size: 15px; }
.bd-bar-act { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- stats ---------- */
.bd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.bd-stat { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 14px; }
.bd-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--saffron); }
.bd-stat:nth-child(2)::before { background: var(--green); }
.bd-stat:nth-child(3)::before { background: var(--gold); }
.bd-stat:nth-child(4)::before { background: var(--navy); }
.bd-stat b { display: block; font: 800 30px/1.1 var(--sat); }
.bd-stat span { color: var(--slate); font-size: 14px; }

/* ---------- panels ---------- */
.bd-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 8px 20px -14px rgba(11, 31, 69, .35); }
.bd-panel h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.bd-panel .bd-sub { color: var(--slate); font-size: 14.5px; margin-bottom: 4px; }

/* ---------- editor ---------- */
.bd-editor { animation: bdIn .25s ease both; }
@keyframes bdIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bd-form label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.bd-form label small { font-weight: 500; color: var(--slate); }
.bd-form input[type="text"], .bd-form input[type="url"], .bd-form select, .bd-form textarea {
  width: 100%; padding: 11px 12px; font: inherit; background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px;
}
.bd-form textarea { line-height: 1.6; resize: vertical; }
.bd-form input:focus, .bd-form select:focus, .bd-form textarea:focus { outline: 3px solid rgba(255, 153, 51, .35); border-color: var(--saffron); }
.bd-form .bad { border-color: #B4232A !important; background: #FFF6F6 !important; box-shadow: 0 0 0 3px rgba(180, 35, 42, .18); }
.bd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bd-hint { margin-top: 5px; color: var(--slate); font-size: 13px; line-height: 1.5; }
.bd-cnt { margin-top: 4px; text-align: right; color: var(--slate); font-size: 13px; }
.bd-cnt.over { color: #B4232A; font-weight: 700; }
.bd-cover { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.bd-cover input[type="file"] { width: auto; max-width: 100%; padding: 8px; border: 1.5px dashed #cfc8ba; border-radius: 10px; background: #fcfbf8; font: inherit; font-size: 14px; }
.bd-prev { position: relative; width: 160px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--soft, #F6F4EF); border: 1px solid var(--line); }
.bd-prev img { width: 100%; height: 100%; object-fit: cover; }
.bd-prev button { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; }
.bd-or { margin: 10px 0 0; color: var(--slate); font-size: 13px; }
.bd-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.bd-msg { margin-top: 14px; padding: 12px 16px 12px 44px; position: relative; border-radius: 12px; font-weight: 600; font-size: 15px; line-height: 1.45; background: #FDECEC; border: 1.5px solid #E28B90; color: #8F1D22; }
.bd-msg:empty { display: none; }
.bd-msg::before { content: "!"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: #B4232A; color: #fff; text-align: center; line-height: 22px; font-size: 14px; font-weight: 800; }
.bd-msg.ok { background: #E8F6EC; border-color: #8FCBA0; color: #0F5F2F; }
.bd-msg.ok::before { content: "✓"; background: #138808; }

/* ---------- list toolbar ---------- */
.bd-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bd-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-chip { background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 7px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.bd-chip:hover { border-color: var(--saffron); }
.bd-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.bd-find { display: flex; gap: 10px; flex-wrap: wrap; }
.bd-find input, .bd-find select { padding: 9px 12px; font: inherit; font-size: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; }
.bd-find input { min-width: 200px; }

/* ---------- post rows ---------- */
.bd-list { display: grid; gap: 12px; }
.bd-post { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: box-shadow .15s, border-color .15s; }
.bd-post:hover { border-color: #d9d1c1; box-shadow: 0 10px 24px -16px rgba(11, 31, 69, .4); }
.bd-thumb { width: 120px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--navy), #1d3b7a); display: grid; place-items: center; color: var(--gold); font: 800 28px var(--sat); }
.bd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bd-post h3 { font-size: 19px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.bd-post h3 a:hover { color: var(--saffron-deep); }
.bd-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; color: var(--slate); font-size: 13.5px; }
.bd-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #F0EEE8; color: var(--slate); }
.bd-pill.pub { background: #E8F6EC; color: var(--green-deep); }
.bd-pill.draft { background: #FFF1DE; color: #9A5B00; }
.bd-pill.cat { background: #EEF1F9; color: var(--navy); }
.bd-acts { display: flex; flex-direction: column; gap: 8px; }
.bd-acts .btn { padding: 7px 16px; font-size: 13.5px; width: 100%; }
.bd-del { border: 1.5px solid #B4232A; color: #B4232A; background: transparent; }
.bd-empty { text-align: center; padding: 44px 20px; border: 1.5px dashed #d9d1c1; border-radius: 16px; background: #fcfbf8; }
.bd-empty h3 { font-size: 22px; margin-bottom: 6px; }
.bd-empty p { color: var(--slate); margin-bottom: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .bd .btn-outline { display: inline-flex; }       /* style.css hides outline buttons on phones */
  .bd-post { grid-template-columns: 96px minmax(0, 1fr); }
  .bd-thumb { width: 96px; }
  .bd-acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .bd-acts .btn { width: auto; flex: 1; min-width: 90px; }
}
@media (max-width: 560px) {
  .bd { padding: 24px 12px 56px; }
  .bd-row { grid-template-columns: 1fr; }
  .bd-panel { padding: 18px 16px; }
  .bd-find, .bd-find input, .bd-find select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .bd-editor { animation: none; } }
