/* =====================================================================
   admin.css — HEET7 Studio admin panel
   Premium dark + gold theme, mirroring the public website.
   ===================================================================== */
:root {
  --gold: #c9a05f;
  --gold-2: #e6c891;
  --gold-3: #a87b3c;
  --ink: #251a20;
  --cream: #fbf7f2;
  --dark: #140d12;
  --dark-2: #1d141a;
  --muted: #9a8d95;
  --line: #efe6db;
  --panel: #ffffff;
  --grad-gold: linear-gradient(135deg, #a87b3c, #c9a05f 40%, #e6c891 60%, #c9a05f);
  --shadow-sm: 0 1px 2px rgba(20,13,18,.04), 0 4px 12px -6px rgba(20,13,18,.08);
  --shadow-md: 0 6px 24px -14px rgba(20,13,18,.28);
  --radius: 14px;
}

* { -webkit-font-smoothing: antialiased; }

body {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(201,160,95,.07), transparent 60%),
    #f4f0ea;
  font-family: 'Poppins', sans-serif;
  color: #453a41;
  font-size: 14.5px;
}

a { color: var(--gold-3); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, .serif { font-family: 'Playfair Display', serif; }

/* ------------------------------------------------------------ top bar */
.admin-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 1030;
  background: linear-gradient(120deg, #140d12 0%, #1d141a 60%, #221820 100%);
  border-bottom: 1px solid rgba(201,160,95,.35);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 10px 30px -16px rgba(0,0,0,.6);
}
.admin-brand {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
}
.admin-brand:hover { text-decoration: none; }
.admin-brand .brand-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--grad-gold);
  padding: 3px; box-shadow: 0 8px 20px -8px rgba(198,150,82,.8);
  flex: 0 0 auto;
}
.admin-brand .brand-logo i {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--dark); font-size: 22px;
}
.admin-brand .brand-name {
  font-family: 'Playfair Display', serif; font-size: 18px; letter-spacing: 1px;
  color: var(--gold-2); line-height: 1.1;
}
.admin-brand .brand-sub { font-size: 10.5px; color: #9d8fa0; letter-spacing: 2.5px; text-transform: uppercase; }
.admin-user { display: flex; align-items: center; gap: 12px; }
.admin-user .user-chip {
  display: flex; align-items: center; gap: 9px;
  color: #e6dccf; font-size: 13.5px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(230,200,145,.22);
  border-radius: 999px; padding: 5px 14px 5px 6px;
}
.admin-user .user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-gold); color: var(--dark);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.logout-btn {
  background: transparent; border: 1px solid rgba(230,200,145,.3);
  color: #cfbfae; width: 36px; height: 36px; border-radius: 10px;
  font-size: 14px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.logout-btn:hover { background: var(--grad-gold); border-color: transparent; color: var(--dark); }

.admin-topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* mobile drawer controls — hidden on desktop, shown inside the ≤768px block */
.admin-menu-toggle,
.admin-drawer-close,
.admin-backdrop { display: none; }
.admin-drawer-close {
  position: sticky; top: 8px;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  margin-left: auto; margin-bottom: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(230,200,145,.25);
  color: #cfbfae; border-radius: 9px; font-size: 14px; cursor: pointer;
  transition: all .2s;
}
.admin-drawer-close:hover { background: var(--grad-gold); border-color: transparent; color: var(--dark); }

/* ------------------------------------------------------------ sidebar */
.admin-sidebar {
  position: fixed; top: 64px; bottom: 0; left: 0; width: 236px; z-index: 1020;
  background: linear-gradient(180deg, #171015, #1d141a 40%);
  border-right: 1px solid rgba(201,160,95,.18);
  padding: 18px 12px 22px;
  overflow-y: auto;
}
.section-label {
  font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase;
  color: #7d6f76; margin: 18px 12px 6px; font-weight: 600;
}
.section-label:first-child { margin-top: 0; }
.admin-sidebar ul { list-style: none; margin: 0; padding: 0; }
.admin-sidebar li a {
  display: flex; align-items: center; gap: 12px;
  color: #b7a89a; padding: 10px 14px;
  font-size: 14px; text-decoration: none;
  border-radius: 10px; margin-bottom: 2px;
  transition: color .18s, background .18s;
}
.admin-sidebar li a i { width: 18px; text-align: center; color: #9a8d95; font-size: 15px; transition: color .18s; }
.admin-sidebar li a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-sidebar li a:hover i { color: var(--gold-2); }
.admin-sidebar li.active a {
  color: var(--gold-2); background: linear-gradient(90deg, rgba(201,160,95,.18), rgba(201,160,95,.06));
  box-shadow: inset 3px 0 0 var(--gold);
}
.admin-sidebar li.active a i { color: var(--gold-2); }
.admin-sidebar .nav-badge {
  margin-left: auto; font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(201,160,95,.18); color: var(--gold-2); font-weight: 600;
}
.admin-view-site {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 18px 6px 4px; padding: 10px 0;
  text-align: center; color: var(--gold-2);
  border: 1px solid rgba(230,200,145,.35); border-radius: 10px;
  text-decoration: none; font-size: 13px; transition: all .2s;
}
.admin-view-site:hover {
  background: var(--grad-gold); color: var(--dark); text-decoration: none;
  border-color: transparent;
}

/* ------------------------------------------------------------ main */
.admin-main { margin-left: 236px; margin-top: 64px; padding: 32px 36px; min-height: calc(100vh - 64px); }
.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-title { font-size: 30px; color: var(--ink); margin: 0 0 2px; line-height: 1.2; }
.admin-sub { color: var(--muted); margin-bottom: 26px; font-size: 14px; }

/* page head row (title + action button) */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .admin-title { margin: 0; }
.page-head .admin-sub { margin: 2px 0 0; }
.eyebrow {
  font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase; font-weight: 600;
  color: var(--gold-3); margin-bottom: 6px;
}

/* ------------------------------------------------------------ panels */
.panel {
  background: var(--panel); border-radius: var(--radius);
  padding: 24px 26px;
  border: 1px solid rgba(20,13,18,.05);
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 600; font-size: 14.5px; letter-spacing: .4px;
  color: var(--ink); padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head .panel-actions { display: flex; gap: 8px; align-items: center; }

.muted { color: var(--muted); }
.note { background: #fbf5ec; border: 1px solid #f0e0c4; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #7a6a55; margin-bottom: 14px; }

/* ------------------------------------------------------------ stat cards */
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(20,13,18,.05);
  box-shadow: var(--shadow-sm);
  min-height: 150px;
  display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-bottom: 14px;
}
.stat-icon.gold { background: linear-gradient(135deg, #faf1e0, #e8cf9f); color: var(--gold-3); }
.stat-icon.rose { background: linear-gradient(135deg, #fbe9ec, #f4cdd7); color: #c04874; }
.stat-icon.dark { background: linear-gradient(135deg, #e8e2ea, #cfc3d8); color: #4a3b47; }
.stat-icon.violet { background: linear-gradient(135deg, #ece3fb, #d6c4f2); color: #6b4da8; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-label { color: #6c5e68; font-size: 13.5px; margin-top: 6px; font-weight: 500; }
.stat-sub { font-size: 12.5px; color: var(--gold-3); margin-top: auto; }

.mini-stat {
  background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(20,13,18,.04);
  transition: transform .18s, box-shadow .18s;
}
.mini-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mini-stat span { color: var(--muted); font-size: 14px; }
.mini-stat strong { font-size: 20px; font-family: 'Playfair Display', serif; color: var(--ink); }

/* ------------------------------------------------------------ tables */
.table-responsive { border-radius: 10px; }
.admin-table { margin: 0; font-size: 14px; }
.admin-table thead th, .admin-table th {
  border-bottom-width: 2px; border-color: var(--line);
  color: #9a8876; font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .8px; white-space: nowrap;
}
.admin-table td { vertical-align: middle; border-color: #f7f2ec; padding: 12px 10px; overflow-wrap: anywhere; }
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: #fcf9f4; }
.admin-table a { color: var(--gold-3); font-weight: 500; }
.admin-table a:hover { color: var(--gold); }
.admin-table td .btn { margin: 2px 0; }
.admin-table .actions-cell { white-space: nowrap; }
.admin-table .actions-cell form { margin: 0; }

/* keep the action button bar on one line where it is wanted */
.admin-table .btn + .btn, .admin-table form + form { margin-left: 6px; }

.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.thumb-empty {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  background: #f3ede4; color: #bbae9e; font-size: 16px; border-radius: 10px;
}
.thumb-lg { width: 92px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------ badges */
.badge { font-weight: 600; letter-spacing: .4px; padding: .45em .75em; border-radius: 999px; font-size: 12px; }
.badge-pending { background: #fff3cd; color: #8a6d1a; }
.badge-confirmed { background: #d4edda; color: #1d6b37; }
.badge-completed { background: #e2e8f0; color: #2d4a7c; }
.badge-cancelled { background: #f8d7da; color: #9c2538; }
.badge-success { background: #d4edda; color: #1d6b37; }
.badge-secondary { background: #e9e3ea; color: #6f5f72; }

/* ------------------------------------------------------------ item rows */
.item-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0; border-bottom: 1px solid #f5f0ea;
  flex-wrap: wrap;
}
.item-row:last-child { border-bottom: none; }
.item-row.block { align-items: flex-start; }
.panel-divider { height: 1px; background: var(--line); margin: 14px 0; }
.item-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 0; }
.item-edit > * { min-width: 0; }
.item-edit .item-desc { flex: 1 1 160px; }
.item-order { width: 70px; }
.item-price { width: 110px; }
.item-icon { width: 150px; }
.item-image { max-width: 170px; }
.item-thumb { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: inline-flex; flex: 0 0 auto; color: inherit; text-decoration: none; cursor: zoom-in; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.item-info { flex: 1 1 150px; min-width: 0; }
.item-name { font-weight: 600; font-size: 13px; color: var(--ink); word-break: break-all; }
.item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.item-actions form { display: inline-flex; gap: 5px; align-items: center; margin: 0; }
.item-actions input[type="file"] { max-width: 150px; }

/* equal-height columns (dashboard, settings) */
.row-eq-height > [class*='col-'] { display: flex; flex-direction: column; }
.row-eq-height > [class*='col-'] > .panel { flex: 1; }

/* clean footer for long settings forms */
.settings-save { display: flex; align-items: center; justify-content: flex-start; gap: 14px; margin-top: 4px; }
.settings-save .btn-lg { padding: .7rem 2.4rem; border-radius: 12px; }

/* ------------------------------------------------------------ buttons */
.btn { border-radius: 10px; font-weight: 500; letter-spacing: .2px; }
.btn-gold {
  background: var(--grad-gold); border: none; color: var(--dark);
  font-weight: 600; letter-spacing: .4px;
  box-shadow: 0 8px 20px -10px rgba(178,128,58,.65);
}
.btn-gold:hover { color: var(--dark); filter: brightness(1.06); transform: translateY(-1px); }
.btn-outline-gold { border-color: var(--gold-3); color: var(--gold-3); background: transparent; }
.btn-outline-gold:hover { background: var(--grad-gold); border-color: transparent; color: var(--dark); transform: translateY(-1px); }

/* refit bootstrap secondary/danger/dark to the theme */
.btn-outline-secondary { color: #8c7b72; border-color: #d8cdc2; }
.btn-outline-secondary:hover { background: #efe6db; border-color: #d8cdc2; color: var(--ink); }
.btn-secondary { background: #efe6db; border-color: #efe6db; color: var(--ink); }
.btn-outline-danger { color: #b0405a; border-color: #e4b6c0; }
.btn-outline-danger:hover { background: #bb3957; border-color: #bb3957; color: #fff; }
.btn-danger { background: #bb3957; border-color: #bb3957; }
.btn-danger:hover { background: #a5304c; border-color: #a5304c; }
.btn-dark, .btn-outline-dark.active { background: var(--dark-2); border-color: var(--dark-2); color: var(--gold-2); }
.btn-outline-dark { border-color: #cfc3b8; color: #7a6a60; }
.btn-outline-dark:hover { background: var(--dark-2); border-color: var(--dark-2); color: var(--gold-2); }
.btn-sm { border-radius: 8px; }

/* icon-only square buttons in item rows */
.item-row .btn { flex: 0 0 auto; }

/* ------------------------------------------------------------ forms */
.form-control {
  border-radius: 10px; border: 1px solid #e6ddd2;
  padding: .5rem .8rem; font-size: 14px; color: #3d333a;
  background: #fdfcfa;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control:focus {
  border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 .2rem rgba(201,160,95,.18);
}
.form-control::placeholder { color: #b9aca1; }
select.form-control { cursor: pointer; }
.admin-table select.form-control { font-size: 13px; padding: .3rem .5rem; }
label { font-size: 12.5px; color: #6c5e68; font-weight: 600; letter-spacing: .3px; }
.form-group { margin-bottom: 16px; }
.textarea-tall { min-height: 220px; }
.form-control-file, .form-control-file.form-control-sm { padding: .35rem 0; }
.file-preview { margin-top: 8px; display: inline-block; }
.file-preview span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .4px; margin-bottom: 4px; }
.file-preview img { width: 96px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.video-preview { margin-top: 10px; display: none; }
.video-preview.active { display: block; }
.video-preview iframe, .video-preview video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid #e6ddd2; border-radius: 12px; }
.video-preview.reel-preview { text-align: center; }
.video-preview.reel-preview iframe { width: 100%; max-width: 420px; height: 700px; aspect-ratio: auto; max-height: 70vh; }
.video-preview-note { display: block; font-size: 12.5px; color: var(--muted); padding: 12px 14px; border: 1px dashed #ddd3c5; border-radius: 10px; background: #fdfcfa; }
.form-check { padding-left: 26px; }
.form-check-label { color: #4c4147; font-weight: 400; letter-spacing: 0; }
.form-check-input { width: 17px; height: 17px; margin-top: 1px; margin-left: -25px; accent-color: var(--gold-3); }
.status-select { width: 140px; display: inline-block; }

/* ------------------------------------------------------------ alert / flash */
.alert { border-radius: 12px; border: 1px solid; font-size: 14px; }
.alert-success { background: #eaf6ee; border-color: #cde8d6; color: #1d6b37; }
.alert-danger { background: #fdeef1; border-color: #f5d2d8; color: #9c2538; }
.alert .close { opacity: .6; }

/* ------------------------------------------------------------ contacts */
.contact-msg { padding: 16px 4px; border-bottom: 1px solid #f0e9e1; }
.contact-msg:last-child { border-bottom: none; }
.contact-msg.unread {
  background: #fffaf1; margin: 0 -10px; padding: 16px 14px;
  border-radius: 12px; border-left: 3px solid var(--gold);
}
.msg-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.msg-head strong { font-size: 15px; color: var(--ink); }
.msg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg-actions .muted { font-size: 12px; }
.contact-msg p { margin: 0; font-size: 14px; color: #574c53; }

/* ------------------------------------------------------------ login */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(700px 460px at 15% 8%, rgba(201,160,95,.16), transparent 60%),
    radial-gradient(620px 420px at 88% 92%, rgba(212,58,127,.14), transparent 62%),
    linear-gradient(150deg, #140d12, #1d141a 55%, #171016);
}
.login-card {
  width: 400px; max-width: 94vw;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(230,200,145,.28);
  border-radius: 20px; padding: 40px 36px 34px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8);
}
.login-logo {
  width: 86px; height: 86px; margin: 0 auto 16px;
  border-radius: 22px; background: var(--grad-gold);
  padding: 6px; box-shadow: 0 18px 44px -16px rgba(198,150,82,.85);
}
.login-logo i {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--dark); font-size: 48px;
}
.login-card h1 { color: #fff; font-size: 28px; letter-spacing: 1px; margin: 0 0 6px; }
.login-sub { color: #b6a596; font-size: 13.5px; margin-bottom: 24px; }
.login-card label { color: #d9c9b2; text-align: left; font-size: 12.5px; }
.login-card .form-control {
  background: rgba(255,255,255,.06); border: 1px solid rgba(230,200,145,.25); color: #fff;
  padding: .65rem .9rem;
}
.login-card .form-control:focus { border-color: var(--gold); background: rgba(255,255,255,.09); box-shadow: 0 0 0 .2rem rgba(201,160,95,.18); }
.login-card .form-control::placeholder { color: #7d6f76; }
.login-btn {
  background: var(--grad-gold); border: none; color: var(--dark);
  font-weight: 600; letter-spacing: .6px; padding: .7rem 1rem; border-radius: 11px;
  box-shadow: 0 14px 30px -12px rgba(198,150,82,.8);
  transition: filter .15s, transform .15s;
}
.login-btn:hover { color: var(--dark); filter: brightness(1.06); transform: translateY(-1px); }
.login-hint { color: #8f7d6a; font-size: 12px; margin-top: 20px; letter-spacing: .3px; }

/* ------------------------------------------------------------ scrollbar */
.admin-sidebar::-webkit-scrollbar, body::-webkit-scrollbar { width: 9px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(201,160,95,.25); border-radius: 9px; }
body::-webkit-scrollbar-thumb { background: #cfc3b4; border-radius: 9px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 991px) {
  .admin-sidebar { width: 204px; }
  .admin-main { margin-left: 204px; padding: 22px 20px; }
}
@media (max-width: 768px) {
  .admin-topbar { position: static; padding: 0 12px; }
  .admin-topbar-left { gap: 6px; flex: 1; min-width: 0; }
  .admin-brand { min-width: 0; }
  .admin-brand .brand-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-user .user-chip span { display: none; }

  /* hamburger that opens the sidebar drawer */
  .admin-menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: 0 0 auto;
    background: transparent; border: 1px solid rgba(230,200,145,.3);
    color: #cfbfae; border-radius: 10px; font-size: 16px; cursor: pointer;
    transition: all .2s;
  }
  .admin-menu-toggle:hover { background: var(--grad-gold); border-color: transparent; color: var(--dark); }

  /* dimmed backdrop behind the open drawer */
  .admin-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1040;
    background: rgba(20,13,18,.55);
    opacity: 0; visibility: hidden;
    transition: opacity .28s ease, visibility .28s;
  }
  .admin-backdrop.active { opacity: 1; visibility: visible; }

  /* sidebar becomes an off-canvas drawer — full height, slides in from left */
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 84vw;
    z-index: 1050;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .28s ease, visibility .28s;
    padding: 18px 12px 22px;
    border-right: 1px solid rgba(201,160,95,.18);
    border-bottom: none;
  }
  .admin-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 24px 0 60px -24px rgba(0,0,0,.6);
  }
  .admin-drawer-close { display: flex; }
  body.drawer-open { overflow: hidden; }

  .admin-main { margin-left: 0; margin-top: 0; padding: 20px 14px; }
}
@media (max-width: 575.98px) {
  .admin-main { padding: 16px 12px; }
  .admin-title { font-size: 26px; }
  .admin-sub { margin-bottom: 18px; }
  .panel { padding: 18px 16px; border-radius: 12px; }
  .page-head { margin-bottom: 16px; gap: 12px; }
  .item-row { gap: 8px; padding: 12px 0; }
  .item-edit { gap: 6px; }
  .item-actions form { flex-wrap: wrap; }
  .form-control, .form-control-sm { font-size: 14px; }
  .stat-card { min-height: 0; padding: 18px 18px; }
  .stat-num { font-size: 30px; }
  .mini-stat { padding: 12px 14px; }
  .settings-save { flex-wrap: wrap; }
  .msg-head { align-items: flex-start; }
  .contact-msg.unread { margin: 0 -4px; }
}

/* ------------------------------------------------- Blog Posts — mobile cards */
/* Only the Blog Posts section on small screens turns its table rows into
   labelled cards. Scoped to .blog-page so no other admin section changes. */
@media (max-width: 767.98px) {
  .blog-page .table-responsive { overflow: visible; }
  .blog-page .admin-table { display: block; }
  .blog-page .admin-table tbody { display: block; width: 100%; }
  .blog-page .blog-head-row,
  .blog-page .admin-table th { display: none; }
  .blog-page .admin-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    padding: 16px 14px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid rgba(20,13,18,.07);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
  }
  .blog-page .admin-table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    border: 0;
    padding: 0;
    font-size: 13.5px;
    overflow-wrap: anywhere;
  }
  .blog-page .admin-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--gold-3);
  }
  .blog-page .admin-table .blog-id { display: none; }
  .blog-page .admin-table .blog-title { grid-column: 1 / -1; }
  .blog-page .admin-table .blog-title a { font-size: 16px; font-weight: 600; color: var(--ink); }
  .blog-page .admin-table .blog-title a:hover { color: var(--gold-3); }
  .blog-page .admin-table .blog-title::before { display: none; }
  .blog-page .admin-table .thumb,
  .blog-page .admin-table .thumb-empty { width: 46px; height: 46px; }
  .blog-page .admin-table .blog-media { flex-direction: row; align-items: center; gap: 8px; }
  .blog-page .admin-table .blog-media::before { margin-right: auto; }
  .blog-page .admin-table .blog-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }
  .blog-page .admin-table .blog-actions::before { display: none; }
  .blog-page .admin-table .blog-actions form { margin: 0; }
}