/* assets/css/login.css
   Styles specific to the login page (index.php).
   Depends on the CSS variables defined in the root style.css, which
   must be linked before this file.
*/

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 72px 16px 40px;
  background: var(--bg);
}

.container {
  width: 100%;
  max-width: 465px;
  animation: login-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  text-align: center;
  margin-bottom: 8px;
  animation: login-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand svg {
  display: block;
  margin: 0 auto;
  color: var(--text-primary);
}

.brand h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--text-primary);
}

.brand p {
  margin: 6px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.notice-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 32px 0 24px;
  animation: login-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notice-card:hover {
  border-color: #FFD9A8;
  box-shadow: 0 2px 8px rgba(253, 144, 2, 0.08);
}

.notice-card svg {
  flex: none;
  margin-top: 1px;
  width: 26px;
  height: 26px;
  padding: 5px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #FFF3E0;
  color: #FD9002;
}

.notice-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.alert {
  position: relative;
  border-radius: 10px;
  padding: 12px 14px 12px 40px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid;
  animation: alert-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.4;
}

@keyframes alert-pop {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.alert::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.alert-error {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: var(--error);
}

.alert-error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%23DC2626' stroke-width='2'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6' stroke='%23DC2626' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.alert-success {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: var(--success);
}

.alert-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%2316A34A' stroke-width='2'/%3E%3Cpath d='m8.5 12.5 2.3 2.3L16 10' stroke='%2316A34A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.portal-selector {
  display: flex;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
  animation: login-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

.portal-option {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4B5563;
  background: #FFFFFF;
  cursor: pointer;
  border: none;
  transition: background 0.18s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease, transform 0.1s ease;
}

.portal-option:hover {
  background: var(--selector-hover);
}

.portal-option:active {
  transform: scale(0.97);
}

.portal-option.active {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ── UPGRADED LOGIN CARD – premium double border & subtle glow ── */
.login-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  animation: login-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;

  /* Premium shadow with double‑border effect:
     - inner highlight (bevel)
     - main shadow
     - outer faint line (creates the double border illusion)
     - animated glow (from the keyframe) will be applied separately
  */
  box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 8px 24px rgba(17, 24, 39, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.03);

  transition: box-shadow 0.35s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  /* Keep the glow animation, but now it will also affect the enhanced shadow */
  animation: login-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both,
    card-glow 4s ease-in-out 1s infinite;
}

.login-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(17, 24, 39, 0.06),
    0 16px 40px rgba(17, 24, 39, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 2px rgba(253, 144, 2, 0.15);
  /* orange glow on hover – matches your brand */
}

/* Top accent bar – kept exactly as you had (orange) */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  /* background: #FD9002; */
  opacity: 0.9;
}

/* Glow animation now uses the updated shadow values */
@keyframes card-glow {

  0%,
  100% {
    box-shadow:
      0 1px 2px rgba(17, 24, 39, 0.04),
      0 8px 24px rgba(17, 24, 39, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 0 0 1px rgba(0, 0, 0, 0.03);
  }

  50% {
    box-shadow:
      0 1px 2px rgba(17, 24, 39, 0.04),
      0 10px 28px rgba(253, 144, 2, 0.13),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 0 0 1px rgba(253, 144, 2, 0.06);
  }
}

.field {
  margin-bottom: 20px;
}

.field:last-of-type {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 7px;
  transition: color 0.15s ease;
}

.field:focus-within label {
  color: #C2650A;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.field input:focus {
  border-color: #FD9002;
  box-shadow: 0 0 0 3.5px rgba(253, 144, 2, 0.15);
}

.password-wrap {
  position: relative;
}

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

.toggle-visibility {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.toggle-visibility:hover {
  color: var(--text-primary);
  background: var(--selector-hover);
}

.submit-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}

.submit-btn:hover {
  background: var(--btn-bg-hover);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.18);
}

.submit-btn:active {
  transform: scale(0.99);
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.15);
}

.helper-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 22px;
  line-height: 1.55;
  animation: login-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@media (max-width: 480px) {
  .page {
    padding: 40px 16px 24px;
  }

  .login-card {
    padding: 24px;
  }

  .brand h1 {
    font-size: 24px;
  }
}