/* =========================================================
   Malaygawra UI — shared design system (RTL, Kurdish Sorani)
   Plain CSS: no build step needed. Loaded last in layouts.
   ========================================================= */
:root {
  --mg-primary: #027aa3;
  --mg-primary-600: #026a8e;
  --mg-primary-700: #015a78;
  --mg-primary-50: #e8f5fa;
  --mg-primary-100: #cdeaf4;
  --mg-brand: #0396c4;

  --mg-bg: #f3f6f8;
  --mg-surface: #ffffff;
  --mg-border: #e2e8ed;
  --mg-border-strong: #cfd8df;
  --mg-text: #1b2730;
  --mg-text-muted: #5b6b77;
  --mg-text-faint: #8795a0;

  --mg-success: #16794a;  --mg-success-bg: #e7f6ee;
  --mg-danger:  #c0392b;  --mg-danger-bg:  #fdecea;
  --mg-warning: #9a6200;  --mg-warning-bg: #fff4de;

  --mg-radius: 12px;
  --mg-radius-sm: 8px;
  --mg-shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --mg-shadow-lg: 0 10px 30px rgba(16,24,40,.12);
  --mg-sidebar-w: 264px;
  --mg-font: 'Vazirmatn', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif;
}

[x-cloak] { display: none !important; }

html, body.mg { background: var(--mg-bg); }
body.mg {
  font-family: var(--mg-font);
  color: var(--mg-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.mg a { color: inherit; text-decoration: none; }
body.mg h1, body.mg h2, body.mg h3 { font-weight: 700; line-height: 1.35; margin: 0; }

/* ---------- Shell ---------- */
.mg-shell { min-height: 100vh; }
.mg-sidebar {
  position: fixed; inset-block: 0; right: 0; z-index: 40;
  width: var(--mg-sidebar-w);
  background: var(--mg-surface);
  border-left: 1px solid var(--mg-border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .2s ease;
}
.mg-sidebar.is-open { transform: translateX(0); box-shadow: var(--mg-shadow-lg); }
.mg-backdrop { position: fixed; inset: 0; background: rgba(15,23,32,.4); z-index: 30; }
.mg-main { min-width: 0; }
@media (min-width: 1024px) {
  .mg-sidebar { transform: none; }
  .mg-sidebar.is-open { box-shadow: none; }
  .mg-main { margin-right: var(--mg-sidebar-w); }
  .mg-backdrop, .mg-menu-toggle { display: none !important; }
}

.mg-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--mg-border); }
.mg-brand img { width: 44px; height: 44px; object-fit: contain; }
.mg-brand-title { font-weight: 700; font-size: 15px; color: var(--mg-primary-700); line-height: 1.3; }
.mg-brand-sub { font-size: 12px; color: var(--mg-text-muted); }

.mg-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.mg-nav-section { font-size: 12px; font-weight: 600; color: var(--mg-text-faint); padding: 16px 12px 6px; }
.mg-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0; border-radius: var(--mg-radius-sm);
  color: var(--mg-text-muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.mg-nav-link i { font-size: 18px; width: 20px; text-align: center; }
.mg-nav-link:hover { background: var(--mg-bg); color: var(--mg-text); }
.mg-nav-link.is-active { background: var(--mg-primary-50); color: var(--mg-primary-700); font-weight: 600; }
.mg-nav-link:focus-visible { outline: 2px solid var(--mg-primary); outline-offset: 1px; }

.mg-user { border-top: 1px solid var(--mg-border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.mg-user-name { font-weight: 600; font-size: 14px; }
.mg-user-mail { font-size: 12px; color: var(--mg-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }

.mg-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 16px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--mg-border);
}
.mg-topbar-title { font-weight: 600; color: var(--mg-text-muted); font-size: 14px; }
.mg-topbar-spacer { flex: 1; }

.mg-container { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
@media (min-width: 768px) { .mg-container { padding: 28px 28px 56px; } }

/* ---------- Page header ---------- */
.mg-page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.mg-page-title { font-size: 24px; }
.mg-page-sub { color: var(--mg-text-muted); margin-top: 2px; font-size: 14px; }
.mg-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-breadcrumb { font-size: 13px; color: var(--mg-text-muted); margin-bottom: 4px; }
.mg-breadcrumb a:hover { color: var(--mg-primary); }

/* ---------- Card ---------- */
.mg-card { background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--mg-radius); box-shadow: var(--mg-shadow); }
.mg-card + .mg-card { margin-top: 16px; }
.mg-card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--mg-border); }
.mg-card-title { font-size: 16px; font-weight: 700; }
.mg-card-body { padding: 20px; }
.mg-card-footer { padding: 14px 20px; border-top: 1px solid var(--mg-border); background: #fafcfd; border-radius: 0 0 var(--mg-radius) var(--mg-radius); }

/* ---------- Buttons ---------- */
.mg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px;
  border-radius: var(--mg-radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.mg-btn i { font-size: 16px; }
.mg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--mg-primary-100); }
.mg-btn:disabled, .mg-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.mg-btn-primary { background: var(--mg-primary); color: #fff !important; }
.mg-btn-primary:hover { background: var(--mg-primary-600); }
.mg-btn-secondary { background: #fff; color: var(--mg-text) !important; border-color: var(--mg-border-strong); }
.mg-btn-secondary:hover { background: var(--mg-bg); }
.mg-btn-danger { background: var(--mg-danger); color: #fff !important; }
.mg-btn-danger:hover { background: #a93226; }
.mg-btn-ghost { background: transparent; color: var(--mg-text-muted) !important; }
.mg-btn-ghost:hover { background: var(--mg-bg); color: var(--mg-text) !important; }
.mg-btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.mg-btn-icon { width: 34px; min-height: 34px; padding: 0; }
.mg-btn-icon.danger:hover { background: var(--mg-danger-bg); color: var(--mg-danger) !important; }
.mg-btn-icon.primary:hover { background: var(--mg-primary-50); color: var(--mg-primary) !important; }
.mg-link { color: var(--mg-primary) !important; font-weight: 600; }
.mg-link:hover { text-decoration: underline !important; }

/* ---------- Forms ---------- */
.mg-form-grid { display: grid; grid-template-columns: 1fr; gap: 18px 20px; }
@media (min-width: 768px) { .mg-form-grid { grid-template-columns: 1fr 1fr; } .mg-col-span-2 { grid-column: span 2; } }
.mg-form-section { font-size: 14px; font-weight: 700; color: var(--mg-primary-700); padding-bottom: 6px; border-bottom: 1px dashed var(--mg-border); grid-column: 1 / -1; margin-top: 4px; }
.mg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mg-label { font-size: 14px; font-weight: 600; color: var(--mg-text); }
.mg-label .req { color: var(--mg-danger); margin-inline-start: 2px; }
.mg-help { font-size: 12px; color: var(--mg-text-muted); }
.mg-error { font-size: 13px; color: var(--mg-danger); }
.mg-input, .mg-select, .mg-textarea {
  width: 100%; min-height: 42px; padding: 8px 12px;
  background: #fff; color: var(--mg-text);
  border: 1px solid var(--mg-border-strong); border-radius: var(--mg-radius-sm);
  font: inherit; font-size: 15px; text-align: right;
  transition: border-color .15s, box-shadow .15s;
}
.mg-select { padding-left: 32px; background-position: left .6rem center; }
.mg-input::placeholder { color: var(--mg-text-faint); }
.mg-input:focus, .mg-select:focus, .mg-textarea:focus { outline: none; border-color: var(--mg-primary); box-shadow: 0 0 0 3px var(--mg-primary-100); }
.mg-input.is-invalid, .mg-select.is-invalid { border-color: var(--mg-danger); }
.mg-input[type="date"], .mg-input[type="tel"] { direction: ltr; text-align: right; }
.mg-input[type="file"] { padding: 6px; }
.mg-form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }

.mg-search { position: relative; flex: 1; min-width: 220px; }
.mg-search i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mg-text-faint); pointer-events: none; }
.mg-search .mg-input { padding-right: 38px; }
.mg-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* select2 alignment */
body.mg .select2-container { width: 100% !important; }
body.mg .select2-container--default .select2-selection--single { height: 42px; border: 1px solid var(--mg-border-strong); border-radius: var(--mg-radius-sm); }
body.mg .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; padding-right: 12px; }
body.mg .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
body.mg .select2-container--default.select2-container--focus .select2-selection--single,
body.mg .select2-container--open .select2-selection--single { border-color: var(--mg-primary); }
body.mg .select2-results__option--highlighted[aria-selected] { background: var(--mg-primary) !important; }

/* ---------- Tables ---------- */
.mg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mg-table th {
  text-align: right; font-weight: 600; font-size: 13px; color: var(--mg-text-muted);
  background: #f7f9fb; padding: 11px 16px; border-bottom: 1px solid var(--mg-border); white-space: nowrap;
}
.mg-table td { padding: 12px 16px; border-bottom: 1px solid var(--mg-border); vertical-align: middle; }
.mg-table tbody tr:last-child td { border-bottom: 0; }
.mg-table tbody tr:hover td { background: #f9fbfc; }
.mg-table .num { font-variant-numeric: tabular-nums; color: var(--mg-text-muted); width: 56px; }
.mg-table .ltr { direction: ltr; text-align: right; unicode-bidi: plaintext; }
.mg-table .actions { width: 1%; white-space: nowrap; }
.mg-table .actions-inner { display: flex; gap: 4px; justify-content: flex-end; }
.mg-table th.sortable { cursor: pointer; user-select: none; }
.mg-table th.sortable:hover { color: var(--mg-text); }
.mg-cell-person { display: flex; align-items: center; gap: 10px; }

.mg-pagination { padding: 12px 16px; border-top: 1px solid var(--mg-border); }
.mg-pagination nav { direction: rtl; }

/* ---------- Badges / alerts ---------- */
.mg-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mg-bg); color: var(--mg-text-muted); white-space: nowrap; }
.mg-badge-success { background: var(--mg-success-bg); color: var(--mg-success); }
.mg-badge-danger  { background: var(--mg-danger-bg);  color: var(--mg-danger); }
.mg-badge-warning { background: var(--mg-warning-bg); color: var(--mg-warning); }
.mg-badge-primary { background: var(--mg-primary-50); color: var(--mg-primary-700); }

.mg-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--mg-radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.mg-alert i { font-size: 18px; line-height: 1.3; }
.mg-alert-success { background: var(--mg-success-bg); color: var(--mg-success); border-color: #bfe5cf; }
.mg-alert-danger  { background: var(--mg-danger-bg);  color: var(--mg-danger);  border-color: #f5c6c0; }
.mg-alert ul { margin: 4px 0 0; padding-right: 18px; list-style: disc; }
.mg-alert-close { margin-inline-start: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; font-size: 18px; line-height: 1; }

/* ---------- Empty state ---------- */
.mg-empty { text-align: center; padding: 40px 20px; color: var(--mg-text-muted); }
.mg-empty i { font-size: 36px; color: var(--mg-text-faint); display: block; margin-bottom: 8px; }
.mg-empty-title { font-weight: 600; color: var(--mg-text); margin-bottom: 4px; }

/* ---------- Stats ---------- */
.mg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.mg-stat { display: flex; align-items: center; gap: 14px; padding: 18px; }
.mg-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.mg-stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mg-stat-label { color: var(--mg-text-muted); font-size: 14px; }
.tone-blue   { background: var(--mg-primary-50); color: var(--mg-primary); }
.tone-green  { background: var(--mg-success-bg); color: var(--mg-success); }
.tone-amber  { background: var(--mg-warning-bg); color: var(--mg-warning); }
.tone-rose   { background: #fdebf1; color: #b4235a; }

.mg-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mg-quick a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--mg-border); border-radius: var(--mg-radius-sm); background: #fff; font-weight: 600; transition: border-color .15s, background .15s; }
.mg-quick a:hover { border-color: var(--mg-primary); background: var(--mg-primary-50); }
.mg-quick a i { font-size: 20px; color: var(--mg-primary); }
.mg-quick small { display: block; font-weight: 400; color: var(--mg-text-muted); font-size: 12px; }

/* ---------- Avatar / profile ---------- */
.mg-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--mg-primary-50); color: var(--mg-primary-700); display: grid; place-items: center; font-weight: 700; font-size: 14px; overflow: hidden; flex-shrink: 0; }
.mg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mg-avatar-xl { width: 120px; height: 120px; font-size: 40px; border: 4px solid #fff; box-shadow: var(--mg-shadow); }
.mg-profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.mg-dl { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 768px) { .mg-dl { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.mg-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--mg-border); }
.mg-dl dt { color: var(--mg-text-muted); font-size: 14px; }
.mg-dl dd { font-weight: 600; margin: 0; text-align: left; }

/* ---------- Attendance segmented control ---------- */
.mg-seg { display: inline-flex; border: 1px solid var(--mg-border-strong); border-radius: var(--mg-radius-sm); overflow: hidden; background: #fff; }
.mg-seg label { position: relative; margin: 0; cursor: pointer; }
.mg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mg-seg span { display: block; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--mg-text-muted); border-left: 1px solid var(--mg-border); transition: background .15s, color .15s; }
.mg-seg label:last-child span { border-left: 0; }
.mg-seg input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--mg-primary); }
.mg-seg input.present:checked + span { background: var(--mg-success); color: #fff; }
.mg-seg input.absent:checked + span  { background: var(--mg-danger);  color: #fff; }
.mg-seg input.leave:checked + span   { background: #d48a00;           color: #fff; }

.mg-summary { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Day chips & schedule board ---------- */
.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--mg-border-strong); background: #fff; font: inherit; font-weight: 600; font-size: 14px; color: var(--mg-text-muted); cursor: pointer; }
.mg-chip:hover { border-color: var(--mg-primary); color: var(--mg-primary); }
.mg-chip.is-active { background: var(--mg-primary); border-color: var(--mg-primary); color: #fff; }
.mg-chip.is-today:not(.is-active) { border-color: var(--mg-primary); color: var(--mg-primary-700); }

.mg-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.mg-day { display: flex; flex-direction: column; }
.mg-day.is-today { border-color: var(--mg-primary); box-shadow: 0 0 0 2px var(--mg-primary-100); }
.mg-day-list { list-style: none; margin: 0; padding: 0; }
.mg-day-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--mg-border); font-size: 14px; }
.mg-day-list li:last-child { border-bottom: 0; }
.mg-day-add { display: flex; gap: 8px; align-items: center; }
.mg-day-add .select2-container { flex: 1; }

/* ---------- Details (report cards) ---------- */
.mg-report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.mg-report-card .mg-card-header { border-bottom: 0; }
.mg-report-card form { border-top: 1px solid var(--mg-border); }
.mg-report-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; }

/* ---------- Guest (login) ---------- */
.mg-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--mg-primary-50), var(--mg-bg) 60%); }
.mg-auth-card { width: 100%; max-width: 420px; }
.mg-auth-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; text-align: center; }
.mg-auth-logo img { width: 96px; height: 96px; object-fit: contain; }

/* ---------- Utilities ---------- */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mg-stack > * + * { margin-top: 16px; }
.mg-muted { color: var(--mg-text-muted); }
.mg-hide-mobile { display: none; }
@media (min-width: 768px) { .mg-hide-mobile { display: table-cell; } }

@media print {
  .mg-sidebar, .mg-topbar, .mg-page-actions, .mg-no-print { display: none !important; }
  .mg-main { margin: 0 !important; }
  .mg-card { box-shadow: none; border: 0; }
}
.mg-avatar { position: relative; }
.mg-avatar span { position: relative; z-index: 0; }
.mg-avatar img { position: absolute; inset: 0; z-index: 1; }
.mg-select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235b6b77' viewBox='0 0 16 16'%3E%3Cpath d='M1.6 5.1a.5.5 0 0 1 .7 0L8 10.8l5.7-5.7a.5.5 0 0 1 .7.7l-6 6a.5.5 0 0 1-.7 0l-6-6a.5.5 0 0 1 0-.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; background-size: 14px;
  padding-left: 36px;
}
.mg-input[type="file"]::file-selector-button { font: inherit; border: 1px solid var(--mg-border-strong); background: var(--mg-bg); border-radius: 6px; padding: 4px 12px; margin-left: 10px; cursor: pointer; }

/* =========================================================
   Top navbar (replaces the sidebar)
   ========================================================= */
.mg-navbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--mg-border); }
.mg-navbar-inner { max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
@media (min-width: 768px) { .mg-navbar-inner { padding: 0 28px; } }
.mg-navbar-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-inline-end: 8px; }
.mg-navbar-brand img { width: 40px; height: 40px; object-fit: contain; }
.mg-navbar-links { display: none; align-items: center; gap: 2px; flex: 1; }
.mg-navbar-user { margin-inline-start: auto; }
.mg-navbar-toggle { display: inline-flex; }
@media (min-width: 1100px) {
  .mg-navbar-links { display: flex; }
  .mg-navbar-toggle { display: none !important; }
  .mg-navbar-user { margin-inline-start: 0; }
}
@media (max-width: 1099px) { .mg-navbar-toggle { margin-inline-start: 4px; } }
@media (max-width: 520px) { .mg-navbar-brand .mg-brand-title, .mg-hide-sm { display: none; } }

.mg-top-link {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border: 0; background: transparent; border-radius: var(--mg-radius-sm);
  font: inherit; font-size: 14px; font-weight: 500; color: var(--mg-text-muted); cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.mg-top-link:hover { background: var(--mg-bg); color: var(--mg-text); }
.mg-top-link.is-active { background: var(--mg-primary-50); color: var(--mg-primary-700); font-weight: 600; }
.mg-top-link:focus-visible { outline: 2px solid var(--mg-primary); outline-offset: 1px; }
.mg-caret { font-size: 11px !important; transition: transform .15s; }
.mg-caret.rot { transform: rotate(180deg); }

.mg-dd { position: relative; }
.mg-dd-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; z-index: 50;
  background: #fff; border: 1px solid var(--mg-border); border-radius: var(--mg-radius); box-shadow: var(--mg-shadow-lg); padding: 6px;
}
.mg-dd-menu.mg-dd-end { right: auto; left: 0; }
.mg-dd-menu a, .mg-dd-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--mg-radius-sm);
  font: inherit; font-size: 14px; color: var(--mg-text); background: none; border: 0; cursor: pointer; text-align: right;
}
.mg-dd-menu a i, .mg-dd-menu button i { color: var(--mg-text-faint); font-size: 16px; }
.mg-dd-menu a:hover, .mg-dd-menu button:hover { background: var(--mg-bg); }
.mg-dd-menu a.is-active { background: var(--mg-primary-50); color: var(--mg-primary-700); font-weight: 600; }
.mg-dd-menu a.is-active i { color: var(--mg-primary); }
.mg-dd-menu .mg-dd-danger { color: var(--mg-danger); }
.mg-dd-menu .mg-dd-danger i { color: var(--mg-danger); }
.mg-dd-sep { height: 1px; background: var(--mg-border); margin: 6px 0; }
.mg-dd-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--mg-border); margin-bottom: 6px; }

.mg-navbar-mobile { border-top: 1px solid var(--mg-border); padding: 8px 16px 16px; max-height: calc(100vh - 64px); overflow-y: auto; background: #fff; }
.mg-navbar-mobile a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--mg-radius-sm); color: var(--mg-text-muted); font-weight: 500; }
.mg-navbar-mobile a:hover { background: var(--mg-bg); }
.mg-navbar-mobile a.is-active { background: var(--mg-primary-50); color: var(--mg-primary-700); font-weight: 600; }
@media (min-width: 1100px) { .mg-navbar-mobile { display: none !important; } }
@media print { .mg-navbar { display: none !important; } }
