/* ---- Fonts ------------------------------------------------------------- */
@font-face {
  font-family: "metropolis";
  src: url("assets/fonts/Metropolis-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "metropolis-medium";
  src: url("assets/fonts/Metropolis-Medium.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "metropolis-semibold";
  src: url("assets/fonts/Metropolis-SemiBold.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "metropolis-bold";
  src: url("assets/fonts/Metropolis-Bold.woff2") format("woff2");
  font-display: swap;
}

/* ---- Design tokens (subset of the original Sanitas variables) ---------- */
:root {
  --san-primary: #0079c8;
  --san-primary-active: #0652ae;
  --san-secondary: #0d1846;
  --grey-90: #111c24;
  --grey-60: #70777d;
  --san-error: #d91e05;
  --white: #ffffff;

  --font-regular: "metropolis", system-ui, sans-serif;
  --font-medium: "metropolis-medium", system-ui, sans-serif;
  --font-semibold: "metropolis-semibold", system-ui, sans-serif;
  --font-bold: "metropolis-bold", system-ui, sans-serif;
}

/* ---- Reset ------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-regular);
  color: var(--grey-90);
  background: #e9edf0;                 /* neutral page behind the app frame */
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* ---- App frame (the centred "device" column) --------------------------- */
.app-frame {
  position: relative;
  width: 100%;
  max-width: 585px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
  /* dark gradient overlay + hero photo */
  background-image:
    linear-gradient(2deg, rgba(12, 12, 12, 0.4), rgba(12, 12, 12, 0.8)),
    url("assets/img/login/bg_02.jpg");
  background-size: cover;
  background-position: center;
}

/* ---- Login layout ------------------------------------------------------ */
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 32px;
  color: var(--white);
}

.brand { text-align: center; }
.brand__logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  display: block;
  margin: 0 auto;
}
.brand__title {
  font-family: var(--font-semibold);
  font-size: 20px;
  letter-spacing: 0.2px;
  margin: 16px 0 0;
}

/* ---- Country / flag selector ------------------------------------------- */
.flags {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.flag {
  width: 60px;
  text-align: center;
  cursor: pointer;
}
.flag__img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.flag__label {
  display: block;
  margin-top: 6px;
  font-family: var(--font-semibold);
  font-size: 12px;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.7);
}
.flag--active .flag__label { color: var(--white); }

.field-error {
  font-family: var(--font-medium);
  font-size: 20px;
  letter-spacing: 0.2px;
  color: var(--san-error);
  margin: 100px 0 0;
  text-align: center;
}

/* ---- Form -------------------------------------------------------------- */
.form {
  width: 100%;
  max-width: 490px;
  margin-top: 20px;
}

.input {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 8px;
  height: 53px;
  padding: 0 14px;
  margin-top: 14px;
}
.input__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--grey-90);
}
.input__icon--trailing {
  margin-left: auto;
  color: var(--grey-60);
  cursor: pointer;
}
.input__control {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-medium);
  font-size: 16px;
  letter-spacing: 0.16px;
  color: var(--grey-90);
  padding: 0 12px;
  height: 100%;
}
.input__control::placeholder { color: var(--grey-60); }

/* ---- Remember me ------------------------------------------------------- */
.remember {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-family: var(--font-medium);
  font-size: 16px;
  color: var(--white);
  cursor: pointer;
}
.remember__box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--white);
  border-radius: 4px;
  background: transparent;
  flex: 0 0 22px;
}

/* ---- Submit ------------------------------------------------------------ */
.btn-primary {
  width: 100%;
  height: 48px;
  margin-top: 22px;
  border: 0;
  border-radius: 8px;
  background: var(--san-primary);
  color: var(--white);
  font-family: var(--font-semibold);
  font-size: 16px;
  letter-spacing: 0.16px;
  cursor: pointer;
}
.btn-primary:hover { background: var(--san-primary-active); }

/* ---- Narrow screens ---------------------------------------------------- */
@media (max-width: 585px) {
  .app-frame { box-shadow: none; }
}
