/* ==========================================================================
   OVS-SIESEC — Login Page Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --blue-dark:  #04091a;
  --blue-mid:   #071230;
  --blue-accent:#1340c7;
  --blue-light: #3b6ef5;
  --gold:       #f0c040;
  --success:    #00f5a0;
  --text-main:  #f0f4ff;
  --text-muted: #8ba0cc;
  --border-g:   rgba(59,110,245,0.18);
  --shadow:     0 24px 60px rgba(0,0,0,0.55);
  --radius-lg:  20px;
  --radius-md:  12px;
  --radius-sm:  8px;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-main);
  background: var(--blue-dark);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(145deg, #020816 0%, #071230 40%, #0d2060 70%, #071a48 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 0;
  position: relative;
  overflow: hidden;
}

/* Animated floating particles */
.bg-particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  animation: float-up linear infinite;
  opacity: 0;
  background: rgba(59, 110, 245, 0.12);
}
.bg-particles span:nth-child(1)  { width:60px;  height:60px;  left:10%;  animation-duration:18s; animation-delay:0s; }
.bg-particles span:nth-child(2)  { width:30px;  height:30px;  left:25%;  animation-duration:22s; animation-delay:3s; }
.bg-particles span:nth-child(3)  { width:80px;  height:80px;  left:42%;  animation-duration:15s; animation-delay:1s; }
.bg-particles span:nth-child(4)  { width:20px;  height:20px;  left:60%;  animation-duration:20s; animation-delay:5s; }
.bg-particles span:nth-child(5)  { width:50px;  height:50px;  left:75%;  animation-duration:17s; animation-delay:2s; }
.bg-particles span:nth-child(6)  { width:35px;  height:35px;  left:85%;  animation-duration:25s; animation-delay:4s; }
.bg-particles span:nth-child(7)  { width:15px;  height:15px;  left:5%;   animation-duration:12s; animation-delay:6s; }
.bg-particles span:nth-child(8)  { width:70px;  height:70px;  left:50%;  animation-duration:19s; animation-delay:1.5s; }
.bg-particles span:nth-child(9)  { width:25px;  height:25px;  left:35%;  animation-duration:23s; animation-delay:7s; }
.bg-particles span:nth-child(10) { width:45px;  height:45px;  left:90%;  animation-duration:16s; animation-delay:3.5s; }

@keyframes float-up {
  0%   { transform: translateY(110vh) scale(0.5); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-10vh)  scale(1.2); opacity: 0; }
}

/* ── Layout wrapper ── */
.login-wrapper {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 2;
}

/* ── Glass Card ── */
.glass-card {
  width: 100%;
  background: rgba(8, 18, 50, 0.70);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-g);
  border-radius: var(--radius-lg);
  padding: 36px 40px 28px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(59,110,245,0.08);
  animation: card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-in {
  0%   { opacity: 0; transform: translateY(28px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Logo Area ── */
.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.ovs-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(19,64,199,0.5));
  border-radius: 14px;
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 6px 20px rgba(19,64,199,0.5)); }
  50%       { filter: drop-shadow(0 6px 28px rgba(59,110,245,0.75)); }
}

.system-title {
  text-align: center;
}

.system-title h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #ffffff 30%, #7aaeff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.system-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 5px;
}

/* ── Form ── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group-login {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-login label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-group-login input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(4, 9, 26, 0.6);
  border: 1px solid var(--border-g);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.25s ease;
}

.form-group-login input:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59, 110, 245, 0.18);
  background: rgba(4, 9, 26, 0.85);
}

.form-group-login input::placeholder {
  color: rgba(139, 160, 204, 0.5);
}

/* Password toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-pass:hover {
  color: var(--text-main);
}

/* Error message */
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 78, 80, 0.12);
  border: 1px solid rgba(255, 78, 80, 0.35);
  border-radius: var(--radius-sm);
  color: #ff8080;
  font-size: 0.85rem;
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.hide { display: none !important; }

/* Login button */
.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1340c7 0%, #3b6ef5 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(19, 64, 199, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59, 110, 245, 0.5);
}

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

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Institutional Logos Strip ── */
.logos-strip {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logos-divider {
  width: 100%;
  height: 1px;
  background: var(--border-g);
}

.logos-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
}

.logos-row img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(1);
  transition: filter 0.2s ease, transform 0.2s ease;
  border-radius: 4px;
}

.logos-row img:hover {
  filter: brightness(1.1);
  transform: scale(1.04);
}

/* ── Footer ── */
.login-footer {
  width: 100%;
  padding: 16px 20px 12px;
  text-align: center;
  border-top: 1px solid rgba(59, 110, 245, 0.1);
  margin-top: 6px;
}

.login-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 5px;
}

.footer-org-txt {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.footer-addr {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto 8px;
}

.footer-copy-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  color: rgba(139, 160, 204, 0.6);
}

.footer-lnk {
  color: var(--blue-light);
  text-decoration: none;
  font-weight: 600;
}

.footer-lnk:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .glass-card {
    padding: 28px 22px 22px;
    border-radius: 16px;
  }

  .ovs-logo {
    width: 80px;
    height: 80px;
  }

  .system-title h1 {
    font-size: 1.5rem;
  }

  .logos-row img {
    height: 40px;
  }
}
