:root {
  --bg: #eef2f7;
  --bg-soft: #f6f8fc;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe4ef;
  --line-strong: #c5d1e0;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.04);
  --sidebar: #0b1220;
  --sidebar-2: #121a2d;
  --sidebar-text: #dce7f6;
  --sidebar-muted: #90a4c5;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --success: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0891b2;
  --dark: #1f2937;
  --radius: 18px;
}
body.theme-dark {
  --bg: #0b1220;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #172033;
  --panel-3: #1b2638;
  --text: #e5edf8;
  --muted: #9fb0ca;
  --line: #243244;
  --line-strong: #304258;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.18);
  --sidebar: #020617;
  --sidebar-2: #0a1324;
  --sidebar-text: #d8e1ef;
  --sidebar-muted: #8ba0bf;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrapper { min-height: 100vh; }
.main-header {
  position: fixed;
  top: 0;
  left: 274px;
  right: 0;
  height: 72px;
  z-index: 1000;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
body.theme-dark .main-header { background: rgba(17, 24, 39, 0.88); }
.header-left, .header-actions { display: flex; align-items: center; gap: 12px; }
.brand-mini { display: flex; align-items: center; gap: 10px; }
.brand-mini strong { display: block; font-size: 16px; line-height: 1.1; }
.brand-mini small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.brand-mini-logo-only {
  gap: 0;
}
.brand-mark-large {
  width: 78px;
  height: 78px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.brand-mark-large img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
}
body.theme-dark .brand-mark-large {
  background: transparent;
}
@media (max-width: 768px) {
  .main-header {
    height: 76px;
  }
  .brand-mark-large {
    width: 58px;
    height: 58px;
  }
}
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
}
.header-search input {
  width: 260px;
  max-width: 34vw;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: var(--text);
}
.header-search button, .icon-btn, .btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.header-search button {
  padding: 10px 13px;
  border-radius: 10px;
  font-weight: 800;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  transition: 0.18s ease;
}
.icon-btn:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.main-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 274px;
  z-index: 1010;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--sidebar-text);
}
.brand-link {
  display: block;
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-title { display:block; color:#fff; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.brand-sub { display:block; margin-top:6px; font-size:12px; color: var(--sidebar-muted); }
.sidebar { padding: 12px 0 24px; }
.nav, .nav-treeview { list-style: none; margin: 0; padding: 0; }
.nav-section {
  padding: 16px 18px 8px;
  color: var(--sidebar-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--sidebar-text);
  transition: .16s ease;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.08); color: #fff; }
.nav-badge {
  width: 25px;
  height: 25px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,.16);
}
.nav-treeview { padding-left: 14px; display: none; }
.nav-treeview .nav-link { padding: 10px 12px; font-size: 14px; color: #d7e1ef; }
.caret { margin-left: auto; color: var(--sidebar-muted); }
.content-wrapper, .main-footer { margin-left: 274px; }
.content-wrapper {
  padding-top: 72px;
  min-height: 100vh;
}
.content-header { padding: 24px 20px 0; }
.content { padding: 0 20px 26px; }
.container-fluid { width: 100%; }
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-kicker { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.page-title { margin: 0; font-size: 34px; line-height: 1.08; letter-spacing: -.03em; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.58; }
.row { display:flex; flex-wrap:wrap; margin:0 -10px; }
.col-12,.col-6,.col-md-4,.col-md-6,.col-md-8,.col-md-12,.col-lg-3,.col-lg-4,.col-lg-6,.col-lg-8 { width:100%; padding:0 10px; }
@media (min-width:768px){ .col-md-4{width:33.3333%} .col-md-6{width:50%} .col-md-8{width:66.6666%} .col-md-12{width:100%} }
@media (min-width:992px){ .col-lg-3{width:25%} .col-lg-4{width:33.3333%} .col-lg-6{width:50%} .col-lg-8{width:66.6666%} .col-6{width:50%} }
.card, .soft-card, .hero-card, .list-card, .tools-card, .pkg-table-card, .bc-card, .import-card, .cardx, .info-card, .side-card, .settings-card, .ticket-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-header, .card-body, .card-footer { padding: 18px 20px; }
.card-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line);
  background: transparent;
}
.card-title { margin: 0; font-size: 18px; font-weight: 800; }
.card-note { color: var(--muted); font-size: 13px; }
.hero-card { padding: 26px 28px; }
.hero-meta { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; }
.mini-pill {
  display:inline-flex;
  align-items:center;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
.table thead th, .table-bordered thead th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  background: var(--panel-2);
}
.table-hover tbody tr:hover, .table tbody tr:hover { background: rgba(37,99,235,.025); }
.table-bordered { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-bordered th, .table-bordered td { border-bottom: 1px solid var(--line); }
.table-bordered th:first-child, .table-bordered td:first-child { padding-left: 18px; }
.table-bordered th:last-child, .table-bordered td:last-child { padding-right: 18px; }
.form-group { margin-bottom: 16px; }
label { display:block; margin-bottom:8px; font-size:13px; font-weight:700; }
.form-control, textarea, select, .inputx, .selectx, .textareax, .field-input, .field-select, .input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: .18s ease;
}
.textarea, textarea, .textareax { min-height: 120px; }
.form-control:focus, textarea:focus, select:focus, .inputx:focus, .selectx:focus, .textareax:focus, .field-input:focus, .field-select:focus, .input:focus, .select:focus, .textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.btn, .btnx, .portal-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight:700;
  border:1px solid transparent;
}
.btn-sm { padding: 9px 12px; font-size: 13px; }
.btn-xs { padding: 7px 10px; font-size: 12px; border-radius: 10px; }
.btn-primary, .btn-primaryx, .btnx { background:#2563eb; border-color:#2563eb; color:#fff; }
.btn-secondary, .btn-darkx { background:#334155; border-color:#334155; color:#fff; }
.btn-danger, .btn-dangerx { background:#ef4444; border-color:#ef4444; color:#fff; }
.btn-warning, .btn-warnx { background:#f59e0b; border-color:#f59e0b; color:#111827; }
.btn-info, .btn-infox { background:#0891b2; border-color:#0891b2; color:#fff; }
.btn-lightx, .btn-light { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.alert {
  padding: 13px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.alert-danger { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.alert-success { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
body.theme-dark .alert-danger { background: rgba(127,29,29,.2); }
body.theme-dark .alert-success { background: rgba(20,83,45,.22); }
.text-center { text-align:center; }
.text-muted { color: var(--muted); }
.text-danger { color:#dc2626; }
.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:1rem}.mt-1{margin-top:.25rem}.mr-2{margin-right:.5rem}.pt-3{padding-top:1rem}
.header-user { display:flex; align-items:center; gap:10px; padding:0 4px; }
.user-meta strong { display:block; line-height:1.1; }
.user-meta small { display:block; color: var(--muted); font-size:11px; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background:#dbeafe;
  color:#1d4ed8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
}
.small-box {
  position: relative;
  min-height: 168px;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  color:#fff;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.small-box::after {
  content:'';
  position:absolute;
  right:-30px;
  top:22px;
  width:118px;
  height:118px;
  border-radius:28px;
  background: rgba(255,255,255,.08);
  transform: rotate(12deg);
}
.small-box .inner { position: relative; z-index: 2; }
.small-box .inner h3 { margin:0 0 10px; font-size: 38px; line-height:1; font-weight: 800; }
.small-box .inner p { margin:0; font-size:14px; opacity:.96; max-width:92%; line-height:1.45; }
.small-box-footer {
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:16px;
  font-weight:700;
  opacity:.95;
}
.bg-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.bg-info { background: linear-gradient(135deg, #0891b2, #0ea5e9); }
.bg-success { background: linear-gradient(135deg, #16a34a, #22c55e); }
.bg-warning { background: linear-gradient(135deg, #f59e0b, #facc15); color:#1f2937; }
.bg-danger { background: linear-gradient(135deg, #ef4444, #e11d48); }
.bg-dark { background: linear-gradient(135deg, #111827, #1f2937); }
.badge, .status-badge, .pkg-badge, .bill-badge, .summary-pill, .online-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.badge-success, .status-badge.active, .b-active { background:#dcfce7; color:#166534; }
.badge-danger, .online-badge.offline, .b-inactive { background:#fee2e2; color:#991b1b; }
.badge-warning, .b-day { background:#fef3c7; color:#92400e; }
.online-badge.online { background:#ecfdf5; color:#166534; }
.pkg-badge { background:#eff6ff; color:#1d4ed8; }
.bill-badge { background:#f0fdf4; color:#166534; }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; }
.dot.online { background:#22c55e; }
.dot.offline { background:#ef4444; }
.panel-grid { display:grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap:20px; }
.span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-12 { grid-column: span 12; }
@media (max-width:1100px) { .span-8,.span-4,.span-6 { grid-column: span 12; } }
.chart-card { padding: 18px 20px 10px; }
.chart-wrap { height: 280px; display:flex; align-items:flex-end; gap:12px; padding-top: 18px; }
.bar-col { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:10px; }
.bar-stack {
  width: 100%;
  max-width: 54px;
  height: 190px;
  border-radius: 16px;
  background: var(--panel-2);
  display:flex;
  align-items:flex-end;
  padding: 6px;
}
.bar { width:100%; border-radius: 12px; background: linear-gradient(180deg, #60a5fa, #2563eb); }
.bar.alt { background: linear-gradient(180deg, #22c55e, #16a34a); }
.bar-label { font-size: 12px; color: var(--muted); }
.bar-value { font-size: 11px; color: var(--muted); font-weight: 700; }
.donut-list { display:flex; flex-direction:column; gap:12px; padding-top:8px; }
.donut-item { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.main-footer {
  padding: 16px 20px 22px;
  color: var(--muted);
  font-size: 13px;
}
.mobile-only { display:none; }
.page-shell, .user-list-shell, .pkg-shell, .bc-shell, .import-shell, .ticket-shell, .view-shell { display:flex; flex-direction:column; gap:18px; }
.user-list-head, .pkg-head, .bc-head, .import-head, .page-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.user-list-title, .pkg-title, .bc-title, .import-title { margin:0 0 6px; font-size:32px; letter-spacing:-.03em; }
.user-list-sub, .pkg-sub, .bc-sub, .import-sub { color: var(--muted); font-size: 14px; line-height: 1.6; }
.tools-top, .bc-card-head, .pkg-table-head, .settings-actions, .headx { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.filter-panel, .import-tools { background: var(--panel); border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.filter-grid, .grid, .import-form, .settings-grid {
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.filter-grid > *, .import-form > * { grid-column: span 3; }
.filter-grid > button, .filter-grid > a { align-self:end; }
.field-label, .labelx { font-size:12px; color:var(--muted); font-weight:700; margin-bottom:6px; }
.form-span-full { grid-column: 1 / -1; }
.summary-grid, .bc-summary, .stat-highlight, .hero-grid {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.summary-card, .bc-mini, .stat-box, .mini-card, .hero-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.summary-card .name, .mini-card .k, .bc-mini .k, .stat-box .k, .hero-stat .k { color: var(--muted); font-size:12px; margin-bottom:8px; font-weight:700; }
.summary-card .summary-stats, .hero-stat .v, .mini-card .v, .bc-mini .v, .stat-box .v { font-weight:800; font-size:20px; }
.action-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.action-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  min-height: 96px;
  padding: 18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
  font-weight:800;
  text-align:left;
}
.iconx { font-size: 18px; }
.tab-shell { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tab-nav { display:flex; gap:8px; flex-wrap:wrap; padding: 16px 18px; border-bottom:1px solid var(--line); background: var(--panel-2); }
.tab-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.tab-btn.active { background: var(--primary); border-color: var(--primary); color:#fff; }
.tab-pane { display:none; padding: 18px; }
.tab-pane.active { display:block; }
.section-grid, .view-grid, .top-grid { display:grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
.info-card .head { padding: 18px 20px; border-bottom:1px solid var(--line); font-weight:800; }
.info-table { width:100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 14px 16px; border-bottom:1px solid var(--line); text-align:left; }
.info-table th { width: 200px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.timeline { display:flex; flex-direction:column; gap:16px; padding: 18px; }
.timeline-item { display:flex; gap:12px; align-items:flex-start; }
.timeline-dot { width:12px; height:12px; border-radius:50%; background: var(--primary); margin-top: 5px; }
.timeline .title { font-weight:800; margin-bottom:4px; }
.timeline .sub { color: var(--muted); font-size:13px; }
.rowx { display:flex; justify-content:space-between; gap:16px; padding: 14px 0; border-bottom:1px solid var(--line); }
.rowx:last-child { border-bottom: 0; }
.rowx .k { color: var(--muted); font-weight:700; }
.rowx .v { font-weight:800; text-align:right; }
.inline-flex { display:inline-flex; align-items:center; gap:10px; flex-wrap:wrap; }
.call-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding: 7px 12px;
  font-size: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.v-pos { color: #166534; } .v-neg { color: #b91c1c; } .small-text { font-size: 13px; }
.empty-box { padding: 34px 20px; text-align:center; color: var(--muted); }
.cardx .bodyx, .list-card form .card-body { padding: 18px 20px; }
.note {
  margin-top: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.6;
}
.content-wrapper .content-wrapper {
  margin-left: 0;
  min-height: auto;
  padding-top: 0;
  background: transparent;
}
.content-wrapper .content-wrapper > .content-header,
.content-wrapper .content-wrapper > .content,
.content-wrapper .content-wrapper > section { padding-left: 0; padding-right: 0; }
.content-wrapper .content-wrapper > .content > .container-fluid,
.content-wrapper .content-wrapper > section > .container-fluid { padding: 0; }
.content-wrapper h1, .content-wrapper h2, .content-wrapper h3 { letter-spacing: -.03em; }
.content-wrapper > .content-header > .container-fluid > h1:only-child,
.content-wrapper .content-wrapper h1:first-child {
  margin: 0 0 18px;
  font-size: 30px;
}
.content-wrapper form:not(.header-search):not(.import-form) > .card,
.content-wrapper form:not(.header-search):not(.import-form) > .list-card { overflow: hidden; }
.main-header::-webkit-scrollbar, .main-sidebar::-webkit-scrollbar { width: 8px; }
.main-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
@media (max-width: 1180px) {
  .header-search input { width: 200px; }
  .summary-grid, .bc-summary, .stat-highlight, .hero-grid, .section-grid, .view-grid, .top-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 992px) {
  .main-header { left: 0; }
  .content-wrapper, .main-footer { margin-left: 0; }
  .main-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .main-sidebar.mobile-open { transform: translateX(0); }
  .mobile-only { display: inline-flex; }
  body.sidebar-open::before {
    content:'';
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 1005;
  }
  .header-user .user-meta, .header-search { display:none; }
}
@media (max-width: 760px) {
  .content-header { padding: 18px 14px 0; }
  .content { padding: 0 14px 20px; }
  .main-header { padding: 0 12px; }
  .page-title, .user-list-title, .pkg-title, .bc-title, .import-title { font-size: 28px; }
  .hero-card, .user-list-head, .pkg-head, .bc-head, .import-head { padding: 20px; }
  .summary-grid, .bc-summary, .stat-highlight, .hero-grid, .section-grid, .view-grid, .top-grid, .filter-grid, .grid, .import-form { grid-template-columns: 1fr; }
  .small-box .inner h3 { font-size: 32px; }
  .chart-wrap { gap: 8px; }
}


.action-toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom: 18px;
}
.icon-action-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
}
.icon-action-btn:hover { transform: translateY(-1px); border-color: var(--primary); box-shadow: var(--shadow); }
.icon-action-btn.primary { background: var(--primary); color:#fff; border-color: var(--primary); }
.icon-action-btn .iconx { font-size: 18px; line-height: 1; }
.single-col { grid-template-columns: 1fr; }
.timeline-content { min-width: 0; }
.strong-line { font-weight: 700; }
.detail-note { margin-top: 6px; color: var(--muted); line-height: 1.55; }
@media (max-width: 767px) {
  .action-toolbar { gap: 8px; }
  .icon-action-btn { width: 42px; height: 42px; border-radius: 12px; }
}

body.theme-dark .main-footer { background: #111827; color: #cbd5e1; border-top: 1px solid #243041; }
body.theme-dark .content-wrapper { background: #0f172a; }
body.theme-dark .card, body.theme-dark .soft-card, body.theme-dark .hero-card, body.theme-dark .list-card, body.theme-dark .tools-card, body.theme-dark .pkg-table-card, body.theme-dark .bc-card, body.theme-dark .import-card, body.theme-dark .cardx, body.theme-dark .info-card, body.theme-dark .side-card, body.theme-dark .settings-card, body.theme-dark .ticket-card { background: #111827; border-color: #243041; color: #e5edf7; }
body.theme-dark .table th, body.theme-dark .table td, body.theme-dark .table-bordered th, body.theme-dark .table-bordered td { border-color: #243041; color: #e5edf7; }
body.theme-dark .table thead th, body.theme-dark .table-bordered thead th { background: #0b1220; color: #93a4ba; }
body.theme-dark .form-control, body.theme-dark textarea, body.theme-dark select { background: #0b1220; border-color: #243041; color: #e5edf7; }
body.theme-dark .form-control::placeholder { color: #6b7b91; }

.brand-mark img{width:100%;height:100%;object-fit:contain;border-radius:12px}.portal-brand-logo{width:56px;height:56px;border-radius:16px;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;margin-bottom:10px;overflow:hidden}.portal-brand-logo img{width:100%;height:100%;object-fit:contain}


.brand-mini.mobile-only{display:none}
.brand-mark-top{width:56px;height:56px;border-radius:0;background:transparent;border:none;box-shadow:none;padding:0}
.brand-mark-top img{width:100%;height:100%;object-fit:contain;display:block}
.brand-link{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:24px 20px 18px}
.brand-logo-stack{width:132px;max-width:100%;height:132px;display:flex;align-items:center;justify-content:flex-start;background:transparent;border:none;box-shadow:none;overflow:visible}
.brand-logo-stack img{width:100%;height:100%;object-fit:contain;display:block}
.brand-logo-fallback{display:flex;align-items:center;justify-content:center;width:112px;height:112px;border-radius:26px;background:rgba(255,255,255,.10);color:#fff;font-size:42px;font-weight:800}
.brand-copy-stack{display:flex;flex-direction:column}
.brand-title{font-size:24px;line-height:1.1}
.brand-sub{margin-top:6px;font-size:12px;line-height:1.5}
@media (max-width: 768px){
  .brand-mini.mobile-only{display:flex}
  .brand-logo-stack{width:98px;height:98px}
  .brand-title{font-size:20px}
}
.login-page{margin:0;min-height:100vh;font-family:Inter,Arial,sans-serif;background:radial-gradient(circle at top left, rgba(37,99,235,.15), transparent 24%),linear-gradient(135deg,#08101d 0%,#0c1424 48%,#111827 100%);display:flex;align-items:center;justify-content:center;padding:24px 16px;color:#e5eefc}
.login-shell{width:100%;max-width:1120px;display:grid;grid-template-columns:1fr 430px;gap:28px;align-items:center}
.login-showcase{padding:24px 12px 24px 4px}
.login-badge{display:inline-flex;align-items:center;padding:8px 14px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#cbd5e1;margin-bottom:18px}
.login-brand-logo{width:190px;height:190px;border-radius:34px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 24px 50px rgba(0,0,0,.25);margin-bottom:22px}
.login-brand-logo img{width:100%;height:100%;object-fit:contain;padding:20px}
.login-brand-fallback{font-size:60px;font-weight:800;color:#fff}
.login-showcase h1{margin:0;font-size:48px;line-height:1.02;letter-spacing:-.04em;color:#fff}
.login-showcase p{margin:14px 0 0;color:#94a3b8;font-size:17px;line-height:1.7;max-width:560px}
.login-card{border-radius:28px;background:rgba(15,23,42,.78);border:1px solid rgba(255,255,255,.08);box-shadow:0 28px 70px rgba(0,0,0,.42);backdrop-filter:blur(18px);overflow:hidden}
.login-card-body{padding:30px}
.login-kicker{display:inline-block;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#93c5fd;margin-bottom:12px}
.login-title{margin:0 0 8px;font-size:34px;font-weight:800;color:#fff;letter-spacing:-.03em}
.login-subtitle{margin:0 0 22px;color:#94a3b8;font-size:15px;line-height:1.7}
.login-card-body .form-group{margin-bottom:16px}.login-card-body label{display:block;margin-bottom:8px;font-size:13px;font-weight:700;color:#dbe7fb}
.login-card-body .form-control{width:100%;padding:14px 16px;border-radius:16px;border:1px solid #24324b;background:#101a2c;color:#fff;outline:none}
.login-card-body .form-control::placeholder{color:#7f8ea8}.login-card-body .form-control:focus{border-color:rgba(59,130,246,.55);box-shadow:0 0 0 4px rgba(37,99,235,.14)}
.login-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0 18px}
.login-check{display:inline-flex;align-items:center;gap:8px;color:#94a3b8;font-size:13px}
.login-btn{width:100%;border:none;cursor:pointer;padding:14px 18px;border-radius:16px;background:linear-gradient(135deg,var(--primary),#0ea5e9);color:#fff;font-size:15px;font-weight:800;box-shadow:0 18px 40px rgba(37,99,235,.28)}
.login-inline-brand{display:none;text-align:center;margin-bottom:20px}.login-inline-logo{width:88px;height:88px;border-radius:24px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;overflow:hidden;margin:0 auto 12px}.login-inline-logo img{width:100%;height:100%;object-fit:contain;padding:10px}
.login-inline-logo span{font-size:30px;font-weight:800;color:#fff}.login-inline-name{font-size:24px;font-weight:800;color:#fff}.login-inline-sub{margin-top:6px;font-size:14px;color:#94a3b8}
@media (max-width: 980px){.login-shell{grid-template-columns:1fr;max-width:520px}.login-showcase{display:none}.login-inline-brand{display:block}}


/* --- patched logo fit fixes --- */
.brand-link{
  align-items:flex-start;
}
.brand-logo-stack{
  width: 220px !important;
  max-width: calc(100% - 8px);
  height: auto !important;
  min-height: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  padding: 0 !important;
}
.brand-logo-stack img{
  width: 100% !important;
  height: auto !important;
  max-height: 78px;
  object-fit: contain !important;
  object-position: left center;
  display: block;
}
.brand-logo-fallback{
  width: 88px !important;
  height: 88px !important;
}

.login-brand-logo{
  width: 320px !important;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  padding: 0 !important;
  margin-bottom: 24px !important;
}
.login-brand-logo img{
  width: 100% !important;
  height: auto !important;
  max-height: 120px;
  object-fit: contain !important;
  object-position: left center;
  padding: 0 !important;
  display: block;
}

@media (max-width: 768px){
  .brand-logo-stack{
    width: 170px !important;
  }
  .brand-logo-stack img{
    max-height: 56px;
  }
  .login-brand-logo{
    width: 220px !important;
    margin-left: auto;
    margin-right: auto;
  }
  .login-brand-logo img{
    max-height: 86px;
    object-position: center center;
  }
}

/* Dashboard premium cards light mode visibility fix */
html:not(.dark) .premium-box,
body:not(.dark) .premium-box,
[data-theme="light"] .premium-box,
.theme-light .premium-box{
  color:#ffffff !important;
}

html:not(.dark) .premium-box .inner h3,
html:not(.dark) .premium-box .inner p,
html:not(.dark) .premium-box .small-box-footer,
body:not(.dark) .premium-box .inner h3,
body:not(.dark) .premium-box .inner p,
body:not(.dark) .premium-box .small-box-footer,
[data-theme="light"] .premium-box .inner h3,
[data-theme="light"] .premium-box .inner p,
[data-theme="light"] .premium-box .small-box-footer,
.theme-light .premium-box .inner h3,
.theme-light .premium-box .inner p,
.theme-light .premium-box .small-box-footer{
  color:#ffffff !important;
  opacity:1 !important;
}

html:not(.dark) .premium-warning,
body:not(.dark) .premium-warning,
[data-theme="light"] .premium-warning,
.theme-light .premium-warning{
  color:#111827 !important;
}

html:not(.dark) .premium-warning .inner h3,
html:not(.dark) .premium-warning .inner p,
html:not(.dark) .premium-warning .small-box-footer,
html:not(.dark) .premium-warning .premium-icon,
body:not(.dark) .premium-warning .inner h3,
body:not(.dark) .premium-warning .inner p,
body:not(.dark) .premium-warning .small-box-footer,
body:not(.dark) .premium-warning .premium-icon,
[data-theme="light"] .premium-warning .inner h3,
[data-theme="light"] .premium-warning .inner p,
[data-theme="light"] .premium-warning .small-box-footer,
[data-theme="light"] .premium-warning .premium-icon,
.theme-light .premium-warning .inner h3,
.theme-light .premium-warning .inner p,
.theme-light .premium-warning .small-box-footer,
.theme-light .premium-warning .premium-icon{
  color:#111827 !important;
}

html:not(.dark) .premium-box::before,
body:not(.dark) .premium-box::before,
[data-theme="light"] .premium-box::before,
.theme-light .premium-box::before{
  opacity:1 !important;
}

html:not(.dark) .premium-box .premium-icon,
body:not(.dark) .premium-box .premium-icon,
[data-theme="light"] .premium-box .premium-icon,
.theme-light .premium-box .premium-icon{
  background:rgba(255,255,255,.18) !important;
  color:#ffffff !important;
}

html:not(.dark) .premium-warning .premium-icon,
body:not(.dark) .premium-warning .premium-icon,
[data-theme="light"] .premium-warning .premium-icon,
.theme-light .premium-warning .premium-icon{
  background:rgba(255,255,255,.28) !important;
  color:#111827 !important;
}

/* keep gradients clearly visible in light mode */
html:not(.dark) .premium-primary,
body:not(.dark) .premium-primary,
[data-theme="light"] .premium-primary,
.theme-light .premium-primary{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 55%,#3b82f6 100%) !important;
}
html:not(.dark) .premium-success,
body:not(.dark) .premium-success,
[data-theme="light"] .premium-success,
.theme-light .premium-success{
  background:linear-gradient(135deg,#16a34a 0%,#22c55e 55%,#34d399 100%) !important;
}
html:not(.dark) .premium-warning,
body:not(.dark) .premium-warning,
[data-theme="light"] .premium-warning,
.theme-light .premium-warning{
  background:linear-gradient(135deg,#f59e0b 0%,#fbbf24 55%,#facc15 100%) !important;
}
html:not(.dark) .premium-danger,
body:not(.dark) .premium-danger,
[data-theme="light"] .premium-danger,
.theme-light .premium-danger{
  background:linear-gradient(135deg,#ef4444 0%,#f43f5e 55%,#e11d48 100%) !important;
}
html:not(.dark) .premium-info,
body:not(.dark) .premium-info,
[data-theme="light"] .premium-info,
.theme-light .premium-info{
  background:linear-gradient(135deg,#0891b2 0%,#06b6d4 55%,#38bdf8 100%) !important;
}
html:not(.dark) .premium-dark,
body:not(.dark) .premium-dark,
[data-theme="light"] .premium-dark,
.theme-light .premium-dark{
  background:linear-gradient(135deg,#0f172a 0%,#111827 55%,#334155 100%) !important;
}
html:not(.dark) .premium-router,
body:not(.dark) .premium-router,
[data-theme="light"] .premium-router,
.theme-light .premium-router{
  background:linear-gradient(135deg,#1d4ed8 0%,#2563eb 55%,#60a5fa 100%) !important;
}

