/* ===== LOGIN.CSS - TRIAS DLP Professional Login Page ===== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --trias-navy: #182c44;
  --trias-teal: #749cac;
  --trias-blue: #4484b0;
  --trias-green: #144c44;
  --trias-indigo: #44487c;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --danger: #e53e3e;
  --warning: #d69e2e;
  --success: #10b981;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.18);
}

html,
body {
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--slate-900);
  background:
    radial-gradient(circle at 12% 18%, rgba(116, 156, 172, 0.26), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(68, 132, 176, 0.18), transparent 18%),
    radial-gradient(circle at 78% 84%, rgba(20, 76, 68, 0.16), transparent 20%),
    linear-gradient(135deg, #0e1724 0%, #182c44 42%, #11354d 100%);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 26%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.03), transparent 28%);
  pointer-events: none;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
  z-index: 2;
}

.login-shell {
  width: 100%;
  max-width: 440px;
  display: block;
  align-items: stretch;
}

.login-brand-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top left, rgba(116, 156, 172, 0.16), transparent 28%);
  border-radius: 28px;
  padding: 42px 38px;
  color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: auto -12% -26% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(68, 132, 176, 0.24), transparent 66%);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark img {
  width: 180px;
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-copy {
  margin-top: 26px;
  max-width: 320px;
}

.brand-kicker,
.brand-copy h1 {
  display: none;
}

.brand-copy p {
  margin-top: 0;
  max-width: 320px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 236, 244, 0.84);
}

.login-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  padding: 34px 30px 24px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  position: relative;
  animation: slideUpLogin 0.45s ease;
}

.login-card.shake {
  animation: shakeError 0.42s ease;
}

@keyframes slideUpLogin {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 18px;
}

.login-logo img {
  width: 172px;
  height: auto;
}

.login-console-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(24, 44, 68, 0.06);
  border: 1px solid rgba(24, 44, 68, 0.08);
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-headline {
  margin-top: 0;
  text-align: center;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(24, 44, 68, 0.06);
  color: var(--trias-navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-headline h2 {
  margin-top: 14px;
  color: var(--trias-navy);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.login-headline p {
  margin-top: 8px;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.6;
}

.login-form {
  margin-top: 22px;
}

.error-msg {
  margin-top: 18px;
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.14), rgba(229, 62, 62, 0.08));
  border: 1px solid rgba(229, 62, 62, 0.2);
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

.input-group,
.select-group {
  position: relative;
}

.input-group input,
.select-group select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.94);
  color: var(--trias-navy);
  box-shadow: var(--shadow-xs);
}

.input-group input::placeholder {
  color: var(--slate-400);
  font-weight: 500;
}

.input-group input:hover,
.select-group select:hover {
  border-color: rgba(68, 132, 176, 0.42);
}

.input-group input:focus,
.select-group select:focus {
  border-color: var(--trias-blue);
  box-shadow: 0 0 0 4px rgba(68, 132, 176, 0.12);
}

.input-icon,
.select-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  font-size: 14px;
  z-index: 2;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--slate-400);
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--trias-blue);
  background: rgba(68, 132, 176, 0.08);
}

.select-group select {
  appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364758b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 14px;
}

.captcha-group {
  display: grid;
  gap: 10px;
}

.captcha-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  min-height: 82px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  border: 1px solid var(--slate-200);
}

.captcha-image {
  cursor: pointer;
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.captcha-refresh {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--trias-blue), var(--trias-navy));
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.captcha-refresh:hover {
  transform: rotate(90deg) translateY(-1px);
}

.login-btn {
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--trias-blue), var(--trias-navy));
  color: var(--white);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 16px 32px rgba(24, 44, 68, 0.18);
}

.login-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

.login-btn:active {
  transform: translateY(0);
}

.security-notice {
  background: rgba(214, 158, 46, 0.12);
  border: 1px solid rgba(214, 158, 46, 0.24);
  color: #9a6a10;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.8);
  text-align: center;
}

.login-footer small {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 600;
}

.login-btn:focus-visible,
.input-group input:focus-visible,
.select-group select:focus-visible,
.captcha-refresh:focus-visible {
  outline: 2px solid var(--trias-blue);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .login-shell {
    max-width: 440px;
  }
}

@media (max-width: 640px) {
  .login-wrapper {
    padding: 18px;
  }

  .login-card {
    padding: 24px 20px 20px;
  }

  .brand-mark img,
  .login-logo img {
    width: 144px;
  }

  .login-headline h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
