   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  }

  body {
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
  }

  .container {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
  }

  .header-bar {
    background: #1e40af;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: white;
  }

  .header-bar svg {
    width: 24px;
    height: 24px;
    fill: white;
    cursor: pointer;
  }

  .home-link {
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }


.home-icon {
  width: 24px;
  height: 24px;
  color: white;
  stroke: currentColor;     
  stroke-width: 2;     
  fill: none;          
}

.logo-container {
  text-align: center;
  padding: 40px 20px 20px;
  background-color: #ffffff;
}

.logo-text {
  font-size: 32px;
  font-weight: 700;
  color: #1e3a8a; /* same dark blue */
  letter-spacing: -0.5px;
}

.subtext {
  font-size: 15px;
  color: #4b5563; /* gray */
  margin-top: 8px;
}

  .content {
    padding: 32px 28px 36px;
  }

  .auth-logo {
    display: block;
    width: 118px;
    height: 118px;
    object-fit: contain;
    margin: 0 auto 14px;
  }

  h1 {
    text-align: center;
    color: #1e40af;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 28px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-group.row {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .form-group.row label {
    width: 140px;
    font-size: 14px;
    color: #374151;
    flex-shrink: 0;
  }

  .form-group.column label {
    display: block;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    margin-bottom: 6px;
  }

  .form-group input,
  .form-group select {
    flex: 1;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background: white;
  }

  .field-stack {
    flex: 1;
    width: 100%;
  }

  .field-help {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 6px;
  }

  .form-alert {
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 18px;
    padding: 10px 12px;
  }

  .form-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
  }

  .form-alert.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
  }

  .form-group input:focus,
  .form-group select:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
  }

  .roles-box {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 16px;
    margin: 24px 0;
    background: #fafafa;
  }

  .roles-box .roles-title {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
  }

  .btn {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }

  .btn:hover {
    background: #059669;
  }

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

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

  .divider span {
    padding: 0 12px;
  }

  .switch-link {
    text-align: center;
    font-size: 14px;
    color: #374151;
    margin-top: 16px;
  }

  .switch-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
  }

  .switch-link a:hover {
    text-decoration: underline;
  }

  .page {
    display: none;
  }

  .page.active {
    display: block;
  }

  @media (max-width: 380px) {
    .form-group.row {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }
    .form-group.row label {
      width: 100%;
    }
  }


/* UNINEST — Mobile Login and Registration Fix */
@media (max-width: 640px) {
  body {
    flex-direction: column;
    align-items: center;
    padding: 12px;
  }

  .container {
    width: 100%;
    max-width: 420px;
    margin-bottom: 12px;
  }

  .content {
    padding: 24px 18px 30px;
  }

  .header-bar {
    height: auto;
    min-height: 54px;
    gap: 8px;
    justify-content: space-between;
    padding: 8px 12px;
  }

  .header-bar .system-status-chip {
    min-width: 0;
    max-width: calc(100% - 40px);
    white-space: normal;
    line-height: 1.3;
  }

  .header-bar .home-link {
    flex-shrink: 0;
  }

  .form-group input,
  .form-group select {
    min-width: 0;
    max-width: 100%;
  }
}

