:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #173448;
  background: #eef5f7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, #b7eaf0 0, transparent 30%),
    radial-gradient(circle at 90% 5%, #b9d8ff 0, transparent 28%), #f4f8fa;
}
.portal-head {
  height: 76px;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #10364b;
  color: #fff;
}
.portal-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}
.portal-brand b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #15c5b4, #1586dd);
  font-size: 23px;
}
.portal-brand span,
.portal-brand small {
  display: block;
}
.portal-brand small {
  font-size: 11px;
  color: #a9c6d2;
}
button {
  border: 0;
  border-radius: 9px;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}
.portal-head button {
  background: #244f63;
  color: #fff;
}
main {
  width: min(1180px, calc(100% - 30px));
  margin: 42px auto;
}
.login-card {
  width: min(480px, 100%);
  margin: 70px auto;
  background: #fff;
  padding: 38px;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(28, 70, 90, 0.16);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 900;
  color: #098f9c;
}
.login-card h1,
.welcome h1 {
  font-size: 34px;
  margin: 8px 0;
}
.login-card p {
  color: #58717e;
  line-height: 1.55;
}
.login-card form {
  display: grid;
  gap: 15px;
  margin: 25px 0;
}
.login-card label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.login-card input {
  border: 1px solid #cadbe2;
  border-radius: 10px;
  padding: 13px;
  font-size: 16px;
}
.login-card form button {
  background: linear-gradient(120deg, #0878cf, #0bb9a5);
  color: #fff;
  font-size: 15px;
}
.portal-error {
  background: #ffe8eb;
  color: #a01832;
  padding: 11px;
  border-radius: 8px;
  margin: 0 !important;
}
.welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.welcome p {
  color: #63808e;
}
.status {
  padding: 8px 13px;
  border-radius: 20px;
  background: #dff6ef;
  color: #08765f;
  font-weight: 900;
}
.portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.portal-metrics article {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(26, 65, 84, 0.08);
}
.portal-metrics span {
  display: block;
  color: #69818d;
  font-size: 12px;
}
.portal-metrics strong {
  display: block;
  font-size: 25px;
  margin-top: 6px;
}
.portal-tabs {
  display: flex;
  gap: 5px;
  overflow: auto;
  margin: 24px 0 12px;
}
.portal-tabs button {
  background: #dfeaec;
  color: #385869;
  white-space: nowrap;
}
.portal-tabs button.active {
  background: #0878cf;
  color: #fff;
}
.portal-panel {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(26, 65, 84, 0.08);
}
.portal-list {
  display: grid;
  gap: 10px;
}
.portal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dbe6ea;
  border-radius: 11px;
}
.portal-row small {
  display: block;
  color: #6b828d;
  margin-top: 4px;
}
.portal-row strong:last-child {
  align-self: center;
}
.panel-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel-head h2,
.dialog-head h2 {
  margin: 0;
}
.panel-head button,
dialog form > button {
  background: #0878cf;
  color: #fff;
}
.portal-row[data-ticket] {
  cursor: pointer;
}
.portal-row[data-ticket]:hover {
  border-color: #0878cf;
  background: #f5fbff;
}
dialog {
  width: min(620px, calc(100% - 24px));
  border: 0;
  border-radius: 18px;
  padding: 25px;
  color: #173448;
  box-shadow: 0 28px 80px rgba(10, 45, 65, 0.28);
}
dialog::backdrop {
  background: rgba(10, 35, 50, 0.55);
}
dialog form {
  display: grid;
  gap: 14px;
}
.dialog-head {
  margin-bottom: 18px;
}
.dialog-head button {
  font-size: 24px;
  background: #e7eff2;
  color: #365565;
  padding: 4px 11px;
}
dialog label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
dialog input,
dialog select,
dialog textarea {
  width: 100%;
  border: 1px solid #cadbe2;
  border-radius: 9px;
  padding: 11px;
  font: inherit;
}
.thread-message {
  margin: 10px 0;
  padding: 13px;
  border-radius: 10px;
  background: #edf5f7;
}
.thread-message.customer {
  background: #e2f5ef;
}
.thread-message small {
  display: block;
  color: #69818d;
  margin-bottom: 5px;
}
footer {
  text-align: center;
  color: #69818d;
  padding: 35px;
}
.account-password {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 15px;
}
.account-password label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.account-password input {
  border: 1px solid #cadbe2;
  border-radius: 9px;
  padding: 11px;
  font: inherit;
}
.account-password button,
.account-password .portal-error {
  grid-column: 1 / -1;
}
.account-password button {
  background: #0878cf;
  color: #fff;
}
@media (max-width: 760px) {
  .portal-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .login-card {
    padding: 25px;
    margin: 25px auto;
  }
  .welcome {
    align-items: flex-start;
  }
  .welcome h1 {
    font-size: 27px;
  }
  .portal-row {
    grid-template-columns: 1fr;
  }
  .account-password {
    grid-template-columns: 1fr;
  }
}
