/*
 * MARGA.NET modern UI layer for Mikhmon.
 * This file intentionally contains visual overrides only.
 */

:root {
  --marga-bg: #080b1b;
  --marga-bg-soft: #0d1126;
  --marga-surface: rgba(17, 22, 45, 0.92);
  --marga-surface-strong: #11162d;
  --marga-surface-soft: rgba(23, 29, 57, 0.76);
  --marga-border: rgba(139, 151, 211, 0.18);
  --marga-border-strong: rgba(119, 99, 255, 0.42);
  --marga-text: #f5f6ff;
  --marga-muted: #929ab8;
  --marga-primary: #7657f6;
  --marga-primary-2: #8c5cf7;
  --marga-cyan: #3ec9ee;
  --marga-green: #39d7b0;
  --marga-yellow: #f2b84b;
  --marga-red: #f45f8b;
  --marga-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  --marga-radius-sm: 10px;
  --marga-radius: 15px;
  --marga-radius-lg: 22px;
}

/* Lightweight large-table navigation ------------------------------------ */
body.marga-app-page .marga-paginated-table tbody tr[hidden] {
  display: none !important;
}

body.marga-app-page .marga-table-pager {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0 0;
  padding: 5px 7px;
  border: 1px solid rgba(92, 116, 164, 0.24);
  border-radius: 9px;
  color: #8fa5c9;
  background: rgba(7, 22, 42, 0.72);
  font-size: 8px;
}

body.marga-app-page .marga-table-pager[hidden] {
  display: none !important;
}

body.marga-app-page .marga-table-pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.marga-app-page .marga-table-pager button {
  display: inline-grid;
  width: 27px;
  min-width: 27px;
  min-height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(82, 125, 188, 0.32);
  border-radius: 7px;
  color: #c7d5ef;
  background: rgba(15, 42, 74, 0.78);
  font-size: 8px;
}

body.marga-app-page .marga-table-pager button:disabled {
  cursor: default;
  opacity: 0.35;
}

body.marga-app-page .marga-table-page-number {
  min-width: 38px;
  color: #e7efff;
  font-size: 8px;
  text-align: center;
}

body.marga-app-page .marga-data-card .overflow {
  scrollbar-gutter: stable;
}

body.marga-app-page .marga-data-card .marga-data-table tbody td {
  padding-top: 7px;
  padding-bottom: 7px;
}

@media screen and (max-width: 800px) {
  body.marga-app-page .marga-table-pager {
    position: sticky;
    z-index: 2;
    bottom: 4px;
    min-height: 31px;
    margin-top: 5px;
    padding: 4px 6px;
    backdrop-filter: blur(8px);
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody tr {
    margin-bottom: 5px;
    border-radius: 9px;
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody td {
    min-height: 27px;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    padding: 4px 7px;
    font-size: 8px;
    line-height: 1.25;
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody td::before {
    font-size: 6.5px;
  }

  body.marga-app-page .marga-form-grid tbody {
    gap: 5px;
  }

  body.marga-app-page .marga-form-grid tr {
    padding: 6px 7px;
  }

  body.marga-app-page .marga-form-grid td:first-child {
    margin-bottom: 3px;
    font-size: 8px;
  }

  body.marga-app-page .form-control,
  body.marga-app-page .group-item,
  body.marga-app-page select,
  body.marga-app-page textarea,
  body.marga-app-page input[type="text"],
  body.marga-app-page input[type="password"],
  body.marga-app-page input[type="number"],
  body.marga-app-page input[type="date"],
  body.marga-app-page input[type="time"] {
    min-height: 34px;
    font-size: 10px;
  }
}

@media screen and (min-width: 360px) and (max-width: 800px) {
  body.marga-app-page .marga-form-grid tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

body.mikhmon-theme-blue {
  --marga-primary: #4e7cf5;
  --marga-primary-2: #6d5dfc;
  --marga-cyan: #38c8f0;
}

body.mikhmon-theme-green {
  --marga-primary: #27b891;
  --marga-primary-2: #42cc9b;
  --marga-cyan: #3ccbdc;
}

body.mikhmon-theme-pink {
  --marga-primary: #d950a5;
  --marga-primary-2: #8b5cf6;
  --marga-cyan: #4bc8e9;
}

body.mikhmon-theme-light {
  --marga-bg: #eef1f9;
  --marga-bg-soft: #f6f7fc;
  --marga-surface: rgba(255, 255, 255, 0.94);
  --marga-surface-strong: #ffffff;
  --marga-surface-soft: rgba(241, 243, 251, 0.92);
  --marga-border: rgba(62, 70, 111, 0.14);
  --marga-border-strong: rgba(109, 86, 240, 0.3);
  --marga-text: #1b2039;
  --marga-muted: #6d7593;
  --marga-shadow: 0 18px 45px rgba(35, 41, 75, 0.12);
}

html {
  min-height: 100%;
  background: var(--marga-bg);
}

body.marga-ui {
  min-height: 100vh;
  margin: 0;
  color: var(--marga-text);
  background:
    radial-gradient(circle at 82% 8%, rgba(118, 87, 246, 0.18), transparent 28rem),
    radial-gradient(circle at 8% 88%, rgba(62, 201, 238, 0.11), transparent 26rem),
    linear-gradient(145deg, var(--marga-bg) 0%, var(--marga-bg-soft) 52%, var(--marga-bg) 100%);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

body.marga-ui::before,
body.marga-ui::after {
  position: fixed;
  z-index: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  content: "";
  opacity: 0.12;
}

body.marga-ui::before {
  top: 8%;
  right: -150px;
  background: var(--marga-red);
}

body.marga-ui::after {
  bottom: -130px;
  left: 25%;
  background: var(--marga-cyan);
}

.wrapper,
#main,
.navbar,
.sidenav,
#notify,
.modal-window {
  position: relative;
  z-index: 1;
}

* {
  scrollbar-color: rgba(135, 145, 190, 0.45) rgba(7, 10, 24, 0.35);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 10, 24, 0.35);
  border: 0;
}

::-webkit-scrollbar-thumb {
  background: rgba(135, 145, 190, 0.45);
  border: 0;
  border-radius: 999px;
}

/* Application header */
.navbar {
  position: fixed;
  z-index: 20;
  top: 0;
  width: 100%;
  height: 66px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--marga-border);
  background: rgba(8, 11, 27, 0.86);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.mikhmon-theme-light .navbar {
  background: rgba(255, 255, 255, 0.88);
}

.navbar-left,
.navbar-right {
  height: 66px;
  display: flex;
  align-items: center;
}

.navbar-left {
  float: left;
}

.navbar-right {
  float: right;
  padding-right: 12px;
  gap: 7px;
}

.navbar-left a,
.navbar-right a {
  color: var(--marga-text);
  padding: 10px 13px;
}

#brand {
  position: relative;
  display: flex;
  min-width: 205px;
  height: 66px;
  align-items: center;
  box-sizing: border-box;
  padding: 0 18px !important;
  color: transparent !important;
  font-size: 0 !important;
  letter-spacing: 0;
  text-align: left;
}

#brand::before {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--marga-primary-2), var(--marga-cyan));
  box-shadow: 0 8px 22px rgba(98, 89, 241, 0.3);
  content: "S";
  font-size: 16px;
  font-weight: 900;
}

#brand::after {
  color: var(--marga-text);
  content: "SKAYNET.ID";
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

#openNav,
#closeNav {
  width: 38px;
  height: 38px;
  margin: 0 7px 0 0;
  padding: 0 !important;
  border: 1px solid var(--marga-border);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: var(--marga-surface-soft);
}

#openNav:hover,
#closeNav:hover {
  border-color: var(--marga-border-strong);
  background: rgba(118, 87, 246, 0.14);
}

#cpage {
  max-width: 34vw;
  overflow: hidden;
  color: var(--marga-muted) !important;
  font-size: 13px !important;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cpage::before {
  margin-right: 9px;
  color: var(--marga-primary-2);
  content: "\f105";
  font-family: FontAwesome;
}

.navbar-right .ses,
.navbar-right select {
  max-width: 170px;
  height: 36px;
  margin-top: 0;
  padding: 0 30px 0 11px;
  border: 1px solid var(--marga-border);
  border-radius: 11px;
  color: var(--marga-text);
  background: var(--marga-surface-soft);
  outline: 0;
}

.navbar-right #logout {
  display: inline-flex;
  height: 36px;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(244, 95, 139, 0.26);
  border-radius: 11px;
  color: #ff9ab7;
  background: rgba(244, 95, 139, 0.08);
}

.navbar-right #logout:hover {
  color: #fff;
  background: rgba(244, 95, 139, 0.2);
}

.navbar-right a[title="Idle Timeout"] span {
  display: inline-flex;
  height: 36px;
  align-items: center;
  box-sizing: border-box;
  border: 1px solid var(--marga-border);
  border-radius: 11px;
  color: var(--marga-muted);
  background: var(--marga-surface-soft);
}

/* Sidebar */
.sidenav {
  position: fixed;
  z-index: 19;
  top: 0;
  left: 0;
  height: calc(100% - 67px);
  margin-top: 67px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0 !important;
  border-right: 1px solid var(--marga-border) !important;
  background: rgba(10, 14, 32, 0.95);
  box-shadow: 14px 0 40px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.mikhmon-theme-light .sidenav {
  background: rgba(248, 249, 253, 0.96);
}

.sidenav > .card-header:first-child {
  margin: 11px 10px 8px !important;
  padding: 12px 10px !important;
  border: 1px solid var(--marga-border-strong);
  border-radius: 13px !important;
  background: linear-gradient(135deg, rgba(118, 87, 246, 0.19), rgba(62, 201, 238, 0.08));
}

.sidenav > .card-header:first-child h3 {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidenav a,
.sidenav .dropdown-btn {
  position: relative;
  width: auto;
  min-height: 42px;
  box-sizing: border-box;
  margin: 4px 9px;
  padding: 7px 32px 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--marga-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  line-height: 28px;
}

.sidenav a i:not(.fa-caret-down),
.sidenav .dropdown-btn > i:first-child {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 8px 0 0;
  padding: 0;
  border: 1px solid rgba(118, 87, 246, 0.45);
  border-radius: 9px;
  color: #b3a7ff;
  background: rgba(118, 87, 246, 0.08);
  font-size: 13px;
}

.sidenav a:nth-of-type(3n + 2) i:not(.fa-caret-down),
.sidenav .dropdown-btn:nth-of-type(3n + 2) > i:first-child {
  border-color: rgba(62, 201, 238, 0.42);
  color: #69d9f4;
  background: rgba(62, 201, 238, 0.07);
}

.sidenav a:nth-of-type(3n + 3) i:not(.fa-caret-down),
.sidenav .dropdown-btn:nth-of-type(3n + 3) > i:first-child {
  border-color: rgba(57, 215, 176, 0.4);
  color: #63e2c0;
  background: rgba(57, 215, 176, 0.07);
}

.sidenav a:hover,
.sidenav .dropdown-btn:hover,
.sidenav a.active,
.sidenav .dropdown-btn.active {
  border-color: var(--marga-border);
  border-radius: 12px;
  color: var(--marga-text);
  background: linear-gradient(90deg, rgba(118, 87, 246, 0.16), rgba(62, 201, 238, 0.05));
}

.sidenav a.marga-router-add-locked,
.sidenav a.marga-router-add-locked:hover {
  border-color: rgba(255, 173, 66, 0.16);
  color: #c7a36b;
  background: rgba(255, 173, 66, 0.05);
  opacity: 0.72;
  cursor: not-allowed;
}

.sidenav a.active::after,
.sidenav .dropdown-btn.active::after {
  position: absolute;
  top: 10px;
  right: 5px;
  width: 3px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(var(--marga-primary-2), var(--marga-cyan));
  content: "";
}

.sidenav .fa-caret-down,
.sidenav .fa-caret-left {
  position: absolute;
  top: 12px;
  right: 11px;
  margin: 0;
  padding: 0;
  color: var(--marga-muted);
  font-size: 12px;
}

.sidenav .dropdown-container {
  margin: 2px 8px 7px 18px;
  padding-left: 5px;
  border-left: 1px solid var(--marga-border);
}

.sidenav .dropdown-container a,
.sidenav .dropdown-container .dropdown-btn {
  margin-right: 0;
  margin-left: 3px;
  font-size: 12px;
}

.sidenav .dropdown-container i:not(.fa-caret-down) {
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 11px;
}

.sidenav .spa {
  min-height: 1px;
  margin: 10px 12px;
  padding: 0;
  border-bottom: 1px solid var(--marga-border);
}

/* Page shell */
#main {
  margin-top: 67px;
  transition: margin-left 0.35s ease;
}

.main-container {
  max-width: 1680px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px 18px 28px;
}

.row {
  margin-right: -5px;
  margin-left: -5px;
}

[class*="col-"] {
  box-sizing: border-box;
  padding-right: 5px;
  padding-left: 5px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--marga-text);
  letter-spacing: -0.015em;
}

p,
small {
  color: var(--marga-muted);
}

a,
.table td,
.table th {
  color: var(--marga-text);
}

/* Cards and dashboard blocks */
.card,
.box {
  position: relative;
  box-sizing: border-box;
  margin: 6px;
  overflow: hidden;
  border: 1px solid var(--marga-border);
  border-radius: var(--marga-radius);
  color: var(--marga-text);
  background: var(--marga-surface);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
}

.card::before {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(133, 112, 255, 0.55), transparent);
  content: "";
}

.card > *,
.box > * {
  position: relative;
  z-index: 1;
}

.card-header {
  min-height: 26px;
  margin: 0;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--marga-border);
  border-radius: var(--marga-radius) var(--marga-radius) 0 0;
  background: rgba(255, 255, 255, 0.018);
}

.card-header h3,
.card-header .card-title {
  font-size: 14px;
  font-weight: 800;
}

.card-header h3 > i:first-child,
.card-title > i:first-child {
  margin-right: 7px;
  color: #a89cff;
}

.card-body {
  margin: 0;
  padding: 14px 15px 16px;
}

.card-footer {
  padding: 11px 15px;
  border-top: 1px solid var(--marga-border);
}

.box {
  padding: 14px;
  border-radius: 14px;
}

.box-bordered {
  border-color: var(--marga-border) !important;
}

.box-group {
  display: table;
  width: 100%;
}

.box-group-icon {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--marga-border-strong);
  border-radius: 14px;
  color: #afa4ff;
  background: rgba(118, 87, 246, 0.11);
  font-size: 21px;
  line-height: 46px;
}

.box-group-area {
  padding: 4px 7px 4px 12px;
  color: var(--marga-muted);
}

.box.bg-blue,
.box.bg-primary {
  background: linear-gradient(135deg, rgba(78, 124, 245, 0.94), rgba(83, 93, 212, 0.9));
}

.box.bg-green,
.box.bg-success {
  background: linear-gradient(135deg, rgba(32, 172, 142, 0.95), rgba(30, 132, 142, 0.9));
}

.box.bg-yellow,
.box.bg-warning {
  background: linear-gradient(135deg, rgba(218, 151, 45, 0.95), rgba(196, 103, 55, 0.9));
}

.box.bg-red,
.box.bg-danger {
  background: linear-gradient(135deg, rgba(219, 70, 116, 0.95), rgba(158, 64, 143, 0.9));
}

.box.bg-indigo,
.box.bg-purple,
.box.bg-pink {
  background: linear-gradient(135deg, var(--marga-primary-2), #a951c7);
}

.box.bg-cyan,
.box.bg-info,
.box.bg-light-blue,
.box.bg-teal {
  background: linear-gradient(135deg, #26a8d1, #337cc9);
}

.box[class*="bg-"] {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.box[class*="bg-"] a,
.box[class*="bg-"] span,
.box[class*="bg-"] .box-group-area,
.box[class*="bg-"] .box-group-area a,
.box[class*="bg-"] .box-group-area span,
.box[class*="bg-"] h1,
.box[class*="bg-"] h2,
.box[class*="bg-"] h3,
.box[class*="bg-"] p {
  color: #fff !important;
}

.box[class*="bg-"] .box-group-icon {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(11, 14, 35, 0.14);
}

/* Tables */
.overflow {
  border-radius: 12px;
}

.table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
}

.table th {
  padding: 10px 9px;
  border-color: var(--marga-border) !important;
  color: #b9c0d8;
  background: rgba(118, 87, 246, 0.08);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.table td {
  padding: 9px;
  border-color: var(--marga-border) !important;
  color: var(--marga-text);
}

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

.table-hover:hover tbody tr:hover,
.table tbody tr:hover {
  background: rgba(118, 87, 246, 0.07);
}

.table-bordered {
  border: 1px solid var(--marga-border);
  border-radius: 12px;
}

.table-bordered th:first-child {
  border-top-left-radius: 11px;
}

.table-bordered th:last-child {
  border-top-right-radius: 11px;
}

/* Forms */
.form-control,
.group-item,
select,
textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"] {
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--marga-border);
  border-radius: 10px;
  color: var(--marga-text);
  background: rgba(6, 9, 23, 0.48);
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mikhmon-theme-light .form-control,
.mikhmon-theme-light .group-item,
.mikhmon-theme-light select,
.mikhmon-theme-light textarea,
.mikhmon-theme-light input[type="text"],
.mikhmon-theme-light input[type="password"],
.mikhmon-theme-light input[type="number"] {
  background: rgba(237, 239, 248, 0.8);
}

.form-control:focus,
.group-item:focus,
select:focus,
textarea:focus,
input:focus {
  border-color: rgba(118, 87, 246, 0.82);
  box-shadow: 0 0 0 3px rgba(118, 87, 246, 0.14);
}

.form-control::placeholder,
.group-item::placeholder,
input::placeholder,
textarea::placeholder {
  color: #707995;
  opacity: 1;
}

.group-item-l {
  border-radius: 10px 0 0 10px;
}

.group-item-r {
  border-radius: 0 10px 10px 0;
}

.group-item-md {
  border-radius: 0;
}

input[type="checkbox"],
input[type="radio"] {
  min-height: auto;
  accent-color: var(--marga-primary);
}

/* Buttons and statuses */
.btn,
.btn-login,
button,
input[type="submit"],
input[type="button"] {
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--marga-border);
  border-radius: 10px;
  color: var(--marga-text);
  background: var(--marga-surface-soft);
  font-weight: 750;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn:hover,
.btn-login:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  border-color: var(--marga-border-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.bg-primary,
.btn.bg-primary,
.btn-login.bg-primary,
input.bg-primary {
  color: #fff;
  background: linear-gradient(100deg, var(--marga-primary), var(--marga-primary-2) 55%, var(--marga-cyan));
}

.bg-secondary {
  color: #fff;
  background-color: #5f6884;
}

.bg-success,
.bg-green {
  color: #fff;
  background-color: #23b991;
}

.bg-info,
.bg-cyan,
.bg-light-blue {
  color: #fff;
  background-color: #2caed0;
}

.bg-warning,
.bg-yellow,
.bg-orange {
  color: #fff;
  background-color: #d99d36;
}

.bg-danger,
.bg-red {
  color: #fff;
  background-color: #df4e78;
}

.bg-indigo,
.bg-purple,
.bg-pink {
  color: #fff;
  background-color: var(--marga-primary);
}

.alert {
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--marga-border);
  border-radius: 11px;
}

.text-primary,
.text-blue,
.text-indigo,
.text-purple {
  color: #9b8cff;
}

.text-success,
.text-green,
.text-teal {
  color: #50dab5;
}

.text-info,
.text-cyan,
.text-light-blue {
  color: #5fd7f1;
}

.text-warning,
.text-yellow,
.text-orange {
  color: #f3bf58;
}

.text-danger,
.text-red,
.text-pink {
  color: #ff789e;
}

.cl-w,
.text-white,
.text-light {
  color: #fff;
}

/* Modals, notifications, and loading */
#notify {
  position: fixed;
  z-index: 1000;
  top: 78px;
  left: 50%;
  width: auto;
  min-width: 220px;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid var(--marga-border-strong);
  border-radius: 12px;
  color: var(--marga-text);
  background: var(--marga-surface-strong);
  box-shadow: var(--marga-shadow);
  transform: translateX(-50%);
}

.modal-window {
  position: fixed;
  z-index: 999;
  background: rgba(2, 4, 13, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-window > div {
  border: 1px solid var(--marga-border-strong);
  border-radius: var(--marga-radius-lg);
  color: var(--marga-text);
  background: var(--marga-surface-strong);
  box-shadow: var(--marga-shadow);
}

.modal-window header {
  color: var(--marga-text);
}

.lds-dual-ring::after {
  border-color: var(--marga-primary) transparent var(--marga-cyan) transparent;
}

/* Highcharts follows the active MARGA.NET surface */
#trafficMonitor,
.highcharts-container,
.highcharts-root {
  border-radius: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

#trafficMonitor {
  overflow: hidden;
  border: 1px solid var(--marga-border);
  background: rgba(6, 9, 23, 0.28);
}

.highcharts-background {
  fill: transparent !important;
}

.highcharts-plot-background {
  fill: rgba(7, 10, 25, 0.2) !important;
}

.highcharts-grid-line {
  stroke: rgba(145, 155, 202, 0.14) !important;
}

.highcharts-axis-line,
.highcharts-tick {
  stroke: rgba(145, 155, 202, 0.26) !important;
}

.highcharts-title,
.highcharts-subtitle,
.highcharts-axis-title,
.highcharts-axis-labels text,
.highcharts-legend-item text {
  color: var(--marga-text) !important;
  fill: var(--marga-text) !important;
}

.highcharts-tooltip-box {
  fill: var(--marga-surface-strong) !important;
  stroke: var(--marga-border-strong) !important;
}

/* Login */
body.marga-login-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 28px;
  box-sizing: border-box;
}

.marga-login-page .wrapper {
  width: 100%;
}

.marga-login-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0;
}

.marga-login-card {
  display: grid;
  min-height: 570px;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  margin: 0;
  border-color: rgba(123, 107, 222, 0.34);
  border-radius: 26px;
  background: rgba(12, 16, 36, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.marga-login-card::after {
  position: absolute;
  top: -140px;
  left: -120px;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: rgba(118, 87, 246, 0.18);
  filter: blur(38px);
  content: "";
}

.marga-login-brand,
.marga-login-form-panel {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  padding: 42px;
}

.marga-login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-right: 1px solid var(--marga-border);
  background:
    radial-gradient(circle at 85% 16%, rgba(244, 95, 139, 0.18), transparent 16rem),
    linear-gradient(145deg, rgba(118, 87, 246, 0.22), rgba(12, 16, 36, 0.36) 64%);
}

.marga-login-brand::after {
  position: absolute;
  right: -95px;
  bottom: -110px;
  width: 310px;
  height: 310px;
  border: 55px solid rgba(62, 201, 238, 0.07);
  border-radius: 50%;
  content: "";
}

.marga-brand-lockup,
.marga-mobile-brand {
  display: flex;
  align-items: center;
}

.marga-brand-mark {
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--marga-primary-2), var(--marga-cyan));
  box-shadow: 0 13px 30px rgba(86, 93, 235, 0.3);
  font-size: 19px;
  font-weight: 900;
}

.marga-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.marga-brand-copy {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
}

.marga-brand-copy strong {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.marga-brand-copy small {
  margin-top: 2px;
  color: #8e96b6;
  font-size: 9px;
  letter-spacing: 0.03em;
}

.marga-login-intro {
  max-width: 370px;
  margin: 75px 0 50px;
}

.marga-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #aa9fff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.marga-login-intro h1 {
  max-width: 350px;
  margin: 17px 0 15px;
  color: #fff;
  font-size: clamp(31px, 4vw, 44px);
  line-height: 1.08;
}

.marga-login-intro p {
  max-width: 350px;
  margin: 0;
  color: #a3aac4;
  font-size: 13px;
  line-height: 1.7;
}

.marga-login-features {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marga-login-features span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--marga-border);
  border-radius: 10px;
  color: #c1c7da;
  background: rgba(5, 8, 22, 0.26);
  font-size: 11px;
  font-weight: 700;
}

.marga-login-features i {
  color: #74d9f1;
}

.marga-login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.marga-mobile-brand {
  display: none;
  margin-bottom: 32px;
}

.marga-login-heading {
  margin-bottom: 28px;
}

.marga-login-heading h2 {
  margin: 8px 0 5px;
  color: #fff;
  font-size: 27px;
}

.marga-login-heading p {
  margin: 0;
  color: #858da9;
  font-size: 12px;
}

.marga-login-form label {
  display: block;
  margin: 15px 0 7px;
  color: #c2c7da;
  font-size: 11px;
  font-weight: 750;
}

.marga-input-wrap {
  position: relative;
}

.marga-input-wrap > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15px;
  color: #77809f;
  transform: translateY(-50%);
}

.marga-input-wrap .form-control {
  height: 48px;
  padding: 0 14px 0 43px;
  border-color: rgba(129, 141, 195, 0.2);
  border-radius: 13px;
  color: #fff;
  background: rgba(5, 8, 23, 0.62);
  font-size: 13px;
}

.marga-login-button {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.marga-login-feedback {
  margin-top: 13px;
  text-align: center;
}

.marga-login-feedback:empty {
  display: none;
}

.marga-login-feedback .bg-danger {
  box-sizing: border-box;
  border: 1px solid rgba(244, 95, 139, 0.32);
  border-radius: 11px !important;
  color: #ff9ab7;
  background: rgba(244, 95, 139, 0.1);
}

.marga-login-assurance {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
  padding: 11px 12px;
  border: 1px solid rgba(116, 217, 241, 0.14);
  border-radius: 11px;
  color: #858da9;
  background: rgba(5, 8, 23, 0.34);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.marga-login-assurance strong {
  color: #b8c0dc;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.marga-login-assurance i {
  margin-right: 5px;
  color: #39c9a5;
}

.marga-login-note {
  margin: 22px 0 0;
  color: #6f7792;
  font-size: 10px;
  text-align: center;
}

.marga-login-note i {
  margin-right: 5px;
  color: #39c9a5;
}

/* Public voucher status */
body.marga-status-page {
  min-height: 100vh;
  padding: 28px 14px;
  box-sizing: border-box;
}

.marga-status-shell {
  width: min(520px, 100%);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--marga-border-strong);
  border-radius: var(--marga-radius-lg);
  background: var(--marga-surface);
  box-shadow: var(--marga-shadow);
}

.marga-status-brand {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}

.marga-status-shell > h3 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.25;
}

.marga-status-shell > h3 span {
  color: #a99eff;
  font-size: 14px;
}

.marga-status-shell #date1 {
  margin: 0 0 22px;
  font-size: 11px;
}

.marga-status-shell > .form {
  margin-bottom: 18px;
}

.marga-status-shell .input-group-7 .group-item {
  height: 44px;
  padding-left: 13px;
}

.marga-status-shell .input-group-5 .group-item {
  width: 100%;
  height: 44px;
  border-color: transparent;
  color: #fff;
  background: linear-gradient(100deg, var(--marga-primary), var(--marga-cyan));
}

.marga-status-shell section .card {
  margin: 24px 0 0;
}

/* Responsive */
@media (max-width: 1000px) {
  .navbar-right .stheme,
  .navbar-right a[title="Idle Timeout"] {
    display: none !important;
  }

  #cpage {
    max-width: 28vw;
  }
}

@media (max-width: 800px) {
  #brand {
    min-width: 170px;
    padding-left: 10px !important;
  }

  #brand::before {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    margin-right: 8px;
    border-radius: 11px;
  }

  #brand::after {
    font-size: 13px;
  }

  #cpage {
    display: none;
  }

  .sidenav {
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.46);
  }

  .main-container {
    padding: 10px 9px 22px;
  }

  [class*="col-"] {
    padding-right: 3px;
    padding-left: 3px;
  }

  .card,
  .box {
    margin: 4px;
  }

  .card-header {
    padding: 11px 12px;
  }

  .card-body {
    padding: 11px 12px 13px;
  }

  .table th,
  .table td {
    padding: 8px 7px;
  }

  .modal-window > div {
    width: calc(100% - 28px);
    margin: 18vh 14px;
    box-sizing: border-box;
  }
}

@media (max-width: 720px) {
  body.marga-login-page {
    display: block;
    padding: 12px;
  }

  .marga-login-shell {
    width: 100%;
    margin-top: 0;
  }

  .marga-login-card {
    display: block;
    min-height: calc(100vh - 24px);
    border-radius: 21px;
  }

  .marga-login-brand {
    display: none;
  }

  .marga-login-form-panel {
    min-height: calc(100vh - 24px);
    padding: 27px 24px;
  }

  .marga-mobile-brand {
    display: flex;
  }

  .marga-login-heading {
    margin-top: auto;
  }

  .marga-login-note {
    margin-top: auto;
    padding-top: 10px;
  }

  .marga-login-assurance {
    margin-top: 12px;
    padding: 8px 10px;
  }
}

@media (max-width: 576px) {
  .navbar {
    height: 60px;
  }

  .navbar-left,
  .navbar-right {
    height: 60px;
  }

  #brand {
    min-width: 148px;
    height: 60px;
  }

  #brand::before {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  #brand::after {
    font-size: 12px;
  }

  #openNav,
  #closeNav {
    width: 34px;
    height: 34px;
  }

  .navbar-right {
    padding-right: 7px;
  }

  .navbar-right .ses,
  .navbar-right select {
    max-width: 102px;
    height: 34px;
    padding-right: 22px;
    font-size: 11px;
  }

  .navbar-right #logout {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .navbar-right #logout i {
    margin: 0;
    font-size: 14px;
  }

  .sidenav {
    height: calc(100% - 61px);
    margin-top: 61px;
  }

  #main {
    margin-top: 61px;
  }

  .main-container {
    padding: 8px 5px 18px;
  }

  .card,
  .box {
    border-radius: 13px;
  }

  .card-header {
    border-radius: 13px 13px 0 0;
  }

  .card-header h3,
  .card-header .card-title {
    font-size: 13px;
  }

  .table {
    font-size: 12px;
  }

  .form-control,
  .group-item,
  select,
  textarea,
  input[type="text"],
  input[type="password"],
  input[type="number"] {
    font-size: 12px;
  }

  body.marga-status-page {
    padding: 10px;
  }

  .marga-status-shell {
    min-height: calc(100vh - 20px);
    padding: 22px 17px;
    border-radius: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ========================================================================== */
/* MARGA.NET application shell v2 - structural redesign                      */
/* ========================================================================== */

body.marga-app-page {
  --marga-sidebar-width: 244px;
  --marga-topbar-height: 56px;
  --marga-panel: rgba(15, 20, 43, 0.92);
  --marga-panel-raised: rgba(20, 26, 54, 0.96);
  --marga-field: rgba(7, 10, 26, 0.62);
}

body.marga-app-page .navbar {
  height: var(--marga-topbar-height);
  overflow: visible;
  border-bottom: 1px solid rgba(145, 155, 214, 0.12);
  background: rgba(7, 10, 25, 0.9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

body.marga-app-page .navbar-left,
body.marga-app-page .navbar-right {
  height: var(--marga-topbar-height);
}

body.marga-app-page .marga-app-brand {
  display: flex !important;
  width: var(--marga-sidebar-width);
  min-width: var(--marga-sidebar-width);
  height: var(--marga-topbar-height);
  align-items: center;
  box-sizing: border-box;
  padding: 0 14px !important;
  border-right: 1px solid rgba(145, 155, 214, 0.12);
  text-align: left;
}

body.marga-app-page .marga-app-brand::before,
body.marga-app-page .marga-app-brand::after {
  display: none !important;
}

.marga-brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #825ff8, #3ec9ee);
  box-shadow: 0 10px 28px rgba(76, 111, 242, 0.3);
  font-size: 16px;
  font-weight: 900;
}

body.marga-app-page .marga-brand-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 11px;
  box-shadow: 0 7px 20px rgba(76, 111, 242, 0.24);
  font-size: 14px;
}

.marga-brand-copy {
  display: flex;
  min-width: 0;
  margin-left: 9px;
  flex-direction: column;
  line-height: 1.1;
}

.marga-brand-copy strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.marga-brand-copy small {
  margin-top: 3px;
  color: #737d9d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

body.marga-app-page #openNav,
body.marga-app-page #closeNav {
  width: 36px;
  height: 36px;
  margin: 10px 8px;
  padding: 0 !important;
  border: 1px solid var(--marga-border);
  border-radius: 10px;
  line-height: 34px;
}

body.marga-app-page #cpage {
  display: flex;
  height: var(--marga-topbar-height);
  align-items: center;
  padding: 0 10px !important;
  color: var(--marga-muted);
  font-size: 12px;
  font-weight: 750;
}

body.marga-app-page #cpage::before {
  width: 5px;
  height: 5px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--marga-primary-2);
  box-shadow: 0 0 0 5px rgba(118, 87, 246, 0.1);
  content: "";
}

.marga-topbar-context {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  margin: 12px 4px 12px 0;
  padding: 0 10px;
  border: 1px solid var(--marga-border);
  border-radius: 999px;
  color: var(--marga-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.marga-topbar-context.is-online i,
.marga-live-dot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--marga-green);
  box-shadow: 0 0 0 5px rgba(57, 215, 176, 0.1);
}

body.marga-app-page .navbar-right #logout {
  height: 36px;
  margin-top: 10px;
}

body.marga-app-page .navbar-right .ses,
body.marga-app-page .navbar-right select {
  height: 36px;
  margin-top: 10px;
}

body.marga-app-page .navbar-right a[title="Idle Timeout"] {
  margin-top: 10px;
}

body.marga-app-page .sidenav {
  top: 0;
  height: calc(100% - var(--marga-topbar-height));
  box-sizing: border-box;
  margin-top: var(--marga-topbar-height);
  padding: 10px 8px 20px;
  border-right: 1px solid rgba(145, 155, 214, 0.12) !important;
  background: rgba(8, 12, 29, 0.95);
  box-shadow: none;
}

.marga-sidebar-branding {
  display: flex;
  min-height: 52px;
  align-items: center;
  box-sizing: border-box;
  margin: 0 2px 10px;
  padding: 8px;
  border: 1px solid var(--marga-border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(118, 87, 246, 0.14), rgba(62, 201, 238, 0.035));
}

.marga-sidebar-branding-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(118, 87, 246, 0.38);
  border-radius: 9px;
  color: #b8adff;
  background: rgba(118, 87, 246, 0.12);
}

.marga-sidebar-branding > span:last-child {
  display: flex;
  min-width: 0;
  margin-left: 8px;
  flex-direction: column;
}

.marga-sidebar-branding small,
.marga-sidebar-context small,
.marga-nav-label {
  color: #66708f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.marga-sidebar-branding strong {
  overflow: hidden;
  margin-top: 3px;
  color: var(--marga-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marga-sidebar-context {
  margin: 0 3px 13px;
  padding: 2px 11px 12px;
  border-bottom: 1px solid var(--marga-border);
}

.marga-sidebar-context h3 {
  overflow: hidden;
  margin-top: 3px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marga-nav-label {
  margin: 12px 10px 6px;
}

body.marga-app-page .sidenav a,
body.marga-app-page .sidenav .dropdown-btn {
  min-height: 40px;
  box-sizing: border-box;
  margin: 3px 1px;
  padding: 6px 28px 6px 7px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 26px;
}

body.marga-app-page .sidenav a i:not(.fa-caret-down),
body.marga-app-page .sidenav .dropdown-btn > i:first-child {
  width: 28px;
  height: 28px;
  margin-right: 7px;
  border-radius: 8px;
  line-height: 26px;
}

body.marga-app-page .sidenav a.active,
body.marga-app-page .sidenav .dropdown-btn.active {
  border-color: rgba(118, 87, 246, 0.28);
  background: linear-gradient(100deg, rgba(118, 87, 246, 0.2), rgba(62, 201, 238, 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

body.marga-app-page .sidenav .dropdown-container {
  margin: 2px 2px 6px 12px;
  padding: 2px 0 2px 7px;
}

body.marga-app-page #main {
  margin-top: var(--marga-topbar-height);
}

body.marga-app-page .main-container {
  max-width: 1580px;
  padding: 24px 28px 46px;
}

.marga-page-intro {
  position: relative;
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  margin: 0 6px 20px;
  overflow: hidden;
  padding: 24px 26px;
  border: 1px solid var(--marga-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 5%, rgba(62, 201, 238, 0.16), transparent 15rem),
    linear-gradient(125deg, rgba(118, 87, 246, 0.18), rgba(15, 20, 43, 0.96) 44%, rgba(20, 26, 54, 0.88));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
}

.marga-page-intro::after {
  position: absolute;
  right: -45px;
  bottom: -120px;
  width: 250px;
  height: 250px;
  border: 38px solid rgba(118, 87, 246, 0.09);
  border-radius: 50%;
  content: "";
}

.marga-page-intro-copy,
.marga-page-intro-meta {
  position: relative;
  z-index: 1;
}

.marga-eyebrow {
  color: #a99cff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.marga-eyebrow i {
  margin-right: 6px;
  color: var(--marga-green);
  font-size: 6px;
  vertical-align: middle;
}

.marga-page-intro h1 {
  margin: 8px 0 5px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.marga-page-intro p {
  max-width: 670px;
  margin: 0;
  font-size: 12px;
}

.marga-page-intro-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.marga-live-dot,
.marga-workspace-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid var(--marga-border);
  border-radius: 12px;
  color: var(--marga-muted);
  background: rgba(7, 10, 26, 0.38);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.marga-workspace-pill i {
  color: #a99cff;
}

body.marga-app-page .card {
  margin: 7px 6px;
  border-color: rgba(139, 151, 211, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--marga-panel-raised), var(--marga-panel));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

body.marga-app-page .card::before {
  display: none;
}

body.marga-app-page .card-header {
  display: flex;
  min-height: 34px;
  align-items: center;
  padding: 16px 19px;
  border-bottom-color: rgba(139, 151, 211, 0.13);
  background: rgba(255, 255, 255, 0.012);
}

body.marga-app-page .card-header h3,
body.marga-app-page .card-header .card-title {
  width: 100%;
  font-size: 13px;
  letter-spacing: -0.005em;
}

body.marga-app-page .card-header h3 > a,
body.marga-app-page .card-header h3 > span a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin: 0 2px;
  padding: 0 9px;
  border: 1px solid var(--marga-border);
  border-radius: 9px;
  color: #c8c2ff;
  background: rgba(118, 87, 246, 0.07);
  font-size: 10px;
}

body.marga-app-page .card-body {
  padding: 18px 20px 20px;
}

.marga-data-card > .card-body {
  background: rgba(6, 9, 23, 0.09);
}

.marga-data-toolbar {
  margin: 0 0 14px !important;
  padding: 12px !important;
  border: 1px solid var(--marga-border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
}

.marga-data-card .overflow,
.marga-data-card .box-bordered {
  border: 0 !important;
  border-radius: 0;
  background: transparent;
}

.marga-data-table {
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 7px !important;
  background: transparent !important;
}

.marga-data-table thead th {
  padding: 6px 11px 8px;
  border: 0 !important;
  color: #707b9e;
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.09em;
}

.marga-data-table tbody tr {
  filter: drop-shadow(0 7px 13px rgba(0, 0, 0, 0.08));
}

.marga-data-table tbody td {
  padding: 11px;
  border-top: 1px solid rgba(139, 151, 211, 0.13) !important;
  border-right: 0 !important;
  border-bottom: 1px solid rgba(139, 151, 211, 0.13) !important;
  border-left: 0 !important;
  background: rgba(25, 31, 61, 0.76);
  font-size: 11px;
}

.marga-data-table tbody td:first-child {
  border-left: 1px solid rgba(139, 151, 211, 0.13) !important;
  border-radius: 13px 0 0 13px;
}

.marga-data-table tbody td:last-child {
  border-right: 1px solid rgba(139, 151, 211, 0.13) !important;
  border-radius: 0 13px 13px 0;
}

.marga-form-card > .card-body {
  padding: 20px;
}

.marga-form-card form > div:first-child {
  display: flex;
  margin: 0 0 15px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--marga-border);
}

.marga-form-table {
  border: 0 !important;
  background: transparent !important;
}

.marga-form-grid,
.marga-form-grid tbody {
  display: block;
  width: 100%;
}

.marga-form-grid tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marga-form-grid tr {
  display: flex;
  min-width: 0;
  flex-direction: column;
  box-sizing: border-box;
  padding: 13px;
  border: 1px solid rgba(139, 151, 211, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
}

.marga-form-grid tr.marga-form-wide {
  grid-column: 1 / -1;
}

.marga-form-grid tr.marga-form-empty {
  display: none !important;
}

.marga-card-heading-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.marga-form-grid td {
  display: block;
  width: 100% !important;
  box-sizing: border-box;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.marga-form-grid td:first-child {
  margin-bottom: 7px;
  color: #a8b0cc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.marga-form-grid td[colspan] {
  margin: 0;
}

body.marga-app-page .form-control,
body.marga-app-page .group-item,
body.marga-app-page select,
body.marga-app-page textarea,
body.marga-app-page input[type="text"],
body.marga-app-page input[type="password"],
body.marga-app-page input[type="number"],
body.marga-app-page input[type="date"],
body.marga-app-page input[type="time"] {
  min-height: 42px;
  border-color: rgba(139, 151, 211, 0.18);
  border-radius: 12px;
  background: var(--marga-field);
}

body.marga-app-page .btn,
body.marga-app-page button,
body.marga-app-page input[type="submit"],
body.marga-app-page input[type="button"] {
  min-height: 40px;
  padding-right: 14px;
  padding-left: 14px;
  border-radius: 12px;
}

body.marga-app-page .btn.bg-primary,
body.marga-app-page button.bg-primary,
body.marga-app-page input[type="submit"] {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(110deg, var(--marga-primary), var(--marga-cyan));
  box-shadow: 0 10px 24px rgba(88, 93, 231, 0.2);
}

.marga-legacy-box:not([class*="bg-"]) {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--marga-panel-raised), var(--marga-panel));
}

.marga-mobile-nav {
  display: none;
}

body.mikhmon-theme-light.marga-app-page {
  --marga-panel: rgba(247, 248, 253, 0.96);
  --marga-panel-raised: rgba(255, 255, 255, 0.98);
  --marga-field: rgba(237, 239, 248, 0.86);
}

body.mikhmon-theme-light .marga-data-table tbody td {
  background: rgba(255, 255, 255, 0.9);
}

@media screen and (min-width: 801px) {
  body.marga-app-page .sidenav {
    width: var(--marga-sidebar-width);
  }

  body.marga-app-page #main {
    margin-left: var(--marga-sidebar-width);
  }
}

@media screen and (max-width: 1100px) {
  .marga-page-intro-meta {
    flex-direction: column;
    align-items: flex-end;
  }

  .marga-form-grid tbody {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 800px) {
  body.marga-app-page {
    --marga-topbar-height: 58px;
  }

  body.marga-app-page.marga-sidebar-open::before {
    position: fixed;
    z-index: 37;
    top: var(--marga-topbar-height);
    right: 0;
    bottom: 0;
    left: 230px;
    background: rgba(3, 6, 18, 0.7);
    content: "";
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  body.marga-app-page .navbar-left,
  body.marga-app-page .navbar-right {
    height: var(--marga-topbar-height);
  }

  body.marga-app-page .marga-app-brand {
    width: 178px;
    min-width: 178px;
    height: var(--marga-topbar-height);
    padding: 0 10px !important;
    border-right: 0;
  }

  .marga-brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 12px;
  }

  .marga-brand-copy {
    margin-left: 9px;
  }

  .marga-brand-copy strong {
    font-size: 12px;
  }

  .marga-brand-copy small,
  .marga-topbar-context,
  body.marga-app-page #cpage,
  body.marga-app-page .navbar-right .stheme,
  body.marga-app-page .navbar-right a[title="Idle Timeout"] {
    display: none !important;
  }

  body.marga-app-page #openNav,
  body.marga-app-page #closeNav {
    position: absolute;
    left: 176px;
    width: 38px;
    height: 38px;
    margin: 10px 0;
    line-height: 36px;
  }

  body.marga-app-page .navbar-right #logout,
  body.marga-app-page .navbar-right .ses,
  body.marga-app-page .navbar-right select {
    height: 36px;
    margin-top: 11px;
  }

  body.marga-app-page .sidenav {
    z-index: 30;
    height: calc(100% - var(--marga-topbar-height));
    margin-top: var(--marga-topbar-height);
    padding-top: 12px;
    box-shadow: 25px 0 55px rgba(0, 0, 0, 0.5);
  }

  body.marga-app-page #main {
    margin-top: var(--marga-topbar-height);
  }

  body.marga-app-page .main-container {
    padding: 13px 7px 104px;
  }

  .marga-page-intro {
    min-height: 0;
    margin: 0 4px 13px;
    padding: 18px;
    border-radius: 19px;
  }

  .marga-page-intro h1 {
    margin-top: 6px;
    font-size: 22px;
  }

  .marga-page-intro p {
    font-size: 11px;
  }

  .marga-page-intro-meta {
    display: none;
  }

  body.marga-app-page .card {
    margin: 6px 4px;
    border-radius: 17px;
  }

  body.marga-app-page .card-header {
    padding: 14px;
  }

  body.marga-app-page .card-body {
    padding: 14px;
  }

  .marga-mobile-nav {
    position: fixed;
    z-index: 25;
    right: 10px;
    bottom: 9px;
    left: 10px;
    display: grid;
    height: 64px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid rgba(139, 151, 211, 0.22);
    border-radius: 19px;
    background: rgba(8, 12, 29, 0.96);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.44);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .marga-mobile-nav a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 14px;
    color: #7e88a9;
    font-size: 9px;
    font-weight: 750;
  }

  .marga-mobile-nav a i {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .marga-mobile-nav a.active {
    color: #fff;
    background: linear-gradient(120deg, rgba(118, 87, 246, 0.9), rgba(62, 201, 238, 0.9));
    box-shadow: 0 8px 20px rgba(86, 94, 226, 0.25);
  }

  .marga-mobile-nav a.marga-mobile-logout {
    color: #ff718a;
  }

  .marga-mobile-nav a.marga-mobile-add-locked {
    color: #ffb85c;
    opacity: 0.72;
  }
}

@media screen and (max-width: 640px) {
  body.marga-app-page .marga-app-brand {
    width: 160px;
    min-width: 160px;
  }

  body.marga-app-page #openNav,
  body.marga-app-page #closeNav {
    left: 158px;
  }

  .marga-brand-copy small {
    display: none;
  }

  .marga-data-card .marga-data-table,
  .marga-data-card .marga-data-table tbody,
  .marga-data-card .marga-data-table tr,
  .marga-data-card .marga-data-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .marga-data-card .marga-data-table {
    border-spacing: 0 !important;
  }

  .marga-data-card .marga-data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .marga-data-card .marga-data-table tbody tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(139, 151, 211, 0.14);
    border-radius: 15px;
    background: rgba(25, 31, 61, 0.74);
    filter: none;
  }

  .marga-data-card .marga-data-table tbody td {
    display: grid;
    min-height: 38px;
    grid-template-columns: minmax(92px, 38%) 1fr;
    align-items: center;
    padding: 8px 10px;
    border: 0 !important;
    border-bottom: 1px solid rgba(139, 151, 211, 0.1) !important;
    border-radius: 0 !important;
    background: transparent;
    text-align: left !important;
    white-space: normal;
  }

  .marga-data-card .marga-data-table tbody td:last-child {
    border-bottom: 0 !important;
  }

  .marga-data-card .marga-data-table tbody td::before {
    padding-right: 8px;
    color: #717b9c;
    content: attr(data-label);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .marga-data-card .marga-data-table tbody td[colspan] {
    display: block;
    padding: 16px;
    text-align: center !important;
  }

  .marga-data-card .marga-data-table tbody td[colspan]::before {
    display: none;
  }

  .marga-form-grid tbody {
    grid-template-columns: 1fr;
  }

  .marga-form-grid tr {
    padding: 11px;
  }

  .marga-form-card form > div:first-child {
    position: sticky;
    z-index: 3;
    top: 64px;
    margin: -4px -4px 12px;
    padding: 8px 4px 11px;
    background: var(--marga-panel-raised);
  }
}

/* Dashboard composition */
.marga-dashboard-hero {
  position: relative;
  display: grid;
  min-height: 248px;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  align-items: center;
  box-sizing: border-box;
  margin: 7px 6px 18px;
  overflow: hidden;
  padding: 34px 38px;
  border: 1px solid rgba(139, 151, 211, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 76% 35%, rgba(62, 201, 238, 0.17), transparent 15rem),
    linear-gradient(125deg, rgba(58, 42, 128, 0.72), rgba(18, 22, 48, 0.98) 58%, rgba(11, 17, 39, 0.96));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.23);
}

.marga-dashboard-hero::before {
  position: absolute;
  top: -180px;
  right: -90px;
  width: 440px;
  height: 440px;
  border: 55px solid rgba(118, 87, 246, 0.1);
  border-radius: 50%;
  content: "";
}

.marga-dashboard-hero-copy,
.marga-dashboard-hero-visual {
  position: relative;
  z-index: 1;
}

.marga-dashboard-hero h2 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
}

.marga-dashboard-hero p {
  max-width: 610px;
  margin: 0;
  color: #b5bdd8;
  font-size: 13px;
}

.marga-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.marga-dashboard-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid rgba(162, 171, 225, 0.2);
  border-radius: 12px;
  color: #fff;
  background: rgba(8, 12, 29, 0.38);
  font-size: 10px;
  font-weight: 800;
}

.marga-dashboard-actions a:first-child {
  border-color: transparent;
  background: linear-gradient(110deg, var(--marga-primary), var(--marga-cyan));
}

.marga-dashboard-hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 10px;
}

.marga-signal-orbit {
  position: relative;
  display: flex;
  width: 132px;
  height: 132px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border: 1px solid rgba(116, 214, 241, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(62, 201, 238, 0.04), 0 0 0 48px rgba(118, 87, 246, 0.035);
}

.marga-signal-orbit::before,
.marga-signal-orbit::after {
  position: absolute;
  border: 1px solid rgba(118, 87, 246, 0.2);
  border-radius: 50%;
  content: "";
}

.marga-signal-orbit::before {
  width: 82px;
  height: 82px;
}

.marga-signal-orbit::after {
  width: 12px;
  height: 12px;
  border: 5px solid rgba(57, 215, 176, 0.14);
  background: var(--marga-green);
}

.marga-signal-orbit span {
  color: #60d8f5;
  font-size: 28px;
  transform: translateY(-32px);
}

.marga-hero-stat {
  padding: 12px 13px;
  border: 1px solid rgba(139, 151, 211, 0.16);
  border-radius: 14px;
  background: rgba(8, 12, 29, 0.42);
}

.marga-hero-stat strong,
.marga-hero-stat small {
  display: block;
}

.marga-hero-stat strong {
  color: #fff;
  font-size: 20px;
}

.marga-hero-stat small {
  margin-top: 2px;
  font-size: 9px;
}

.marga-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 6px 12px;
}

.marga-overview-card {
  height: 100%;
  min-height: 106px;
  margin: 0 !important;
  padding: 18px !important;
  border-radius: 19px !important;
  background: linear-gradient(145deg, rgba(20, 26, 54, 0.93), rgba(13, 18, 40, 0.9)) !important;
}

.marga-overview-card .box-group {
  display: flex;
  height: 100%;
  align-items: center;
}

.marga-overview-card .box-group-area {
  font-size: 11px;
  line-height: 1.75;
}

.marga-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.72fr);
  gap: 13px;
}

.marga-dashboard-main,
.marga-dashboard-aside,
.marga-dashboard-section {
  min-width: 0;
}

.marga-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.marga-action-tile {
  min-height: 126px;
  margin: 0 !important;
  overflow: hidden;
  padding: 0 !important;
  border-color: rgba(139, 151, 211, 0.14) !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.018) !important;
  box-shadow: none !important;
}

.marga-action-tile::after {
  position: absolute;
  right: -24px;
  bottom: -26px;
  width: 84px;
  height: 84px;
  border: 18px solid rgba(118, 87, 246, 0.08);
  border-radius: 50%;
  content: "";
}

.marga-action-tile > a {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 126px;
  box-sizing: border-box;
  padding: 16px;
  flex-direction: column;
  justify-content: space-between;
}

.marga-action-tile h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
}

.marga-action-tile h1 span,
.marga-action-tile > a > div:last-child {
  color: #aab3d0 !important;
  font-size: 9px !important;
  font-weight: 750;
}

.marga-action-tile > a > div:last-child > i,
.marga-action-tile h1 > i {
  color: #a99cff;
}

.marga-action-tile.is-users > a > div:last-child > i {
  color: var(--marga-green);
}

.marga-action-tile.is-add > a > div:last-child > i,
.marga-action-tile.is-add h1 > i {
  color: var(--marga-yellow);
}

.marga-action-tile.is-generate > a > div:last-child > i,
.marga-action-tile.is-generate h1 > i {
  color: var(--marga-red);
}

.marga-action-tile.is-pppoe-active {
  background: linear-gradient(135deg, rgba(61, 199, 238, 0.13), rgba(255, 255, 255, 0.018)) !important;
}

.marga-action-tile.is-pppoe-active > a > div:last-child > i {
  color: var(--marga-cyan);
}

.marga-action-tile.is-pppoe-users {
  background: linear-gradient(135deg, rgba(118, 87, 246, 0.15), rgba(255, 255, 255, 0.018)) !important;
}

.marga-action-tile.is-pppoe-users > a > div:last-child > i {
  color: #aa9fff;
}

.marga-chart-card #trafficMonitor {
  min-height: 330px;
}

.marga-income-card {
  min-height: 118px;
  margin: 7px 6px !important;
  border-radius: 19px !important;
  background: linear-gradient(135deg, rgba(57, 215, 176, 0.13), rgba(20, 26, 54, 0.94)) !important;
}

.marga-log-card .overflow {
  height: 480px !important;
}

@media screen and (max-width: 1180px) {
  .marga-dashboard-hero {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .marga-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .marga-dashboard-aside {
    display: grid;
    grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
    gap: 12px;
  }

  .marga-log-card .overflow {
    height: 300px !important;
  }
}

@media screen and (max-width: 800px) {
  .marga-dashboard-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    margin: 4px 4px 13px;
    padding: 24px 20px;
    border-radius: 21px;
  }

  .marga-dashboard-hero h2 {
    font-size: 32px;
  }

  .marga-dashboard-hero-visual {
    display: none;
  }

  .marga-dashboard-actions {
    margin-top: 18px;
  }

  .marga-overview-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 4px 9px;
  }

  .marga-overview-card {
    min-height: 88px;
  }

  .marga-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marga-dashboard-aside {
    display: block;
  }
}

@media screen and (max-width: 440px) {
  .marga-dashboard-actions a {
    flex: 1 1 calc(50% - 9px);
    justify-content: center;
  }

  .marga-quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .marga-action-tile,
  .marga-action-tile > a {
    min-height: 112px;
  }
}

/* Admin settings workspace */
.marga-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(350px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.marga-admin-layout > .card {
  min-width: 0;
  margin: 0 !important;
}

.marga-panel-heading {
  display: flex !important;
  min-height: 76px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marga-panel-heading > div {
  min-width: 0;
}

.marga-panel-heading .marga-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #9284f8;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 1.35px;
}

.marga-panel-heading .card-title {
  margin: 0;
  font-size: 14px;
}

.marga-icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 1px solid rgba(118, 87, 246, 0.34) !important;
  border-radius: 12px !important;
  background: rgba(118, 87, 246, 0.12) !important;
  color: #b8afff !important;
  box-shadow: none !important;
}

.marga-router-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marga-router-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(139, 151, 211, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(118, 87, 246, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(20, 26, 54, 0.92), rgba(11, 16, 37, 0.94));
}

.marga-router-card-top,
.marga-router-actions,
.marga-settings-footer,
.marga-settings-footer > div,
.marga-admin-note {
  display: flex;
  align-items: center;
}

.marga-router-card-top {
  justify-content: space-between;
  gap: 12px;
}

.marga-router-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(96, 216, 245, 0.32);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(118, 87, 246, 0.2), rgba(62, 201, 238, 0.13));
  color: #63d9f5;
  font-size: 17px;
}

.marga-router-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #91e7ce;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 1px;
}

.marga-router-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--marga-green);
  box-shadow: 0 0 0 4px rgba(57, 215, 176, 0.1);
}

.marga-router-card-copy {
  margin: 22px 0 18px;
}

.marga-router-card-copy small,
.marga-router-card-copy h3,
.marga-router-card-copy p {
  display: block;
  margin: 0;
}

.marga-router-card-copy small {
  color: #77809f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.marga-router-card-copy h3 {
  overflow: hidden;
  margin-top: 5px;
  color: #fff;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marga-router-card-copy p {
  overflow: hidden;
  margin-top: 8px;
  color: #98a2bf;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marga-router-card-copy p i {
  margin-right: 5px;
  color: #7f70ee;
}

.marga-router-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  gap: 7px;
}

.marga-router-actions button,
.marga-router-actions a {
  display: inline-flex;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid rgba(139, 151, 211, 0.17);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: #c6cce0;
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.marga-router-actions button:hover,
.marga-router-actions a:hover {
  border-color: rgba(118, 87, 246, 0.48);
  background: rgba(118, 87, 246, 0.12);
  color: #fff;
}

.marga-router-actions .is-danger {
  color: #ff8eb4;
}

.marga-router-actions .is-danger:hover {
  border-color: rgba(255, 91, 146, 0.35);
  background: rgba(255, 91, 146, 0.1);
}

.marga-admin-security {
  overflow: hidden;
}

.marga-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(57, 215, 176, 0.18);
  border-radius: 999px;
  background: rgba(57, 215, 176, 0.07);
  color: #8bdfc7;
  font-size: 8px;
  font-weight: 800;
}

.marga-admin-note {
  gap: 12px;
  margin-bottom: 19px;
  padding: 13px;
  border: 1px solid rgba(139, 151, 211, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.marga-admin-note > span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(118, 87, 246, 0.13);
  color: #aa9fff;
  font-size: 15px;
}

.marga-admin-note strong,
.marga-admin-note p {
  display: block;
  margin: 0;
}

.marga-admin-note strong {
  color: #e7eafa;
  font-size: 10px;
}

.marga-admin-note p {
  margin-top: 3px;
  color: #7e88a7;
  font-size: 8px;
  line-height: 1.55;
}

.marga-settings-fields {
  display: grid;
  gap: 14px;
}

.marga-field-block,
.marga-field-block > span {
  display: block;
}

.marga-field-block > span {
  margin: 0 0 7px 2px;
  color: #aeb6d0;
  font-size: 9px;
  font-weight: 750;
}

.marga-field-control {
  position: relative;
}

.marga-field-control > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 14px;
  color: #737e9f;
  transform: translateY(-50%);
}

.marga-field-control .form-control {
  width: 100% !important;
  height: 44px !important;
  box-sizing: border-box;
  padding-left: 39px !important;
  border-radius: 13px !important;
}

.marga-field-control select.form-control {
  padding-right: 32px !important;
}

.marga-password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 7px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f89aa;
  cursor: pointer;
  transform: translateY(-50%);
}

.marga-field-control:has(.marga-password-toggle) .form-control {
  padding-right: 42px !important;
}

.marga-settings-footer {
  min-height: 70px;
  box-sizing: border-box;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid rgba(139, 151, 211, 0.13);
  background: rgba(6, 10, 25, 0.3);
  color: #737e9e;
  font-size: 8px;
}

.marga-settings-footer > div {
  gap: 8px;
}

.marga-settings-footer .btn {
  min-width: 112px;
}

.marga-empty-state {
  grid-column: 1 / -1;
  padding: 40px 20px;
  border: 1px dashed rgba(139, 151, 211, 0.2);
  border-radius: 17px;
  color: #7f89a8;
  text-align: center;
}

.marga-empty-state > i {
  color: #8f80f8;
  font-size: 25px;
}

.marga-empty-state h3 {
  margin: 12px 0 4px;
  color: #e7eafa;
  font-size: 13px;
}

.marga-empty-state p {
  margin: 0;
  font-size: 9px;
}

/* Mikhmon's original runtime validates this exact marker. Keep it present
   without letting the compatibility element affect the MARGA.NET header. */
body.marga-app-page #brand.mikhmon-integrity-brand {
  position: fixed !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  color: transparent !important;
  white-space: nowrap;
}

body.marga-app-page #brand.mikhmon-integrity-brand::before,
body.marga-app-page #brand.mikhmon-integrity-brand::after {
  display: none !important;
}

body.marga-light-theme .marga-router-card {
  background: linear-gradient(145deg, #fff, #f5f7ff);
}

body.marga-light-theme .marga-router-card-copy h3,
body.marga-light-theme .marga-admin-note strong,
body.marga-light-theme .marga-empty-state h3 {
  color: #222942;
}

body.marga-light-theme .marga-admin-note,
body.marga-light-theme .marga-router-actions button,
body.marga-light-theme .marga-router-actions a,
body.marga-light-theme .marga-settings-footer {
  background: rgba(72, 82, 135, 0.035);
}

/* MARGA.NET operational polish - compact, wider, and easier to scan. */
body.marga-app-page {
  --marga-sidebar-width: 210px;
  --marga-panel: rgba(14, 19, 38, 0.96);
  --marga-panel-raised: rgba(18, 24, 48, 0.98);
  --marga-border: rgba(126, 141, 194, 0.18);
  font-size: 14px;
}

body.marga-app-page .main-container {
  width: 100%;
  max-width: none;
  padding: 18px 22px 34px;
}

body.marga-app-page .main-container:has(> .marga-dashboard) {
  padding: 10px 12px 24px;
}

.marga-dashboard {
  font-size: 13px;
}

body.marga-app-page .card,
body.marga-app-page .box,
.marga-data-toolbar,
.marga-page-intro,
.marga-dashboard-hero,
.marga-overview-card,
.marga-action-tile,
.marga-income-card {
  border-radius: 8px !important;
}

body.marga-app-page .card {
  margin: 8px 0;
  border-color: rgba(126, 141, 194, 0.2);
  background: linear-gradient(180deg, rgba(18, 24, 48, 0.98), rgba(13, 18, 38, 0.98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

body.marga-app-page .card-header {
  min-height: 42px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(126, 141, 194, 0.16);
}

body.marga-app-page .card-header h3,
body.marga-app-page .card-header .card-title {
  font-size: 14px;
  letter-spacing: 0;
}

body.marga-app-page .card-body {
  padding: 16px;
}

.marga-page-intro {
  min-height: 86px;
  margin: 0 0 14px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(18, 24, 48, 0.98), rgba(14, 19, 40, 0.96));
}

.marga-page-intro::after {
  display: none;
}

.marga-page-intro h1 {
  margin: 5px 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.marga-page-intro p {
  max-width: 860px;
  font-size: 13px;
  line-height: 1.55;
}

.marga-eyebrow,
.marga-sidebar-branding small,
.marga-sidebar-context small,
.marga-nav-label {
  letter-spacing: 0.08em;
}

.marga-dashboard-hero {
  min-height: 154px;
  grid-template-columns: minmax(0, 1fr) 260px;
  margin: 0 0 14px;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(37, 50, 94, 0.96), rgba(17, 23, 48, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.marga-dashboard-hero::before {
  display: none;
}

.marga-dashboard-hero h2 {
  margin: 7px 0 6px;
  font-size: 34px;
  letter-spacing: 0;
}

.marga-dashboard-hero p {
  max-width: 760px;
  font-size: 13px;
}

.marga-dashboard-actions {
  margin-top: 16px;
}

.marga-dashboard-actions a {
  min-height: 38px;
  border-radius: 8px;
  font-size: 12px;
}

.marga-dashboard-hero-visual {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.marga-signal-orbit {
  display: none;
}

.marga-hero-stat {
  min-height: 70px;
  padding: 14px;
  border-radius: 8px;
}

.marga-hero-stat strong {
  font-size: 26px;
}

.marga-hero-stat small {
  font-size: 11px;
}

.marga-overview-grid {
  gap: 12px;
  margin: 0 0 14px;
}

.marga-overview-grid > .marga-overview-grid,
.marga-overview-grid > .row {
  display: contents;
}

.marga-overview-grid > .row > [class*="col-"] {
  width: auto;
  max-width: none;
  padding: 0;
}

.marga-overview-card {
  min-height: 104px;
  padding: 16px !important;
}

.marga-overview-card .box-group-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  line-height: 44px;
}

.marga-overview-card .box-group-area {
  color: #b2bbd4;
  font-size: 13px;
  line-height: 1.55;
}

.marga-dashboard-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 16px;
  align-items: start;
}

.marga-dashboard-main {
  display: contents;
}

.marga-dashboard-main #r_2 {
  grid-column: 1 / -1;
}

.marga-dashboard-main .marga-chart-card {
  grid-column: 1;
}

.marga-dashboard-aside {
  grid-column: 2;
}

.marga-service-card .card-body {
  padding: 16px;
}

.marga-quick-grid {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 12px;
}

.marga-action-tile {
  min-height: 116px;
  border-color: rgba(126, 141, 194, 0.2) !important;
  background: rgba(17, 24, 48, 0.86) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03) !important;
}

.marga-action-tile::after {
  display: none;
}

.marga-action-tile > a {
  min-height: 116px;
  padding: 17px;
}

.marga-action-tile h1 {
  font-size: 32px;
  line-height: 1;
}

.marga-action-tile h1 span {
  margin-left: 4px;
  color: #c3cbe0 !important;
  font-size: 12px !important;
}

.marga-action-tile > a > div:last-child {
  color: #c3cbe0 !important;
  font-size: 12px !important;
  line-height: 1.35;
}

.marga-action-tile > a > div:last-child > i,
.marga-action-tile h1 > i {
  font-size: 18px;
}

.marga-action-tile.is-active {
  background: linear-gradient(135deg, rgba(49, 99, 214, 0.42), rgba(17, 24, 48, 0.92)) !important;
}

.marga-action-tile.is-users {
  background: linear-gradient(135deg, rgba(39, 170, 142, 0.36), rgba(17, 24, 48, 0.92)) !important;
}

.marga-action-tile.is-add {
  background: linear-gradient(135deg, rgba(218, 151, 45, 0.34), rgba(17, 24, 48, 0.92)) !important;
}

.marga-action-tile.is-generate {
  background: linear-gradient(135deg, rgba(219, 70, 116, 0.34), rgba(17, 24, 48, 0.92)) !important;
}

.marga-action-tile.is-pppoe-active {
  background: linear-gradient(135deg, rgba(36, 159, 200, 0.34), rgba(17, 24, 48, 0.92)) !important;
}

.marga-action-tile.is-pppoe-users {
  background: linear-gradient(135deg, rgba(116, 96, 221, 0.36), rgba(17, 24, 48, 0.92)) !important;
}

.marga-chart-card #trafficMonitor {
  min-height: 380px;
}

.marga-income-card {
  min-height: 110px;
  margin: 8px 0 !important;
}

.marga-log-card .overflow {
  height: 360px !important;
}

.marga-data-table thead th {
  color: #8c96b6;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.marga-data-table tbody td {
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.marga-form-grid tbody {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.marga-form-grid td:first-child {
  color: #b4bdd7;
  font-size: 11px;
  letter-spacing: 0;
}

body.marga-app-page .form-control,
body.marga-app-page .group-item,
body.marga-app-page select,
body.marga-app-page textarea,
body.marga-app-page input[type="text"],
body.marga-app-page input[type="password"],
body.marga-app-page input[type="number"],
body.marga-app-page input[type="date"],
body.marga-app-page input[type="time"] {
  border-radius: 8px;
  font-size: 13px;
}

@media screen and (min-width: 1500px) {
  .marga-quick-grid {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
  }
}

@media screen and (max-width: 1180px) {
  .marga-dashboard-main {
    display: block;
  }

  .marga-dashboard-layout,
  .marga-dashboard-main #r_2,
  .marga-dashboard-main .marga-chart-card,
  .marga-dashboard-aside {
    display: block;
    grid-column: auto;
  }
}

@media screen and (max-width: 800px) {
  body.marga-app-page .main-container {
    padding: 12px 10px 104px;
  }

  body.marga-app-page .main-container:has(> .marga-dashboard) {
    padding: 12px 10px 104px;
  }

  .marga-dashboard-hero {
    margin: 0 0 12px;
    padding: 20px;
  }

  .marga-dashboard-hero h2 {
    font-size: 32px;
  }

  .marga-overview-grid {
    margin: 0 0 10px;
  }

  .marga-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .marga-action-tile,
  .marga-action-tile > a {
    min-height: 118px;
  }
}

@media screen and (max-width: 440px) {
  .marga-service-card .card-body {
    padding: 12px;
  }

  .marga-action-tile > a {
    padding: 14px;
  }

  .marga-action-tile h1 {
    font-size: 30px;
  }
}

@media screen and (max-width: 1120px) {
  .marga-admin-layout {
    grid-template-columns: 1fr;
  }

  .marga-router-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 640px) {
  .marga-router-grid {
    grid-template-columns: 1fr;
  }

  .marga-panel-heading {
    min-height: 68px;
  }

  .marga-router-card {
    padding: 16px;
  }

  .marga-settings-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .marga-settings-footer > div {
    width: 100%;
  }

  .marga-settings-footer .btn {
    flex: 1;
  }
}

/* Dashboard service tiles final polish: no large hero, compact premium cards. */
.marga-dashboard .marga-dashboard-hero {
  display: none !important;
}

.marga-dashboard .marga-service-card {
  margin-top: 0 !important;
  border-color: rgba(119, 101, 241, 0.22) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(125, 87, 246, 0.1), transparent 32%),
    linear-gradient(145deg, rgba(15, 21, 46, 0.98), rgba(10, 15, 32, 0.98)) !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.045) !important;
}

.marga-dashboard .marga-service-card .card-body {
  padding: 10px !important;
}

.marga-dashboard .marga-service-card .marga-quick-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 8px !important;
}

.marga-dashboard .marga-service-card .marga-action-tile {
  min-height: 90px !important;
  border: 1px solid rgba(128, 146, 205, 0.22) !important;
  border-radius: 9px !important;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.045) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    radial-gradient(circle at 90% 86%, rgba(255, 255, 255, 0.1), transparent 32%);
  content: "";
  pointer-events: none;
}

.marga-dashboard .marga-service-card .marga-action-tile::after {
  display: block;
  right: -14px;
  bottom: -16px;
  width: 48px;
  height: 48px;
  border: 11px solid rgba(255, 255, 255, 0.04);
  opacity: 0.5;
  pointer-events: none;
}

.marga-dashboard .marga-service-card .marga-action-tile > a {
  min-height: 90px !important;
  padding: 10px 12px !important;
}

.marga-dashboard .marga-service-card .marga-action-tile h1 {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 24px !important;
  line-height: 1 !important;
  letter-spacing: -0.03em;
}

.marga-dashboard .marga-service-card .marga-action-tile h1 span {
  margin-left: 0 !important;
  color: rgba(240, 244, 255, 0.86) !important;
  font-size: 9.5px !important;
  font-weight: 800;
  letter-spacing: 0;
}

.marga-dashboard .marga-service-card .marga-action-tile h1 > i {
  font-size: 17px !important;
}

.marga-dashboard .marga-service-card .marga-action-tile > a > div:last-child {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(224, 231, 255, 0.86) !important;
  font-size: 11px !important;
  font-weight: 800;
  line-height: 1.2;
}

.marga-dashboard .marga-service-card .marga-action-tile > a > div:last-child > i {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  font-size: 11px !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-active {
  background: linear-gradient(135deg, rgba(67, 111, 232, 0.48), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-users {
  background: linear-gradient(135deg, rgba(28, 173, 145, 0.46), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-add {
  background: linear-gradient(135deg, rgba(234, 170, 62, 0.44), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-generate {
  background: linear-gradient(135deg, rgba(228, 76, 128, 0.44), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-active {
  background: linear-gradient(135deg, rgba(33, 177, 220, 0.45), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-users {
  background: linear-gradient(135deg, rgba(128, 105, 244, 0.46), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-add {
  background: linear-gradient(135deg, rgba(39, 192, 170, 0.45), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-profile {
  background: linear-gradient(135deg, rgba(151, 106, 236, 0.46), rgba(17, 24, 48, 0.97)) !important;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-active > a > div:last-child > i {
  color: #87b3ff;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-users > a > div:last-child > i {
  color: #5ef0cf;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-add > a > div:last-child > i,
.marga-dashboard .marga-service-card .marga-action-tile.is-add h1 > i {
  color: #ffd56a;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-generate > a > div:last-child > i,
.marga-dashboard .marga-service-card .marga-action-tile.is-generate h1 > i {
  color: #ff7da9;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-active > a > div:last-child > i {
  color: #62dfff;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-users > a > div:last-child > i {
  color: #b9a8ff;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-add > a > div:last-child > i,
.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-add h1 > i {
  color: #62ead6;
}

.marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-profile > a > div:last-child > i {
  color: #d4b5ff;
}

@media screen and (max-width: 1180px) {
  .marga-dashboard .marga-service-card .marga-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media screen and (max-width: 800px) {
  .marga-dashboard .marga-service-card .marga-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .marga-dashboard .marga-service-card .marga-action-tile,
  .marga-dashboard .marga-service-card .marga-action-tile > a {
    min-height: 90px !important;
  }
}

@media screen and (max-width: 440px) {
  .marga-dashboard .marga-service-card .card-body {
    padding: 8px !important;
  }

  .marga-dashboard .marga-service-card .marga-action-tile > a {
    padding: 10px !important;
  }

  .marga-dashboard .marga-service-card .marga-action-tile h1 {
    font-size: 23px !important;
  }
}

/* Enterprise dashboard overview: system and resources. */
.marga-dashboard .marga-enterprise-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch;
  margin: 0 0 16px !important;
}

.marga-dashboard .marga-enterprise-card {
  position: relative;
  display: flex;
  min-height: 238px !important;
  height: 100%;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 18px !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(11, 29, 53, 0.9), rgba(8, 20, 35, 0.96)),
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.22), transparent 34%),
    radial-gradient(circle at 88% 14%, rgba(139, 92, 246, 0.2), transparent 34%) !important;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(59, 130, 246, 0.12),
    inset 0 1px rgba(255, 255, 255, 0.07) !important;
  opacity: 0;
  transform: translateY(18px);
  animation: margaEnterpriseIn var(--enter-duration, 450ms) cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
  backdrop-filter: blur(14px);
  transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease, background 300ms ease;
}

.marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(1) .marga-enterprise-card {
  --enter-delay: 0ms;
}

.marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(2) .marga-enterprise-card {
  --enter-delay: 90ms;
}

.marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(3) .marga-enterprise-card {
  --enter-delay: 180ms;
}

.marga-dashboard .marga-enterprise-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), transparent 55%);
  content: "";
  pointer-events: none;
}

.marga-dashboard .marga-enterprise-card::after {
  position: absolute;
  top: -90px;
  right: -78px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 62%);
  content: "";
  pointer-events: none;
}

.marga-dashboard .marga-enterprise-card:hover {
  border-color: rgba(96, 165, 250, 0.78) !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.38),
    0 0 42px rgba(59, 130, 246, 0.26),
    inset 0 1px rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-5px);
}

.marga-dashboard .marga-enterprise-head,
.marga-dashboard .marga-enterprise-time-grid,
.marga-dashboard .marga-enterprise-list,
.marga-dashboard .marga-resource-rings,
.marga-dashboard .marga-resource-summary {
  position: relative;
  z-index: 1;
}

.marga-dashboard .marga-enterprise-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.marga-dashboard .marga-enterprise-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 15px;
  color: #93c5fd;
  background:
    linear-gradient(145deg, rgba(59, 130, 246, 0.22), rgba(139, 92, 246, 0.14)),
    rgba(8, 21, 35, 0.5);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 10px 24px rgba(37, 99, 235, 0.16);
  font-size: 20px;
}

.marga-dashboard .marga-enterprise-head h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.marga-dashboard .marga-enterprise-kicker {
  display: block;
  color: #60a5fa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marga-dashboard .marga-enterprise-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(59, 130, 246, 0.36);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.marga-dashboard .marga-enterprise-online {
  border-color: rgba(34, 197, 94, 0.46);
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.marga-dashboard .marga-enterprise-online i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.55);
  animation: margaOnlinePulse 1.7s ease-out infinite;
}

.marga-dashboard .marga-enterprise-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.marga-dashboard .marga-enterprise-primary-value {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 15px;
  background: rgba(8, 21, 35, 0.52);
}

.marga-dashboard .marga-enterprise-primary-value span,
.marga-dashboard .marga-enterprise-mini-value span,
.marga-dashboard .marga-resource-summary span,
.marga-dashboard .marga-enterprise-list span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.marga-dashboard .marga-enterprise-primary-value strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.marga-dashboard .marga-enterprise-mini-value {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 29, 49, 0.52);
}

.marga-dashboard .marga-enterprise-mini-value strong {
  display: block;
  margin-top: 6px;
  color: #e5edff;
  font-size: 13px;
  line-height: 1.25;
}

.marga-dashboard .marga-enterprise-list {
  display: grid;
  gap: 9px;
  margin-top: auto;
}

.marga-dashboard .marga-enterprise-list div {
  display: grid;
  grid-template-columns: 24px minmax(88px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(8, 21, 35, 0.46);
}

.marga-dashboard .marga-enterprise-list i {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.13);
  font-size: 11px;
}

.marga-dashboard .marga-enterprise-list strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marga-dashboard .marga-resource-rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}

.marga-dashboard .marga-circular-progress {
  --dashoffset: 100;
  position: relative;
  display: grid;
  min-height: 96px;
  place-items: center;
  color: #3b82f6;
}

.marga-dashboard .marga-circular-progress svg {
  width: 74px;
  height: 74px;
  overflow: visible;
  transform: rotate(-90deg);
}

.marga-dashboard .marga-circular-progress circle {
  fill: none;
  stroke-linecap: round;
  stroke-width: 4.5;
}

.marga-dashboard .marga-circle-bg {
  stroke: rgba(148, 163, 184, 0.17);
}

.marga-dashboard .marga-circle-bar {
  stroke: currentColor;
  stroke-dasharray: 100;
  stroke-dashoffset: var(--dashoffset);
  filter: drop-shadow(0 0 7px currentColor);
  transition: stroke-dashoffset 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.marga-dashboard .marga-circular-progress strong {
  position: absolute;
  top: 25px;
  left: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
  transform: translateX(-50%);
}

.marga-dashboard .marga-circular-progress strong span {
  font-size: 9px;
}

.marga-dashboard .marga-circular-progress small {
  margin-top: -4px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.marga-dashboard .marga-circular-progress.is-cpu {
  color: #3b82f6;
}

.marga-dashboard .marga-circular-progress.is-ram {
  color: #22c55e;
}

.marga-dashboard .marga-circular-progress.is-hdd {
  color: #8b5cf6;
}

.marga-dashboard .marga-resource-summary {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 4px;
}

.marga-dashboard .marga-resource-summary div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.marga-dashboard .marga-resource-summary strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes margaEnterpriseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes margaOnlinePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media screen and (max-width: 1180px) {
  .marga-dashboard .marga-enterprise-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 767px) {
  .marga-dashboard .marga-enterprise-overview {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(3) {
    grid-column: auto;
  }

  .marga-dashboard .marga-enterprise-card {
    min-height: 0 !important;
    padding: 16px !important;
  }
}

@media screen and (max-width: 420px) {
  .marga-dashboard .marga-enterprise-head {
    gap: 10px;
  }

  .marga-dashboard .marga-enterprise-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
    font-size: 17px;
  }

  .marga-dashboard .marga-enterprise-badge {
    padding: 0 8px;
    font-size: 8px;
  }

  .marga-dashboard .marga-resource-rings {
    gap: 4px;
  }

  .marga-dashboard .marga-circular-progress svg {
    width: 66px;
    height: 66px;
  }
}

/* Compact enterprise overview: smaller top cards with functional colors. */
.marga-dashboard .marga-enterprise-overview {
  gap: 8px !important;
  margin: 0 0 8px !important;
}

.marga-dashboard .marga-enterprise-time {
  --enterprise-accent: #0284c7;
  --enterprise-accent-soft: rgba(2, 132, 199, 0.15);
  --enterprise-accent-glow: rgba(2, 132, 199, 0.2);
}

.marga-dashboard .marga-enterprise-board {
  --enterprise-accent: #7c3aed;
  --enterprise-accent-soft: rgba(124, 58, 237, 0.15);
  --enterprise-accent-glow: rgba(124, 58, 237, 0.2);
}

.marga-dashboard .marga-enterprise-resource {
  --enterprise-accent: #059669;
  --enterprise-accent-soft: rgba(5, 150, 105, 0.14);
  --enterprise-accent-glow: rgba(5, 150, 105, 0.18);
}

.marga-dashboard .marga-enterprise-card {
  min-width: 0;
  min-height: 168px !important;
  gap: 8px !important;
  padding: 10px !important;
  border-color: color-mix(in srgb, var(--enterprise-accent, #3b82f6) 54%, transparent) !important;
  border-radius: 10px !important;
  background:
    radial-gradient(circle at 8% 0%, var(--enterprise-accent-soft, rgba(59, 130, 246, 0.11)), transparent 34%),
    radial-gradient(circle at 96% 0%, rgba(139, 92, 246, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(11, 29, 53, 0.94), rgba(8, 20, 35, 0.98)) !important;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.24),
    0 0 12px var(--enterprise-accent-glow, rgba(59, 130, 246, 0.12)),
    inset 0 1px rgba(255, 255, 255, 0.07) !important;
}

.marga-dashboard .marga-enterprise-card:hover {
  border-color: color-mix(in srgb, var(--enterprise-accent, #60a5fa) 78%, #ffffff 12%) !important;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.3),
    0 0 20px var(--enterprise-accent-glow, rgba(59, 130, 246, 0.18)),
    inset 0 1px rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-2px);
}

.marga-dashboard .marga-enterprise-card::after {
  top: -70px;
  right: -58px;
  width: 132px;
  height: 132px;
  opacity: 0.7;
  border-color: color-mix(in srgb, var(--enterprise-accent, #3b82f6) 18%, transparent);
  background: radial-gradient(circle, var(--enterprise-accent-soft, rgba(59, 130, 246, 0.12)), transparent 64%);
}

.marga-dashboard .marga-enterprise-head {
  gap: 8px !important;
}

.marga-dashboard .marga-enterprise-icon {
  width: 32px !important;
  height: 32px !important;
  flex-basis: 32px !important;
  border-color: color-mix(in srgb, var(--enterprise-accent, #60a5fa) 55%, transparent);
  border-radius: 9px !important;
  color: var(--enterprise-accent, #93c5fd) !important;
  background:
    linear-gradient(145deg, var(--enterprise-accent-soft, rgba(59, 130, 246, 0.2)), rgba(8, 21, 35, 0.48)),
    rgba(8, 21, 35, 0.54);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 7px 15px var(--enterprise-accent-glow, rgba(37, 99, 235, 0.14));
  font-size: 14px !important;
}

.marga-dashboard .marga-enterprise-head h3 {
  margin-top: 2px !important;
  font-size: 13.5px !important;
  line-height: 1.1 !important;
}

.marga-dashboard .marga-enterprise-kicker {
  color: var(--enterprise-accent, #60a5fa) !important;
  font-size: 9px !important;
  letter-spacing: 0.11em !important;
}

.marga-dashboard .marga-enterprise-badge {
  min-height: 20px !important;
  padding: 0 8px !important;
  border-color: color-mix(in srgb, var(--enterprise-accent, #3b82f6) 44%, transparent);
  color: color-mix(in srgb, var(--enterprise-accent, #bfdbfe) 80%, #ffffff 20%);
  background: var(--enterprise-accent-soft, rgba(59, 130, 246, 0.12));
  font-size: 9px !important;
}

.marga-dashboard .marga-enterprise-online {
  border-color: rgba(34, 197, 94, 0.48) !important;
  color: #86efac !important;
  background: rgba(34, 197, 94, 0.13) !important;
}

.marga-dashboard .marga-enterprise-time-grid {
  gap: 6px !important;
  margin-top: auto !important;
}

.marga-dashboard .marga-enterprise-primary-value {
  padding: 7px 9px !important;
  border-color: color-mix(in srgb, var(--enterprise-accent, #3b82f6) 28%, transparent);
  border-radius: 8px !important;
}

.marga-dashboard .marga-enterprise-primary-value strong {
  margin-top: 3px !important;
  font-size: clamp(27px, 2.2vw, 30px) !important;
}

.marga-dashboard .marga-enterprise-mini-value {
  padding: 6px 8px !important;
  border-radius: 8px !important;
}

.marga-dashboard .marga-enterprise-mini-value strong {
  margin-top: 3px !important;
  font-size: 11.5px !important;
}

.marga-dashboard .marga-enterprise-primary-value span,
.marga-dashboard .marga-enterprise-mini-value span,
.marga-dashboard .marga-resource-summary span,
.marga-dashboard .marga-enterprise-list span {
  font-size: 9px !important;
}

.marga-dashboard .marga-enterprise-board .marga-enterprise-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px !important;
  margin-top: 0 !important;
}

.marga-dashboard .marga-enterprise-board .marga-enterprise-list div {
  grid-template-columns: 20px minmax(64px, 0.9fr) minmax(0, 1.1fr);
  gap: 5px !important;
  min-width: 0;
  min-height: 28px;
  box-sizing: border-box;
  padding: 4px 6px !important;
  border-radius: 8px !important;
}

.marga-dashboard .marga-enterprise-board .marga-enterprise-list div:last-child {
  grid-column: 1 / -1;
}

.marga-dashboard .marga-enterprise-list i {
  width: 20px !important;
  height: 20px !important;
  border-radius: 7px !important;
  color: var(--enterprise-accent, #93c5fd) !important;
  background: var(--enterprise-accent-soft, rgba(59, 130, 246, 0.13)) !important;
  font-size: 9px !important;
}

.marga-dashboard .marga-enterprise-list strong {
  overflow: visible;
  font-size: 10.5px !important;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.marga-dashboard .marga-resource-rings {
  gap: 8px !important;
  margin-top: 0 !important;
}

.marga-dashboard .marga-circular-progress {
  min-height: 52px !important;
}

.marga-dashboard .marga-circular-progress svg {
  width: 46px !important;
  height: 46px !important;
}

.marga-dashboard .marga-circular-progress circle {
  stroke-width: 3.8 !important;
}

.marga-dashboard .marga-circular-progress strong {
  top: 14px !important;
  font-size: 11.5px !important;
}

.marga-dashboard .marga-circular-progress strong span {
  font-size: 9px !important;
}

.marga-dashboard .marga-circular-progress small {
  margin-top: -2px !important;
  font-size: 9px !important;
}

.marga-dashboard .marga-resource-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px !important;
  margin-top: auto !important;
  padding-top: 0 !important;
}

.marga-dashboard .marga-resource-summary div {
  display: block !important;
  min-width: 0;
  box-sizing: border-box;
  padding: 5px 6px !important;
  border: 1px solid rgba(148, 163, 184, 0.13) !important;
  border-radius: 8px;
  background: rgba(8, 21, 35, 0.42);
}

.marga-dashboard .marga-resource-summary strong {
  display: block;
  margin-top: 3px;
  overflow: visible;
  font-size: 10px !important;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left !important;
  text-overflow: clip;
  white-space: normal;
}

@media screen and (max-width: 1180px) {
  .marga-dashboard .marga-enterprise-card {
    min-height: 164px !important;
  }
}

@media screen and (max-width: 767px) {
  .marga-dashboard .marga-enterprise-card {
    min-height: 0 !important;
    padding: 10px !important;
  }

  .marga-dashboard .marga-enterprise-board .marga-enterprise-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 420px) {
  .marga-dashboard .marga-enterprise-overview {
    gap: 8px !important;
  }

  .marga-dashboard .marga-enterprise-board .marga-enterprise-list div {
    grid-template-columns: 19px minmax(60px, 0.9fr) minmax(0, 1.1fr);
    padding: 4px 5px !important;
  }

  .marga-dashboard .marga-enterprise-list strong,
  .marga-dashboard .marga-resource-summary strong {
    font-size: 10px !important;
  }
}

/* MARGA.NET enterprise network console: reference-led, UI-only refinement. */
body.marga-app-page {
  --console-bg: #07101b;
  --console-sidebar: #08121f;
  --console-topbar: #09131f;
  --console-surface: #0d1825;
  --console-surface-alt: #101d2b;
  --console-surface-hover: #142438;
  --console-border-soft: rgba(148, 163, 184, 0.1);
  --console-border: rgba(148, 163, 184, 0.16);
  --console-border-active: rgba(59, 130, 246, 0.55);
  --console-text: #f1f5f9;
  --console-text-secondary: #a7b4c5;
  --console-text-muted: #64748b;
  --console-brand: #3b82f6;
  --console-brand-soft: rgba(59, 130, 246, 0.14);
  --console-success: #22c55e;
  --console-warning: #f59e0b;
  --console-danger: #ef4444;
  --console-info: #38bdf8;
  --console-pppoe: #8b5cf6;
  color: var(--console-text);
  background: var(--console-bg);
}

body.mikhmon-theme-green.marga-app-page {
  --console-brand: #22a783;
  --console-brand-soft: rgba(34, 167, 131, 0.14);
  --console-border-active: rgba(34, 167, 131, 0.52);
}

body.mikhmon-theme-pink.marga-app-page {
  --console-brand: #c94d91;
  --console-brand-soft: rgba(201, 77, 145, 0.14);
  --console-border-active: rgba(201, 77, 145, 0.5);
}

body.mikhmon-theme-light.marga-app-page {
  --console-bg: #eef3f8;
  --console-sidebar: #ffffff;
  --console-topbar: #ffffff;
  --console-surface: #ffffff;
  --console-surface-alt: #f6f8fb;
  --console-surface-hover: #edf3fa;
  --console-border-soft: rgba(51, 65, 85, 0.09);
  --console-border: rgba(51, 65, 85, 0.15);
  --console-border-active: rgba(37, 99, 235, 0.48);
  --console-text: #172033;
  --console-text-secondary: #526176;
  --console-text-muted: #718096;
  --console-brand: #2563eb;
  --console-brand-soft: rgba(37, 99, 235, 0.1);
}

body.marga-app-page::before,
body.marga-app-page::after {
  display: none;
}

body.marga-app-page .navbar {
  border-bottom: 1px solid var(--console-border-soft);
  background: var(--console-topbar);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  backdrop-filter: none;
}

body.marga-app-page .sidenav {
  padding: 12px 8px 20px;
  border-right: 1px solid var(--console-border-soft) !important;
  background: var(--console-sidebar);
  box-shadow: none;
}

body.marga-app-page .sidenav[style*="width: 0"] {
  padding-right: 0;
  padding-left: 0;
  border-right: 0 !important;
}

body.marga-app-page .navbar-right a[title="Idle Timeout"] {
  border: 0 !important;
  background: transparent !important;
}

body.marga-app-page .navbar-right #timer::after {
  display: block;
  margin-top: 2px;
  color: var(--console-text-muted);
  content: "WIB";
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

body.marga-app-page .navbar-right a[title="Idle Timeout"] #timer {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  line-height: 1;
}

body.marga-app-page #main {
  background: var(--console-bg);
}

body.marga-app-page .marga-sidebar-branding {
  min-height: 70px;
  padding: 10px 11px;
  border: 1px solid var(--console-border-soft);
  border-radius: 10px;
  background: var(--console-surface);
  box-shadow: none;
}

body.marga-app-page .marga-sidebar-branding-mark {
  width: 34px;
  height: 34px;
  border-color: var(--console-border);
  border-radius: 8px;
  color: var(--console-brand);
  background: var(--console-brand-soft);
}

body.marga-app-page .marga-sidebar-branding small,
body.marga-app-page .marga-nav-label {
  color: var(--console-text-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

body.marga-app-page .marga-sidebar-branding strong {
  margin-top: 4px;
  color: var(--console-text);
  font-size: 13px;
  font-weight: 650;
}

body.marga-app-page .marga-nav-label {
  margin: 14px 9px 7px;
}

body.marga-app-page .sidenav a,
body.marga-app-page .sidenav .dropdown-btn {
  min-height: 41px;
  margin: 3px 0;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--console-text-secondary);
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 27px;
}

body.marga-app-page .sidenav a i:not(.fa-caret-down),
body.marga-app-page .sidenav .dropdown-btn > i:first-child,
body.marga-app-page .sidenav a:nth-of-type(3n + 2) i:not(.fa-caret-down),
body.marga-app-page .sidenav .dropdown-btn:nth-of-type(3n + 2) > i:first-child,
body.marga-app-page .sidenav a:nth-of-type(3n + 3) i:not(.fa-caret-down),
body.marga-app-page .sidenav .dropdown-btn:nth-of-type(3n + 3) > i:first-child {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 1px solid var(--console-border-soft) !important;
  border-radius: 7px;
  color: var(--console-text-muted) !important;
  background: var(--console-surface-alt) !important;
  font-size: 14px;
  line-height: 26px;
}

body.marga-app-page .sidenav a:hover,
body.marga-app-page .sidenav .dropdown-btn:hover {
  border-color: var(--console-border-soft);
  border-radius: 8px;
  color: var(--console-text);
  background: var(--console-surface-hover);
}

body.marga-app-page .sidenav a.active,
body.marga-app-page .sidenav .dropdown-btn.active {
  border-color: rgba(59, 130, 246, 0.24);
  border-radius: 8px;
  color: var(--console-text);
  background: var(--console-brand-soft);
  box-shadow: none;
}

body.marga-app-page .sidenav a.active i:not(.fa-caret-down),
body.marga-app-page .sidenav .dropdown-btn.active > i:first-child {
  border-color: rgba(59, 130, 246, 0.24) !important;
  color: var(--console-brand) !important;
  background: rgba(59, 130, 246, 0.12) !important;
}

body.marga-app-page .sidenav a.active::after,
body.marga-app-page .sidenav .dropdown-btn.active::after {
  top: 9px;
  right: 4px;
  width: 2px;
  height: 23px;
  background: var(--console-brand);
}

body.marga-app-page .sidenav .dropdown-container {
  margin: 2px 2px 6px 14px;
  padding: 2px 0 2px 7px;
  border-left: 1px solid var(--console-border-soft);
}

body.marga-app-page .sidenav .fa-caret-down,
body.marga-app-page .sidenav .fa-caret-left {
  color: var(--console-text-muted);
}

@media screen and (min-width: 801px) {
  body.marga-app-page .marga-app-brand {
    width: var(--marga-sidebar-width);
    min-width: var(--marga-sidebar-width);
    height: var(--marga-topbar-height);
    padding: 0 14px !important;
    border-right-color: var(--console-border-soft);
  }

  body.marga-app-page .marga-brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-color: rgba(59, 130, 246, 0.22);
    border-radius: 9px;
    color: #dbeafe;
    background: linear-gradient(145deg, #1d4ed8, #3b82f6);
    box-shadow: none;
    font-size: 14px;
  }

  body.marga-app-page .marga-brand-copy strong {
    color: var(--console-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  body.marga-app-page .marga-brand-copy small {
    margin-top: 3px;
    color: var(--console-text-muted);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.08em;
  }

  body.marga-app-page #openNav,
  body.marga-app-page #closeNav {
    width: 36px;
    height: 36px;
    margin: 10px 7px;
    border-color: var(--console-border);
    border-radius: 8px;
    color: var(--console-text-secondary);
    background: transparent;
    line-height: 34px;
  }

  body.marga-app-page #openNav:hover,
  body.marga-app-page #closeNav:hover {
    color: var(--console-text);
    background: var(--console-surface-hover);
  }

  body.marga-app-page #cpage {
    padding: 0 8px !important;
    color: var(--console-text) !important;
    font-size: 13px;
    font-weight: 600;
  }

  body.marga-app-page #cpage::before {
    width: 5px;
    height: 5px;
    margin-right: 9px;
    background: var(--console-brand);
    box-shadow: none;
  }

  body.marga-app-page .navbar-right {
    gap: 8px;
    padding-right: 10px;
  }

  body.marga-app-page .marga-topbar-context {
    height: 34px;
    gap: 7px;
    margin: 11px 0;
    padding: 0 11px;
    border-color: var(--console-border);
    color: var(--console-text-secondary);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
  }

  body.marga-app-page .marga-topbar-context.is-online i {
    width: 7px;
    height: 7px;
    background: var(--console-success);
    box-shadow: none;
  }

  body.marga-app-page .navbar-right #logout,
  body.marga-app-page .navbar-right .ses,
  body.marga-app-page .navbar-right select {
    height: 36px;
    margin-top: 10px;
    border-color: var(--console-border);
    border-radius: 8px;
    color: var(--console-text-secondary);
    background-color: transparent;
    font-size: 12px;
  }

  body.marga-app-page .navbar-right #logout {
    padding: 0 11px;
    border-color: rgba(239, 68, 68, 0.22);
    color: var(--console-text-secondary);
    background: transparent;
  }

  body.marga-app-page .navbar-right #logout i {
    color: var(--console-danger);
  }

  body.marga-app-page .navbar-right #logout:hover {
    border-color: rgba(239, 68, 68, 0.42);
    color: var(--console-text);
    background: rgba(239, 68, 68, 0.08);
  }

  body.marga-app-page .navbar-right .ses,
  body.marga-app-page .navbar-right select {
    max-width: 150px;
    padding: 0 28px 0 10px;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] {
    width: 68px;
    margin-top: 10px;
    padding: 0 !important;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] > span {
    display: grid !important;
    width: 68px !important;
    height: 36px;
    grid-template-rows: auto auto;
    place-items: center;
    box-sizing: border-box;
    padding: 4px 6px !important;
    border-color: var(--console-border);
    border-radius: 8px;
    color: var(--console-text-secondary);
    background: transparent;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] span > i {
    display: none;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] span > #timer {
    margin: 0 !important;
    font-size: 11px;
  }

}

body.marga-app-page .main-container:has(> .marga-dashboard) {
  padding: 12px 14px 28px;
}

body.marga-app-page .marga-dashboard {
  color: var(--console-text);
  font-size: 13px;
}

body.marga-app-page .marga-dashboard .marga-enterprise-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 11px !important;
  align-items: stretch;
  margin: 0 0 11px !important;
}

body.marga-app-page .marga-dashboard .marga-overview-item {
  min-width: 0;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card {
  min-width: 0;
  min-height: 240px !important;
  height: 100%;
  gap: 11px !important;
  box-sizing: border-box;
  padding: 13px !important;
  overflow: hidden;
  border: 1px solid var(--console-border-soft) !important;
  border-radius: 11px !important;
  background: var(--console-surface) !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.13) !important;
  opacity: 1 !important;
  animation: none !important;
  backdrop-filter: none;
  transform: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::before,
body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
  display: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: var(--console-border) !important;
  background: var(--console-surface-alt) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-1px);
}

body.marga-app-page .marga-dashboard .marga-enterprise-head {
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 9px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-head > div:nth-child(2) {
  min-width: 0;
}

body.marga-app-page .marga-dashboard .marga-enterprise-icon {
  width: 32px !important;
  height: 32px !important;
  flex-basis: 32px !important;
  border: 1px solid var(--console-border-soft);
  border-radius: 8px !important;
  color: var(--console-brand) !important;
  background: var(--console-brand-soft) !important;
  box-shadow: none !important;
  font-size: 15px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-icon {
  color: var(--console-pppoe) !important;
  background: rgba(139, 92, 246, 0.12) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  color: var(--console-success) !important;
  background: rgba(34, 197, 94, 0.1) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-kicker {
  display: none !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
  display: block !important;
  overflow: hidden;
  margin: 0 !important;
  color: var(--console-text);
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.25 !important;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.marga-app-page .marga-dashboard .marga-enterprise-badge {
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 1px solid var(--console-border-soft);
  border-radius: 7px;
  color: var(--console-brand);
  background: var(--console-brand-soft);
  font-size: 9px !important;
  font-weight: 650;
  letter-spacing: 0.02em;
}

body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-badge {
  color: #b9a3ff;
  background: rgba(139, 92, 246, 0.12);
}

body.marga-app-page .marga-dashboard .marga-enterprise-online {
  border-color: rgba(34, 197, 94, 0.2) !important;
  color: #65d785 !important;
  background: rgba(34, 197, 94, 0.1) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-online i {
  width: 6px;
  height: 6px;
  background: var(--console-success);
  box-shadow: none;
  animation: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time-grid {
  flex: 1;
  gap: 10px !important;
  margin-top: 0 !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
  display: flex;
  min-width: 0;
  min-height: 96px;
  box-sizing: border-box;
  padding: 13px 14px !important;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--console-border-soft);
  border-radius: 8px !important;
  background: var(--console-surface-alt);
}

body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
  min-width: 0;
  padding: 10px 12px !important;
  border: 1px solid var(--console-border-soft);
  border-radius: 8px !important;
  background: transparent;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value span,
body.marga-app-page .marga-dashboard .marga-enterprise-mini-value span,
body.marga-app-page .marga-dashboard .marga-resource-summary span,
body.marga-app-page .marga-dashboard .marga-enterprise-list span {
  color: var(--console-text-secondary);
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
  margin-top: 6px !important;
  color: var(--console-text);
  font-size: clamp(30px, 2.5vw, 34px) !important;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
  margin-top: 5px !important;
  color: var(--console-text);
  font-size: 12px !important;
  font-weight: 550;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 !important;
  margin-top: 0 !important;
  border-top: 1px solid var(--console-border-soft);
}

body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-list div,
body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-list div:last-child {
  grid-column: auto;
  grid-template-columns: 20px minmax(86px, 1fr) minmax(0, 1.1fr);
  gap: 8px !important;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 6px 1px !important;
  border: 0;
  border-bottom: 1px solid var(--console-border-soft);
  border-radius: 0 !important;
  background: transparent;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list i {
  width: 20px !important;
  height: 20px !important;
  border: 0;
  border-radius: 6px !important;
  color: var(--console-text-muted) !important;
  background: transparent !important;
  font-size: 12px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list strong {
  min-width: 0;
  overflow: visible;
  color: var(--console-text);
  font-size: 12px !important;
  font-weight: 550;
  line-height: 1.25;
  text-align: right;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-resource-rings {
  gap: 12px !important;
  margin-top: 2px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress {
  min-height: 82px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress svg {
  width: 58px !important;
  height: 58px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress circle {
  stroke-width: 5.5 !important;
}

body.marga-app-page .marga-dashboard .marga-circle-bg {
  stroke: rgba(100, 116, 139, 0.22);
}

body.marga-app-page .marga-dashboard .marga-circle-bar {
  filter: none;
}

body.marga-app-page .marga-dashboard .marga-circular-progress strong {
  top: 19px !important;
  color: var(--console-text);
  font-size: 18px !important;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-circular-progress strong span {
  font-size: 10px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress small {
  margin-top: -3px !important;
  color: var(--console-text-secondary);
  font-size: 11px !important;
  font-weight: 550;
  letter-spacing: 0.02em;
}

body.marga-app-page .marga-dashboard .marga-resource-summary {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 0 !important;
  margin-top: auto !important;
  padding-top: 0 !important;
  border-top: 1px solid var(--console-border-soft);
}

body.marga-app-page .marga-dashboard .marga-resource-summary div {
  display: block !important;
  min-width: 0;
  padding: 9px 10px 2px !important;
  border: 0 !important;
  border-left: 1px solid var(--console-border-soft) !important;
  border-radius: 0;
  background: transparent;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child {
  border-left: 0 !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: visible;
  color: var(--console-text);
  font-size: 11px !important;
  font-weight: 550;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-service-card {
  margin: 0 0 11px !important;
  border: 1px solid var(--console-border-soft) !important;
  border-radius: 11px !important;
  background: var(--console-surface) !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12) !important;
}

body.marga-app-page .marga-dashboard .marga-service-card .card-body {
  padding: 13px !important;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
}

body.marga-app-page .marga-dashboard .marga-summary-group {
  min-width: 0;
}

body.marga-app-page .marga-dashboard .marga-summary-group.is-hotspot {
  padding-right: 13px;
  border-right: 1px solid var(--console-border-soft);
}

body.marga-app-page .marga-dashboard .marga-summary-group.is-pppoe {
  padding-left: 13px;
}

body.marga-app-page .marga-dashboard .marga-summary-heading {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--console-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

body.marga-app-page .marga-dashboard .marga-summary-heading i {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--console-border-soft);
  border-radius: 7px;
  color: var(--console-brand);
  background: var(--console-brand-soft);
  font-size: 12px;
}

body.marga-app-page .marga-dashboard .marga-summary-group.is-pppoe .marga-summary-heading i {
  color: #b9a3ff;
  background: rgba(139, 92, 246, 0.12);
}

body.marga-app-page .marga-dashboard .marga-summary-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  align-items: stretch;
}

body.marga-app-page .marga-dashboard .marga-quick-item {
  min-width: 0;
}

body.marga-app-page .marga-dashboard .marga-action-tile,
body.marga-app-page .marga-dashboard .marga-action-tile > a {
  min-height: 126px !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile {
  position: relative;
  margin: 0 !important;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--console-border-soft) !important;
  border-radius: 8px !important;
  background: var(--console-surface-alt) !important;
  box-shadow: none !important;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-active,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-users,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-active,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-users,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-profile {
  background: var(--console-surface-alt) !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile::before,
body.marga-app-page .marga-dashboard .marga-action-tile::after {
  display: none;
}

body.marga-app-page .marga-dashboard .marga-action-tile:hover {
  border-color: var(--console-border-active) !important;
  background: var(--console-surface-hover) !important;
  transform: translateY(-1px);
}

body.marga-app-page .marga-dashboard .marga-action-tile > a {
  display: flex;
  box-sizing: border-box;
  padding: 13px !important;
  flex-direction: column;
  justify-content: space-between;
  color: var(--console-text);
  text-decoration: none;
}

body.marga-app-page .marga-dashboard .marga-action-tile > a:focus-visible,
body.marga-app-page .sidenav a:focus-visible,
body.marga-app-page .sidenav .dropdown-btn:focus-visible,
body.marga-app-page .navbar a:focus-visible,
body.marga-app-page .navbar select:focus-visible {
  outline: 2px solid var(--console-brand);
  outline-offset: 2px;
}

body.marga-app-page .marga-dashboard .marga-action-tile h1 {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  color: var(--console-text);
  font-size: 28px !important;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-action-tile h1 span {
  margin-left: 0 !important;
  color: var(--console-text-secondary) !important;
  font-size: 10px !important;
  font-weight: 500;
}

body.marga-app-page .marga-dashboard .marga-action-tile > a > div:last-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--console-text-secondary) !important;
  font-size: 11px !important;
  font-weight: 500;
  line-height: 1.3;
}

body.marga-app-page .marga-dashboard .marga-action-tile > a > div:last-child > i {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--console-border-soft);
  border-radius: 7px;
  color: var(--console-brand);
  background: var(--console-brand-soft);
  font-size: 12px !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-users > a > div:last-child > i {
  color: var(--console-success);
  background: rgba(34, 197, 94, 0.1);
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-active > a > div:last-child > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-users > a > div:last-child > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-profile > a > div:last-child > i {
  color: #b9a3ff;
  background: rgba(139, 92, 246, 0.12);
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-add,
body.marga-app-page .marga-dashboard .marga-action-tile.is-generate,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add {
  border-style: solid !important;
  background: var(--console-surface) !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-add h1,
body.marga-app-page .marga-dashboard .marga-action-tile.is-generate h1,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add h1 {
  align-items: center;
  gap: 8px;
  font-size: 13px !important;
  line-height: 1.3;
  letter-spacing: 0;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-add h1 > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-generate h1 > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add h1 > i {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--console-border-soft);
  border-radius: 50%;
  color: var(--console-brand);
  background: var(--console-brand-soft);
  font-size: 15px !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-generate h1 > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add h1 > i {
  color: #b9a3ff;
  background: rgba(139, 92, 246, 0.12);
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-add h1 span,
body.marga-app-page .marga-dashboard .marga-action-tile.is-generate h1 span,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add h1 span {
  color: var(--console-text) !important;
  font-size: 12px !important;
  font-weight: 600;
}

body.marga-app-page .marga-dashboard .marga-dashboard-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.85fr);
  gap: 11px;
  align-items: stretch;
}

body.marga-app-page .marga-dashboard .marga-chart-card,
body.marga-app-page .marga-dashboard #r_3 .card {
  margin: 0 !important;
  border: 1px solid var(--console-border-soft) !important;
  border-radius: 11px !important;
  background: var(--console-surface) !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12) !important;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-header,
body.marga-app-page .marga-dashboard #r_3 .card-header {
  min-height: 46px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--console-border-soft);
  background: transparent;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-header h3,
body.marga-app-page .marga-dashboard #r_3 .card-header h3,
body.marga-app-page .marga-dashboard #r_3 .card-header a {
  margin: 0;
  color: var(--console-text);
  font-size: 14px;
  font-weight: 600;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-body,
body.marga-app-page .marga-dashboard #r_3 .card-body {
  padding: 12px 14px 14px;
}

body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
  min-height: 320px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

body.marga-app-page .marga-dashboard .highcharts-background {
  fill: transparent;
}

body.marga-app-page .marga-dashboard .highcharts-grid-line {
  stroke: rgba(148, 163, 184, 0.09);
}

body.marga-app-page .marga-dashboard .highcharts-axis-line,
body.marga-app-page .marga-dashboard .highcharts-tick {
  stroke: rgba(148, 163, 184, 0.13);
}

body.marga-app-page .marga-dashboard .highcharts-axis-labels text,
body.marga-app-page .marga-dashboard .highcharts-title,
body.marga-app-page .marga-dashboard .highcharts-legend-item text {
  fill: var(--console-text-secondary) !important;
  color: var(--console-text-secondary) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

body.marga-app-page .marga-dashboard .highcharts-series-0 .highcharts-graph {
  stroke: var(--console-brand) !important;
  stroke-width: 2px;
}

body.marga-app-page .marga-dashboard .highcharts-series-1 .highcharts-graph {
  stroke: var(--console-success) !important;
  stroke-width: 2px;
}

body.marga-app-page .marga-dashboard .highcharts-series-0 .highcharts-area {
  fill: rgba(59, 130, 246, 0.08) !important;
}

body.marga-app-page .marga-dashboard .highcharts-series-1 .highcharts-area {
  fill: rgba(34, 197, 94, 0.07) !important;
}

body.marga-app-page .marga-dashboard .marga-dashboard-aside {
  display: grid;
  gap: 11px;
}

body.marga-app-page .marga-dashboard .marga-income-card,
body.marga-app-page .marga-dashboard #r_4 .box {
  min-height: 100px;
  margin: 0 !important;
  border: 1px solid var(--console-border-soft) !important;
  border-radius: 11px !important;
  background: var(--console-surface) !important;
  box-shadow: none !important;
}

body.marga-app-page .marga-dashboard #r_3 .overflow {
  height: 320px !important;
  margin-top: 0 !important;
  overflow: auto;
  padding: 0 !important;
}

body.marga-app-page .marga-dashboard #r_3 table {
  margin: 0;
  color: var(--console-text-secondary);
  background: transparent;
  font-size: 11.5px !important;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard #r_3 thead th {
  padding: 9px 10px;
  border-color: var(--console-border-soft);
  color: var(--console-text-muted);
  background: var(--console-surface-alt);
  font-size: 10px;
  font-weight: 600;
}

body.marga-app-page .marga-dashboard #r_3 tbody td {
  padding: 9px 10px;
  border-color: var(--console-border-soft);
}

body.marga-app-page .marga-dashboard #r_3 tbody tr:hover {
  background: var(--console-surface-hover);
}

@media screen and (min-width: 1200px) {
  body.marga-app-page .marga-dashboard .marga-service-card {
    margin-bottom: 0 !important;
  }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(3) {
    grid-column: 1 / -1;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 224px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-quick-grid {
    grid-template-columns: 1fr !important;
    gap: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-summary-group.is-hotspot {
    padding-right: 0;
    padding-bottom: 13px;
    border-right: 0;
    border-bottom: 1px solid var(--console-border-soft);
  }

  body.marga-app-page .marga-dashboard .marga-summary-group.is-pppoe {
    padding-left: 0;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-layout,
  body.marga-app-page .marga-dashboard .marga-dashboard-main #r_2,
  body.marga-app-page .marga-dashboard .marga-dashboard-main .marga-chart-card,
  body.marga-app-page .marga-dashboard .marga-dashboard-aside {
    display: block;
    grid-column: auto;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside {
    margin-top: 11px;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside > .marga-dashboard-section + .marga-dashboard-section {
    margin-top: 11px;
  }
}

@media screen and (max-width: 799px) {
  body.marga-app-page.marga-sidebar-open::before {
    display: block;
    position: fixed;
    z-index: 37;
    top: var(--marga-topbar-height);
    right: 0;
    bottom: 0;
    left: 210px;
    width: auto;
    height: auto;
    border-radius: 0;
    opacity: 1;
    background: rgba(3, 6, 18, 0.7);
    box-shadow: none;
    filter: none;
  }

  body.marga-app-page .sidenav {
    width: 0;
    padding-right: 0;
    padding-left: 0;
    border-right: 0 !important;
  }

  body.marga-app-page .sidenav[style]:not([style*="width: 0"]) {
    padding: 12px 8px 20px;
    border-right: 1px solid var(--console-border-soft) !important;
  }

  body.marga-app-page #main {
    margin-left: 0;
  }

  body.marga-app-page .main-container:has(> .marga-dashboard) {
    padding: 12px 10px 104px;
  }
}

/* ========================================================================== 
   MARGA.NET reference alignment v10
   Compact, colorful sidebar icons and centered KPI card content.
   ========================================================================== */

body.marga-app-page .sidenav a,
body.marga-app-page .sidenav .dropdown-btn {
  min-height: 31px;
  margin: 1px 0;
  padding: 4px 9px;
  font-size: 11.5px;
  line-height: 21px;
}

body.marga-app-page #sidenav.sidenav a i:not(.fa-caret-down):not(.fa-caret-left),
body.marga-app-page #sidenav.sidenav .dropdown-btn > i:first-child {
  display: inline-block;
  width: 17px;
  height: 21px;
  margin-right: 8px;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--nav-icon-color, var(--console-text-muted)) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
  line-height: 21px;
  text-align: center;
}

body.marga-app-page .sidenav .fa-dashboard,
body.marga-app-page .sidenav .fa-list,
body.marga-app-page .sidenav .fa-area-chart,
body.marga-app-page .sidenav .fa-upload {
  --nav-icon-color: #60a5fa;
}

body.marga-app-page .sidenav .fa-wifi,
body.marga-app-page .sidenav .fa-link,
body.marga-app-page .sidenav .fa-laptop {
  --nav-icon-color: #22d3ee;
}

body.marga-app-page .sidenav .fa-users,
body.marga-app-page .sidenav .fa-print,
body.marga-app-page .sidenav .fa-money,
body.marga-app-page .sidenav .fa-gear {
  --nav-icon-color: #34d399;
}

body.marga-app-page .sidenav .fa-exchange,
body.marga-app-page .sidenav .fa-pie-chart,
body.marga-app-page .sidenav .fa-sliders,
body.marga-app-page .sidenav .fa-edit,
body.marga-app-page .sidenav .fa-align-justify,
body.marga-app-page .sidenav .fa-sitemap {
  --nav-icon-color: #a78bfa;
}

body.marga-app-page .sidenav .fa-ticket,
body.marga-app-page .sidenav .fa-address-book {
  --nav-icon-color: #f472b6;
}

body.marga-app-page .sidenav .fa-user-plus,
body.marga-app-page .sidenav .fa-clock-o,
body.marga-app-page .sidenav .fa-hourglass,
body.marga-app-page .sidenav .fa-info-circle {
  --nav-icon-color: #fbbf24;
}

body.marga-app-page .sidenav .fa-power-off {
  --nav-icon-color: #fb7185;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-dashboard,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-list,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-area-chart,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-upload {
  --nav-icon-color: #2563eb;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-wifi,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-link,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-laptop {
  --nav-icon-color: #0891b2;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-users,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-print,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-money,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-gear {
  --nav-icon-color: #15803d;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-exchange,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-pie-chart,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-sliders,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-edit,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-align-justify,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-sitemap {
  --nav-icon-color: #7c3aed;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-ticket,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-address-book {
  --nav-icon-color: #be185d;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-user-plus,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-clock-o,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-hourglass,
body.mikhmon-theme-light.marga-app-page .sidenav .fa-info-circle {
  --nav-icon-color: #b45309;
}

body.mikhmon-theme-light.marga-app-page .sidenav .fa-power-off {
  --nav-icon-color: #dc2626;
}

body.marga-app-page .marga-dashboard .marga-service-card .card-body {
  padding: 12px !important;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-heading {
  min-height: 26px;
  margin-bottom: 8px;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-heading i {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  font-size: 11px;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-items {
  gap: 8px;
  align-items: center;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class],
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] > a {
  min-height: 94px !important;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] > a {
  justify-content: center;
  gap: 7px;
  padding: 10px !important;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile > a > div:last-child {
  order: -1;
  min-height: 18px;
  padding-right: 35px;
  color: var(--console-text-secondary) !important;
  font-size: 9.5px !important;
  font-weight: 600;
  letter-spacing: 0.025em;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-active h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-users h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-active h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-users h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-profile h1 {
  padding-right: 0;
  font-size: 23px !important;
  line-height: 1.05;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-add h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-generate h1,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-add h1 {
  font-size: 13px !important;
  line-height: 1.25;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile h1 > i,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile > a > div:last-child > i {
  top: 10px;
  right: 10px;
  width: 28px !important;
  height: 28px !important;
  flex-basis: 28px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class],
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] > a {
    min-height: 90px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] > a {
    padding: 9px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-active h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-users h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-active h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-users h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-profile h1 {
    font-size: 22px !important;
  }
}

/* Skaynet-inspired card and icon model. Visual treatment only. */
body.marga-app-page .marga-dashboard {
  --dashboard-card-bg: #111b2f;
  --dashboard-card-bg-subtle: #131e32;
  --dashboard-card-border: rgba(100, 116, 139, 0.3);
  --dashboard-card-border-hover: rgba(100, 116, 139, 0.44);
  --dashboard-card-shadow: 0 3px 10px rgba(2, 6, 23, 0.18);
  --dashboard-card-shadow-hover: 0 5px 14px rgba(2, 6, 23, 0.22);
  --dashboard-card-shadow-mobile: 0 3px 9px rgba(2, 6, 23, 0.17);
  --dashboard-tile-shadow: 0 2px 6px rgba(2, 6, 23, 0.16);
  --dashboard-tile-shadow-hover: 0 4px 10px rgba(2, 6, 23, 0.2);
  --dashboard-icon-shadow: none;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard {
  --dashboard-card-bg: #ffffff;
  --dashboard-card-bg-subtle: #f5f7fb;
  --dashboard-card-border: rgba(51, 65, 85, 0.18);
  --dashboard-card-border-hover: rgba(51, 65, 85, 0.3);
  --dashboard-card-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
  --dashboard-card-shadow-hover: 0 5px 14px rgba(15, 23, 42, 0.1);
  --dashboard-card-shadow-mobile: 0 3px 9px rgba(15, 23, 42, 0.07);
  --dashboard-tile-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  --dashboard-tile-shadow-hover: 0 4px 10px rgba(15, 23, 42, 0.11);
  --dashboard-icon-shadow: none;
}

@media screen and (min-width: 800px) and (max-width: 800px) {
  body.marga-app-page .marga-mobile-nav {
    display: none !important;
  }
}

@media screen and (min-width: 800px) and (max-width: 800px) {
  body.marga-app-page .sidenav {
    width: var(--marga-sidebar-width) !important;
    padding: 12px 8px 20px !important;
    border-right: 1px solid var(--console-border-soft) !important;
  }

  body.marga-app-page #main {
    margin-left: var(--marga-sidebar-width) !important;
  }

  body.marga-app-page #openNav,
  body.marga-app-page #closeNav {
    display: none !important;
  }
}

@media screen and (min-width: 681px) and (max-width: 800px) {
  body.marga-app-page .marga-app-brand {
    width: 145px;
    min-width: 145px;
    padding: 0 8px !important;
  }

  body.marga-app-page .marga-brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  body.marga-app-page #openNav,
  body.marga-app-page #closeNav {
    position: static;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin: 10px 4px;
    line-height: 34px;
  }

  body.marga-app-page #cpage {
    display: flex !important;
    max-width: 66px;
    height: 58px;
    padding: 0 5px !important;
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
  }

  body.marga-app-page .navbar-right {
    gap: 4px;
    padding-right: 6px;
  }

  body.marga-app-page .marga-topbar-context {
    display: inline-flex !important;
    height: 32px;
    margin: 13px 0;
    padding: 0 6px;
    font-size: 8.5px;
  }

  body.marga-app-page .navbar-right #logout,
  body.marga-app-page .navbar-right .ses,
  body.marga-app-page .navbar-right select {
    height: 34px;
    margin-top: 12px;
    font-size: 9px;
  }

  body.marga-app-page .navbar-right #logout {
    width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  body.marga-app-page .navbar-right #logout i {
    margin: 0;
    font-size: 12px;
  }

  body.marga-app-page .navbar-right .stheme {
    display: block !important;
    width: 62px;
    max-width: 62px;
    padding: 0 18px 0 7px;
  }

  body.marga-app-page .navbar-right select.ses:not(.stheme) {
    width: 88px;
    max-width: 88px;
    padding: 0 18px 0 7px;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] {
    display: block !important;
    width: 62px;
    margin-top: 12px;
    padding: 0 !important;
  }
}

@media screen and (max-width: 1000px) {
  body.marga-app-page {
    --marga-topbar-height: 112px;
  }

  body.marga-app-page .navbar {
    height: var(--marga-topbar-height);
  }

  body.marga-app-page .navbar > .navbar-left {
    position: relative;
    width: 100%;
    height: 58px;
    float: none;
  }

  body.marga-app-page .marga-app-brand {
    width: 145px;
    min-width: 145px;
    height: 58px;
    padding: 0 8px !important;
  }

  body.marga-app-page .marga-brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  body.marga-app-page #openNav,
  body.marga-app-page #closeNav {
    position: static;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin: 10px 4px;
    line-height: 34px;
  }

  body.marga-app-page #cpage {
    display: flex !important;
    min-width: 0;
    height: 58px;
    flex: 1;
    padding: 0 7px !important;
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
  }

  body.marga-app-page .navbar > .navbar-right {
    position: absolute;
    top: 58px;
    right: 0;
    left: 0;
    width: 100%;
    height: 54px;
    float: none;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    gap: 4px;
    padding: 0 8px;
    overflow-x: auto;
    border-top: 1px solid var(--console-border-soft);
    scrollbar-width: none;
  }

  body.marga-app-page .navbar > .navbar-right::-webkit-scrollbar {
    display: none;
  }

  body.marga-app-page .marga-topbar-context {
    display: inline-flex !important;
    height: 34px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0 6px;
    font-size: 8.5px;
  }

  body.marga-app-page .navbar-right #logout,
  body.marga-app-page .navbar-right .ses,
  body.marga-app-page .navbar-right select {
    height: 34px;
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 9px;
  }

  body.marga-app-page .navbar-right #logout {
    width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  body.marga-app-page .navbar-right #logout i {
    margin: 0;
    font-size: 12px;
  }

  body.marga-app-page .navbar-right .stheme {
    display: block !important;
    width: 62px;
    max-width: 62px;
    padding: 0 18px 0 7px;
  }

  body.marga-app-page .navbar-right select.ses:not(.stheme) {
    width: 88px;
    max-width: 88px;
    padding: 0 18px 0 7px;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] {
    display: block !important;
    width: 62px;
    flex: 0 0 62px;
    margin-top: 0;
    padding: 0 !important;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] > span {
    display: grid !important;
    width: 62px !important;
    height: 34px;
    grid-template-rows: auto auto;
    place-items: center;
    box-sizing: border-box;
    padding: 3px 5px !important;
    border-color: var(--console-border);
    border-radius: 8px;
    color: var(--console-text-secondary);
    background: transparent;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] span > i {
    display: none;
  }

  body.marga-app-page .navbar-right a[title="Idle Timeout"] span > #timer {
    margin: 0 !important;
    font-size: 10px;
  }

}

@media screen and (max-width: 374px) {
  body.marga-app-page .navbar > .navbar-right {
    justify-content: flex-start;
  }
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-dashboard-layout,
  body.marga-app-page .marga-dashboard .marga-dashboard-main #r_2,
  body.marga-app-page .marga-dashboard .marga-dashboard-main .marga-chart-card,
  body.marga-app-page .marga-dashboard .marga-dashboard-aside {
    display: block;
    grid-column: auto;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside {
    margin-top: 11px;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside > .marga-dashboard-section + .marga-dashboard-section {
    margin-top: 11px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-overview .marga-overview-item:nth-child(3) {
    grid-column: auto;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 0 !important;
    padding: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 88px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    font-size: 30px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-rings {
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 54px !important;
    height: 54px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-quick-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-summary-group {
    padding-right: 0;
    border-right: 0;
  }

  body.marga-app-page .marga-dashboard .marga-summary-group + .marga-summary-group {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--console-border);
    border-left: 0;
  }

  body.marga-app-page .marga-dashboard .marga-summary-items {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.marga-app-page .marga-dashboard .marga-action-tile,
  body.marga-app-page .marga-dashboard .marga-action-tile > a {
    min-height: 86px !important;
  }

  body.marga-app-page .marga-dashboard .marga-action-tile > a {
    padding: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-action-tile h1 {
    font-size: 25px !important;
  }

  body.marga-app-page .marga-dashboard .marga-action-tile.is-add,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-generate,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-add > a,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-generate > a,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add > a {
    min-height: 76px !important;
  }

  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    min-height: 280px;
  }

  body.marga-app-page .marga-dashboard #r_3 .overflow {
    height: 280px !important;
  }
}

/* Dashboard premium card and icon consistency pass. Visual overrides only. */
body.marga-app-page {
  --console-success-text: #65d785;
  --console-pppoe-text: #b9a3ff;
}

body.marga-app-page .marga-dashboard {
  --console-text-muted: #94a3b8;
}

body.mikhmon-theme-light.marga-app-page {
  --console-success-text: #15803d;
  --console-pppoe-text: #6d28d9;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard {
  --console-text-muted: #64748b;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card,
body.marga-app-page .marga-dashboard .marga-service-card,
body.marga-app-page .marga-dashboard .marga-chart-card,
body.marga-app-page .marga-dashboard .marga-income-card,
body.marga-app-page .marga-dashboard #r_4 .box,
body.marga-app-page .marga-dashboard #r_3 .card {
  border: 1px solid var(--dashboard-card-border) !important;
  border-radius: 12px !important;
  background: var(--dashboard-card-bg) !important;
  box-shadow:
    var(--dashboard-card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card {
  position: relative;
  background: var(--dashboard-card-bg) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: var(--dashboard-card-border-hover) !important;
  background: var(--dashboard-card-bg) !important;
  box-shadow:
    var(--dashboard-card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::before {
  display: none !important;
  position: absolute;
  top: -1px;
  left: 16px;
  width: 72px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--enterprise-accent, var(--console-brand)), transparent);
  content: "";
  opacity: 0.9;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card .marga-enterprise-icon {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 7px !important;
  color: #ffffff !important;
  background: var(--enterprise-accent, var(--console-brand)) !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-badge {
  border-radius: 6px !important;
  box-shadow: none !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
  background: var(--dashboard-card-bg-subtle) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-list div {
  grid-template-columns: 22px minmax(86px, 1fr) minmax(0, 1.1fr);
}

body.marga-app-page .marga-dashboard .marga-enterprise-list i {
  width: 22px !important;
  height: 22px !important;
  border: 1px solid rgba(var(--board-icon-rgb, 167, 139, 250), 0.2) !important;
  color: rgb(var(--board-icon-rgb, 167, 139, 250)) !important;
  background: rgba(var(--board-icon-rgb, 167, 139, 250), 0.1) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 10px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list i {
  --board-icon-rgb: 167, 139, 250;
}

body.marga-app-page .marga-dashboard .marga-service-card {
  overflow: hidden;
  background: var(--dashboard-card-bg) !important;
}

body.marga-app-page .marga-dashboard .marga-summary-heading i {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-color: rgba(56, 189, 248, 0.28);
  color: #67d3ff;
  background: rgba(56, 189, 248, 0.14);
  border-radius: 7px;
  box-shadow: none;
  font-size: 13px;
}

body.marga-app-page .marga-dashboard .marga-summary-group.is-pppoe .marga-summary-heading i {
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--console-pppoe-text);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: none;
}

body.marga-app-page .marga-dashboard .marga-action-tile {
  --tile-accent: #38bdf8;
  --tile-accent-rgb: 56, 189, 248;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] {
  border-color: var(--dashboard-card-border) !important;
  border-radius: 10px !important;
  background: var(--dashboard-card-bg-subtle) !important;
  box-shadow:
    var(--dashboard-tile-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-active {
  --tile-accent: #0284c7;
  --tile-accent-rgb: 2, 132, 199;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-users {
  --tile-accent: #059669;
  --tile-accent-rgb: 5, 150, 105;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-add {
  --tile-accent: #d97706;
  --tile-accent-rgb: 217, 119, 6;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-generate {
  --tile-accent: #db2777;
  --tile-accent-rgb: 219, 39, 119;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-active {
  --tile-accent: #0891b2;
  --tile-accent-rgb: 8, 145, 178;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-users {
  --tile-accent: #7c3aed;
  --tile-accent-rgb: 124, 58, 237;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add {
  --tile-accent: #ea580c;
  --tile-accent-rgb: 234, 88, 12;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-profile {
  --tile-accent: #9333ea;
  --tile-accent-rgb: 147, 51, 234;
}

body.marga-app-page .marga-dashboard .marga-action-tile::before {
  display: none !important;
  position: absolute;
  z-index: 0;
  top: -1px;
  left: 12px;
  width: 48px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--tile-accent), transparent);
  content: "";
}

body.marga-app-page .marga-dashboard .marga-action-tile::after {
  display: none !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile > a {
  position: relative;
  z-index: 1;
}

body.marga-app-page .marga-dashboard .marga-action-tile h1 {
  color: var(--console-text) !important;
  text-shadow: none !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-active h1,
body.marga-app-page .marga-dashboard .marga-action-tile.is-users h1,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-active h1,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-users h1,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-profile h1 {
  padding-right: 38px;
  font-size: 26px !important;
  line-height: 1.05;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class]:hover {
  border-color: rgba(var(--tile-accent-rgb), 0.34) !important;
  background: var(--dashboard-card-bg-subtle) !important;
  box-shadow:
    var(--dashboard-tile-shadow-hover),
    0 0 0 1px rgba(var(--tile-accent-rgb), 0.04) !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile h1 > i,
body.marga-app-page .marga-dashboard .marga-action-tile > a > div:last-child > i {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  background: var(--tile-accent) !important;
  box-shadow: var(--dashboard-icon-shadow) !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-add h1 > i,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-generate h1 > i,
body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-add h1 > i {
  font-size: 14px !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile.is-add > a > div:last-child > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-generate > a > div:last-child > i,
body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add > a > div:last-child > i {
  display: none !important;
}

body.marga-app-page .marga-dashboard .marga-action-tile > a:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px var(--tile-accent);
}

body.marga-app-page .marga-dashboard .marga-chart-card,
body.marga-app-page .marga-dashboard #r_3 .card {
  overflow: hidden;
  background: var(--dashboard-card-bg) !important;
}

body.marga-app-page .marga-dashboard .marga-chart-card {
  display: flex;
  flex-direction: column;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-body {
  display: flex;
  min-height: 0;
  flex: 1;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-header h3,
body.marga-app-page .marga-dashboard #r_3 .card-header h3,
body.marga-app-page .marga-dashboard #r_3 .card-header h3 > a {
  display: flex !important;
  min-height: 30px;
  align-items: center;
  gap: 9px;
}

body.marga-app-page .marga-dashboard #r_3 .card-header h3 > a {
  width: auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--console-text) !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-header h3 > i:first-child,
body.marga-app-page .marga-dashboard #r_3 .card-header h3 > a > i:first-child {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  border: 1px solid rgba(var(--panel-accent-rgb, 56, 189, 248), 0.24);
  border-radius: 7px;
  color: rgb(var(--panel-accent-rgb, 56, 189, 248)) !important;
  background: rgba(var(--panel-accent-rgb, 56, 189, 248), 0.11);
  box-shadow: none;
  font-size: 13px;
}

body.marga-app-page .marga-dashboard #r_3 .card-header h3 > a {
  --panel-accent-rgb: 56, 189, 248;
}

body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
  width: 100%;
  height: 100% !important;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background-color: rgba(5, 13, 24, 0.18);
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.08);
}

body.marga-app-page .marga-dashboard .highcharts-plot-background {
  fill: transparent !important;
}

body.marga-app-page .marga-dashboard .marga-income-card,
body.marga-app-page .marga-dashboard #r_4 .box {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  background: var(--dashboard-card-bg) !important;
}

body.marga-app-page .marga-dashboard .marga-income-card::before,
body.marga-app-page .marga-dashboard #r_4 .box::before {
  display: none !important;
  position: absolute;
  top: -1px;
  left: 16px;
  width: 64px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #34d399, transparent);
  content: "";
}

body.marga-app-page .marga-dashboard .marga-income-card .box-group,
body.marga-app-page .marga-dashboard #r_4 .box-group {
  display: grid;
  min-height: 104px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  box-sizing: border-box;
  padding: 14px 15px;
}

body.marga-app-page .marga-dashboard .marga-income-card .box-group-icon,
body.marga-app-page .marga-dashboard #r_4 .box-group-icon {
  display: inline-flex;
  width: 34px !important;
  height: 34px !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px !important;
  color: #ffffff !important;
  background: #059669 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

body.marga-app-page .marga-dashboard .marga-income-card .box-group-icon i,
body.marga-app-page .marga-dashboard #r_4 .box-group-icon i {
  margin: 0;
  line-height: 1;
}

body.marga-app-page .marga-dashboard .marga-income-card .box-group-area,
body.marga-app-page .marga-dashboard #r_4 .box-group-area {
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
  color: var(--console-text-secondary);
}

body.marga-app-page .marga-dashboard .marga-income-card #reloadLreport,
body.marga-app-page .marga-dashboard #r_4 #reloadLreport {
  color: var(--console-text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}

body.marga-app-page .marga-dashboard .marga-income-card #reloadLreport strong,
body.marga-app-page .marga-dashboard .marga-income-card #reloadLreport b,
body.marga-app-page .marga-dashboard #r_4 #reloadLreport strong,
body.marga-app-page .marga-dashboard #r_4 #reloadLreport b {
  color: var(--console-text);
  font-weight: 650;
}

body.marga-app-page .marga-dashboard #r_3 .table th,
body.marga-app-page .marga-dashboard #r_3 .table td {
  border-color: var(--console-border-soft) !important;
}

body.marga-app-page .marga-dashboard #r_3 .card-body {
  background: transparent;
}

body.marga-app-page .marga-dashboard #r_3 #loader,
body.marga-app-page .marga-dashboard .marga-income-card #loader,
body.marga-app-page .marga-dashboard #r_4 #loader {
  color: var(--console-text-muted);
  font-size: 11px;
  font-weight: 500;
}

body.marga-app-page .marga-dashboard #r_3 #loader .fa-spin,
body.marga-app-page .marga-dashboard .marga-income-card #loader .fa-spin,
body.marga-app-page .marga-dashboard #r_4 #loader .fa-spin {
  margin-right: 6px;
  color: var(--console-brand);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-time {
  --enterprise-accent: #0369a1;
  --enterprise-accent-soft: rgba(3, 105, 161, 0.08);
  --enterprise-accent-glow: rgba(3, 105, 161, 0.1);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-board {
  --enterprise-accent: #6d28d9;
  --enterprise-accent-soft: rgba(109, 40, 217, 0.08);
  --enterprise-accent-glow: rgba(109, 40, 217, 0.1);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-resource {
  --enterprise-accent: #15803d;
  --enterprise-accent-soft: rgba(21, 128, 61, 0.08);
  --enterprise-accent-glow: rgba(21, 128, 61, 0.1);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  background: #15803d !important;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-badge {
  color: var(--console-pppoe-text);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-online,
body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-income-card .box-group-icon,
body.mikhmon-theme-light.marga-app-page .marga-dashboard #r_4 .box-group-icon {
  color: var(--console-success-text) !important;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-income-card .box-group-icon,
body.mikhmon-theme-light.marga-app-page .marga-dashboard #r_4 .box-group-icon {
  color: #ffffff !important;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-summary-group.is-hotspot .marga-summary-heading i {
  border-color: rgba(3, 105, 161, 0.2);
  color: #0369a1;
  background: rgba(3, 105, 161, 0.08);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-chart-card .card-header h3 {
  --panel-accent-rgb: 3, 105, 161;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard #r_3 .card-header h3 > a {
  --panel-accent-rgb: 3, 105, 161;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-active {
  --tile-accent: #0369a1;
  --tile-accent-rgb: 3, 105, 161;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-users {
  --tile-accent: #047857;
  --tile-accent-rgb: 4, 120, 87;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-add {
  --tile-accent: #b45309;
  --tile-accent-rgb: 180, 83, 9;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-generate {
  --tile-accent: #be185d;
  --tile-accent-rgb: 190, 24, 93;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-active {
  --tile-accent: #0e7490;
  --tile-accent-rgb: 14, 116, 144;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-users {
  --tile-accent: #6d28d9;
  --tile-accent-rgb: 109, 40, 217;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-add {
  --tile-accent: #c2410c;
  --tile-accent-rgb: 194, 65, 12;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-profile {
  --tile-accent: #7e22ce;
  --tile-accent-rgb: 126, 34, 206;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
  background-color: rgba(241, 245, 249, 0.72);
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-list i {
  --board-icon-rgb: 109, 40, 217;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(1) > i {
  --board-icon-rgb: 14, 165, 233;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(2) > i {
  --board-icon-rgb: 139, 92, 246;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(3) > i {
  --board-icon-rgb: 20, 184, 166;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(4) > i {
  --board-icon-rgb: 245, 158, 11;
}

body.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(5) > i {
  --board-icon-rgb: 236, 72, 153;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(1) > i {
  --board-icon-rgb: 3, 105, 161;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(2) > i {
  --board-icon-rgb: 109, 40, 217;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(3) > i {
  --board-icon-rgb: 15, 118, 110;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(4) > i {
  --board-icon-rgb: 180, 83, 9;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-enterprise-list > div:nth-child(5) > i {
  --board-icon-rgb: 190, 24, 93;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-circular-progress.is-cpu {
  color: #0369a1;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-circular-progress.is-ram {
  color: #15803d;
}

body.mikhmon-theme-light.marga-app-page .marga-dashboard .marga-circular-progress.is-hdd {
  color: #6d28d9;
}

@media screen and (max-width: 1199px) {
  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    height: 320px !important;
  }
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-card,
  body.marga-app-page .marga-dashboard .marga-service-card,
  body.marga-app-page .marga-dashboard .marga-chart-card,
  body.marga-app-page .marga-dashboard .marga-income-card,
  body.marga-app-page .marga-dashboard #r_4 .box,
  body.marga-app-page .marga-dashboard #r_3 .card {
    border-radius: 11px !important;
    box-shadow:
      var(--dashboard-card-shadow-mobile),
      inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-list div {
    grid-template-columns: 22px minmax(82px, 1fr) minmax(0, 1.1fr);
  }

  body.marga-app-page .marga-dashboard .marga-summary-heading {
    margin-bottom: 10px;
  }

  body.marga-app-page .marga-dashboard .marga-action-tile > a {
    padding: 13px 14px !important;
  }

  body.marga-app-page .marga-dashboard .marga-action-tile.is-active h1,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-users h1,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-active h1,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-users h1,
  body.marga-app-page .marga-dashboard .marga-action-tile.is-pppoe-profile h1 {
    font-size: 24px !important;
  }

  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    height: 250px !important;
    min-height: 250px;
    background-size: 36px 36px;
  }

  body.marga-app-page .marga-dashboard .marga-income-card .box-group,
  body.marga-app-page .marga-dashboard #r_4 .box-group {
    min-height: 96px;
    padding: 13px 14px;
  }

  body.marga-app-page .marga-dashboard #r_3 .overflow {
    height: 260px !important;
  }
}

@media screen and (max-width: 799px) {
  body.marga-app-page {
    --marga-mobile-nav-gap: 16px;
    --marga-mobile-nav-height: 64px;
    --marga-mobile-nav-offset: 9px;
  }

  body.marga-app-page .marga-mobile-nav {
    bottom: var(--marga-mobile-nav-offset);
    bottom: calc(var(--marga-mobile-nav-offset) + env(safe-area-inset-bottom, 0px));
    height: var(--marga-mobile-nav-height);
  }

  body.marga-app-page #main > .main-container:has(> .marga-dashboard) {
    padding-bottom: 104px;
    padding-bottom: max(
      104px,
      calc(
        var(--marga-mobile-nav-height) +
        var(--marga-mobile-nav-offset) +
        var(--marga-mobile-nav-gap) +
        env(safe-area-inset-bottom, 0px)
      )
    );
  }
}

/* ========================================================================== 
   MARGA.NET mobile dashboard precision pass v11
   Compact multi-column summaries with collision-safe spacing.
   ========================================================================== */

@media screen and (max-width: 767px) {
  body.marga-app-page #main > .main-container:has(> .marga-dashboard) {
    padding-right: 8px;
    padding-left: 8px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    gap: 8px !important;
    padding: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 30px;
    gap: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    font-size: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-time-grid {
    gap: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 76px;
    padding: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    font-size: 28px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    padding: 8px 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-board .marga-enterprise-list div {
    min-height: 30px;
    grid-template-columns: 22px minmax(74px, 1fr) minmax(0, 1.05fr);
    padding: 4px 1px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-list strong {
    font-size: 11px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-rings {
    gap: 4px !important;
    margin-top: 0 !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 74px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 50px !important;
    height: 50px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 17px !important;
    font-size: 16px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div {
    padding: 7px 6px 2px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary strong {
    font-size: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .card-body {
    padding: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-quick-grid {
    gap: 0 !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-group.is-hotspot {
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-group + .marga-summary-group {
    padding-top: 10px;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-heading {
    margin-bottom: 8px;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class],
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] > a {
    min-height: 82px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile[class] > a {
    gap: 5px;
    padding: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile > a > div:last-child {
    min-height: 16px;
    padding-right: 31px;
    font-size: 8.5px !important;
    line-height: 1.2;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-active h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-users h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-active h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-users h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-profile h1 {
    font-size: 20px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-add h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-generate h1,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile.is-pppoe-add h1 {
    font-size: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile h1 > i,
  body.marga-app-page .marga-dashboard .marga-service-card .marga-action-tile > a > div:last-child > i {
    top: 8px;
    right: 8px;
    width: 26px !important;
    height: 26px !important;
    flex-basis: 26px !important;
    font-size: 12px !important;
  }
}

@media screen and (min-width: 600px) and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media screen and (max-width: 430px) {
  body.marga-app-page .navbar > .navbar-right {
    justify-content: flex-start;
  }

  body.marga-app-page {
    --marga-mobile-nav-gap: 14px;
    --marga-mobile-nav-height: 58px;
    --marga-mobile-nav-offset: 8px;
  }

  body.marga-app-page .marga-mobile-nav {
    right: 8px;
    left: 8px;
    height: var(--marga-mobile-nav-height);
    padding: 5px;
    border-radius: 16px;
  }

  body.marga-app-page .marga-mobile-nav a {
    border-radius: 12px;
    font-size: 8.5px;
  }

  body.marga-app-page .marga-mobile-nav a i {
    margin-bottom: 2px;
    font-size: 13px;
  }

  body.marga-app-page #main > .main-container:has(> .marga-dashboard) {
    padding-bottom: max(
      92px,
      calc(
        var(--marga-mobile-nav-height) +
        var(--marga-mobile-nav-offset) +
        var(--marga-mobile-nav-gap) +
        env(safe-area-inset-bottom, 0px)
      )
    ) !important;
  }

  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    height: 220px !important;
    min-height: 220px;
  }

  body.marga-app-page .marga-dashboard #r_3 .overflow {
    height: 220px !important;
  }
}

@media screen and (max-width: 319px) {
  body.marga-app-page .marga-dashboard .marga-service-card .marga-summary-items {
    grid-template-columns: 1fr;
  }
}

/* Topbar cleanup v12: keep logout and router selector only. */
body.marga-app-page .navbar-right > .marga-topbar-context.is-online,
body.marga-app-page .navbar-right > select.stheme,
body.marga-app-page .navbar-right > a[title="Idle Timeout"] {
  display: none !important;
}

/* ========================================================================== 
   MARGA.NET responsive viewport and Traffic correction v13
   Keep the mobile sidebar mask in sync and give Highcharts a stable canvas.
   ========================================================================== */

body.marga-app-page .marga-dashboard .marga-chart-card {
  height: auto !important;
  align-self: start;
}

body.marga-app-page .marga-dashboard .marga-chart-card .card-body {
  display: block;
  min-height: 0;
  flex: 0 0 auto;
}

body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
  height: 300px !important;
  min-height: 300px;
  flex: 0 0 300px;
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    height: 280px !important;
    min-height: 280px;
    flex-basis: 280px;
  }
}

@media screen and (max-width: 799px) {
  html,
  body.marga-app-page {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.marga-app-page #main,
  body.marga-app-page #main > .main-container,
  body.marga-app-page .marga-dashboard,
  body.marga-app-page .marga-dashboard .marga-dashboard-layout,
  body.marga-app-page .marga-dashboard .marga-dashboard-main,
  body.marga-app-page .marga-dashboard .marga-dashboard-aside,
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.marga-app-page.marga-sidebar-open:has(.sidenav[style*="width: 0"])::before {
    display: none !important;
    pointer-events: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    height: 220px !important;
    min-height: 220px;
    flex-basis: 220px;
  }
}

@media screen and (max-width: 430px) {
  body.marga-app-page .marga-dashboard .marga-chart-card #trafficMonitor {
    height: 200px !important;
    min-height: 200px;
    flex-basis: 200px;
  }
}

/* Traffic interface selector v14: right-aligned, compact, and touch friendly. */
body.marga-app-page .marga-dashboard .marga-chart-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.marga-app-page .marga-dashboard .marga-traffic-interface-control {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

body.marga-app-page .marga-dashboard .marga-traffic-interface-control > span {
  color: var(--console-text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.marga-app-page .marga-dashboard .marga-traffic-interface-control > span i {
  margin-right: 4px;
  color: var(--console-info);
}

body.marga-app-page .marga-dashboard #margaTrafficInterface {
  width: 190px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 30px 0 11px;
  border: 1px solid var(--console-border);
  border-radius: 8px;
  outline: 0;
  color: var(--console-text);
  background-color: var(--console-surface-alt);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

body.marga-app-page .marga-dashboard #margaTrafficInterface:hover {
  border-color: var(--console-border-active);
}

body.marga-app-page .marga-dashboard #margaTrafficInterface:focus-visible {
  border-color: var(--console-brand);
  box-shadow: 0 0 0 3px var(--console-brand-soft);
}

body.marga-app-page .marga-dashboard #margaTrafficInterface option {
  color: var(--console-text);
  background: var(--console-surface);
}

@media screen and (max-width: 430px) {
  body.marga-app-page .marga-dashboard .marga-chart-card .card-header {
    gap: 8px;
  }

  body.marga-app-page .marga-dashboard .marga-traffic-interface-control > span {
    display: none;
  }

  body.marga-app-page .marga-dashboard #margaTrafficInterface {
    width: min(148px, 46vw);
    height: 32px;
    padding-right: 25px;
    padding-left: 9px;
    font-size: 9.5px;
  }
}

/* Two-card overview v16: vivid accents and a compact side-by-side mobile layout. */
body.marga-app-page .marga-dashboard .marga-enterprise-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card {
  --overview-accent: #38bdf8;
  --overview-rgb: 56, 189, 248;
  min-height: 224px !important;
  border-color: rgba(var(--overview-rgb), 0.28) !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.15), transparent 38%),
    linear-gradient(145deg, rgba(15, 30, 51, 0.98), rgba(8, 21, 37, 0.99)) !important;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(var(--overview-rgb), 0.07),
    inset 0 1px rgba(255, 255, 255, 0.045) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource {
  --overview-accent: #34d399;
  --overview-rgb: 52, 211, 153;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::before {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  width: auto;
  height: 2px;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--overview-accent), rgba(var(--overview-rgb), 0.08) 78%, transparent);
  content: "";
  pointer-events: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
  position: absolute;
  top: -74px;
  right: -64px;
  display: block;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(var(--overview-rgb), 0.12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--overview-rgb), 0.16), transparent 64%);
  content: "";
  pointer-events: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: rgba(var(--overview-rgb), 0.52) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.2), transparent 40%),
    linear-gradient(145deg, rgba(17, 35, 58, 0.99), rgba(9, 23, 40, 0.99)) !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.24),
    0 0 28px rgba(var(--overview-rgb), 0.12) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card .marga-enterprise-icon {
  border-color: rgba(var(--overview-rgb), 0.34) !important;
  color: var(--overview-accent) !important;
  background: linear-gradient(145deg, rgba(var(--overview-rgb), 0.22), rgba(var(--overview-rgb), 0.08)) !important;
  box-shadow: 0 7px 18px rgba(var(--overview-rgb), 0.12), inset 0 1px rgba(255, 255, 255, 0.08) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card .marga-enterprise-badge {
  border-color: rgba(var(--overview-rgb), 0.25) !important;
  color: var(--overview-accent) !important;
  background: rgba(var(--overview-rgb), 0.1) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value,
body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
  border-color: rgba(var(--overview-rgb), 0.15) !important;
  background: rgba(var(--overview-rgb), 0.045) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
  text-shadow: 0 0 24px rgba(var(--overview-rgb), 0.2);
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 206px !important;
    gap: 6px !important;
    padding: 8px !important;
    border-radius: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 34px;
    align-items: center;
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    display: -webkit-box !important;
    overflow: hidden;
    font-size: 10.5px !important;
    line-height: 1.15 !important;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-badge {
    display: none !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 58px;
    padding: 7px !important;
    border-radius: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    margin-top: 4px !important;
    font-size: clamp(18px, 5.9vw, 24px) !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    min-width: 0;
    padding: 6px !important;
    border-radius: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value span,
  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value span,
  body.marga-app-page .marga-dashboard .marga-resource-summary span {
    overflow: hidden;
    font-size: 7.5px !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
    overflow: hidden;
    margin-top: 4px !important;
    font-size: 9px !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.marga-app-page .marga-dashboard .marga-resource-rings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 54px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 36px !important;
    height: 36px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 11px !important;
    font-size: 11px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong span,
  body.marga-app-page .marga-dashboard .marga-circular-progress small {
    font-size: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress small {
    margin-top: -2px;
    letter-spacing: 0.04em;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary {
    gap: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div {
    grid-template-columns: minmax(34px, 0.7fr) minmax(0, 1.3fr);
    gap: 4px !important;
    min-height: 25px;
    padding: 4px 1px 2px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary strong {
    overflow: hidden;
    font-size: 8px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media screen and (max-width: 350px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 200px !important;
    padding: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    font-size: 9.5px !important;
  }
}

/* Premium multicolor overview v19: purposeful color accents without changing content. */
body.marga-app-page .marga-dashboard .marga-enterprise-time {
  --overview-accent: #38bdf8;
  --overview-rgb: 56, 189, 248;
  background:
    radial-gradient(circle at 94% 0%, rgba(56, 189, 248, 0.2), transparent 34%),
    radial-gradient(circle at 8% 108%, rgba(139, 92, 246, 0.15), transparent 40%),
    linear-gradient(135deg, rgba(11, 35, 58, 0.99), rgba(10, 22, 41, 0.99) 54%, rgba(28, 18, 54, 0.96)) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource {
  --overview-accent: #34d399;
  --overview-rgb: 52, 211, 153;
  background:
    radial-gradient(circle at 94% 0%, rgba(52, 211, 153, 0.2), transparent 34%),
    radial-gradient(circle at 4% 110%, rgba(34, 211, 238, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(8, 39, 48, 0.99), rgba(7, 25, 39, 0.99) 55%, rgba(12, 26, 50, 0.98)) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-size: 220% 100%;
  animation: margaPremiumAccent 7s ease-in-out infinite alternate;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before {
  background-image: linear-gradient(90deg, #22d3ee, #3b82f6 36%, #8b5cf6 68%, #f472b6, #22d3ee);
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-image: linear-gradient(90deg, #22c55e, #2dd4bf 38%, #38bdf8 68%, #a78bfa, #22c55e);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon {
  border-color: rgba(56, 189, 248, 0.48) !important;
  color: #e0f2fe !important;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.48), rgba(124, 58, 237, 0.32)) !important;
  box-shadow: 0 7px 18px rgba(14, 165, 233, 0.2), inset 0 1px rgba(255, 255, 255, 0.14) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  border-color: rgba(52, 211, 153, 0.46) !important;
  color: #d1fae5 !important;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.46), rgba(6, 182, 212, 0.28)) !important;
  box-shadow: 0 7px 18px rgba(16, 185, 129, 0.2), inset 0 1px rgba(255, 255, 255, 0.14) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-badge {
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #7dd3fc !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(124, 58, 237, 0.12)) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-badge {
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #86efac !important;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(20, 184, 166, 0.12)) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-primary-value {
  border-color: rgba(56, 189, 248, 0.3) !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.13), rgba(59, 130, 246, 0.045)) !important;
  box-shadow: inset 3px 0 #38bdf8, 0 4px 14px rgba(14, 165, 233, 0.06);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-primary-value strong {
  color: transparent !important;
  background: linear-gradient(90deg, #ffffff, #7dd3fc 58%, #c4b5fd);
  background-clip: text;
  text-shadow: none;
  -webkit-background-clip: text;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(2) {
  border-color: rgba(167, 139, 250, 0.28) !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(139, 92, 246, 0.035)) !important;
  box-shadow: inset 2px 0 #8b5cf6;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(2) span {
  color: #c4b5fd;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(3) {
  border-color: rgba(251, 191, 36, 0.25) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.11), rgba(251, 191, 36, 0.025)) !important;
  box-shadow: inset 2px 0 #f59e0b;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(3) span {
  color: #fcd34d;
}

body.marga-app-page .marga-dashboard .marga-circular-progress {
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 10px;
  background: radial-gradient(circle, color-mix(in srgb, currentColor 12%, transparent), transparent 68%);
}

body.marga-app-page .marga-dashboard .marga-circular-progress.is-cpu {
  color: #38bdf8;
}

body.marga-app-page .marga-dashboard .marga-circular-progress.is-ram {
  color: #34d399;
}

body.marga-app-page .marga-dashboard .marga-circular-progress.is-hdd {
  color: #a78bfa;
}

body.marga-app-page .marga-dashboard .marga-resource-summary {
  gap: 5px !important;
  border-top: 0;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div {
  border: 1px solid rgba(148, 163, 184, 0.09) !important;
  border-radius: 7px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1) {
  border-color: rgba(251, 191, 36, 0.2) !important;
  background: rgba(245, 158, 11, 0.075);
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1) span,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1) strong {
  color: #fcd34d;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2) {
  border-color: rgba(34, 211, 238, 0.2) !important;
  background: rgba(6, 182, 212, 0.075);
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2) span,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2) strong {
  color: #67e8f9;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) {
  border-color: rgba(167, 139, 250, 0.22) !important;
  background: rgba(139, 92, 246, 0.08);
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) span,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) strong {
  color: #c4b5fd;
}

@keyframes margaPremiumAccent {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
  body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
    animation: none;
  }
}

/* Premium clean overview v21: restrained color, stronger hierarchy, no rainbow motion. */
body.marga-app-page .marga-dashboard .marga-enterprise-card {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.085), transparent 34%),
    linear-gradient(180deg, #101e30 0%, #0c1828 100%) !important;
  box-shadow:
    0 8px 20px rgba(1, 7, 18, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.035) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: rgba(var(--overview-rgb), 0.38) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.11), transparent 36%),
    linear-gradient(180deg, #122238 0%, #0d1a2b 100%) !important;
  box-shadow: 0 11px 24px rgba(1, 7, 18, 0.28) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  height: 2px;
  background-size: 100% 100%;
  box-shadow: none;
  animation: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before {
  background-image: linear-gradient(90deg, #38bdf8, #6366f1 72%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-image: linear-gradient(90deg, #34d399, #22d3ee 72%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
  top: -58px;
  right: -46px;
  width: 118px;
  height: 118px;
  border-color: rgba(var(--overview-rgb), 0.07);
  background: radial-gradient(circle, rgba(var(--overview-rgb), 0.075), transparent 68%);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  box-shadow: none !important;
}

/* Dashboard overview v25: polished two-card system overview. */
body.marga-app-page .marga-dashboard .marga-enterprise-overview {
  gap: 12px !important;
  margin-bottom: 12px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card {
  min-height: 218px !important;
  gap: 12px !important;
  padding: 14px !important;
  border-width: 1px !important;
  border-color: rgba(var(--overview-rgb), 0.3) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.2), transparent 37%),
    radial-gradient(circle at 0% 110%, rgba(var(--overview-rgb), 0.08), transparent 38%),
    linear-gradient(145deg, #10243a 0%, #0b1829 58%, #091522 100%) !important;
  box-shadow:
    0 12px 30px rgba(1, 7, 18, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.015) inset !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: rgba(var(--overview-rgb), 0.48) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.24), transparent 39%),
    radial-gradient(circle at 0% 110%, rgba(var(--overview-rgb), 0.1), transparent 40%),
    linear-gradient(145deg, #122943 0%, #0c1c30 58%, #0a1726 100%) !important;
  box-shadow:
    0 15px 34px rgba(1, 7, 18, 0.34),
    0 0 24px rgba(var(--overview-rgb), 0.08) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time {
  --overview-accent: #38bdf8;
  --overview-rgb: 56, 189, 248;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource {
  --overview-accent: #34d399;
  --overview-rgb: 52, 211, 153;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  height: 3px;
  background-size: 100% 100%;
  box-shadow: 0 0 16px rgba(var(--overview-rgb), 0.22);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before {
  background-image: linear-gradient(90deg, #22d3ee, #3b82f6 56%, #8b5cf6 86%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-image: linear-gradient(90deg, #34d399, #22d3ee 60%, #38bdf8 86%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
  top: -66px;
  right: -54px;
  width: 142px;
  height: 142px;
  border-color: rgba(var(--overview-rgb), 0.1);
  background: radial-gradient(circle, rgba(var(--overview-rgb), 0.12), transparent 68%);
}

body.marga-app-page .marga-dashboard .marga-enterprise-head {
  min-height: 34px;
  gap: 9px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-icon,
body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-color: rgba(var(--overview-rgb), 0.42) !important;
  border-radius: 10px !important;
  color: #f8fafc !important;
  background: linear-gradient(145deg, rgba(var(--overview-rgb), 0.5), rgba(var(--overview-rgb), 0.18)) !important;
  box-shadow:
    0 7px 18px rgba(var(--overview-rgb), 0.17),
    inset 0 1px rgba(255, 255, 255, 0.16) !important;
  font-size: 15px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
  color: #f8fafc;
  font-size: 14px !important;
  font-weight: 700;
  letter-spacing: -0.015em;
}

body.marga-app-page .marga-dashboard .marga-enterprise-badge {
  min-height: 23px !important;
  padding: 0 8px !important;
  border-color: rgba(var(--overview-rgb), 0.28) !important;
  color: var(--overview-accent) !important;
  background: rgba(var(--overview-rgb), 0.1) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
  min-height: 82px;
  padding: 12px 13px !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.13), rgba(59, 130, 246, 0.035)) !important;
  box-shadow: inset 3px 0 #38bdf8;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
  font-size: clamp(28px, 2.5vw, 34px) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
  padding: 9px 10px !important;
  border-radius: 10px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(2) {
  border-color: rgba(139, 92, 246, 0.24) !important;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.025)) !important;
  box-shadow: inset 2px 0 #8b5cf6;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(3) {
  border-color: rgba(245, 158, 11, 0.24) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.09), rgba(245, 158, 11, 0.02)) !important;
  box-shadow: inset 2px 0 #f59e0b;
}

body.marga-app-page .marga-dashboard .marga-resource-rings {
  gap: 8px !important;
  margin-top: 0 !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress {
  min-height: 76px !important;
  border-color: rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
}

body.marga-app-page .marga-dashboard .marga-circular-progress svg {
  width: 52px !important;
  height: 52px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress strong {
  top: 17px !important;
  font-size: 15px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress strong span {
  font-size: 8px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress small {
  margin-top: -3px !important;
  font-size: 9px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 6px !important;
  border-top: 0;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div {
  min-height: 39px;
  padding: 7px 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.1) !important;
  border-radius: 9px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 10px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin-bottom: 9px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 186px !important;
    gap: 6px !important;
    padding: 9px !important;
    border-radius: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
    top: -49px;
    right: -42px;
    width: 105px;
    height: 105px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 29px;
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    display: block !important;
    overflow: hidden;
    font-size: 10px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-badge {
    display: none !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-time-grid {
    gap: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 56px;
    padding: 7px 8px !important;
    border-radius: 9px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    margin-top: 4px !important;
    font-size: clamp(19px, 5.7vw, 23px) !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    min-height: 42px;
    padding: 6px !important;
    border-radius: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value span,
  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value span,
  body.marga-app-page .marga-dashboard .marga-resource-summary span {
    font-size: 7.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
    margin-top: 4px !important;
    font-size: 8.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-rings {
    gap: 3px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 53px !important;
    border-radius: 9px;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 36px !important;
    height: 36px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 11px !important;
    font-size: 11px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong span,
  body.marga-app-page .marga-dashboard .marga-circular-progress small {
    font-size: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div {
    min-height: 29px;
    padding: 5px 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child {
    grid-column: 1 / -1;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary strong {
    margin-top: 2px;
    font-size: 8px !important;
  }
}

@media screen and (max-width: 350px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 170px !important;
    gap: 5px !important;
    padding: 7px !important;
    border-radius: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 27px;
    gap: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
    width: 27px !important;
    height: 27px !important;
    flex-basis: 27px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    font-size: 0 !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3::after {
    color: #f8fafc;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-head h3::after {
    content: "Date & Time";
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-head h3::after {
    content: "Resources";
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 53px;
    padding: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    font-size: 19px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    min-height: 39px;
    padding: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value span {
    font-size: 0 !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value span::after {
    font-size: 7px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value:nth-child(2) span::after {
    content: "Date";
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value:nth-child(3) span::after {
    content: "Uptime";
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
    font-size: 7.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 49px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 33px !important;
    height: 33px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 10px !important;
    font-size: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-column: auto;
    align-items: center;
    gap: 6px;
    min-height: 28px;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child strong {
    margin-top: 0;
    text-align: right;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(n + 2) {
    display: none !important;
  }
}

/* Dashboard lower layout v27: place Income directly below Traffic. */
@media screen and (min-width: 1200px) {
  body.marga-app-page .marga-dashboard .marga-dashboard-layout {
    grid-template-areas:
      "summary summary"
      "traffic activity"
      "income activity";
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-main #r_2 {
    grid-area: summary;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-main .marga-chart-card {
    grid-area: traffic;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside {
    display: contents;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside #r_4 {
    grid-area: income;
  }

  body.marga-app-page .marga-dashboard .marga-dashboard-aside #r_3 {
    grid-area: activity;
  }
}

/* Application-wide compact polish v26: presentation only. */
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) {
  padding: 12px 16px 30px;
}

body.marga-app-page .marga-page-intro {
  min-height: 72px;
  margin: 0 0 10px;
  padding: 12px 16px;
  border-color: rgba(99, 102, 241, 0.24);
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 96% 0%, rgba(34, 211, 238, 0.11), transparent 32%),
    linear-gradient(135deg, rgba(21, 30, 61, 0.98), rgba(12, 20, 39, 0.98));
  box-shadow: 0 8px 22px rgba(1, 7, 18, 0.2);
}

body.marga-app-page .marga-page-intro::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, #38bdf8, #8b5cf6);
  content: "";
}

body.marga-app-page .marga-eyebrow {
  font-size: 8px;
  letter-spacing: 0.11em;
}

body.marga-app-page .marga-page-intro h1 {
  margin: 3px 0 2px;
  font-size: 22px;
  line-height: 1.15;
}

body.marga-app-page .marga-page-intro p {
  font-size: 11px;
  line-height: 1.4;
}

body.marga-app-page .marga-page-intro-meta {
  gap: 7px;
}

body.marga-app-page .marga-live-dot,
body.marga-app-page .marga-workspace-pill {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 9px;
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card {
  margin: 7px 0;
  border-color: rgba(126, 141, 194, 0.2);
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.055), transparent 30%),
    linear-gradient(180deg, rgba(18, 25, 48, 0.99), rgba(12, 18, 36, 0.99));
  box-shadow: 0 9px 24px rgba(1, 7, 18, 0.19);
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header {
  min-height: 46px;
  padding: 9px 13px;
  border-bottom-color: rgba(126, 141, 194, 0.14);
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3,
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header .card-title {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
  line-height: 1.2;
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i:first-child {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 8px;
  color: #c4b5fd;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.09));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-users,
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-user-plus {
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.22), rgba(59, 130, 246, 0.07));
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-sitemap,
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-area-chart {
  border-color: rgba(45, 212, 191, 0.3);
  color: #5eead4;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.2), rgba(14, 165, 233, 0.07));
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-money {
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.2), rgba(34, 197, 94, 0.06));
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-info-circle,
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > i.fa-book {
  border-color: rgba(251, 191, 36, 0.3);
  color: #fcd34d;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.18), rgba(249, 115, 22, 0.05));
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > a,
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header h3 > span a {
  min-height: 29px;
  margin: 0;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 9px;
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-body {
  padding: 13px 14px 14px;
}

body.marga-app-page .marga-data-toolbar {
  margin-bottom: 10px !important;
  padding: 10px !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.014);
}

body.marga-app-page .marga-data-card .marga-data-table {
  border-spacing: 0 5px !important;
}

body.marga-app-page .marga-data-card .marga-data-table thead th {
  padding: 5px 9px 6px;
  font-size: 8px;
}

body.marga-app-page .marga-data-card .marga-data-table tbody td {
  padding: 9px 10px;
  font-size: 10px;
  line-height: 1.35;
}

body.marga-app-page .marga-data-card .marga-data-table tbody td:first-child {
  border-radius: 10px 0 0 10px;
}

body.marga-app-page .marga-data-card .marga-data-table tbody td:last-child {
  border-radius: 0 10px 10px 0;
}

body.marga-app-page .marga-form-card > .card-body {
  padding: 14px;
}

body.marga-app-page .marga-form-card form > div:first-child {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

body.marga-app-page .marga-form-grid tbody {
  gap: 8px;
}

body.marga-app-page .marga-form-grid tr {
  padding: 9px 10px;
  border-radius: 11px;
}

body.marga-app-page .marga-form-grid td:first-child {
  margin-bottom: 5px;
  font-size: 9px;
}

body.marga-app-page .form-control,
body.marga-app-page .group-item,
body.marga-app-page select,
body.marga-app-page textarea,
body.marga-app-page input[type="text"],
body.marga-app-page input[type="password"],
body.marga-app-page input[type="number"],
body.marga-app-page input[type="date"],
body.marga-app-page input[type="time"] {
  min-height: 38px;
  border-radius: 9px;
  font-size: 11px;
}

body.marga-app-page .btn,
body.marga-app-page button,
body.marga-app-page input[type="submit"],
body.marga-app-page input[type="button"] {
  min-height: 36px;
  padding-right: 12px;
  padding-left: 12px;
  border-radius: 9px;
  font-size: 10px;
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) #d_interface {
  width: min(220px, 100%);
  min-height: 36px;
  margin: 0 0 8px auto;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(126, 141, 194, 0.2);
  border-radius: 9px;
  background-color: var(--marga-field);
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) #trafficMonitor {
  height: 350px !important;
  min-height: 350px;
}

body.marga-app-page .main-container:not(:has(> .marga-dashboard)) #trafficMonitor .highcharts-container,
body.marga-app-page .main-container:not(:has(> .marga-dashboard)) #trafficMonitor .highcharts-root {
  height: 100% !important;
}

@media screen and (min-width: 900px) {
  body.marga-app-page .marga-form-grid tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 800px) {
  body.marga-app-page:not(.marga-admin-settings-page) {
    --marga-topbar-height: 58px;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar {
    height: var(--marga-topbar-height);
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar > .navbar-left {
    position: relative;
    display: flex;
    width: 100%;
    height: var(--marga-topbar-height);
    float: none;
    box-sizing: border-box;
    padding-right: 132px;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .marga-app-brand {
    width: 145px;
    min-width: 145px;
    height: var(--marga-topbar-height);
  }

  body.marga-app-page:not(.marga-admin-settings-page) #openNav,
  body.marga-app-page:not(.marga-admin-settings-page) #closeNav {
    position: static;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin: 11px 4px;
    line-height: 34px;
  }

  body.marga-app-page:not(.marga-admin-settings-page) #cpage {
    display: none !important;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar > .navbar-right {
    position: absolute;
    top: 0;
    right: 6px;
    left: auto;
    display: flex;
    width: auto;
    height: var(--marga-topbar-height);
    float: none;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding: 0;
    overflow: visible;
    border-top: 0;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right #logout,
  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right .ses,
  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right select {
    height: 34px;
    margin: 0;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right select.ses:not(.stheme) {
    width: 86px;
    max-width: 86px;
    padding: 0 20px 0 7px;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right #logout {
    width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right #logout i {
    margin: 0;
    font-size: 12px;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .sidenav {
    height: calc(100% - var(--marga-topbar-height));
    margin-top: var(--marga-topbar-height);
  }

  body.marga-app-page:not(.marga-admin-settings-page) #main {
    margin-top: var(--marga-topbar-height);
  }

  body.marga-app-page .main-container:not(:has(> .marga-dashboard)) {
    padding: 10px 8px 90px;
  }

  body.marga-app-page .marga-page-intro {
    min-height: 0;
    margin: 0 2px 8px;
    padding: 11px 13px;
    border-radius: 11px !important;
  }

  body.marga-app-page .marga-page-intro h1 {
    margin: 3px 0 2px;
    font-size: 20px;
  }

  body.marga-app-page .marga-page-intro p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card {
    margin: 6px 2px;
    border-radius: 11px !important;
  }

  body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-header {
    min-height: 44px;
    padding: 8px 11px;
  }

  body.marga-app-page .main-container:not(:has(> .marga-dashboard)) .card-body,
  body.marga-app-page .marga-form-card > .card-body {
    padding: 11px;
  }

  body.marga-app-page .marga-form-grid tbody {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px;
  }

  body.marga-app-page .marga-form-grid tr {
    min-width: 0;
    padding: 8px 9px;
  }

  body.marga-app-page .marga-form-card form > div:first-child {
    top: 58px;
    margin: -3px -3px 9px;
    padding: 7px 3px 9px;
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody tr {
    margin-bottom: 8px;
    border-radius: 11px;
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody td {
    min-height: 32px;
    grid-template-columns: minmax(96px, 36%) minmax(0, 1fr);
    padding: 6px 9px;
    font-size: 9px;
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody td::before {
    font-size: 7px;
  }

  body.marga-app-page .marga-data-card .marga-data-table tbody td.marga-empty-cell {
    display: none !important;
  }

  body.marga-app-page .marga-data-toolbar {
    padding: 8px !important;
  }

  body.marga-app-page .main-container:not(:has(> .marga-dashboard)) #d_interface {
    width: 100%;
    margin-bottom: 7px;
  }

  body.marga-app-page .main-container:not(:has(> .marga-dashboard)) #trafficMonitor {
    height: 260px !important;
    min-height: 260px;
  }
}

@media screen and (max-width: 340px) {
  body.marga-app-page:not(.marga-admin-settings-page) .navbar > .navbar-left {
    padding-right: 128px;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .marga-app-brand {
    width: 46px;
    min-width: 46px;
    padding: 0 6px !important;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .marga-brand-copy {
    display: none;
  }

  body.marga-app-page:not(.marga-admin-settings-page) .navbar-right select.ses:not(.stheme) {
    width: 80px;
    max-width: 80px;
  }

  body.marga-app-page .marga-page-intro {
    padding: 10px 11px;
  }

  body.marga-app-page .marga-page-intro h1 {
    font-size: 18px;
  }
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon {
  border-color: rgba(56, 189, 248, 0.34) !important;
  color: #7dd3fc !important;
  background: rgba(14, 165, 233, 0.13) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  border-color: rgba(52, 211, 153, 0.32) !important;
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-badge,
body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-badge {
  background: transparent !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
  border-color: rgba(56, 189, 248, 0.2) !important;
  background: rgba(7, 20, 34, 0.5) !important;
  box-shadow: inset 2px 0 #38bdf8;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-primary-value strong {
  color: #f8fafc !important;
  background: none;
  background-clip: border-box;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.13);
  -webkit-background-clip: border-box;
}

body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
  border-color: rgba(148, 163, 184, 0.11) !important;
  background: rgba(7, 20, 34, 0.28) !important;
  box-shadow: none !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(2) {
  border-left: 2px solid #8b5cf6 !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(3) {
  border-left: 2px solid #f59e0b !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(2) span {
  color: #a7b4c5;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-mini-value:nth-child(3) span {
  color: #a7b4c5;
}

body.marga-app-page .marga-dashboard .marga-circular-progress {
  border-color: rgba(148, 163, 184, 0.07);
  background: rgba(6, 17, 29, 0.27);
}

body.marga-app-page .marga-dashboard .marga-resource-summary {
  gap: 4px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1),
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2),
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) {
  border: 1px solid rgba(148, 163, 184, 0.09) !important;
  background: rgba(6, 17, 29, 0.28);
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1) {
  box-shadow: inset 0 2px #f59e0b;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2) {
  box-shadow: inset 0 2px #22d3ee;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) {
  box-shadow: inset 0 2px #8b5cf6;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1) span,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2) span,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) span {
  color: #7f8da1;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1) strong,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2) strong,
body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) strong {
  color: #e8eef8;
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-resource-summary {
    gap: 2px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(1),
  body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(2),
  body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) {
    box-shadow: inset 0 1px currentColor;
  }
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-circular-progress {
    border-radius: 7px;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary {
    gap: 2px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div {
    border-radius: 5px !important;
  }
}

/* Topbar order v18: keep the session selector before the logout action. */
body.marga-app-page .navbar-right > #logout {
  order: 100;
}

/* Compact overview v17: smaller proportions with stronger visual accents. */
body.marga-app-page .marga-dashboard .marga-enterprise-overview {
  gap: 8px !important;
  margin-bottom: 8px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card {
  min-height: 190px !important;
  gap: 8px !important;
  padding: 11px !important;
  border-color: rgba(var(--overview-rgb), 0.34) !important;
  border-radius: 13px !important;
  background:
    radial-gradient(circle at 96% 4%, rgba(var(--overview-rgb), 0.2), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(var(--overview-rgb), 0.07), transparent 38%),
    linear-gradient(145deg, rgba(15, 32, 54, 0.99), rgba(7, 19, 34, 0.99)) !important;
  box-shadow:
    0 9px 22px rgba(0, 0, 0, 0.22),
    0 0 20px rgba(var(--overview-rgb), 0.09),
    inset 0 1px rgba(255, 255, 255, 0.055) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::before {
  height: 3px;
  background: linear-gradient(90deg, var(--overview-accent), rgba(var(--overview-rgb), 0.42) 46%, transparent 88%);
  box-shadow: 0 0 12px rgba(var(--overview-rgb), 0.32);
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
  top: -68px;
  right: -54px;
  width: 142px;
  height: 142px;
  border-color: rgba(var(--overview-rgb), 0.16);
  background: radial-gradient(circle, rgba(var(--overview-rgb), 0.2), transparent 66%);
}

body.marga-app-page .marga-dashboard .marga-enterprise-head {
  min-height: 30px;
  gap: 8px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-icon {
  width: 30px !important;
  height: 30px !important;
  flex-basis: 30px !important;
  border-radius: 9px !important;
  font-size: 14px !important;
  box-shadow: 0 6px 16px rgba(var(--overview-rgb), 0.2), inset 0 1px rgba(255, 255, 255, 0.1) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
  color: #f8fbff;
  font-size: 13px !important;
  font-weight: 700;
}

body.marga-app-page .marga-dashboard .marga-enterprise-badge {
  min-height: 22px !important;
  padding: 0 7px !important;
  font-size: 8px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time-grid {
  gap: 7px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
  min-height: 70px;
  padding: 9px 11px !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
  margin-top: 4px !important;
  font-size: clamp(25px, 2.2vw, 31px) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
  padding: 7px 9px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-rings {
  gap: 8px !important;
  margin-top: 0 !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress {
  min-height: 61px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress svg {
  width: 46px !important;
  height: 46px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress strong {
  top: 14px !important;
  font-size: 14px !important;
}

body.marga-app-page .marga-dashboard .marga-circular-progress small {
  font-size: 8px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary div {
  padding: 6px 7px 1px !important;
}

body.marga-app-page .marga-dashboard .marga-resource-summary strong {
  margin-top: 3px;
  font-size: 9.5px !important;
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 168px !important;
    gap: 4px !important;
    padding: 7px !important;
    border-radius: 11px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card::before {
    height: 2px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
    top: -54px;
    right: -45px;
    width: 112px;
    height: 112px;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 28px;
    gap: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-icon {
    width: 26px !important;
    height: 26px !important;
    flex-basis: 26px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    font-size: 9.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-time-grid {
    gap: 4px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 46px;
    padding: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    margin-top: 3px !important;
    font-size: clamp(17px, 5.5vw, 21px) !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    padding: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
    margin-top: 3px !important;
    font-size: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 42px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 30px !important;
    height: 30px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 8px !important;
    font-size: 9px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong span,
  body.marga-app-page .marga-dashboard .marga-circular-progress small {
    font-size: 6.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div {
    min-height: 22px;
    padding: 3px 1px 1px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary strong {
    margin-top: 2px;
    font-size: 7.5px !important;
  }
}

@media screen and (max-width: 350px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 164px !important;
    padding: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    font-size: 9px !important;
  }
}

/* Premium multicolor cascade v20: keep the vivid surfaces above compact sizing rules. */
body.marga-app-page .marga-dashboard .marga-enterprise-time {
  background:
    radial-gradient(circle at 94% 0%, rgba(56, 189, 248, 0.2), transparent 34%),
    radial-gradient(circle at 8% 108%, rgba(139, 92, 246, 0.15), transparent 40%),
    linear-gradient(135deg, rgba(11, 35, 58, 0.99), rgba(10, 22, 41, 0.99) 54%, rgba(28, 18, 54, 0.96)) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource {
  background:
    radial-gradient(circle at 94% 0%, rgba(52, 211, 153, 0.2), transparent 34%),
    radial-gradient(circle at 4% 110%, rgba(34, 211, 238, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(8, 39, 48, 0.99), rgba(7, 25, 39, 0.99) 55%, rgba(12, 26, 50, 0.98)) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-size: 220% 100%;
  animation: margaPremiumAccent 7s ease-in-out infinite alternate;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before {
  background-image: linear-gradient(90deg, #22d3ee, #3b82f6 36%, #8b5cf6 68%, #f472b6, #22d3ee);
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-image: linear-gradient(90deg, #22c55e, #2dd4bf 38%, #38bdf8 68%, #a78bfa, #22c55e);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon {
  box-shadow: 0 7px 18px rgba(14, 165, 233, 0.2), inset 0 1px rgba(255, 255, 255, 0.14) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  box-shadow: 0 7px 18px rgba(16, 185, 129, 0.2), inset 0 1px rgba(255, 255, 255, 0.14) !important;
}

@media (prefers-reduced-motion: reduce) {
  body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
  body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
    animation: none;
  }
}

/* Premium clean cascade v22: final guard against legacy vivid overrides. */
body.marga-app-page .marga-dashboard .marga-enterprise-card {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.085), transparent 34%),
    linear-gradient(180deg, #101e30 0%, #0c1828 100%) !important;
  box-shadow:
    0 8px 20px rgba(1, 7, 18, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.035) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: rgba(var(--overview-rgb), 0.38) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.11), transparent 36%),
    linear-gradient(180deg, #122238 0%, #0d1a2b 100%) !important;
  box-shadow: 0 11px 24px rgba(1, 7, 18, 0.28) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  height: 2px;
  background-size: 100% 100%;
  box-shadow: none;
  animation: none;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before {
  background-image: linear-gradient(90deg, #38bdf8, #6366f1 72%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-image: linear-gradient(90deg, #34d399, #22d3ee 72%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-card::after {
  top: -58px;
  right: -46px;
  width: 118px;
  height: 118px;
  border-color: rgba(var(--overview-rgb), 0.07);
  background: radial-gradient(circle, rgba(var(--overview-rgb), 0.075), transparent 68%);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  box-shadow: none !important;
}

/* Dashboard overview v25 final guard: this must stay after legacy cascades. */
body.marga-app-page .marga-dashboard .marga-enterprise-card {
  border-color: rgba(var(--overview-rgb), 0.3) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.2), transparent 37%),
    radial-gradient(circle at 0% 110%, rgba(var(--overview-rgb), 0.08), transparent 38%),
    linear-gradient(145deg, #10243a 0%, #0b1829 58%, #091522 100%) !important;
  box-shadow:
    0 12px 30px rgba(1, 7, 18, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.015) inset !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-card:hover {
  border-color: rgba(var(--overview-rgb), 0.48) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--overview-rgb), 0.24), transparent 39%),
    radial-gradient(circle at 0% 110%, rgba(var(--overview-rgb), 0.1), transparent 40%),
    linear-gradient(145deg, #122943 0%, #0c1c30 58%, #0a1726 100%) !important;
  box-shadow:
    0 15px 34px rgba(1, 7, 18, 0.34),
    0 0 24px rgba(var(--overview-rgb), 0.08) !important;
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before,
body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  height: 3px;
  box-shadow: 0 0 16px rgba(var(--overview-rgb), 0.22);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time::before {
  background-image: linear-gradient(90deg, #22d3ee, #3b82f6 56%, #8b5cf6 86%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-resource::before {
  background-image: linear-gradient(90deg, #34d399, #22d3ee 60%, #38bdf8 86%, transparent);
}

body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
  box-shadow:
    0 7px 18px rgba(var(--overview-rgb), 0.17),
    inset 0 1px rgba(255, 255, 255, 0.16) !important;
}

@media screen and (max-width: 767px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    gap: 7px !important;
    margin-bottom: 9px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 186px !important;
    gap: 6px !important;
    padding: 9px !important;
    border-radius: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 29px;
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    display: block !important;
    overflow: hidden;
    font-size: 10px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 56px;
    padding: 7px 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    font-size: clamp(19px, 5.7vw, 23px) !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    min-height: 42px;
    padding: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
    font-size: 8.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-rings {
    gap: 3px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 53px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 36px !important;
    height: 36px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 11px !important;
    font-size: 11px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong span,
  body.marga-app-page .marga-dashboard .marga-circular-progress small {
    font-size: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px !important;
    margin-top: auto !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div {
    min-height: 29px;
    padding: 5px 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child {
    grid-column: 1 / -1;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary strong {
    font-size: 8px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(3) strong {
    font-size: 7.5px !important;
  }
}

@media screen and (max-width: 350px) {
  body.marga-app-page .marga-dashboard .marga-enterprise-overview {
    gap: 6px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-card {
    min-height: 170px !important;
    gap: 5px !important;
    padding: 7px !important;
    border-radius: 12px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head {
    min-height: 27px;
    gap: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-icon,
  body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-icon {
    width: 27px !important;
    height: 27px !important;
    flex-basis: 27px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3 {
    font-size: 0 !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-head h3::after {
    color: #f8fafc;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-time .marga-enterprise-head h3::after {
    content: "Date & Time";
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-resource .marga-enterprise-head h3::after {
    content: "Resources";
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value {
    min-height: 53px;
    padding: 7px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-primary-value strong {
    font-size: 19px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value {
    min-height: 39px;
    padding: 5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-enterprise-mini-value strong {
    font-size: 7.5px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress {
    min-height: 49px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress svg {
    width: 33px !important;
    height: 33px !important;
  }

  body.marga-app-page .marga-dashboard .marga-circular-progress strong {
    top: 10px !important;
    font-size: 10px !important;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-column: auto;
    align-items: center;
    gap: 6px;
    min-height: 28px;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:first-child strong {
    margin-top: 0;
    text-align: right;
  }

  body.marga-app-page .marga-dashboard .marga-resource-summary div:nth-child(n + 2) {
    display: none !important;
  }
}
