/* Minhaj 2026 UI - Full from-scratch visual system */
:root {
  --mx-font-en: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  --mx-font-ar: "Tajawal", "Cairo", "Noto Kufi Arabic", system-ui, Arial, sans-serif;

  --mx-primary-900: #0a3c37;
  --mx-primary-800: #0f5f57;
  --mx-primary-700: #12786d;
  --mx-primary-600: #159886;
  --mx-primary-500: #20b49c;

  --mx-accent-700: #9e6910;
  --mx-accent-600: #b87b19;
  --mx-accent-500: #d39a31;
  --mx-accent-300: #efcb79;

  --mx-danger: #c0392b;
  --mx-success: #1f8b4c;

  --mx-slate-950: #0b1220;
  --mx-slate-900: #111827;
  --mx-slate-800: #1f2937;
  --mx-slate-700: #334155;
  --mx-slate-600: #475569;
  --mx-slate-400: #94a3b8;
  --mx-slate-300: #cbd5e1;
  --mx-slate-200: #e2e8f0;
  --mx-slate-100: #f1f5f9;

  --mx-r-xs: 8px;
  --mx-r-sm: 12px;
  --mx-r-md: 16px;
  --mx-r-lg: 22px;
  --mx-r-xl: 30px;

  --mx-shadow-xs: 0 1px 2px rgba(2, 8, 23, 0.06);
  --mx-shadow-sm: 0 8px 16px rgba(2, 8, 23, 0.08);
  --mx-shadow-md: 0 14px 28px rgba(2, 8, 23, 0.12);
}

html[data-theme="light"] {
  --mx-bg:
    radial-gradient(62rem 34rem at -15% -15%, rgba(18, 120, 109, 0.14), transparent 62%),
    radial-gradient(58rem 30rem at 112% -8%, rgba(211, 154, 49, 0.16), transparent 58%),
    linear-gradient(180deg, #f8fbfe 0%, #edf2f8 100%);
  --mx-surface: #ffffff;
  --mx-surface-soft: #f9fbfd;
  --mx-border: rgba(100, 116, 139, 0.24);
  --mx-text: #0f172a;
  --mx-muted: #556070;
  --mx-focus: 0 0 0 0.18rem rgba(18, 120, 109, 0.24);
}

html[data-theme="dark"] {
  --mx-bg:
    radial-gradient(62rem 34rem at -15% -15%, rgba(32, 180, 156, 0.24), transparent 62%),
    radial-gradient(58rem 30rem at 112% -8%, rgba(211, 154, 49, 0.2), transparent 58%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  --mx-surface: #182235;
  --mx-surface-soft: #131d2e;
  --mx-border: rgba(148, 163, 184, 0.28);
  --mx-text: #eff5ff;
  --mx-muted: #bfcbdd;
  --mx-focus: 0 0 0 0.22rem rgba(32, 180, 156, 0.32);
}

html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: var(--mx-font-ar);
}

html[lang="en"] body,
html:not([lang="ar"]) body {
  font-family: var(--mx-font-en);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--mx-bg);
  color: var(--mx-text);
  font-size: 14px;
  line-height: 1.45;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.minhaj-shell.mx-app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  min-height: 100vh;
  padding: 0.8rem;
}

.minhaj-sidebar {
  position: sticky;
  top: 0.8rem;
  height: calc(100vh - 1.6rem);
  border-radius: var(--mx-r-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(10, 60, 55, 0.98), rgba(11, 18, 32, 0.97)),
    radial-gradient(38rem 26rem at -10% -10%, rgba(32, 180, 156, 0.25), transparent 62%);
  box-shadow: 0 20px 40px rgba(2, 8, 23, 0.35);
  display: flex;
  flex-direction: column;
  color: #f8fafc;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 0.85rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  text-decoration: none;
  color: #fff;
}

.brand-orb {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.brand-logo {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block;
  background: transparent;
}

.brand-text-wrap {
  display: grid;
}

.brand-text {
  font-size: 1rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.7rem;
  opacity: 0.78;
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-mobile {
  display: none;
}

.sidebar-nav {
  padding: 0.65rem;
  overflow: auto;
}

.nav-section-title {
  margin: 0.62rem 0.4rem 0.28rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.menu-link {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.58rem;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.93);
  font-size: 0.9rem;
  margin-bottom: 0.24rem;
}

.menu-link i {
  width: 1rem;
  text-align: center;
}

.menu-link:hover,
.menu-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.menu-link.is-active {
  background: linear-gradient(135deg, rgba(32, 180, 156, 0.28), rgba(59, 130, 246, 0.24));
  border-color: rgba(186, 230, 253, 0.52);
}

.submenu {
  margin: 0.22rem 0 0.4rem 1.1rem;
  display: grid;
  gap: 0.2rem;
}

.sub-link {
  font-size: 0.86rem;
}

.menu-separator {
  display: block !important;
  width: calc(100% - 0.7rem);
  flex: 0 0 auto;
  height: 2px;
  min-height: 2px;
  margin: 0.55rem 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(251, 191, 36, 0.12),
    rgba(251, 191, 36, 0.9),
    rgba(16, 185, 129, 0.85),
    rgba(251, 191, 36, 0.12)
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.22);
  opacity: 0.98;
  pointer-events: none;
  visibility: visible !important;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.75rem 0.9rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer-title {
  font-weight: 700;
}

.sidebar-footer-text {
  opacity: 0.74;
}

.minhaj-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.minhaj-topbar {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--mx-r-xl);
  background: linear-gradient(135deg, rgba(18, 120, 109, 0.9), rgba(29, 78, 216, 0.86));
  box-shadow: var(--mx-shadow-sm);
  color: #fff;
  padding: 0.7rem 0.9rem;
}

.mx-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.topbar-title-wrap {
  display: grid;
  gap: 0.03rem;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
}

.topbar-path {
  font-size: 0.7rem;
  opacity: 0.82;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.8rem;
  padding: 0.34rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f5fbff;
}

.geometric-divider {
  height: 4px;
  margin-top: 0.48rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mx-accent-500), rgba(255, 255, 255, 0.1), var(--mx-primary-500));
}

main.container.mx-content-shell {
  max-width: 100%;
  padding: 0.95rem 0 0.55rem !important;
}

.mx-page-frame {
  width: 100%;
}

.mx-page-header {
  margin-bottom: 0.8rem;
}

.mx-page-header h2 {
  font-size: 1.35rem;
}

.card {
  border-radius: var(--mx-r-lg) !important;
  border: 1px solid var(--mx-border) !important;
  background: var(--mx-surface) !important;
  box-shadow: var(--mx-shadow-sm) !important;
}

.mx-data-card .card-body {
  padding: 0.92rem 1rem;
}

.mx-data-header {
  display: grid;
  gap: 0.12rem;
  margin-bottom: 0.65rem;
}

.mx-data-header h3,
.mx-data-header h4 {
  font-size: 1.02rem;
}

.mx-data-header p {
  margin: 0;
  color: var(--mx-muted);
  font-size: 0.82rem;
}

.mx-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.62rem;
  margin-bottom: 0.62rem;
}

.mx-table-title h3,
.mx-table-title h4 {
  font-size: 1.02rem;
}

.mx-table-title p {
  margin: 0;
  color: var(--mx-muted);
  font-size: 0.8rem;
}

.mx-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.mx-table-search {
  min-width: 220px;
  max-width: 320px;
}

.table-responsive.mx-table-responsive {
  border-radius: 14px;
  border: 1px solid var(--mx-border);
  background: var(--mx-surface-soft);
  overflow: auto;
}

.table.mx-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.table.mx-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  font-weight: 700;
  color: var(--mx-slate-900);
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.12), rgba(211, 154, 49, 0.1));
  border-bottom: 1px solid var(--mx-border);
  padding: 0.64rem 0.76rem;
}

html[data-theme="dark"] .table.mx-table thead th {
  color: #eff6ff;
}

.table.mx-table tbody td {
  border-color: rgba(100, 116, 139, 0.16);
  padding: 0.62rem 0.76rem;
  vertical-align: middle;
}

.table.mx-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(18, 120, 109, 0.08), rgba(211, 154, 49, 0.06));
}

.mx-icon-button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mx-status-badge,
.badge {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.26rem 0.52rem;
}

.mx-empty-state {
  border: 1px dashed var(--mx-border);
  border-radius: 12px;
  color: var(--mx-muted);
  text-align: center;
  padding: 0.86rem;
}

.mx-form-shell {
  max-width: 760px;
  margin-inline: auto;
}

.mx-form-shell-sm {
  max-width: 560px;
}

.mx-form-shell-lg {
  max-width: 960px;
}

.mx-form-card .card-body {
  padding: 0.96rem 1rem;
}

.mx-form-section {
  border: 1px solid var(--mx-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.05), rgba(211, 154, 49, 0.04));
  padding: 0.8rem;
  margin-bottom: 0.75rem;
}

.mx-form-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mx-primary-800);
  margin-bottom: 0.56rem;
}

.mx-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.66rem 0.8rem;
}

.mx-field {
  min-width: 0;
}

.mx-action-bar {
  border-top: 1px dashed var(--mx-border);
  margin-top: 0.66rem;
  padding-top: 0.66rem;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.mx-action-bar .btn {
  min-width: 94px;
}

.form-label {
  margin-bottom: 0.28rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--mx-text);
}

.form-control,
.form-select,
.input-group-text {
  min-height: 37px;
  border-radius: 10px !important;
  border: 1px solid var(--mx-border) !important;
  background: var(--mx-surface) !important;
  color: var(--mx-text) !important;
  font-size: 0.88rem;
}

textarea.form-control {
  min-height: 96px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--mx-primary-700) !important;
  box-shadow: var(--mx-focus) !important;
}

.form-check-input:checked {
  background-color: var(--mx-primary-700);
  border-color: var(--mx-primary-700);
}

div[asp-validation-summary],
.validation-summary-errors {
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.08);
  padding: 0.45rem 0.6rem;
}

.field-validation-error,
.text-danger.field-validation-error {
  display: inline-block;
  margin-top: 0.18rem;
  font-size: 0.78rem;
  border-radius: 8px;
  border: 1px solid rgba(192, 57, 43, 0.32);
  background: rgba(192, 57, 43, 0.09);
  padding: 0.12rem 0.38rem;
}

.btn {
  min-height: 35px;
  border-radius: 10px !important;
  font-size: 0.86rem;
  font-weight: 600;
}

.btn.btn-sm {
  min-height: 30px;
}

.btn-primary {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--mx-primary-700), var(--mx-primary-600)) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--mx-primary-600), var(--mx-primary-500)) !important;
}

.btn-outline-primary {
  color: var(--mx-primary-700) !important;
  border-color: var(--mx-primary-700) !important;
}

.btn-outline-primary:hover {
  background: var(--mx-primary-700) !important;
  color: #fff !important;
}

.btn-outline-secondary {
  color: var(--mx-slate-700) !important;
  border-color: var(--mx-slate-400) !important;
}

.btn-outline-secondary:hover {
  color: #fff !important;
  background: var(--mx-slate-700) !important;
}

.btn-outline-danger {
  color: var(--mx-danger) !important;
  border-color: var(--mx-danger) !important;
}

.btn-outline-danger:hover {
  color: #fff !important;
  background: var(--mx-danger) !important;
}

.btn-outline-gold {
  color: var(--mx-accent-700) !important;
  border-color: var(--mx-accent-500) !important;
  background: linear-gradient(180deg, rgba(239, 203, 121, 0.18), rgba(211, 154, 49, 0.08)) !important;
}

.btn-outline-gold:hover {
  color: #fff !important;
  background: linear-gradient(180deg, var(--mx-accent-600), var(--mx-accent-500)) !important;
}

.modal-content {
  border: 1px solid var(--mx-border) !important;
  border-radius: 16px !important;
  background: var(--mx-surface) !important;
}

.modal-header {
  border-bottom: 1px solid var(--mx-border);
  background: linear-gradient(135deg, rgba(18, 120, 109, 0.15), rgba(211, 154, 49, 0.12));
}

.modal-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.modal-title-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--mx-primary-700), #1d4ed8);
}

.modal-title-main {
  font-size: 0.98rem;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--mx-muted);
}

.mx-entity-modal .modal-dialog {
  max-width: min(940px, 96vw);
}

.mx-entity-modal .modal-body {
  padding: 0.9rem 1rem;
}

.mx-entity-modal .modal-footer {
  border-top: 1px solid var(--mx-border);
  gap: 0.4rem;
}

/* robust unified dropdown arrows (LTR + RTL + dark + disabled) */
select,
.form-select,
select.form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312786d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  background-position: right 0.72rem center !important;
  padding-right: 2.25rem !important;
}

html[dir="rtl"] select,
html[dir="rtl"] .form-select,
html[dir="rtl"] select.form-control {
  background-position: left 0.72rem center !important;
  padding-right: 0.82rem !important;
  padding-left: 2.25rem !important;
}

html[data-theme="dark"] select,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-size: 18px 18px !important;
}

select:disabled,
.form-select:disabled,
select.form-control:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

.password-toggle-wrapper {
  position: relative;
}

.password-toggle-input {
  padding-right: 2.2rem !important;
}

html[dir="rtl"] .password-toggle-input {
  padding-right: 0.78rem !important;
  padding-left: 2.2rem !important;
}

.password-toggle-button {
  position: absolute;
  right: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--mx-muted);
  padding: 0;
}

html[dir="rtl"] .password-toggle-button {
  right: auto;
  left: 0.62rem;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1020;
  background: rgba(2, 8, 23, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.mx-no-scroll {
  overflow: hidden;
}

.site-footer {
  text-align: center;
  color: var(--mx-muted);
  padding: 0.54rem 0 1rem;
}

.page-crud-compact .mx-form-card {
  max-width: 760px;
  margin-inline: auto;
}

.page-crud-compact .mx-data-card {
  max-width: 560px;
  margin-inline: auto;
}

.page-crud-compact .mx-form-card .row.g-3,
.page-crud-compact .mx-form-card .row.g-4 {
  --bs-gutter-y: 0.65rem;
}

.minhaj-shell.sidebar-collapsed {
  grid-template-columns: 82px 1fr;
}

.minhaj-shell.sidebar-collapsed .brand-text-wrap,
.minhaj-shell.sidebar-collapsed .nav-section-title,
.minhaj-shell.sidebar-collapsed .submenu,
.minhaj-shell.sidebar-collapsed .menu-link span,
.minhaj-shell.sidebar-collapsed .sidebar-footer {
  display: none;
}

.minhaj-shell.sidebar-collapsed .menu-link {
  justify-content: center;
}

@media (max-width: 1200px) {
  .minhaj-shell.mx-app-shell {
    grid-template-columns: 1fr;
    padding: 0.62rem;
  }

  .minhaj-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    inset-inline-start: auto;
    inset-inline-end: auto;
    height: 100vh;
    width: 285px;
    max-width: 84vw;
    border-radius: 0;
    transform: translateX(-112%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.2s ease, visibility 0s linear 0.22s;
    z-index: 1030;
  }

  /* Match Arabic mobile sidebar behavior to English (same side/animation) */
  html[dir="rtl"] .minhaj-sidebar {
    left: 0;
    right: auto;
    inset-inline-start: auto;
    inset-inline-end: auto;
    transform: translateX(-112%);
  }

  .minhaj-shell.sidebar-mobile-open .minhaj-sidebar {
    transform: translateX(0) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.22s ease, opacity 0.2s ease;
  }

  .minhaj-shell:not(.sidebar-mobile-open) .minhaj-sidebar {
    transform: translateX(-112%) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html[dir="rtl"] .minhaj-shell:not(.sidebar-mobile-open) .minhaj-sidebar {
    transform: translateX(-112%) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .minhaj-shell.sidebar-mobile-open + .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-toggle-mobile {
    display: inline-flex;
  }

  .sidebar-toggle-desktop {
    display: none;
  }

  html[dir="rtl"] .sidebar-nav {
    direction: rtl;
  }

  html[dir="rtl"] .submenu {
    margin: 0.22rem 1.1rem 0.4rem 0;
  }
}

@media (max-width: 900px) {
  .mx-form-grid {
    grid-template-columns: 1fr;
  }

  .mx-table-actions {
    width: 100%;
    justify-content: stretch;
  }

  .mx-table-actions .btn,
  .mx-table-actions .btn-group {
    flex: 1 1 auto;
  }
}

/* visual-only density/spacing follow-up pass */
.mx-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.7rem !important;
}

.mx-page-header h2 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.page-filter-bar {
  border: 1px solid var(--mx-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.04), rgba(211, 154, 49, 0.05));
  padding: 0.7rem 0.78rem;
  margin-bottom: 0.8rem !important;
}

.page-filter-bar .form-label {
  font-size: 0.78rem;
  margin-bottom: 0.22rem;
}

.page-filter-bar .btn {
  min-width: 86px;
}

.mx-data-card,
.mx-form-card,
.mx-list-card,
.report-card,
.dashboard-card,
.chart-card {
  margin-bottom: 0.82rem !important;
}

.mx-data-card .card-body,
.mx-form-card .card-body,
.mx-list-card .card-body {
  padding: 0.82rem 0.88rem;
}

.mx-table-toolbar {
  margin-bottom: 0.52rem;
}

.mx-table-actions .btn,
.report-actions-group .btn {
  min-width: 94px;
}

.report-actions-group {
  display: inline-flex;
  flex-wrap: nowrap;
}

html[dir="rtl"] .report-actions-group {
  direction: rtl;
}

html[dir="rtl"] .report-actions-group .btn:first-child {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

html[dir="rtl"] .report-actions-group .btn:last-child {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

.table.mx-table thead th {
  font-size: 0.83rem;
  letter-spacing: 0.01em;
}

.table.mx-table tbody td {
  font-size: 0.86rem;
}

.table.mx-table.table-sm thead th,
.table.mx-table.table-sm tbody td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.mx-action-bar {
  justify-content: flex-end;
}

html[dir="rtl"] .mx-action-bar {
  justify-content: flex-start;
}

.modal-header {
  padding: 0.68rem 0.9rem;
}

.mx-entity-modal .modal-body {
  padding: 0.82rem 0.92rem;
}

.mx-entity-modal .modal-footer {
  padding: 0.62rem 0.88rem;
}

.followup-tabs .nav-link {
  color: var(--mx-primary-800) !important;
  font-weight: 700;
  border-color: var(--mx-border) !important;
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.08), rgba(211, 154, 49, 0.06));
}

/* premium calendar redesign (admin/lecturer schedule views) */
.admin-schedule-calendar,
.lecturer-calendar {
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100%;
  margin: 0;
  border: 1px solid var(--mx-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--mx-surface);
  box-shadow: var(--mx-shadow-sm);
}

.admin-schedule-calendar thead th,
.lecturer-calendar thead th {
  padding: 0.7rem 0.62rem !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  color: var(--mx-slate-900);
  border-bottom: 1px solid var(--mx-border) !important;
  border-inline-end: 1px solid rgba(100, 116, 139, 0.14) !important;
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.14), rgba(211, 154, 49, 0.12));
}

.admin-schedule-calendar thead th:last-child,
.lecturer-calendar thead th:last-child {
  border-inline-end: 0 !important;
}

.calendar-day {
  vertical-align: top !important;
  min-height: 150px;
  height: 150px;
  padding: 0.58rem 0.6rem !important;
  border-inline-end: 1px solid rgba(100, 116, 139, 0.18) !important;
  border-bottom: 1px solid rgba(100, 116, 139, 0.18) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(241, 245, 249, 0.6));
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.calendar-day:hover {
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.08), rgba(211, 154, 49, 0.08));
  box-shadow: inset 0 0 0 1px rgba(18, 120, 109, 0.25);
}

.calendar-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.83rem;
  margin-bottom: 0.42rem;
  color: var(--mx-primary-900);
  border: 1px solid rgba(18, 120, 109, 0.28);
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.12), rgba(211, 154, 49, 0.12));
}

.calendar-session {
  margin-top: 0.34rem;
  padding: 0.42rem 0.46rem;
  border-radius: 10px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  background: var(--mx-surface-soft);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.calendar-session-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--mx-slate-900);
  margin-bottom: 0.12rem;
}

.calendar-session-meta {
  font-size: 0.78rem;
  color: var(--mx-slate-700);
  line-height: 1.35;
}

.calendar-session-actions {
  margin-top: 0.32rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
}

html[data-theme="dark"] .admin-schedule-calendar thead th,
html[data-theme="dark"] .lecturer-calendar thead th {
  color: #f3f8ff;
  border-inline-end-color: rgba(148, 163, 184, 0.26) !important;
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.32), rgba(211, 154, 49, 0.26));
}

html[data-theme="dark"] .calendar-day {
  border-inline-end-color: rgba(148, 163, 184, 0.24) !important;
  border-bottom-color: rgba(148, 163, 184, 0.24) !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
}

html[data-theme="dark"] .calendar-day:hover {
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.22), rgba(211, 154, 49, 0.16));
  box-shadow: inset 0 0 0 1px rgba(244, 207, 132, 0.35);
}

html[data-theme="dark"] .calendar-date {
  color: #f4fbff;
  border-color: rgba(244, 207, 132, 0.5);
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.4), rgba(211, 154, 49, 0.26));
}

html[data-theme="dark"] .calendar-session {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .calendar-session-title {
  color: #f8fbff;
}

html[data-theme="dark"] .calendar-session-meta {
  color: #d5e1f1;
}

.followup-tabs .nav-link:hover {
  color: var(--mx-primary-900) !important;
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.16), rgba(211, 154, 49, 0.14));
}

.followup-tabs .nav-link.active {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--mx-primary-700), var(--mx-primary-600)) !important;
}

html[data-theme="dark"] .followup-tabs .nav-link {
  color: #eaf7ff !important;
  background: linear-gradient(180deg, rgba(32, 180, 156, 0.16), rgba(211, 154, 49, 0.16));
}

html[data-theme="dark"] .followup-tabs .nav-link.active {
  color: #fff !important;
}

.attendee-scroll-panel {
  max-height: 52vh;
}

/* route-level compact forms by page family */
body[class*="mx-route-chapters-"] .mx-form-card,
body[class*="mx-route-languages-"] .mx-form-card,
body[class*="mx-route-subjectcategories-"] .mx-form-card,
body[class*="mx-route-lecturers-"] .mx-form-card,
body[class*="mx-route-locations-"] .mx-form-card,
body[class*="mx-route-attendees-"] .mx-form-card,
body[class*="mx-route-teamwork-"] .mx-form-card {
  max-width: 820px;
  margin-inline: auto;
}

body.mx-route-account-login .auth-login-card,
body.mx-route-account-changepassword .auth-card-compact,
body.mx-route-account-accessdenied .auth-card-compact {
  max-width: 520px;
}

/* denser report tables and aligned toolbars */
body[class*="mx-route-reports-"] .mx-table-toolbar,
body[class*="mx-route-followup-report"] .mx-table-toolbar,
body[class*="mx-route-supervisor-attendance"] .mx-table-toolbar {
  align-items: center;
}

body[class*="mx-route-reports-"] .mx-table-title h3,
body[class*="mx-route-followup-report"] .mx-table-title h3 {
  font-size: 1.15rem;
}

@media (max-width: 900px) {
  .page-filter-bar {
    padding: 0.62rem 0.64rem;
  }

  .mx-table-actions {
    justify-content: flex-start;
  }

  .report-actions-group {
    width: 100%;
  }

  .report-actions-group .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* report-only micro pass: identical export/print toolbars + modal footers */
body[class*="mx-route-reports-"] .mx-table-actions,
body[class*="mx-route-followup-report"] .mx-table-actions {
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
}

html[dir="rtl"] body[class*="mx-route-reports-"] .mx-table-actions,
html[dir="rtl"] body[class*="mx-route-followup-report"] .mx-table-actions {
  justify-content: flex-start;
}

body[class*="mx-route-reports-"] .report-actions-group,
body[class*="mx-route-followup-report"] .report-actions-group {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--mx-border);
}

body[class*="mx-route-reports-"] .report-actions-group .btn,
body[class*="mx-route-followup-report"] .report-actions-group .btn {
  min-width: 112px;
  height: 32px;
  line-height: 1.1;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

body[class*="mx-route-reports-"] .report-actions-group .btn + .btn,
body[class*="mx-route-followup-report"] .report-actions-group .btn + .btn {
  border-inline-start-width: 1px !important;
}

body[class*="mx-route-reports-"] .report-actions-group .btn:first-child,
body[class*="mx-route-followup-report"] .report-actions-group .btn:first-child {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

body[class*="mx-route-reports-"] .report-actions-group .btn:last-child,
body[class*="mx-route-followup-report"] .report-actions-group .btn:last-child {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

html[dir="rtl"] body[class*="mx-route-reports-"] .report-actions-group .btn:first-child,
html[dir="rtl"] body[class*="mx-route-followup-report"] .report-actions-group .btn:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

html[dir="rtl"] body[class*="mx-route-reports-"] .report-actions-group .btn:last-child,
html[dir="rtl"] body[class*="mx-route-followup-report"] .report-actions-group .btn:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

body[class*="mx-route-reports-"] .modal-footer,
body[class*="mx-route-followup-report"] .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.72rem 0.92rem;
  border-top: 1px solid var(--mx-border);
}

html[dir="rtl"] body[class*="mx-route-reports-"] .modal-footer,
html[dir="rtl"] body[class*="mx-route-followup-report"] .modal-footer {
  justify-content: flex-start;
}

body[class*="mx-route-reports-"] .modal-footer .btn,
body[class*="mx-route-followup-report"] .modal-footer .btn {
  min-width: 104px;
  height: 34px;
}

/* contrast hotfix: topbar controls + dark-mode readability */
.minhaj-topbar .btn-outline-gold {
  color: #f8fbff !important;
  border-color: rgba(255, 255, 255, 0.62) !important;
  background: rgba(15, 23, 42, 0.24) !important;
}

.minhaj-topbar .btn-outline-gold:hover,
.minhaj-topbar .btn-outline-gold:focus {
  color: #0b1220 !important;
  border-color: rgba(255, 255, 255, 0.86) !important;
  background: linear-gradient(180deg, #ffe1a0, #efc46b) !important;
}

.minhaj-topbar .form-select,
.minhaj-topbar .form-select:focus {
  color: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
  background-color: #ffffff !important;
}

.minhaj-topbar .topbar-user {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.form-control::placeholder,
.form-select::placeholder,
textarea.form-control::placeholder {
  color: #64748b !important;
  opacity: 1;
}

html[data-theme="dark"] .mx-form-section-title {
  color: #7ce2d2;
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-check-label,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .mx-table-title h3,
html[data-theme="dark"] .mx-table-title h4,
html[data-theme="dark"] .mx-page-header h2 {
  color: #f3f8ff !important;
}

html[data-theme="dark"] .text-muted {
  color: #b8c8dd !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea.form-control {
  background-color: #1a2740 !important;
  color: #eef5ff !important;
  border-color: rgba(148, 163, 184, 0.5) !important;
}

html[data-theme="dark"] {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .form-select:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] select.form-control:disabled {
  color: #d7e4f6 !important;
  background-color: #22324d !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d7e4f6' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-size: 18px 18px !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .form-select::placeholder,
html[data-theme="dark"] textarea.form-control::placeholder {
  color: #aebcd0 !important;
}

/* admin dashboard redesign */
.admin-hero-inner .card-body {
  padding: 1rem 1.05rem;
}

.admin-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.8rem;
}

.admin-hero-copy h2 {
  font-size: 2rem;
  line-height: 1.15;
  margin: 0;
}

.admin-hero-copy p {
  margin: 0.35rem 0 0;
  color: var(--mx-muted);
  font-size: 0.95rem;
}

.admin-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-quicklinks-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mx-primary-800);
  margin-bottom: 0.6rem;
}

.admin-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.admin-tile {
  display: grid;
  gap: 0.24rem;
  align-content: start;
  padding: 0.78rem 0.82rem;
  text-decoration: none;
  border-radius: 14px;
  border: 1px solid var(--mx-border);
  background: linear-gradient(180deg, rgba(18, 120, 109, 0.08), rgba(211, 154, 49, 0.06));
  color: var(--mx-text);
  min-height: 110px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-tile i {
  font-size: 1.02rem;
  color: var(--mx-primary-700);
}

.admin-tile span {
  font-weight: 700;
  font-size: 0.95rem;
}

.admin-tile small {
  color: var(--mx-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-tile:hover,
.admin-tile:focus {
  color: var(--mx-text);
  border-color: rgba(18, 120, 109, 0.55);
  box-shadow: var(--mx-shadow-xs);
  transform: translateY(-2px);
}

html[data-theme="dark"] .admin-quicklinks-label {
  color: #8de8da;
}

html[data-theme="dark"] .admin-tile {
  background: linear-gradient(180deg, rgba(32, 180, 156, 0.14), rgba(211, 154, 49, 0.11));
}

html[data-theme="dark"] .admin-tile small {
  color: #c6d4e7;
}

@media (max-width: 1100px) {
  .admin-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .admin-hero-header {
    flex-direction: column;
  }

  .admin-hero-copy h2 {
    font-size: 1.55rem;
  }

  .admin-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* login + landing modern centered refresh */
body.page-login .mx-content-shell {
  max-width: 1000px;
  margin-inline: auto;
  padding-top: 1.4rem !important;
}

.login-modern-wrap {
  max-width: 620px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.login-brand-top {
  text-align: center;
  display: grid;
  gap: 0.4rem;
}

.login-brand-logo {
  width: min(420px, 88%);
  max-height: 180px;
  object-fit: contain;
  background: transparent;
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--mx-border);
  box-shadow: var(--mx-shadow-sm);
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .login-brand-logo {
  mix-blend-mode: screen;
}

.login-brand-top h1 {
  font-size: 2rem;
  line-height: 1.2;
}

.login-brand-top p {
  margin: 0;
  color: var(--mx-muted);
}

.login-modern-card {
  border-radius: 22px !important;
}

.login-modern-card .card-body {
  padding: 1.15rem 1.2rem;
}

.login-modern-card .card-title {
  text-align: center;
  font-size: 1.9rem;
}

.login-back-home {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.35rem;
}

html[dir="rtl"] .login-back-home {
  justify-content: flex-end;
}

.landing-modern {
  max-width: 1200px;
  margin-inline: auto;
}

.landing-modern-header {
  text-align: center;
  margin: 0 auto 1rem;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
}

.landing-modern-logo {
  width: min(760px, 94%);
  max-height: 250px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  border: 1px solid var(--mx-border);
  box-shadow: var(--mx-shadow-sm);
}

.landing-modern-header .lead {
  max-width: 900px;
  color: var(--mx-muted);
}

/* global readable text defaults */
.card-text,
.form-text,
small,
.small {
  color: var(--mx-muted);
}

/* dark mode contrast pass (app-wide) */
html[data-theme="dark"] body,
html[data-theme="dark"] .mx-page-frame,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .dropdown-menu {
  color: #edf5ff;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] span,
html[data-theme="dark"] label,
html[data-theme="dark"] td,
html[data-theme="dark"] th {
  color: inherit;
}

html[data-theme="dark"] .card-title,
html[data-theme="dark"] .card-text,
html[data-theme="dark"] .lead,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] small,
html[data-theme="dark"] .small,
html[data-theme="dark"] .text-muted {
  color: #cfe0f6 !important;
}

html[data-theme="dark"] .table.mx-table tbody td {
  color: #eaf3ff;
}

/* dark mode global table readability */
html[data-theme="dark"] .table-responsive.mx-table-responsive {
  background: #0f1a2b !important;
  border-color: rgba(148, 163, 184, 0.42) !important;
}

html[data-theme="dark"] .table.mx-table,
html[data-theme="dark"] table.table {
  color: #ecf4ff !important;
  background-color: #0f1a2b !important;
}

html[data-theme="dark"] .table.mx-table tbody tr,
html[data-theme="dark"] table.table tbody tr {
  background-color: #13233a !important;
}

html[data-theme="dark"] .table.mx-table tbody td,
html[data-theme="dark"] table.table tbody td {
  color: #ecf4ff !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  background-color: transparent !important;
}

html[data-theme="dark"] .table.mx-table tbody tr:hover,
html[data-theme="dark"] table.table tbody tr:hover {
  background: #1a2f4c !important;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  color: #ecf4ff !important;
  background-color: #152944 !important;
}

html[data-theme="dark"] .table-bordered > :not(caption) > * > * {
  border-color: rgba(148, 163, 184, 0.3) !important;
}

html[data-theme="dark"] .btn-outline-secondary {
  color: #d8e6fb !important;
  border-color: rgba(203, 213, 225, 0.75) !important;
}

html[data-theme="dark"] .btn-outline-secondary:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="dark"] .btn-outline-gold {
  color: #ffd98b !important;
  border-color: rgba(255, 217, 139, 0.8) !important;
  background: linear-gradient(180deg, rgba(211, 154, 49, 0.18), rgba(211, 154, 49, 0.08)) !important;
}

/* login premium micro-pass: split-tone + subtle motion */
body.page-login {
  background:
    radial-gradient(42rem 24rem at 8% 10%, rgba(18, 120, 109, 0.16), transparent 62%),
    radial-gradient(36rem 22rem at 92% 8%, rgba(211, 154, 49, 0.18), transparent 58%),
    linear-gradient(115deg, #edf3f9 0 49.8%, #f8fbff 49.8% 100%) !important;
}

html[data-theme="dark"] body.page-login {
  background:
    radial-gradient(42rem 24rem at 8% 10%, rgba(32, 180, 156, 0.2), transparent 62%),
    radial-gradient(36rem 22rem at 92% 8%, rgba(211, 154, 49, 0.2), transparent 58%),
    linear-gradient(115deg, #0c1422 0 49.8%, #101c30 49.8% 100%) !important;
}

.login-modern-wrap {
  position: relative;
  isolation: isolate;
}

.login-modern-wrap::before {
  content: "";
  position: absolute;
  inset: -14px -18px;
  z-index: -1;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(18, 120, 109, 0.1), rgba(211, 154, 49, 0.12));
  filter: blur(0.2px);
  animation: loginGlowPulse 5.5s ease-in-out infinite;
}

.login-brand-logo {
  position: relative;
  animation: loginFloat 6.4s ease-in-out infinite;
}

.login-modern-card {
  position: relative;
  overflow: hidden;
  animation: loginCardLift 0.55s ease-out;
}

.login-modern-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 48%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  transform: skewX(-16deg);
  animation: loginShineSweep 4.8s ease-in-out infinite;
  pointer-events: none;
}

html[data-theme="dark"] .login-modern-card::after {
  background: linear-gradient(90deg, transparent, rgba(148, 197, 255, 0.16), transparent);
}

@keyframes loginFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes loginGlowPulse {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.006); }
}

@keyframes loginCardLift {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loginShineSweep {
  0% { left: -130%; }
  42%, 100% { left: 160%; }
}

@media (prefers-reduced-motion: reduce) {
  .login-modern-wrap::before,
  .login-brand-logo,
  .login-modern-card,
  .login-modern-card::after {
    animation: none !important;
  }
}

/* PWA install banner */
.pwa-install-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 2100;
  width: min(94vw, 580px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] .pwa-install-banner {
  background: rgba(17, 26, 42, 0.95);
  border-color: rgba(94, 234, 212, 0.35);
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.pwa-install-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f8f4ea;
  overflow: hidden;
  flex: 0 0 auto;
}

.pwa-install-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.pwa-install-text {
  display: grid;
  gap: 0.15rem;
}

.pwa-install-text strong {
  color: #0f3d3a;
  font-size: 0.98rem;
}

html[data-theme="dark"] .pwa-install-text strong {
  color: #dcfffb;
}

.pwa-install-text span,
.pwa-install-ios-note {
  color: #475569;
  font-size: 0.86rem;
}

html[data-theme="dark"] .pwa-install-text span,
html[data-theme="dark"] .pwa-install-ios-note {
  color: #c2d3e8;
}

.pwa-install-ios-note {
  margin-top: 0.1rem;
  font-size: 0.79rem;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pwa-install-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0b5f59);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.25);
}

.pwa-install-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 1.25rem;
  line-height: 1;
}

html[data-theme="dark"] .pwa-install-close {
  color: #c4d4e8;
  background: #1f2b42;
}

@media (max-width: 560px) {
  .pwa-install-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .pwa-install-actions {
    width: 100%;
  }

  .pwa-install-btn {
    flex: 1;
  }
}
