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

:root {
  --orange: #f97316;
  --red: #dc2626;
  --gold: #f59e0b;
  --dark: #0a0a0f;
  --card-bg: rgba(12, 12, 20, 0.92);
  --border: rgba(249, 115, 22, 0.25);
  --text: #e8e8f0;
  --muted: #8888a8;
}

body {
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050508;
  overflow: hidden;
  position: relative;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(220,38,38,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(249,115,22,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(10,10,30,0.95) 0%, #050508 100%);
  z-index: 0;
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--orange);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  padding: 20px;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px 36px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(249,115,22,0.08),
    0 40px 80px rgba(0,0,0,0.8),
    0 0 60px rgba(249,115,22,0.07);
}

.card-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 150px;
  background: radial-gradient(ellipse, rgba(249,115,22,0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Institute Header */
.institute-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 0 0 24px rgba(249,115,22,0.3), inset 0 0 20px rgba(249,115,22,0.07);
  animation: rotateBorder 8s linear infinite;
}

@keyframes rotateBorder {
  0% { box-shadow: 0 0 24px rgba(249,115,22,0.3), inset 0 0 20px rgba(249,115,22,0.07); }
  50% { box-shadow: 0 0 36px rgba(249,115,22,0.5), inset 0 0 20px rgba(249,115,22,0.1); }
  100% { box-shadow: 0 0 24px rgba(249,115,22,0.3), inset 0 0 20px rgba(249,115,22,0.07); }
}

.logo-inner {
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-letter {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: -1px;
}

.logo-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
  margin: 0 1px;
}

.institute-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: 1.5px;
}

.institute-name span {
  color: var(--orange);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.divider-text {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  font-weight: 500;
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.alert-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
}

.alert-icon { font-size: 16px; }

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

.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 13px 44px 13px 42px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.input-wrap input::placeholder { color: rgba(136,136,168,0.5); }

.input-wrap input:focus {
  border-color: var(--orange);
  background: rgba(249,115,22,0.05);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

.toggle-pw {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--orange); }

/* Buttons */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--orange), var(--red));
  opacity: 0;
  transition: opacity 0.25s;
}

.btn-login:hover::before { opacity: 1; }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(220,38,38,0.4); }
.btn-login span { position: relative; z-index: 1; }
.btn-arrow { font-size: 18px; }

/* Links */
.login-links {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.link-sep { margin: 0 10px; opacity: 0.4; }

.link-small {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.link-small:hover { color: var(--text); }

.link-highlight {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.link-highlight:hover { color: var(--gold); }

.card-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 11px;
  color: rgba(136,136,168,0.5);
  letter-spacing: 0.5px;
}
