:root {
  --ink: #07111f;
  --muted: #64748b;
  --line: #dfe9f5;
  --panel: #ffffff;
  --soft: #f5f8fc;
  --blue: #2f9cff;
  --green: #00a978;
  --amber: #d99600;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgba(47, 156, 255, 0.12), transparent 26%),
    radial-gradient(circle at 90% 92%, rgba(0, 169, 120, 0.13), transparent 30%),
    linear-gradient(135deg, #f4f8fd 0%, #edf3fa 100%);
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.boot-screen,
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card,
.login-card {
  width: min(430px, 100%);
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.10);
}

.boot-card {
  text-align: center;
}

.boot-card img,
.login-logo {
  width: 150px;
  height: 88px;
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.eyebrow {
  margin: 0;
  color: #60728e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 12px 0 8px;
  font-size: 30px;
  line-height: 1.1;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
}

.field input {
  width: 100%;
  height: 48px;
  border: 1px solid #d7e4f2;
  border-radius: 15px;
  background: #f8fbff;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 800;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 156, 255, 0.13);
}

.primary-btn,
.logout-btn,
.small-btn {
  border: 0;
  border-radius: 15px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 950;
  cursor: pointer;
  transition: 0.16s ease;
}

.primary-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
}

.primary-btn:hover,
.logout-btn:hover,
.small-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(7, 17, 31, 0.18);
}

.form-message {
  min-height: 22px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 850;
  color: var(--muted);
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--green);
}

.admin-link {
  display: inline-block;
  margin-top: 14px;
  color: #0066cc;
  text-decoration: none;
  font-weight: 900;
}

.portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: rgba(255,255,255,0.94);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.brand-card img {
  width: 78px;
  height: 54px;
  object-fit: contain;
}

.brand-card strong,
.brand-card span {
  display: block;
}

.brand-card strong {
  font-size: 16px;
}

.brand-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 13px 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.16s ease;
}

.nav button:hover {
  background: #eef6ff;
  transform: translateX(2px);
}

.nav button.active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(7, 17, 31, 0.16);
}

.role-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.role-card strong,
.role-card span {
  display: block;
}

.role-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.main {
  padding: 24px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.topbar,
.card,
.kpi {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.055);
}

.topbar {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.topbar h1 {
  margin: 8px 0 6px;
  font-size: 30px;
  line-height: 1.05;
}

.topbar span {
  color: var(--muted);
  font-weight: 800;
}

.logout-btn,
.small-btn {
  padding: 12px 16px;
}

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

.kpi {
  padding: 18px;
  min-height: 132px;
}

.kpi:nth-child(1) {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.kpi:nth-child(2) {
  background: linear-gradient(135deg, #ffffff, #edfff7);
  border-color: #c7f2dd;
}

.kpi:nth-child(3) {
  background: linear-gradient(135deg, #ffffff, #fff8e8);
  border-color: #f1d994;
}

.kpi:nth-child(4) {
  background: linear-gradient(135deg, #ffffff, #eef6ff);
  border-color: #cae3ff;
}

.kpi label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 950;
}

.kpi strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.1;
}

.kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.card {
  padding: 18px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.card h2,
.card h3 {
  margin: 6px 0 0;
}

.card h2 {
  font-size: 22px;
}

.card h3 {
  font-size: 18px;
}

.muted {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

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

.workflow div {
  min-height: 126px;
  border: 1px solid #dce8f5;
  border-radius: 20px;
  padding: 16px;
  background: #f8fbff;
}

.workflow div:nth-child(2) {
  background: #f0fff8;
  border-color: #c9f6e3;
}

.workflow div:nth-child(3) {
  background: #fff8e8;
  border-color: #f3dc96;
}

.workflow strong,
.workflow span {
  display: block;
}

.workflow span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e3edf8;
  border-radius: 16px;
  background: #f8fbff;
}

.summary-row span {
  color: var(--muted);
  font-weight: 850;
}

.summary-row strong {
  font-weight: 950;
}

.progress {
  height: 11px;
  margin: 18px 0 10px;
  border-radius: 999px;
  background: #e9f1fb;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: inherit;
}

.search {
  width: min(420px, 100%);
  border: 1px solid #dce8f5;
  background: #f8fbff;
  border-radius: 15px;
  padding: 12px 14px;
  font-weight: 850;
  color: var(--ink);
  outline: none;
}

.search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 156, 255, 0.12);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f8fbff;
  color: var(--muted);
  text-align: left;
  padding: 13px 10px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: 15px 10px;
  border-bottom: 1px solid #e8eef6;
  font-size: 13px;
  font-weight: 850;
  vertical-align: middle;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef6ff;
  color: #0066cc;
  font-weight: 950;
}

.badge {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  text-transform: capitalize;
}

.badge.good {
  background: #dcfaef;
  color: #057a55;
}

.badge.warn {
  background: #fff2c7;
  color: #9a6500;
}

.badge.danger {
  background: #ffe3e3;
  color: #c02626;
}

.badge.neutral {
  background: #eef2f7;
  color: #334155;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .portal {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .role-card {
    display: none;
  }

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

  .grid,
  .workflow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 14px;
  }

  .topbar,
  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .kpis,
  .nav {
    grid-template-columns: 1fr;
  }

  .logout-btn,
  .small-btn,
  .search {
    width: 100%;
  }
}

/* V25 R2 reseller action workflow */
.v25-action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.v25-action-panel h3 {
  margin: 6px 0 4px;
}

.v25-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.small-btn.soft,
.v25-close.soft {
  background: #eef6ff;
  color: #0066cc;
}

.v25-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 17, 31, 0.48);
  backdrop-filter: blur(8px);
}

.v25-modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dfe9f5;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 32px 90px rgba(7, 17, 31, 0.22);
}

.v25-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.v25-modal-head h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.v25-close {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 950;
  cursor: pointer;
}

.v25-form {
  display: grid;
  gap: 10px;
}

.v25-form label {
  font-size: 12px;
  font-weight: 950;
  color: #07111f;
}

.v25-form input,
.v25-form select,
.v25-form textarea {
  width: 100%;
  border: 1px solid #dce8f5;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px 14px;
  font-weight: 850;
  outline: none;
}

.v25-form textarea {
  min-height: 110px;
  resize: vertical;
}

.v25-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.v25-form-message {
  min-height: 22px;
  font-size: 13px;
  font-weight: 850;
  color: #64748b;
}

.v25-form-message.success {
  color: #059669;
}

.v25-form-message.error {
  color: #dc2626;
}

.v25-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.18s ease;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #07111f;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 20px 60px rgba(7, 17, 31, 0.22);
}

.v25-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.v25-toast.info {
  background: #0066cc;
}

@media (max-width: 720px) {
  .v25-action-panel,
  .v25-modal-head,
  .v25-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
