/* ==========================================================================
   Admin panel design system — loaded after styles.css / theme.css.
   Visual layer only: layout mechanics (sidebar toggle, responsive) still
   come from SB Admin's styles.css, so every page keeps working unchanged.
   ========================================================================== */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5e8f0;
  --line-2: #eef1f6;
  --bg: #f4f6fb;
  --surface: #ffffff;

  --brand: #4338ca;
  --brand-2: #4f46e5;
  --brand-soft: #eef0ff;
  --brand-ink: #312e81;

  --side-bg: #111735;
  --side-bg-2: #0b1029;
  --side-ink: #aab3d4;
  --side-ink-hi: #ffffff;
  --side-head: #6b75a3;

  --ok: #059669;     --ok-soft: #e7f7f1;
  --warn: #d97706;   --warn-soft: #fdf4e3;
  --bad: #dc2626;    --bad-soft: #fdecec;
  --info: #0284c7;   --info-soft: #e6f4fb;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px -12px rgba(15, 23, 42, .18);

  --font: "Inter", "Tiro Bangla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --topbar-h: 64px;
}

/* ---------- Base ---------- */
html, body { background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); }
a:hover { color: var(--brand-ink); text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
::selection { background: #c7cbff; }

/* ---------- Top bar ---------- */
.sb-topnav.ad-topbar {
  height: var(--topbar-h);
  background: var(--surface) !important;
  border-bottom: 1px solid var(--line);
  padding: 0 20px 0 0;
  box-shadow: none;
}
/* Mirrors SB Admin's layout rules, resized: 225px -> 260px sidebar, 56px -> 64px bar */
#layoutSidenav #layoutSidenav_nav { flex-basis: 260px; transform: translateX(-260px); }
#layoutSidenav #layoutSidenav_content { margin-left: -260px; min-height: calc(100vh - var(--topbar-h)); }
.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { transform: translateX(0); }
.sb-nav-fixed #layoutSidenav #layoutSidenav_nav { width: 260px; }
.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav { padding-top: var(--topbar-h); }
.sb-nav-fixed #layoutSidenav #layoutSidenav_content { padding-left: 260px; top: var(--topbar-h); }
@media (min-width: 992px) {
  #layoutSidenav #layoutSidenav_nav { transform: translateX(0); }
  #layoutSidenav #layoutSidenav_content { margin-left: 0; }
  .sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { transform: translateX(-260px); }
  .sb-sidenav-toggled #layoutSidenav #layoutSidenav_content { margin-left: -260px; }
}

.ad-brand {
  display: flex; align-items: center; gap: 12px;
  width: 260px; height: var(--topbar-h);
  padding: 0 18px;
  background: var(--side-bg-2);
  color: #fff !important;
  margin-right: 8px;
  flex-shrink: 0;
}
.ad-brand img {
  width: 36px; height: 36px; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 3px;
}
.ad-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ad-brand-name {
  font-size: 13.5px; font-weight: 650; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}
.ad-brand-sub { font-size: 11px; color: var(--side-head); letter-spacing: .06em; text-transform: uppercase; }

#sidebarToggle.ad-icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); background: transparent; border: 0; font-size: 17px;
}
.ad-icon-btn:hover { background: var(--line-2); color: var(--ink); }

.ad-topbar-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-left: 6px; }

.ad-top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ad-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 550; color: var(--ink-2) !important;
  border: 1px solid var(--line); background: var(--surface);
}
.ad-pill:hover { background: var(--line-2); color: var(--ink) !important; }
.ad-pill.ad-pill-brand { background: var(--brand-soft); border-color: transparent; color: var(--brand) !important; }
.ad-pill.ad-pill-brand:hover { background: #e0e3ff; }

.ad-user {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px; border-radius: 12px; color: var(--ink) !important;
  cursor: pointer;
}
.ad-user:hover { background: var(--line-2); }
.ad-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 650; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.ad-user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.ad-user-name { font-size: 13.5px; font-weight: 600; text-transform: capitalize; }
.ad-user-role { font-size: 11.5px; color: var(--muted); }
.ad-user::after { display: none; }

.dropdown-menu {
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 6px; font-size: 14px; min-width: 210px;
}
.dropdown-item { border-radius: 8px; padding: 8px 12px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.dropdown-item i { width: 16px; text-align: center; color: var(--muted); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--line-2); color: var(--ink); }
.dropdown-item.text-danger i { color: var(--bad); }
.dropdown-header { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 8px 12px 4px; }
.dropdown-divider { border-color: var(--line-2); margin: 6px 0; }

/* ---------- Sidebar ---------- */
.sb-sidenav.ad-side {
  background: var(--side-bg) !important;
  color: var(--side-ink);
  font-size: 14px;
}
.ad-side .sb-sidenav-menu { padding: 14px 12px 24px; }
.ad-side .sb-sidenav-menu::-webkit-scrollbar { width: 6px; }
.ad-side .sb-sidenav-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.ad-side .sb-sidenav-menu .nav { flex-direction: column; }
.ad-side .sb-sidenav-menu-heading {
  padding: 18px 12px 6px !important;
  font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--side-head) !important;
}
.ad-side .sb-sidenav-menu .nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px !important; margin: 1px 0;
  border-radius: 9px; border: 0 !important;
  color: var(--side-ink) !important; font-weight: 500;
  transition: background .15s, color .15s;
}
.ad-side .sb-sidenav-menu .nav .nav-link .sb-nav-link-icon {
  margin: 0 !important; width: 18px; text-align: center; font-size: 14px;
  color: var(--side-head) !important; transition: color .15s;
}
.ad-side .sb-sidenav-menu .nav .nav-link:hover { background: rgba(255,255,255,.06); color: var(--side-ink-hi) !important; }
.ad-side .sb-sidenav-menu .nav .nav-link:hover .sb-nav-link-icon { color: var(--side-ink) !important; }
.ad-side .sb-sidenav-menu .nav .nav-link.active {
  background: var(--brand-2); color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .7);
}
.ad-side .sb-sidenav-menu .nav .nav-link.active .sb-nav-link-icon { color: #fff !important; }
.ad-side .nav-link .ad-ext { margin-left: auto; font-size: 11px; opacity: .5; }

.ad-side .sb-sidenav-footer {
  background: var(--side-bg-2) !important;
  color: var(--side-head) !important;
  padding: 14px 20px; font-size: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.ad-side .sb-sidenav-footer a { color: var(--side-ink); }
.ad-side .sb-sidenav-footer a:hover { color: #fff; }

/* ---------- Content shell ---------- */
#layoutSidenav_content main { padding: 8px 12px 32px; }
#layoutSidenav_content main > .container-fluid { max-width: 1480px; }

/* Each page ships a ".page-title" breadcrumb bar ("Dashboard > X") */
.page-title {
  background: transparent !important;
  box-shadow: none !important;
  padding: 18px 0 6px !important;
  margin: 0 0 18px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--line);
  font-size: 22px !important; font-weight: 650 !important;
  color: var(--ink) !important; letter-spacing: -.015em;
}
.page-title .fa-angle-right, .page-title .fa-chevron-right, .page-title svg.fa-angle-right {
  color: #b6bdd0; font-size: .8em; margin: 0 4px;
}
.page-title .btn { font-size: 13.5px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow) !important;
  margin-bottom: 24px;
}
.card:hover { box-shadow: var(--shadow) !important; }
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--line-2) !important;
  padding: 16px 20px !important;
  font-weight: 650; color: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0 !important;
}
.card-body { padding: 22px; }
.card-footer { background: #fafbfd; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg) !important; }

/* ---------- Forms ---------- */
label, .col-form-label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  text-transform: none; letter-spacing: .01em; margin-bottom: 6px;
}
label i, label svg { color: var(--muted); margin-right: 4px; }
.form-group { margin-bottom: 18px; }
.form-control, .custom-select, select.form-control {
  height: 42px;
  border: 1px solid #d9deea; border-radius: 10px;
  background-color: #fff; color: var(--ink);
  font-size: 14px; padding: 8px 12px;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .02);
  transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; min-height: 100px; }
.form-control::placeholder { color: #9aa3b8; }
.form-control:focus, .custom-select:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}
.form-control:disabled, .form-control[readonly] { background: #f6f7fb; }
input[type="file"].form-control { padding: 6px 8px; height: auto; background: #fafbfd; border-style: dashed; cursor: pointer; }
input[type="file"]::file-selector-button {
  border: 0; border-radius: 7px; padding: 6px 12px; margin-right: 12px;
  background: var(--brand-soft); color: var(--brand); font-weight: 600; cursor: pointer;
}
input[type="file"]::-webkit-file-upload-button {
  border: 0; border-radius: 7px; padding: 6px 12px; margin-right: 12px;
  background: var(--brand-soft); color: var(--brand); font-weight: 600; cursor: pointer;
}
.help-block { font-size: 12.5px; color: var(--bad); }
.input-group-text { border-radius: 10px; background: #f6f7fb; border-color: #d9deea; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 10px; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-width: 1px;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus { box-shadow: 0 0 0 4px rgba(79, 70, 229, .16) !important; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; }
.btn i, .btn svg { margin-right: 2px; }

.btn-primary { background: var(--brand-2); border-color: var(--brand-2); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand); border-color: var(--brand); }
.btn-success { background: var(--ok); border-color: var(--ok); }
.btn-success:hover, .btn-success:focus { background: #047857; border-color: #047857; }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-danger:hover, .btn-danger:focus { background: #b91c1c; border-color: #b91c1c; }
.btn-info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-info:hover, .btn-info:focus { background: #0369a1; border-color: #0369a1; color: #fff; }
.btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-warning:hover { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-secondary { background: #fff; border-color: #d9deea; color: var(--ink-2); }
.btn-secondary:hover, .btn-secondary:focus { background: var(--line-2); border-color: #cdd3e1; color: var(--ink); }
.btn-light { background: var(--line-2); border-color: var(--line-2); }

/* Compact icon buttons inside tables (edit / delete) */
.table .btn { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.table .btn-success { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.table .btn-success:hover { background: var(--ok); color: #fff; }
.table .btn-danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.table .btn-danger:hover { background: var(--bad); color: #fff; }
.table .btn-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.table .btn-info:hover { background: var(--info); color: #fff; }
.table .btn-warning { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.table .btn-warning:hover { background: var(--warn); color: #fff; }

/* ---------- Tables ---------- */
.table { color: var(--ink-2); font-size: 14px; margin-bottom: 0; }
.table thead th {
  background: #f8f9fc;
  border-top: 0 !important; border-bottom: 1px solid var(--line) !important;
  font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 12px 14px; white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: 10px; }
.table thead th:last-child { border-top-right-radius: 10px; }
.table td { padding: 12px 14px; vertical-align: middle; border-top: 1px solid var(--line-2); }
.table-hover tbody tr:hover { background: #f9faff; }
.table td a { color: var(--ink); font-weight: 500; }
.table td a:hover { color: var(--brand-2); }
.table td img { border-radius: 8px; }
.table-responsive > br:first-child { display: none; }

/* DataTables chrome */
.dataTables_wrapper { font-size: 13.5px; color: var(--muted); }
.dataTables_wrapper .row:first-child { margin-bottom: 12px; }
.dataTables_wrapper .row:last-child { margin-top: 14px; }
.dataTables_wrapper .dataTables_filter input {
  height: 38px; border-radius: 10px; border: 1px solid #d9deea; padding: 6px 12px 6px 34px; margin-left: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
  min-width: 240px;
}
.dataTables_wrapper .dataTables_filter input:focus { outline: 0; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(79,70,229,.14); }
.dataTables_wrapper .dataTables_length select { height: 38px; border-radius: 10px; border: 1px solid #d9deea; margin: 0 6px; }
.page-item .page-link { border: 0; border-radius: 8px !important; margin: 0 2px; color: var(--ink-2); font-weight: 550; min-width: 36px; text-align: center; }
.page-item .page-link:hover { background: var(--line-2); color: var(--ink); }
.page-item.active .page-link { background: var(--brand-2); color: #fff; }
.page-item.disabled .page-link { color: #b6bdd0; background: transparent; }
table.dataTable thead .sorting::before, table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before, table.dataTable thead .sorting_desc::after { bottom: .85em; }

/* ---------- Alerts & badges ---------- */
.alert { border: 0; border-radius: var(--r); font-size: 14px; }
.alert-success { background: var(--ok-soft); color: #065f46; }
.alert-danger { background: var(--bad-soft); color: #991b1b; }
.alert-warning { background: var(--warn-soft); color: #92400e; }
.alert-info { background: var(--info-soft); color: #075985; }
.badge { border-radius: 6px; font-weight: 600; padding: .35em .6em; }

/* Old dashboard tiles (kept for any page still using .home-icon) */
.home-icon { border: 0 !important; border-radius: var(--r) !important; background: var(--brand-soft) !important; }
.home-icon a { color: var(--brand) !important; }

/* ---------- Rich text editor (Summernote BS4) ---------- */
.note-editor.note-frame { border: 1px solid #d9deea !important; border-radius: 12px; overflow: hidden; }
.note-editor .note-toolbar { background: #f8f9fc; border-bottom: 1px solid var(--line) !important; padding: 8px 8px 4px; }
.note-editor .note-toolbar .note-btn { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; font-weight: 500; }
.note-editor .note-toolbar .note-btn:hover { background: var(--line-2); }
.note-editor .note-toolbar .note-btn.active { background: var(--brand-soft); color: var(--brand); }
.note-editor .note-editing-area .note-editable { font-size: 15px; color: var(--ink); padding: 16px 18px; line-height: 1.7; }
.note-editor .note-statusbar { background: #f8f9fc; border-top: 1px solid var(--line-2) !important; }
.note-editor.note-frame.fullscreen { border-radius: 0; background: #fff; }
.note-modal .modal-content { border-radius: var(--r-lg); border: 0; }

/* ---------- Modals ---------- */
.modal-content { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line-2); padding: 18px 22px; }
.modal-footer { border-top: 1px solid var(--line-2); }

/* ---------- Footer ---------- */
.ad-footer {
  background: transparent !important; border-top: 1px solid var(--line);
  padding: 18px 0 !important; color: var(--muted); font-size: 13px; margin: 0 12px;
}
.ad-footer a { color: var(--muted); }
.ad-footer a:hover { color: var(--brand-2); }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: 18px 0 24px; padding: 26px 30px;
  border-radius: 20px; color: #fff;
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(129, 140, 248, .45), transparent 60%),
    radial-gradient(400px 200px at 0% 100%, rgba(56, 189, 248, .22), transparent 60%),
    linear-gradient(135deg, #1e1b4b, #312e81 55%, #3730a3);
}
.dash-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 40%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
}
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.dash-hero-logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 6px; object-fit: contain; flex-shrink: 0; }
.dash-hero-eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #c7d2fe; margin-bottom: 4px; }
.dash-hero h1 { color: #fff; font-size: 24px; margin: 0 0 4px; }
.dash-hero p { margin: 0; color: #c7d2fe; font-size: 14px; }
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-hero .btn-hero {
  background: #fff; color: var(--brand-ink); border: 0; border-radius: 11px; padding: 10px 16px; font-weight: 650;
}
.dash-hero .btn-hero:hover { background: #eef0ff; color: var(--brand-ink); }
.dash-hero .btn-hero-ghost {
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 11px; padding: 10px 16px; font-weight: 600;
}
.dash-hero .btn-hero-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  color: inherit !important; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.stat:hover { border-color: #c9cdf7; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.stat-num { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--muted); }
.tone-indigo { background: #eef0ff; color: #4f46e5; }
.tone-emerald { background: #e7f7f1; color: #059669; }
.tone-sky { background: #e6f4fb; color: #0284c7; }
.tone-amber { background: #fdf4e3; color: #d97706; }
.tone-rose { background: #fdecf1; color: #e11d48; }
.tone-violet { background: #f3edff; color: #7c3aed; }
.tone-teal { background: #e3f6f5; color: #0d9488; }
.tone-slate { background: #eef1f6; color: #475569; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 650; color: var(--ink); margin: 0 0 14px;
}
.section-title a { font-size: 13px; font-weight: 600; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.quick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink) !important; font-weight: 600; font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.quick .stat-icon { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; }
.quick:hover { border-color: #c9cdf7; background: #fbfbff; }

.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.recent-list li:first-child { border-top: 0; }
.recent-thumb {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.recent-main { min-width: 0; flex: 1; }
.recent-title { display: block; color: var(--ink) !important; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-title:hover { color: var(--brand-2) !important; }
.recent-meta { font-size: 12.5px; color: var(--muted); }
.chip {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.empty-note { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.info-list li:first-child { border-top: 0; }
.info-list .k { width: 82px; flex-shrink: 0; color: var(--muted); }
.info-list .v { color: var(--ink); word-break: break-word; min-width: 0; }

/* ==========================================================================
   Login
   ========================================================================== */
.auth-body { min-height: 100vh; margin: 0; background: var(--bg); font-family: var(--font); }
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(129, 140, 248, .45), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(56, 189, 248, .25), transparent 60%),
    linear-gradient(140deg, #1e1b4b, #312e81 60%, #3730a3);
}
.auth-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 20px 20px;
}
.auth-art > * { position: relative; z-index: 1; }
.auth-org { display: flex; align-items: center; gap: 14px; }
.auth-org img { width: 52px; height: 52px; background: #fff; border-radius: 14px; padding: 5px; object-fit: contain; }
.auth-org-name { font-weight: 650; font-size: 16px; line-height: 1.25; }
.auth-org-sub { font-size: 12.5px; color: #c7d2fe; }
.auth-pitch h2 { color: #fff; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; max-width: 460px; }
.auth-pitch p { color: #c7d2fe; font-size: 15px; max-width: 420px; margin: 0; }
.auth-feats { display: flex; gap: 22px; flex-wrap: wrap; color: #dfe3ff; font-size: 13.5px; }
.auth-feats span { display: inline-flex; align-items: center; gap: 8px; }
.auth-feats i { color: #a5b4fc; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card-logo { display: none; width: 56px; height: 56px; border-radius: 14px; object-fit: contain; margin-bottom: 18px; border: 1px solid var(--line); padding: 5px; }
.auth-card h1 { font-size: 26px; margin: 0 0 6px; }
.auth-card .lead-sm { color: var(--muted); font-size: 14.5px; margin-bottom: 28px; }
.auth-card .form-group label { font-size: 13px; }
.auth-card .form-control { height: 46px; font-size: 15px; }
.auth-field { position: relative; }
.auth-field > i, .auth-field > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9aa3b8; font-size: 14px; pointer-events: none; z-index: 2;
}
.auth-field .auth-eye svg { position: static; transform: none; }
.auth-field .form-control { padding-left: 40px; }
.auth-field .auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #9aa3b8; width: 36px; height: 36px; border-radius: 8px;
}
.auth-field .auth-eye:hover { color: var(--ink-2); background: var(--line-2); }
.has-error .form-control { border-color: var(--bad); }
.auth-error { background: var(--bad-soft); color: #991b1b; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; }
.auth-submit { width: 100%; height: 48px; font-size: 15px; border-radius: 12px; margin-top: 6px; }
.auth-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--brand-2); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-card-logo { display: block; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .ad-brand { width: auto; background: transparent; color: var(--ink) !important; padding: 0 6px; margin: 0; }
  .ad-brand-name { color: var(--ink); max-width: 46vw; }
  .ad-brand-sub { display: none; }
  .ad-topbar-title { display: none; }
  .sb-topnav.ad-topbar { padding-left: 8px; }
}
@media (max-width: 575.98px) {
  body { font-size: 14px; }
  .ad-pill-label, .ad-user-meta { display: none !important; }
  .ad-pill { padding: 0 11px; }
  #layoutSidenav_content main { padding: 4px 4px 24px; }
  .page-title { font-size: 19px !important; }
  .dash-hero { padding: 22px; border-radius: 16px; }
  .dash-hero h1 { font-size: 20px; }
  .dash-hero-logo { width: 52px; height: 52px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-num { font-size: 21px; }
  .card-body { padding: 16px; }
  .dataTables_wrapper .dataTables_filter input { min-width: 0; width: 100%; }
}

@media print {
  #layoutSidenav_nav, .sb-topnav, .ad-footer { display: none !important; }
  #layoutSidenav_content { margin: 0 !important; padding: 0 !important; }
}

/* ---------- v1 refinements ---------- */
.stat-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat { flex-direction: column; align-items: flex-start; gap: 14px; }
.stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stat > span:last-child { min-width: 0; max-width: 100%; }
@media (max-width: 991.98px) {
  #sidebarToggle.ad-icon-btn { order: -1; margin-left: 4px; }
}

/* Table headers: some pages set inline font sizes on <th>; keep the header row uniform. */
.table thead th, .table thead th * { font-size: 11.5px !important; font-weight: 650 !important; letter-spacing: .06em; }
table.dataTable thead > tr > th.sorting, table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc { padding-right: 28px; }
table.dataTable thead .sorting::before, table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_desc::before { right: 1em; }
table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::after { right: .5em; }
/* Narrow sidebars with file inputs (e.g. Photo Albums) */
.col-md-3 input[type="file"].form-control, .col-md-4 input[type="file"].form-control { font-size: 12.5px; }
@media (max-width: 575.98px) {
  .dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; width: 100%; }
  .dataTables_wrapper .dataTables_filter input { flex: 1; min-width: 0; }
}

/* ---------- Collapsible sidebar groups ---------- */
.ad-side .sb-sidenav-menu { padding-top: 18px; }
.ad-side .nav-link.ad-group .ad-caret { margin-left: auto; font-size: 10px; opacity: .6; transition: transform .2s; }
.ad-side .nav-link.ad-group.collapsed .ad-caret { transform: rotate(-90deg); }
.ad-side .nav-link.ad-group.open, .ad-side .nav-link.ad-group[aria-expanded="true"] { color: #fff !important; }
.ad-side .nav-link.ad-group[aria-expanded="true"] .sb-nav-link-icon { color: var(--side-ink) !important; }
.ad-side .ad-sub { display: flex; flex-direction: column; margin: 2px 0 6px 21px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.1); }
.ad-side .sb-sidenav-menu .nav .ad-sub .nav-link { padding: 7px 12px !important; font-size: 13.5px; font-weight: 500; }
.ad-side .sb-sidenav-menu .nav .ad-sub .nav-link.active { background: rgba(99,102,241,.18); color: #fff !important; box-shadow: none; position: relative; }
.ad-side .sb-sidenav-menu .nav .ad-sub .nav-link.active::before { content: ""; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: #818cf8; }

/* ==========================================================================
   Content tools (CMS v2)
   ========================================================================== */
.ad-side .nav-link .ad-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.ad-side .nav-link.active .ad-badge { background: rgba(255,255,255,.25); }

.cms-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 22px 0 20px; }
.cms-head h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
.cms-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cms-head p a { color: var(--muted); font-weight: 600; }
.cms-head p a:hover { color: var(--brand-2); }
.cms-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.cms-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.cms-inline-form { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 16px; align-items: end; }
.cms-inline-form .form-group { margin: 0; }
@media (max-width: 767px) { .cms-inline-form { grid-template-columns: 1fr; } }

.cms-toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.cms-toast.is-ok { background: var(--ok-soft); color: #065f46; }
.cms-toast.is-error { background: var(--bad-soft); color: #991b1b; }
.cms-toast-float { position: fixed; right: 24px; bottom: 24px; z-index: 2000; box-shadow: var(--shadow-lg); margin: 0; animation: cmsIn .25s ease-out; transition: opacity .4s, transform .4s; max-width: 420px; }
.cms-toast-float.out { opacity: 0; transform: translateY(8px); }
@keyframes cmsIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cms-note { display: flex; gap: 10px; align-items: flex-start; background: var(--info-soft); color: #075985; border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; }
.cms-empty { text-align: center; padding: 56px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--r-lg); background: #fbfcfe; }
.cms-empty > svg, .cms-empty > i { font-size: 34px; color: #c3c9d8; margin-bottom: 10px; }
.cms-empty p { margin: 0; }

.cms-kebab { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.cms-kebab:hover { background: var(--line-2); color: var(--ink); }

/* dialogs */
.cms-dlg .modal-dialog { max-width: 420px; }
.cms-dlg .modal-body { padding: 26px 26px 10px; }
.cms-dlg h5 { font-size: 18px; margin: 0 0 6px; }
.cms-dlg p { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.cms-dlg .form-control { margin-top: 12px; }
.cms-dlg .modal-footer { border: 0; padding: 14px 26px 22px; }
.cms-dlg-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; font-size: 18px; }
.cms-dlg-icon.is-danger { background: var(--bad-soft); color: var(--bad); }

/* albums */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.album-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: visible; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.album-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.album-cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--line-2); border-radius: 15px 15px 0 0; overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.album-card:hover .album-cover img { transform: scale(1.03); }
.album-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b6bdd0; font-size: 32px; }
.album-count { position: absolute; left: 10px; bottom: 10px; background: rgba(15,23,42,.72); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; backdrop-filter: blur(4px); }
.album-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 16px; }
.album-title { font-weight: 600; color: var(--ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.album-card.is-unsorted { border-style: dashed; }

/* drop zone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  border: 2px dashed #c9cfe0; border-radius: 16px; background: #fbfcff; padding: 28px 20px; margin-bottom: 20px; text-align: center;
  transition: border-color .15s, background .15s;
}
.dropzone > svg, .dropzone > i { font-size: 30px; color: var(--brand-2); margin-bottom: 6px; }
.dropzone strong { color: var(--ink); font-size: 15px; }
.dropzone span { color: var(--muted); font-size: 13px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand-2); background: var(--brand-soft); }

/* photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.photo-tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
.photo-tile.is-selected { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(79,70,229,.25); }
.photo-tile.is-cover::after { content: "Cover"; position: absolute; top: 10px; right: 10px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.photo-img { display: block; aspect-ratio: 1 / 1; background: var(--line-2); position: relative; }
.photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-caption { width: 100%; border: 0; border-top: 1px solid var(--line-2); padding: 9px 12px; font-size: 13px; color: var(--ink-2); background: #fff; }
.photo-caption:focus { outline: 0; background: #fbfbff; box-shadow: inset 0 -2px 0 var(--brand-2); }
.photo-check { position: absolute; top: 10px; left: 10px; z-index: 2; margin: 0; cursor: pointer; }
.photo-check input { display: none; }
.photo-check span { display: block; width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.92); border: 2px solid rgba(15,23,42,.25); box-shadow: 0 1px 3px rgba(0,0,0,.2); opacity: 0; transition: opacity .15s; }
.photo-tile:hover .photo-check span, .photo-check input:checked + span, .bulk-bar.show ~ .photo-grid .photo-check span { opacity: 1; }
.photo-check input:checked + span { background: var(--brand-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--brand-2); }
.photo-cover-btn { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); color: #f59e0b; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.photo-tile:hover .photo-cover-btn { opacity: 1; }
.photo-tile.is-cover .photo-cover-btn { display: none; }
.photo-tile.is-uploading .photo-img img { opacity: .45; filter: grayscale(.4); }
.photo-tile.is-uploading .photo-progress { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.7); overflow: hidden; }
.photo-tile.is-uploading .photo-progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--brand-2); border-radius: 4px; animation: cmsBar 1s ease-in-out infinite; }
.photo-tile.is-failed { border-color: var(--bad); }
.photo-tile.is-failed .photo-img::after { content: "Failed"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(220,38,38,.6); color: #fff; font-weight: 700; }
@keyframes cmsBar { 0% { left: -40%; } 100% { left: 100%; } }

/* bulk action bar */
.bulk-bar {
  position: sticky; top: calc(var(--topbar-h) + 10px); z-index: 20; display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--ink); color: #fff; padding: 10px 12px 10px 18px; border-radius: 14px; margin-bottom: 16px; box-shadow: var(--shadow-lg);
}
.bulk-bar.show { display: flex; }
.bulk-bar span { margin-right: auto; font-size: 14px; }
.bulk-bar .form-control { width: auto; min-width: 190px; height: 34px; }
.bulk-bar .btn-secondary { background: transparent; color: #cbd5e1; border-color: rgba(255,255,255,.2); }
.bin-list { list-style: none; margin: 0; padding: 0; }
.bin-list li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.bin-list li:first-child { border-top: 0; }
.bin-main { flex: 1; min-width: 0; }
.bin-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bin-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.bin-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* slider list */
.slide-list { display: flex; flex-direction: column; gap: 10px; }
.slide-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 10px 8px; box-shadow: var(--shadow); }
.slide-row.is-ghost { opacity: .4; }
.slide-row.is-uploading .slide-thumb img { opacity: .5; }
.slide-row.is-uploading .photo-progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--brand-2); animation: cmsBar 1s ease-in-out infinite; }
.slide-handle { cursor: grab; color: #b6bdd0; width: 22px; text-align: center; font-size: 15px; }
.slide-handle:active { cursor: grabbing; }
.slide-num { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.slide-thumb { width: 220px; aspect-ratio: 16 / 6; border-radius: 10px; overflow: hidden; background: var(--line-2); flex-shrink: 0; display: block; }
.slide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-caption { flex: 1; min-width: 0; }
@media (max-width: 767px) { .slide-row { flex-wrap: wrap; } .slide-thumb { width: calc(100% - 70px); } .slide-caption { flex-basis: 100%; } }
/* notices list */
.n-toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.n-search { position: relative; flex: 1; max-width: 520px; }
.n-search > svg, .n-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9aa3b8; z-index: 2; }
.n-search .form-control { padding-left: 40px; height: 44px; }
.n-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.n-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2) !important; font-size: 13px; font-weight: 550; }
.n-chip span { font-size: 11.5px; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 0 7px; }
.n-chip:hover { border-color: #c9cdf7; }
.n-chip.on { background: var(--ink); border-color: var(--ink); color: #fff !important; }
.n-chip.on span { background: rgba(255,255,255,.18); color: #fff; }
.n-list { list-style: none; margin: 0; padding: 0; }
.n-list li { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.n-list li:first-child { border-top: 0; }
.n-list li:hover { background: #fafbff; }
.n-thumb { width: 64px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--line-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #b6bdd0; font-size: 18px; }
.n-thumb img { width: 100%; height: 100%; object-fit: cover; }
.n-main { flex: 1; min-width: 0; }
.n-title { display: block; font-weight: 600; color: var(--ink) !important; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-title:hover { color: var(--brand-2) !important; }
.n-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.n-meta svg, .n-meta i { margin-right: 3px; opacity: .7; }
.n-pdf { color: var(--bad) !important; font-weight: 600; }
.n-actions { display: flex; gap: 6px; flex-shrink: 0; }
.n-actions .n-del:hover { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.n-pager { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13.5px; margin: -4px 0 20px; }
.n-pager div { display: flex; gap: 8px; }
@media (max-width: 575px) { .n-list li { flex-wrap: wrap; padding: 14px; } .n-actions { width: 100%; justify-content: flex-end; } }

/* notice editor */
.ne-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .ne-grid { grid-template-columns: 1fr; } }
.ne-title { width: 100%; border: 0; border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 650; color: var(--ink); padding: 4px 2px 14px; margin-bottom: 16px; }
.ne-title:focus { outline: 0; border-bottom-color: var(--brand-2); }
.ne-title::placeholder { color: #b6bdd0; }
.ne-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
.ne-side .cms-card { margin-bottom: 16px; }
.ne-publish .btn-lg { margin-top: 6px; }
.ne-more { font-weight: 600; color: var(--ink-2) !important; display: flex; gap: 8px; align-items: center; }
.ne-drop { display: block; cursor: pointer; border: 2px dashed #c9cfe0; border-radius: 12px; background: #fbfcff; overflow: hidden; margin: 0; transition: border-color .15s, background .15s; }
.ne-drop:hover, .ne-drop.is-over { border-color: var(--brand-2); background: var(--brand-soft); }
.ne-drop-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }
.ne-drop-preview > svg, .ne-drop-preview > i { font-size: 24px; color: #b6bdd0; }
.ne-drop.has-file .ne-drop-preview { padding: 0; min-height: 0; }
.ne-drop-preview img { width: 100%; display: block; max-height: 260px; object-fit: cover; }
.ne-drop-sm .ne-drop-preview { min-height: 74px; flex-direction: row; }
.ne-drop-sm.has-file .ne-drop-preview { padding: 14px; color: var(--ink); }
.ne-remove { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--muted); font-size: 13px; margin: 10px 0 0; text-transform: none; }
.cms-file-chip { display: inline-flex; gap: 8px; align-items: center; background: var(--bad-soft); color: var(--bad) !important; font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; }
/* people */
.p-toolbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.p-tabs { display: inline-flex; background: #e9ecf4; border-radius: 12px; padding: 4px; }
.p-tabs a { padding: 8px 16px; border-radius: 9px; color: var(--ink-2) !important; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.p-tabs a span { font-size: 12px; color: var(--muted); }
.p-tabs a.on { background: #fff; color: var(--ink) !important; box-shadow: var(--shadow); }
.p-toolbar .n-search { max-width: 360px; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.p-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px 16px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; }
.p-card.is-ghost { opacity: .4; }
.p-handle { position: absolute; top: 10px; left: 10px; color: #c3c9d8; cursor: grab; padding: 4px 6px; border-radius: 6px; }
.p-handle:hover { background: var(--line-2); color: var(--muted); }
.p-photo { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); margin-bottom: 12px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.p-photo img { width: 100%; height: 100%; object-fit: cover; }
.p-photo span { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.p-name { font-weight: 650; color: var(--ink); font-size: 15px; line-height: 1.3; text-transform: capitalize; }
.p-role { color: var(--muted); font-size: 13px; margin-top: 3px; min-height: 20px; }
.p-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.p-contact { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.p-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 14px; }
@media (max-width: 575.98px) {
  .album-grid, .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .album-meta { padding: 10px 6px 10px 12px; }
  .cms-head h1 { font-size: 22px; }
}

/* ==========================================================================
   v3 — Academic green & gold theme
   ========================================================================== */
:root {
  --brand: #0b6b4c;
  --brand-2: #0f7d59;
  --brand-soft: #e6f4ee;
  --brand-ink: #074632;
  --gold: #e3a92b;
  --gold-2: #f4c45a;
  --gold-soft: #fdf3dc;

  --side-bg: #0c3b2d;
  --side-bg-2: #082c21;
  --side-ink: #c2d9cf;
  --side-ink-hi: #ffffff;
  --side-head: #80aa99;
}
::selection { background: #bfe3d3; }

/* sidebar: subtle texture + gold accents */
.sb-sidenav.ad-side {
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(227,169,43,.10), transparent 60%),
    linear-gradient(180deg, var(--side-bg) 0%, #0a3327 100%) !important;
}
.ad-side .sb-sidenav-menu .nav .nav-link.active {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #2a1f04 !important; font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(227,169,43,.8);
}
.ad-side .sb-sidenav-menu .nav .nav-link.active .sb-nav-link-icon { color: #2a1f04 !important; }
.ad-side .sb-sidenav-menu .nav .ad-sub .nav-link.active { background: rgba(227,169,43,.16); color: #fff !important; box-shadow: none; font-weight: 600; }
.ad-side .sb-sidenav-menu .nav .ad-sub .nav-link.active::before { background: var(--gold); }
.ad-side .nav-link.ad-group[aria-expanded="true"] .sb-nav-link-icon { color: var(--gold-2) !important; }
.ad-side .nav-link .ad-badge { background: rgba(227,169,43,.22); color: #ffe7ad; }
.ad-side .nav-link.active .ad-badge { background: rgba(42,31,4,.15); color: #2a1f04; }
.ad-brand { background: var(--side-bg-2); border-bottom: 2px solid var(--gold); }
.ad-brand-sub { color: var(--gold-2); opacity: .85; }

/* buttons, focus, links follow the green brand */
.btn:focus { box-shadow: 0 0 0 4px rgba(15,125,89,.18) !important; }
.form-control:focus, .custom-select:focus { box-shadow: 0 0 0 4px rgba(15,125,89,.14); }
.ad-pill.ad-pill-brand:hover { background: #d6eee3; }
.tone-indigo { background: var(--brand-soft); color: var(--brand-2); }
.n-chip.on { background: var(--brand); border-color: var(--brand); }
.stat:hover, .quick:hover, .n-chip:hover { border-color: #b7dccb; }
.photo-tile.is-selected { box-shadow: 0 0 0 3px rgba(15,125,89,.28); }
.bulk-bar { background: var(--brand-ink); }

/* dashboard hero + login art: green with gold glow */
.dash-hero, .auth-art {
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(244,196,90,.30), transparent 60%),
    radial-gradient(420px 220px at 0% 100%, rgba(52,211,153,.18), transparent 60%),
    linear-gradient(135deg, #062c20, #0b4a36 55%, #0f5c43) !important;
}
.dash-hero-eyebrow, .dash-hero p, .auth-org-sub, .auth-pitch p { color: #cfe6dc; }
.auth-feats { color: #e3f1ea; }
.auth-feats i, .auth-feats svg { color: var(--gold-2); }
.dash-hero .btn-hero { color: var(--brand-ink); }
.dash-hero .btn-hero:hover { background: var(--gold-soft); color: var(--brand-ink); }

/* album card menus must sit above neighbouring cards */
.album-card { position: relative; z-index: 1; }
.album-card:hover { z-index: 5; }
.album-card:focus-within, .album-card.menu-open { z-index: 20; transform: none; }
.album-card .dropdown-menu { z-index: 1050; }
.p-card { z-index: 1; }
.p-card:focus-within, .p-card.menu-open { z-index: 20; }

/* Bangla text uses Tiro Bangla (English stays Inter); form fields and the editor inherit it too. */
input, select, textarea, button, .note-editable, .dropdown-menu, .table { font-family: var(--font); }
