/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

:root {
  --hop-navy: #033d5d;
  --hop-navy-deep: #022a40;
  --hop-sky: #b9e5fa;
  --hop-sky-soft: #e8f6fc;
  --hop-accent: #1a8fc2;
  --hop-accent-hover: #157aa6;
  --hop-text: #1a2b36;
  --hop-muted: #5a6f7c;
  --hop-error: #c0392b;
  --hop-error-bg: #fdecea;
  --hop-card: #ffffff;
  --hop-radius: 16px;
  --hop-shadow: 0 24px 48px rgba(2, 42, 64, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
  color: var(--hop-text);
  background: linear-gradient(145deg, var(--hop-navy-deep) 0%, var(--hop-navy) 42%, #0a5a82 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(185, 229, 250, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(26, 143, 194, 0.2), transparent 45%);
  pointer-events: none;
}

.shell {
  position: relative;
  width: 100%;
  max-width: 420px;
  z-index: 1;
}

.card {
  background: var(--hop-card);
  border-radius: var(--hop-radius);
  box-shadow: var(--hop-shadow);
  overflow: hidden;
  border: 1px solid rgba(185, 229, 250, 0.25);
}

.brand {
  background: linear-gradient(160deg, var(--hop-navy) 0%, var(--hop-navy-deep) 100%);
  color: #fff;
  padding: 32px 28px 28px;
  text-align: center;
}

.brand-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: block;
  background: var(--hop-navy);
}

.brand h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand .subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--hop-sky);
  font-weight: 500;
}

.panel {
  padding: 28px 28px 24px;
}

.welcome {
  margin: 0 0 22px;
  color: var(--hop-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hop-navy);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d0dde5;
  border-radius: 10px;
  font-size: 1rem;
  color: var(--hop-text);
  background: #fafcfd;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--hop-accent);
  box-shadow: 0 0 0 3px rgba(26, 143, 194, 0.18);
  background: #fff;
}

.field input::placeholder {
  color: #9aafbc;
}

.error {
  background: var(--hop-error-bg);
  color: var(--hop-error);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.actions {
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--hop-accent) 0%, var(--hop-accent-hover) 100%);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 143, 194, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(26, 143, 194, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
}

.footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--hop-muted);
}

.footer a {
  color: var(--hop-accent);
  text-decoration: none;
}

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

.badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(185, 229, 250, 0.18);
  color: var(--hop-sky);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  .card {
    background: #0f1f2a;
    border-color: rgba(185, 229, 250, 0.12);
  }

  .panel {
    color: #e8eef2;
  }

  .welcome {
    color: #9eb3c0;
  }

  .field label {
    color: var(--hop-sky);
  }

  .field input {
    background: #152836;
    border-color: #2a4150;
    color: #e8eef2;
  }

  .field input:focus {
    background: #1a3140;
  }

  .footer {
    color: #7a93a3;
  }
}
