/* ============================================
   TAIIH Executive Portal — Login Page Styles
   ============================================ */

:root {
  --p-primary: #0B3C8C;
  --p-primary-light: #1A5BC4;
  --p-accent: #D4AF37;
  --p-accent-light: #E8C84A;
  --p-navy: #0A1D37;
  --p-navy-light: #0F2A4A;
  --p-success: #22C55E;
  --p-error: #DC2626;
  --p-warning: #F59E0B;
  --p-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --p-font-heading: 'Playfair Display', Georgia, serif;
}

[data-theme="dark"] {
  --login-bg: #070D1A;
  --login-card: #0F1520;
  --login-input-bg: #151E2E;
  --login-text: #FFFFFF;
  --login-text-muted: #8892A8;
  --login-border: #1A2540;
  --login-shadow: rgba(0,0,0,0.6);
}

[data-theme="light"] {
  --login-bg: #F0F2F7;
  --login-card: #FFFFFF;
  --login-input-bg: #F8F9FA;
  --login-text: #0A1D37;
  --login-text-muted: #6B7590;
  --login-border: #D8DCE8;
  --login-shadow: rgba(10,46,92,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

.login-body {
  font-family: var(--p-font);
  background: var(--login-bg);
  color: var(--login-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
}

/* --- Layout --- */
.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* --- Brand Panel (Left) --- */
.login-brand-panel {
  background: linear-gradient(135deg, var(--p-navy), var(--p-primary), var(--p-navy));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 30% 40%, rgba(212,175,55,0.08), transparent),
              radial-gradient(ellipse 40% 40% at 80% 70%, rgba(11,60,140,0.15), transparent);
}

.brand-content {
  position: relative;
  z-index: 2;
}

.brand-logo {
  width: 80px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.brand-title {
  font-family: var(--p-font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.brand-title span {
  color: var(--p-accent);
  font-size: 0.65em;
  display: block;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
}

.brand-divider {
  width: 60px;
  height: 3px;
  background: var(--p-accent);
  margin-bottom: 1.5rem;
}

.brand-org {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.brand-motto {
  font-size: 0.85rem;
  color: var(--p-accent);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.brand-feature i {
  color: var(--p-accent);
  font-size: 1rem;
}

.brand-footer {
  position: absolute;
  bottom: 2rem;
  left: 3rem;
  right: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.brand-footer span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

.theme-toggle-login {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s;
}

.theme-toggle-login:hover {
  background: rgba(255,255,255,0.15);
  color: var(--p-accent);
}

/* --- Form Panel (Right) --- */
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--login-bg);
}

.login-form-content {
  width: 100%;
  max-width: 400px;
}

.login-mobile-logo {
  display: none;
  margin-bottom: 2rem;
}

.login-mobile-logo img {
  height: 48px;
  border-radius: 8px;
}

.login-form-content h2 {
  font-family: var(--p-font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--login-text);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.95rem;
  color: var(--login-text-muted);
  margin-bottom: 2rem;
}

/* --- Alerts --- */
.login-alert {
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

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

/* --- Form --- */
.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--login-text);
  margin-bottom: 0.5rem;
}

.input-icon {
  position: relative;
}

.input-icon > i:first-child {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--login-text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.input-icon input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: var(--login-input-bg);
  border: 1px solid var(--login-border);
  border-radius: 10px;
  color: var(--login-text);
  font-family: var(--p-font);
  font-size: 0.95rem;
  transition: all 0.3s;
  outline: none;
}

.input-icon input:focus {
  border-color: var(--p-primary);
  box-shadow: 0 0 0 3px rgba(11,60,140,0.15);
}

.input-icon input::placeholder {
  color: var(--login-text-muted);
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--login-text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
}

.password-toggle:hover {
  color: var(--p-primary);
}

/* --- Submit Button --- */
.btn-login {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--p-primary), var(--p-primary-light));
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: var(--p-font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(11,60,140,0.3);
  margin-top: 0.5rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(11,60,140,0.4);
}

/* --- Footer Text --- */
.login-footer-text {
  margin-top: 2rem;
  text-align: center;
}

.login-footer-text p {
  font-size: 0.8rem;
  color: var(--login-text-muted);
  margin-bottom: 0.25rem;
}

.login-footer-text a {
  color: var(--p-primary);
  text-decoration: none;
}

.login-footer-text a:hover {
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .login-wrapper {
    grid-template-columns: 1fr;
  }
  .login-brand-panel {
    display: none;
  }
  .login-mobile-logo {
    display: block;
  }
  .login-form-panel {
    min-height: 100vh;
  }
}
