/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --h1-font-size: 2rem;
  --normal-font-size: 1rem;
  --small-font-size: .813rem;
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

a {
  text-decoration: none;
}

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

/*=============== LOGIN ===============*/
.login {
  position: relative;
  height: 100vh;
  display: grid;
  align-items: center;
}

.login__bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login__form {
  position: relative;
  margin-inline: 1.5rem;
  background-color: hsla(0, 0%, 100%, .01);
  border: 2px solid hsla(0, 0%, 100%, .7);
  padding: 2.5rem 1rem;
  color: var(--white-color);
  border-radius: 1rem;
  backdrop-filter: blur(16px);
}

.login__title {
  text-align: center;
  font-size: var(--h1-font-size);
  margin-bottom: 1.25rem;
}

.login__inputs, 
.login__box {
  display: grid;
}

.login__inputs {
  row-gap: 1.25rem;
  margin-bottom: 1rem;
}

.login__box {
  grid-template-columns: 1fr max-content;
  column-gap: .75rem;
  align-items: center;
  border: 2px solid hsla(0, 0%, 100%, .7);
  padding-inline: 1.25rem;
  border-radius: 4rem;
}

.login__input, 
.login__button {
  border: none;
  outline: none;
}

.login__input {
  width: 100%;
  background: none;
  color: var(--white-color);
  padding-block: 1rem;
}

.login__input::placeholder {
  color: var(--white-color);
}

.login__box i {
  font-size: 1.25rem;
}

.login__check, 
.login__check-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login__check {
  margin-bottom: 1rem;
  font-size: var(--small-font-size);
}

.login__check-box {
  column-gap: .5rem;
}

.login__check-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--white-color);
}

.login__forgot {
  color: var(--white-color);
}

.login__forgot:hover {
  text-decoration: underline;
}

.login__button {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: var(--white-color);
  border-radius: 4rem;
  color: var(--black-color);
  font-weight: 500;
  cursor: pointer;
}

.login__register {
  font-size: var(--small-font-size);
  text-align: center;
}

.login__register a {
  color: var(--white-color);
  font-weight: 500;
}

.login__register a:hover {
  text-decoration: underline;
}

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media screen and (min-width: 576px) {
  .login {
    justify-content: center;
  }
  .login__form {
    width: 420px;
    padding-inline: 2.5rem;
  }
  .login__title {
    margin-bottom: 2rem;
  }
}

/*=============== DASHBOARD ===============*/
.dashboard-page {
  min-height: 100vh;
  background: #f4f7fb;
  color: #172033;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  background: #ffffff;
  border-bottom: 1px solid #d9e2ef;
}

.app-header h1,
.dashboard-panel h2 {
  line-height: 1.2;
}

.eyebrow {
  color: #4f6f95;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
  display: grid;
  gap: 1rem;
}

.dashboard-panel,
.stat-card,
.vpn-item {
  background: #ffffff;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 51, .06);
}

.dashboard-panel {
  padding: 1.25rem;
}

.request-panel {
  display: grid;
  gap: 1rem;
}

.panel-heading,
.vpn-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .75rem;
}

.field {
  display: grid;
  gap: .35rem;
  color: #40546d;
  font-size: .875rem;
  font-weight: 500;
}

.field input {
  min-height: 2.75rem;
  border: 1px solid #cbd7e6;
  border-radius: 6px;
  padding: 0 .85rem;
  background: #ffffff;
  color: #172033;
}

.primary-button,
.ghost-button {
  min-height: 2.75rem;
  border-radius: 6px;
  padding: 0 1rem;
  font-weight: 600;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #1f6feb;
  background: #1f6feb;
  color: #ffffff;
}

.ghost-button {
  border: 1px solid #cbd7e6;
  background: #ffffff;
  color: #23415f;
}

.primary-button:disabled {
  cursor: wait;
  opacity: .65;
}

.status-message,
.muted {
  color: #5e7088;
}

.vpn-list {
  display: grid;
  gap: .75rem;
}

.vpn-item {
  padding: 1rem;
}

.vpn-item h3 {
  font-size: 1rem;
}

.vpn-item p {
  color: #5e7088;
  margin-top: .25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border-radius: 999px;
  padding: 0 .7rem;
  font-size: .8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: #fff7df;
  color: #7a5600;
}

.status-active {
  background: #e3f8ec;
  color: #126336;
}

.status-failed {
  background: #ffe8e6;
  color: #9f241c;
}

.config-output {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border: 1px solid #cbd7e6;
  border-radius: 6px;
  padding: .85rem;
  background: #101828;
  color: #eaf1ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .875rem;
  line-height: 1.5;
}

.qr-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
}

.qr-block img {
  width: 180px;
  height: 180px;
  border: 8px solid #ffffff;
  border-radius: 6px;
}

.qr-block p {
  color: #40546d;
  font-weight: 500;
}

.error-text {
  color: #9f241c;
}

.empty-state,
.empty-table {
  padding: 1.25rem;
  color: #5e7088;
  text-align: center;
}

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

.stat-card {
  padding: 1rem;
}

.stat-card span {
  display: block;
  color: #1f6feb;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.stat-card p {
  margin-top: .5rem;
  color: #5e7088;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: .85rem;
  border-bottom: 1px solid #e5ecf5;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #40546d;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
}

@media screen and (max-width: 760px) {
  .app-header,
  .panel-heading,
  .vpn-item__header {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .qr-block {
    align-items: flex-start;
    flex-direction: column;
  }
}
