:root {
  --fa-primary: #0f766e;
  --fa-primary-dark: #0b5f59;
  --fa-sidebar: #0b1624;
  --fa-brand: #0b1f33;
  --fa-accent: #14b8a6;
  --fa-warning: #d97706;
  --fa-danger: #dc2626;
  --fa-info: #0284c7;
  --fa-purple: #4f46e5;
  --fa-body: #f3f6f9;
  --fa-card: #ffffff;
  --fa-text: #152033;
  --fa-muted: #667085;
  --fa-border: #e6edf3;
  --fa-radius: 18px;
  --fa-sidebar-width: 278px;
  --fa-font: "Manrope", "Segoe UI", sans-serif;
  --fa-display: "Sora", "Manrope", sans-serif;
}

* { box-sizing: border-box; }

body.admin-body {
  margin: 0;
  font-family: var(--fa-font);
  background: var(--fa-body);
  color: var(--fa-text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.admin-body button,
.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-body .btn,
.admin-body .form-control,
.admin-body .form-select,
.admin-body .dropdown-menu,
.admin-body .nav-group-toggle {
  font-family: inherit;
}

.admin-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.admin-ambient span {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  animation: floatOrb 16s ease-in-out infinite;
}

.admin-ambient span:nth-child(1) {
  width: 420px; height: 420px; left: 14%; top: -100px;
  background: radial-gradient(circle, rgba(15,139,141,.16), transparent 70%);
}

.admin-ambient span:nth-child(2) {
  width: 340px; height: 340px; right: 4%; top: 28%;
  background: radial-gradient(circle, rgba(20,184,166,.10), transparent 70%);
  animation-delay: -5s;
}

.admin-ambient span:nth-child(3) {
  width: 300px; height: 300px; left: 42%; bottom: -70px;
  background: radial-gradient(circle, rgba(18,61,86,.08), transparent 70%);
  animation-duration: 20s;
}

.admin-wrapper { position: relative; display: flex; min-height: 100vh; }

/* Modal harus di atas ambient/sidebar; jangan terjebak stacking context */
.modal { z-index: 1080; }
.modal-backdrop { z-index: 1070; }
.modal-dialog { pointer-events: auto; }
.modal-content { pointer-events: auto; }

/* ===== Sidebar ===== */
.admin-sidebar {
  width: var(--fa-sidebar-width);
  background: linear-gradient(180deg, #0e1a2b 0%, #0a1320 100%);
  border-right: 1px solid rgba(255,255,255,.05);
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 1040;
  transition: transform .25s ease;
  color: #c7d0db;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}

.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.25rem 1.2rem 1.1rem;
  color: #fff;
  text-decoration: none;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(10, 19, 32, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.admin-sidebar .brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  display: grid; place-items: center;
  font-family: var(--fa-display);
  font-weight: 800; color: #fff;
  box-shadow: 0 10px 22px rgba(15,118,110,.28);
  overflow: hidden;
}

.admin-sidebar .brand-mark-logo {
  background: rgba(255,255,255,.08);
  box-shadow: none;
  padding: .2rem;
}

.admin-sidebar .brand-mark-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.admin-sidebar .brand strong {
  display: block;
  font-family: var(--fa-display);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.admin-sidebar .brand small {
  display: block;
  font-size: .72rem;
  color: #8fa0b3;
  margin-top: .1rem;
}

.sidebar-nav { padding: .55rem .85rem 1.6rem; }

.nav-section-label {
  margin: .95rem .55rem .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6d7c8f;
}

.nav-group { margin-top: .2rem; }

.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .7rem;
  border: 0;
  background: transparent;
  color: #9aa8b8;
  padding: .68rem .7rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}

.nav-group-toggle span { flex: 1; min-width: 0; text-align: left; }
.nav-group-toggle .caret {
  margin-left: auto;
  width: auto;
  font-size: .62rem;
  transition: transform .2s ease;
  opacity: .7;
}
.nav-group-toggle:not(.collapsed) .caret { transform: rotate(180deg); }
.nav-group-toggle:hover { color: #fff; background: rgba(255,255,255,.04); }

.nav-group-links {
  display: grid;
  gap: .12rem;
  padding: .1rem 0 .35rem .2rem;
}

.admin-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .62rem .75rem;
  margin: 0;
  border-radius: 12px;
  color: #c7d0db;
  text-decoration: none;
  font-weight: 500;
  border-left: 0;
  transition: background .18s ease, color .18s ease;
}

.admin-sidebar .nav-link i {
  width: 1.15rem;
  text-align: center;
  color: #8394a8;
  font-size: .9rem;
  flex-shrink: 0;
}

.admin-sidebar .nav-link span {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.admin-sidebar .nav-link:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}

.admin-sidebar .nav-link:hover i { color: #9ff0e8; }

.admin-sidebar .nav-link.active {
  background: rgba(20, 184, 166, .14);
  color: #9ff0e8;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #14b8a6;
}

.admin-sidebar .nav-link.active i { color: #9ff0e8; }

.nav-link-external {
  margin-top: .85rem !important;
  color: #8fa0b3 !important;
  border-top: 1px solid rgba(255,255,255,.05);
  padding-top: .9rem !important;
  border-radius: 0 0 12px 12px !important;
}

.admin-sidebar .nav-badge {
  margin-left: auto;
  background: #14b8a6;
  color: #083532;
  font-size: .65rem;
  font-weight: 700;
  padding: .14rem .45rem;
  border-radius: 999px;
}

.admin-sidebar .nav-badge.danger,
.admin-sidebar .nav-badge.red { background: #ef4444; color: #fff; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .45);
  z-index: 1030;
}
.sidebar-backdrop.show { display: block; }

/* ===== Main ===== */
.admin-main {
  margin-left: var(--fa-sidebar-width);
  flex: 1;
  min-width: 0;
}

.admin-topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 40, .05);
  padding: .85rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 72px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: 1;
  min-width: 0;
}

.topbar-menu-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--fa-border);
  border-radius: 12px;
  background: #fff;
  color: #475467;
  display: none;
  place-items: center;
}

.topbar-search {
  position: relative;
  max-width: 360px;
  width: 100%;
}

.topbar-search input {
  width: 100%;
  border: 1px solid #e2eaf1;
  background: #f7fafc;
  border-radius: 14px;
  padding: .68rem 1rem .68rem 2.5rem;
  font-size: .9rem;
  outline: none;
  transition: .18s ease;
}

.topbar-search input:focus {
  border-color: #99d5cf;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15,118,110,.1);
}

.topbar-search i {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #93a1b2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.topbar-link {
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 12px;
  color: #475467;
  text-decoration: none;
  font-weight: 600;
  font-size: .86rem;
  background: #f4f7fa;
}

.topbar-link:hover { color: var(--fa-primary); background: #e8f6f4; }

.topbar-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid #e8eef3;
  background: #fff;
  color: #475467;
  display: grid;
  place-items: center;
  position: relative;
  text-decoration: none;
}

.topbar-icon:hover { background: #e8f6f4; color: var(--fa-primary); border-color: #cfe8e4; }

.topbar-icon .dot {
  position: absolute;
  top: 7px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}

.topbar-user {
  margin-left: .25rem;
  padding-left: .7rem;
  border-left: 1px solid var(--fa-border);
}

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: inherit;
}

.topbar-avatar {
  width: 40px; height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--fa-display);
  font-weight: 700;
  font-size: .9rem;
}

.topbar-caret { color: #98a2b3; font-size: .7rem; }

.admin-content { padding: 1.7rem 1.9rem 2.8rem; }

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.45rem;
}

.page-kicker {
  margin: 0 0 .25rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7b8b9c;
}

.page-title,
.page-header h4 {
  margin: 0;
  font-family: var(--fa-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  letter-spacing: -.03em;
  color: #0b1f33;
}

.page-actions { display: flex; gap: .55rem; flex-wrap: wrap; }

/* ===== Dashboard ===== */
.dash-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem;
  border-radius: var(--fa-radius);
  background:
    linear-gradient(135deg, rgba(15,118,110,.08), rgba(11,31,51,.04) 48%, rgba(255,255,255,.9)),
    #fff;
  border: 1px solid rgba(15,23,40,.04);
  box-shadow: 0 8px 24px rgba(15, 23, 40, .03);
}

.dash-hero-eyebrow {
  margin: 0;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #0f766e;
}

.dash-hero-title {
  margin: 0 0 .35rem;
  font-family: var(--fa-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0b1f33;
}

.dash-hero-text {
  color: var(--fa-muted);
  max-width: 38rem;
}

.dash-hero-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}

.chip-muted {
  display: inline-flex;
  align-items: center;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: #eef7f5;
  color: #0f766e;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: #e8f6f4;
  color: #0f766e;
  font-size: .75rem;
  font-weight: 600;
}

.empty-inline {
  display: grid;
  gap: .2rem;
  padding: .65rem 0;
}

.balance-figure strong {
  font-family: var(--fa-display);
  font-size: 1.35rem;
  letter-spacing: -.03em;
  color: #0b1f33;
}

.dash-progress {
  height: 8px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}

.dash-progress .progress-bar {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.role-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #067647;
  font-size: .72rem;
  font-weight: 700;
  text-transform: capitalize;
}

.dash-profile-card .topbar-avatar {
  width: 52px;
  height: 52px;
  font-size: 1.05rem;
}

/* ===== Cards ===== */
.card-panel {
  background: rgba(255,255,255,.92);
  border-radius: var(--fa-radius);
  border: 1px solid rgba(16,24,40,.04);
  box-shadow: 0 8px 28px rgba(15, 23, 40, .04);
  margin-bottom: 1.35rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card-panel .card-panel-header {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.card-panel .card-panel-header strong {
  font-weight: 600;
  color: #101828;
  letter-spacing: -.01em;
}

.card-panel .card-panel-body { padding: 1.35rem 1.4rem 1.45rem; }

.metric-card,
.stat-card {
  height: 100%;
  border-radius: var(--fa-radius);
  padding: 1.25rem 1.3rem;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(15,23,40,.04);
  box-shadow: 0 8px 24px rgba(15, 23, 40, .04);
  color: var(--fa-text);
  position: relative;
  overflow: hidden;
}

.metric-card::after,
.stat-card::after { display: none; }

.metric-card .label,
.stat-card .label {
  color: var(--fa-muted);
  font-size: .82rem;
  margin-bottom: .45rem;
  font-weight: 600;
}

.metric-card .value,
.stat-card .value {
  margin: 0;
  font-family: var(--fa-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0b1f33;
}

.metric-card .icon,
.stat-card .icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-blue .icon,
.metric-teal .icon { background: #e7f7f4; color: #0f766e; }
.stat-green .icon,
.metric-green .icon { background: #ecfdf3; color: #067647; }
.stat-orange .icon,
.metric-amber .icon { background: #fff7ed; color: #c2410c; }
.stat-red .icon,
.metric-rose .icon { background: #fef3f2; color: #b42318; }
.stat-purple .icon { background: #eef2ff; color: #4338ca; }

.stat-blue, .stat-green, .stat-orange, .stat-red, .stat-purple, .stat-soft {
  background: rgba(255,255,255,.94);
  color: var(--fa-text);
}

.stat-soft .label { color: var(--fa-muted); }
.stat-soft .value { color: #0b1f33; }

.bg-soft-primary { background: rgba(70,128,255,.12); color: var(--fa-primary); }
.bg-soft-success { background: rgba(46,216,182,.15); color: #1aa88f; }
.bg-soft-warning { background: rgba(255,182,77,.18); color: #d48900; }
.bg-soft-danger { background: rgba(255,83,112,.12); color: var(--fa-danger); }
.bg-soft-info { background: rgba(0,188,212,.12); color: var(--fa-info); }

.btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.btn-sm {
  border-radius: 10px;
  padding: .4rem .75rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  border-color: transparent;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(15,118,110,.18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0b5f59, #0f766e);
  border-color: transparent;
  filter: brightness(1.03);
}

.btn-emeterai {
  background: #8B5E34;
  border-color: #8B5E34;
  color: #fff;
}

.btn-emeterai:hover {
  background: #734c28;
  border-color: #734c28;
  color: #fff;
}

.btn-spj-doc {
  background: #0f5c63;
  border-color: #0f5c63;
  color: #fff;
  width: 100%;
  text-align: left;
  margin-bottom: .5rem;
}

.btn-spj-doc:hover {
  background: #0c4a50;
  border-color: #0c4a50;
  color: #fff;
}

.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
  border-bottom-color: #eef2f6;
  padding: .95rem .85rem;
}

.table thead th {
  font-size: .8rem;
  text-transform: none;
  letter-spacing: -.01em;
  color: #667085;
  font-weight: 600;
  border-bottom: 1px solid #e8eef5;
  background: transparent;
  white-space: nowrap;
}

.table tbody tr {
  transition: background .15s ease;
}

.table tbody tr:hover {
  background: rgba(246, 249, 252, .95);
}

.table tbody td {
  color: #344054;
  font-size: .92rem;
}

.table-empty {
  text-align: center;
  padding: 2.8rem 1rem !important;
  color: #98a2b3;
  background: #fbfcfe;
}

.table-empty-title {
  display: block;
  margin-bottom: .25rem;
  color: #475467;
  font-weight: 600;
}

.form-control, .form-select {
  border-color: #dfe7ef;
  border-radius: 12px;
  min-height: 44px;
  background: #fff;
  box-shadow: none;
}

.form-control:focus, .form-select:focus {
  border-color: #9bb0f5;
  box-shadow: 0 0 0 .2rem rgba(59,91,219,.1);
}

.card-panel-body > form.row {
  align-items: center;
  background: #f5f8fb;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: .85rem;
  margin-bottom: 1.25rem !important;
  row-gap: .7rem;
}

.card-panel-body > form.row .form-control,
.card-panel-body > form.row .form-select {
  background: #fff;
  border-color: #e1e8f0;
}

.card-panel-body > form.row .btn {
  min-height: 44px;
}

.btn-outline-primary {
  border-color: #b7ddd8;
  color: var(--fa-primary);
  background: #fff;
}

.btn-outline-primary:hover {
  background: #e8f6f4;
  border-color: #7ec8bf;
  color: var(--fa-primary-dark);
}

.form-control:focus, .form-select:focus {
  border-color: #7ec8bf;
  box-shadow: 0 0 0 .2rem rgba(15,118,110,.12);
}

.list-footer .page-item.active .page-link {
  background: var(--fa-primary);
  border-color: var(--fa-primary);
}

.btn-light {
  background: #fff;
  border: 1px solid #e1e8f0;
  color: #475467;
}

.btn-light:hover {
  background: #f8fafc;
  border-color: #d0d5dd;
  color: #101828;
}

.form-center { max-width: 820px; margin: 0 auto; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.form-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .22);
}

.form-modal .modal-header,
.form-modal .modal-footer {
  border-color: #eef2f6;
  padding: 1rem 1.25rem;
}

.form-modal .modal-title { font-weight: 700; letter-spacing: -.02em; }
.form-modal .modal-body { padding: 1.15rem 1.25rem .4rem; }

.btn-light, .btn-outline-primary, .btn-outline-danger, .btn-outline-secondary {
  border-radius: 10px;
  font-weight: 600;
}

.content-studio {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.content-nav {
  position: sticky;
  top: 88px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(15,23,40,.05);
  border-radius: 18px;
  padding: .75rem;
  box-shadow: 0 10px 28px rgba(15, 23, 40, .04);
}

.content-nav-label {
  margin: .35rem .7rem .55rem;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7b8b9c;
  font-weight: 700;
}

.content-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .72rem .75rem;
  border-radius: 13px;
  color: #344054;
  text-decoration: none;
  margin-bottom: .25rem;
  border: 1px solid transparent;
  transition: .15s ease;
}

.content-nav-copy { min-width: 0; }
.content-nav a strong { display: block; font-size: .9rem; }
.content-nav a small { color: #98a2b3; }
.content-nav a.is-active,
.content-nav a:hover {
  background: #e8f6f4;
  color: #0f766e;
  border-color: #cfe8e4;
}
.content-nav a.is-active small { color: #0f766e; }

.content-nav-icon,
.content-section-icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: #eef2f6;
  color: #475467;
  flex-shrink: 0;
}
.content-nav a.is-active .content-nav-icon,
.content-section-icon {
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  color: #fff;
}

.content-intro { margin-bottom: 1.1rem; }
.content-section { scroll-margin-top: 96px; margin-bottom: 1.1rem; }
.content-field { min-height: 46px; }

.save-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(15,118,110,.12);
  box-shadow: 0 16px 40px rgba(15, 23, 40, .1);
  backdrop-filter: blur(12px);
}

@media (max-width: 991px) {
  .content-studio { grid-template-columns: 1fr; }
  .content-nav {
    position: static;
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .55rem;
  }
  .content-nav-label { display: none; }
  .content-nav a { min-width: 150px; margin-bottom: 0; }
  .save-bar { flex-direction: column; align-items: stretch; }
}

/* ===== Sortable menus ===== */
.menu-sortable-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: #e8f6f4;
  border: 1px solid #cfe8e4;
  color: #0b5f59;
}

.menu-sortable-hint strong { display: block; }
.menu-sortable-status {
  font-size: .82rem;
  font-weight: 700;
  color: #0f766e;
  min-height: 1.2em;
}
.menu-sortable-status.is-error { color: #b42318; }
.menu-sortable-status.is-muted { color: #667085; font-weight: 600; }

.menu-sortable {
  display: grid;
  gap: .65rem;
}

.menu-sort-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .9rem;
  align-items: center;
  padding: .9rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15,23,40,.06);
  box-shadow: 0 6px 18px rgba(15, 23, 40, .03);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.menu-sort-item.is-dragging {
  opacity: .92;
  border-color: #7ec8bf;
  box-shadow: 0 16px 36px rgba(15, 118, 110, .14);
  transform: scale(1.01);
}

.menu-sort-handle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #e6edf3;
  background: #f7fafc;
  color: #667085;
  display: grid;
  place-items: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.menu-sort-handle:active { cursor: grabbing; }
.menu-sort-item:not([data-sortable="1"]) .menu-sort-handle {
  cursor: default;
  opacity: .45;
}

.menu-sort-index {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  margin-right: .55rem;
  border-radius: 999px;
  background: #e8f6f4;
  color: #0f766e;
  font-size: .75rem;
  font-weight: 700;
}

.menu-sort-meta strong { display: block; margin-bottom: .15rem; }
.menu-sort-meta small { color: var(--fa-muted); word-break: break-all; }

.menu-sort-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 767px) {
  .menu-sort-item {
    grid-template-columns: auto 1fr;
  }
  .menu-sort-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.badge-status { font-weight: 600; }

.message-item {
  display: flex;
  gap: .85rem;
  padding: .85rem 0;
  border-bottom: 1px solid #f1f1f1;
}

.message-item:last-child { border-bottom: 0; padding-bottom: 0; }

.message-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #eef3ff;
  color: var(--fa-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* Login — brand split */
.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #122033;
  background: #eef4f7;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}

.login-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7,21,37,.82), rgba(15,139,141,.42)),
    var(--login-photo) center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.4rem;
  min-height: 100vh;
}

.login-brand-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(20,184,166,.28), transparent 42%),
    linear-gradient(180deg, rgba(7,21,37,.2), rgba(7,21,37,.72));
  pointer-events: none;
}

.login-brand-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-brand-orbs span {
  position: absolute;
  border-radius: 50%;
  background: rgba(159, 240, 232, .16);
  animation: floatOrb 12s ease-in-out infinite;
}

.login-brand-orbs span:first-child {
  width: 220px; height: 220px;
  left: -40px; bottom: 12%;
}

.login-brand-orbs span:last-child {
  width: 140px; height: 140px;
  right: 10%; top: 18%;
  animation-delay: -4s;
  background: rgba(255,255,255,.1);
}

.login-brand-content {
  position: relative;
  z-index: 1;
}

.login-brand-home {
  display: block;
  color: inherit;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
  transition: transform .18s ease, opacity .18s ease;
}

.login-brand-home:hover {
  color: inherit;
  transform: translateY(-2px);
  opacity: .96;
}

.login-brand-home:focus-visible {
  outline: 2px solid #9ff0e8;
  outline-offset: 6px;
  border-radius: 12px;
}

.login-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(145deg, #14b8a6, #0f8b8d);
  margin-bottom: 2.2rem;
  overflow: hidden;
}

.login-brand-mark-logo {
  background: rgba(255,255,255,.12);
  padding: .35rem;
}

.login-brand-mark-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-upload {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(15,23,40,.06);
  background: linear-gradient(180deg, #fbfcfe, #f5f8fa);
}

.brand-upload-preview {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: center;
}

.brand-upload-checker {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  background:
    linear-gradient(45deg, #e8eef3 25%, transparent 25%),
    linear-gradient(-45deg, #e8eef3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8eef3 75%),
    linear-gradient(-45deg, transparent 75%, #e8eef3 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.brand-upload-checker img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.brand-upload-fallback {
  font-family: var(--fa-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: #0f766e;
}

.brand-upload-favicon {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--fa-muted);
  font-size: .78rem;
}

.brand-upload-favicon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 6px;
  background:
    linear-gradient(45deg, #e8eef3 25%, transparent 25%),
    linear-gradient(-45deg, #e8eef3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8eef3 75%),
    linear-gradient(-45deg, transparent 75%, #e8eef3 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  border: 1px solid #e6edf3;
}

@media (max-width: 767px) {
  .brand-upload { grid-template-columns: 1fr; }
  .brand-upload-preview { flex-direction: row; justify-content: flex-start; }
}

.login-brand-kicker {
  margin: 0 0 .55rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9ff0e8;
}

.login-brand h1 {
  margin: 0;
  max-width: 11ch;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  color: #fff;
}

.login-brand-copy {
  margin: 1.1rem 0 0;
  max-width: 34ch;
  color: rgba(255,255,255,.82);
  font-size: 1.02rem;
  line-height: 1.65;
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.5rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(20,184,166,.12), transparent 28%),
    radial-gradient(circle at 10% 85%, rgba(18,61,86,.08), transparent 32%),
    linear-gradient(180deg, #f7fbfd 0%, #eef4f7 100%);
}

.login-panel-inner {
  width: min(420px, 100%);
  animation: fadeUp .55s ease both;
}

.login-back-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.35rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #b7ddd8;
  color: #0f766e;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .12);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.login-back-chip:hover {
  color: #0b5f59;
  background: #e8f6f4;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 118, 110, .16);
}

.login-back-chip-ext {
  font-size: .72rem;
  opacity: .75;
}

.login-home-note {
  margin: 1.25rem 0 0;
  text-align: center;
  color: #667085;
  font-size: .9rem;
}

.login-home-note a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.login-home-note a:hover { text-decoration: underline; }

.login-panel-head {
  margin-bottom: 1.6rem;
}

.login-panel-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0b1f33;
}

.login-panel-head p {
  margin: .45rem 0 0;
  color: #5b6b7c;
  line-height: 1.55;
}

.login-alert {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: #fdecea;
  color: #a12622;
  border: 1px solid #f5c2c0;
  font-size: .92rem;
}

.login-form { display: grid; gap: 1rem; }

.login-field label {
  display: block;
  margin-bottom: .4rem;
  font-size: .86rem;
  font-weight: 700;
  color: #344054;
}

.login-input {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 48px;
  padding: 0 0.95rem;
  border: 1px solid #d7e2ea;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.login-input i {
  color: #7b8b9c;
  width: 1rem;
  text-align: center;
}

.login-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: #122033;
  padding: .85rem 0;
}

.login-input input::placeholder { color: #98a2b3; }

.login-input:focus-within {
  border-color: #14b8a6;
  box-shadow: 0 0 0 .2rem rgba(20,184,166,.12);
}

.login-captcha {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: stretch;
}

.login-captcha-prompt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 12px;
  background: #e7f7f4;
  color: #0f5c56;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.login-hint {
  margin: .45rem 0 0;
  font-size: .8rem;
  color: #7b8b9c;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: .15rem 0 .35rem;
  color: #5b6b7c;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}

.login-remember input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #0f8b8d;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f8b8d, #14b8a6);
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.login-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand {
    min-height: auto;
    padding: 1.6rem 1.35rem 1.4rem;
  }
  .login-brand-mark { width: 48px; height: 48px; margin-bottom: 1.2rem; }
  .login-brand h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); max-width: none; }
  .login-brand-copy { margin-top: .7rem; font-size: .95rem; }
  .login-panel { padding: 1.6rem 1.2rem 2.2rem; place-items: start center; }
  .login-back-chip { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .login-brand-orbs span,
  .login-panel-inner { animation: none !important; }
  .login-submit:hover { transform: none; }
}

.list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.list-footer .page-link {
  min-width: 2.15rem;
  text-align: center;
  color: var(--fa-text);
  border-color: var(--fa-border);
  font-weight: 600;
}

.list-footer .page-item.active .page-link {
  background: var(--fa-primary);
  border-color: var(--fa-primary);
  color: #fff;
}

.list-footer .page-item.disabled .page-link { color: #98a2b3; }

@media (prefers-reduced-motion: reduce) {
  .login-page::before,
  .login-page::after,
  .admin-ambient span { animation: none !important; }
}

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -28px, 0); }
}

.topbar-user-meta strong {
  display: block;
  font-size: .88rem;
  line-height: 1.2;
  color: var(--fa-text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-meta small {
  display: block;
  color: var(--fa-muted);
  font-size: .72rem;
}

.dropdown-menu {
  font-family: inherit;
  border-radius: 12px;
  padding: .4rem;
  min-width: 210px;
}

.dropdown-item {
  border-radius: 8px;
  padding: .55rem .7rem;
  font-weight: 500;
}

.form-label {
  font-weight: 600;
  font-size: .86rem;
  color: #344054;
  margin-bottom: .4rem;
}

.profile-layout {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.25rem 1.5rem;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(16,24,40,.05);
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .04);
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(145deg, #6d7dff, #3d5afe);
  box-shadow: 0 12px 24px rgba(61,90,254,.28);
}

.profile-identity h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.profile-identity p {
  margin: .2rem 0 .7rem;
  color: var(--fa-muted);
  overflow-wrap: anywhere;
}

.profile-pills { display: flex; flex-wrap: wrap; gap: .4rem; }

.profile-meta {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--fa-border);
}

.profile-meta div { margin: 0; }
.profile-meta dt { font-size: .75rem; color: var(--fa-muted); font-weight: 600; }
.profile-meta dd { margin: .15rem 0 0; font-weight: 600; }

.profile-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.profile-forms .card-panel { margin-bottom: 0; height: 100%; }

.card-panel-body > form.row {
  align-items: center;
}

@media (min-width: 768px) {
  .card-panel-body > form.row > [class*="col-"] {
    flex: 1 1 12rem;
    width: auto;
    max-width: 18rem;
    min-width: 0;
  }

  .card-panel-body > form.row > [class*="col-"].d-flex {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 991.98px) {
  .profile-hero { grid-template-columns: auto minmax(0, 1fr); }
  .profile-meta {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    border-left: 0;
    padding-left: 0;
    padding-top: .9rem;
    border-top: 1px solid var(--fa-border);
  }
}

@media (max-width: 767.98px) {
  .admin-content { padding: 1rem .9rem 2rem; }
  .page-header { align-items: flex-start; }
  .page-header h4 { font-size: 1.2rem; }
  .profile-hero, .profile-forms { grid-template-columns: 1fr; }
  .profile-meta { grid-template-columns: 1fr; }
  .card-panel-body > form.row > [class*="col-"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  .card-panel-body > form.row > [class*="col-"].d-flex { width: 100%; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn, .form-actions a.btn { width: 100%; }
  .list-footer { align-items: flex-start; }
  .content-studio { grid-template-columns: 1fr; }
}

.nav-group-toggle i { width: 1.1rem; text-align: center; flex-shrink: 0; }

.sidebar-toggle,
.topbar-menu-btn { display: none; }

@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-105%); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle,
  .topbar-menu-btn { display: inline-flex; }
  .topbar-search { display: none !important; }
}
