*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: #2c2c2c;
  background: #f5f5f5;
  -webkit-font-smoothing: antialiased;
}

#page-boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-ready #page-boot {
  display: none;
}

.page-boot-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #EB1000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

a {
  color: #1473E6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #EB1000;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 32px;
}

.doc-preview {
  text-align: center;
}

.doc-icon {
  margin-bottom: 16px;
}

.doc-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: #2c2c2c;
}

.doc-info {
  margin: 0;
  font-size: 14px;
  color: #6e6e6e;
}

.login-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.login-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #2c2c2c;
  text-align: center;
}

.login-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: #6e6e6e;
  text-align: center;
}

.login-form {
  width: 100%;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #4b4b4b;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d3d3d3;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: #2c2c2c;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: #b3b3b3;
}

.field input:focus {
  border-color: #1473E6;
  box-shadow: 0 0 0 2px rgba(20, 115, 230, 0.2);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.show-password-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #6e6e6e;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.show-password-btn:hover {
  background: #f0f0f0;
  color: #2c2c2c;
}

.show-password-btn svg {
  width: 20px;
  height: 20px;
}

.status-box {
  padding: 12px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.status-box[hidden] {
  display: none;
}

.status-error {
  background: #ffebe6;
  color: #c9252d;
  border: 1px solid #ffc0b5;
}

.status-success {
  background: #e3fcef;
  color: #006644;
  border: 1px solid #abf5d1;
}

.login-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 20px;
  background: #1473E6;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.login-btn:hover {
  background: #0d66d0;
}

.login-btn:disabled {
  background: #b3b3b3;
  cursor: not-allowed;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #6e6e6e;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  padding: 0 16px;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  border: 1px solid #d3d3d3;
  border-radius: 20px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #2c2c2c;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.social-btn:hover {
  background: #f5f5f5;
  border-color: #b3b3b3;
}

.terms {
  margin-top: 24px;
  font-size: 12px;
  color: #6e6e6e;
  text-align: center;
  line-height: 1.5;
}

.footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #6e6e6e;
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px;
  }

  .main {
    padding: 24px 16px;
  }
}
