* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 28%), linear-gradient(180deg, #060b17 0%, #0b1424 100%);
  color: #e2e8f0;
}

body {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-backdrop {
  width: 100%;
  max-width: 450px;
}

.login-card {
  position: relative;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  padding: 2.5rem;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 24%), radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.08), transparent 18%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #0284c7, #0f4c81);
  font-size: 1.35rem;
}

.brand-label {
  margin: 0;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  color: #f8fafc;
}

.login-description {
  margin: 0 0 1.75rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
}

label {
  display: block;
  margin: 1rem 0 0.35rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.input-icon-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 1rem;
}

.input-icon-wrapper input {
  width: 100%;
  box-sizing: border-box;
  padding-left: 3rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3.2rem;
}

.toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 23, 42, 0.96);
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.toggle-password:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
}

.toggle-password i {
  font-size: 1rem;
}

input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b1220;
  color: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f4c81, #38bdf8);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(2, 132, 199, 0.35);
}

.login-note {
  margin-top: 0.85rem;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
}

#message {
  min-height: 2.2rem;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.95rem;
}

.message-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 9999px;
}

.message-success {
  color: #d9f99d;
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.message-error {
  color: #fecaca;
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.login-footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.92rem;
}

.developer-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
}

.developer-link:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 10, 20, 0.75);
  backdrop-filter: blur(6px);
  z-index: 50;
}

.modal-card {
  width: min(420px, calc(100% - 2rem));
  padding: 2rem;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(74, 222, 128, 0.18);
  text-align: center;
  box-shadow: 0 24px 80px rgba(15, 76, 129, 0.2);
  animation: modalPop 0.22s ease-out;
}

.modal-icon {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: #ecfccb;
  font-size: 1.75rem;
}

.modal-card h2 {
  margin: 0;
  font-size: 1.55rem;
  color: #f8fafc;
}

.modal-message {
  margin: 0.9rem auto 0;
  color: #d9f99d;
  line-height: 1.75;
}

.modal-ok-button {
  margin: 1.6rem auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 0.95rem 1.3rem;
  border: none;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-ok-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(34, 197, 94, 0.25);
}

.hidden {
  display: none !important;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .login-card {
    padding: 1.8rem;
  }
}
