:root {
  --color-primary: rgb(0, 121, 194);
  --color-primary-dark: rgb(0, 96, 158);
  --color-surface: rgb(245, 245, 245);
  --color-surface-strong: #ffffff;
  --color-text: #222;
  --color-muted: #5d6470;
  --color-border: #d9dfe7;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --max-width: 1180px;
  --page-bg: #eaf1f3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: var(--page-bg);
  color: var(--color-text);
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header,
.site-footer nav {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--color-primary);
}

.logo {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
}

.logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.page-login {
  background: linear-gradient(180deg, #eef5f6 0%, #ecf2f4 100%);
}

.login-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 16px 82px;
}

.login-box {
  width: min(100%, 420px);
  background: rgba(245, 245, 245, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.login-box h2 {
  margin: 0 0 20px;
  text-align: center;
  color: var(--color-primary);
  font-size: 2rem;
  font-weight: 700;
}

.login-form {
  display: flex;
  flex-direction: column;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 1rem;
  color: var(--color-text);
}

input:focus {
  outline: 2px solid rgba(0, 121, 194, 0.15);
  border-color: var(--color-primary);
}

.form-row {
  margin-bottom: 18px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.checkbox-label input {
  width: auto;
  margin: 0;
}

.button-primary {
  display: block;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button-primary:hover {
  background: var(--color-primary-dark);
}

.site-footer {
  background: var(--color-primary);
  color: white;
  padding: 14px 0;
  margin-top: auto;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
}

.site-footer a {
  color: white;
  flex: 1 1 25%;
  padding: 6px 8px;
  font-weight: 700;
  border-radius: 999px;
  text-align: center;
}

.site-footer a:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 820px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .login-box {
    max-width: 380px;
  }
}

@media (orientation: landscape) and (max-width: 900px) {
  .login-box {
    max-width: 360px;
    padding: 20px 18px;
  }

  .login-main {
    padding-bottom: 52px;
  }
}

@media (max-width: 480px) {
  .site-header,
  .site-footer nav {
    width: min(var(--max-width), calc(100% - 20px));
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .subtitle {
    width: 100%;
    text-align: center;
  }

  .button-primary {
    width: 100%;
  }
}