:root {
  --ink: #17202a;
  --muted: #60707d;
  --line: #dce5eb;
  --paper: #f5f8fa;
  --white: #ffffff;
  --cyan: #00a6e8;
  --cyan-dark: #0477b4;
  --green: #2db67c;
  --amber: #c88216;
  --charcoal: #10161d;
  --nav: #0c141b;
  --shadow: 0 18px 56px rgba(17, 29, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  padding: 26px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--nav);
}

.portal-logo {
  display: block;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-logo img {
  width: 224px;
}

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

.portal-nav a,
.small-link,
.topbar-link {
  border-radius: 6px;
  font-weight: 700;
}

.portal-nav a {
  padding: 12px 13px;
}

.portal-nav a:hover,
.portal-nav a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.small-link {
  margin-top: auto;
  padding: 12px 13px;
  color: #9fdfff;
  background: rgba(0, 166, 232, 0.1);
}

.portal-main {
  min-width: 0;
  padding: clamp(22px, 4vw, 46px);
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.topbar-link {
  flex: 0 0 auto;
  padding: 11px 14px;
  color: var(--cyan-dark);
  background: var(--white);
  border: 1px solid var(--line);
}

.logout-button {
  cursor: pointer;
  font: inherit;
}

.auth-panel,
.status-strip,
.dashboard-grid,
.work-area,
.admin-layout {
  margin-bottom: 22px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 500px);
  gap: 26px;
  align-items: start;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, #111b24, #14313d);
}

.auth-copy p:last-child {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.72);
}

.auth-form,
.panel,
.metric-card,
.status-strip article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(17, 29, 40, 0.06);
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  color: var(--ink);
}

label {
  display: grid;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 800;
}

input {
  width: 100%;
  border: 1px solid #cbd7df;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
}

input:focus {
  outline: 3px solid rgba(0, 166, 232, 0.18);
  border-color: var(--cyan);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.button.ghost,
.button.compact {
  color: var(--cyan-dark);
  background: #e9f7fd;
}

.button.compact {
  min-height: 38px;
}

.form-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.status-strip article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(45, 182, 124, 0.12);
}

.status-dot.pending {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(200, 130, 22, 0.12);
}

.status-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

.metric-card {
  padding: 22px;
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2.2rem;
  line-height: 1;
}

.metric-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.work-area {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1fr);
  gap: 18px;
}

.work-area.lower,
.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-layout .wide {
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-list article {
  padding: 14px;
  border-radius: 6px;
  background: var(--paper);
}

.service-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  font-size: 0.92rem;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.amber {
  color: #6f4407;
  background: #fff1d7;
}

.badge.blue {
  color: #075d8c;
  background: #e9f7fd;
}

.badge.green {
  color: #146842;
  background: #e7f8f0;
}

.plain-list,
.action-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.plain-list span {
  color: var(--muted);
  text-align: right;
}

.action-list button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 0 14px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  align-items: center;
  justify-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(10, 16, 22, 0.9), rgba(10, 16, 22, 0.72)),
    url("assets/img/systems-dashboard.png") center / cover;
}

.admin-login-page {
  background:
    linear-gradient(90deg, rgba(10, 16, 22, 0.94), rgba(20, 33, 42, 0.84)),
    url("assets/img/systems-dashboard.png") center / cover;
}

.login-card {
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--white);
  background: rgba(10, 16, 22, 0.88);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.wide-login-card {
  width: min(660px, 100%);
}

.login-logo {
  display: block;
  width: min(260px, 70vw);
  margin-bottom: 30px;
}

.login-card h1 {
  margin-bottom: 22px;
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.login-card .auth-form {
  margin-top: 20px;
  box-shadow: none;
}

.login-copy {
  color: rgba(255, 255, 255, 0.72);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.auth-links a {
  color: #9fdfff;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .portal-shell,
  .auth-panel,
  .status-strip,
  .dashboard-grid,
  .admin-shell .dashboard-grid,
  .work-area,
  .work-area.lower,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    height: auto;
  }

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

@media (max-width: 680px) {
  .portal-main {
    padding: 18px;
  }

  .portal-topbar,
  .panel-heading,
  .plain-list li,
  .status-strip article {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .auth-panel,
  .panel,
  .metric-card,
  .status-strip article {
    padding: 18px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
