/* --- GLOBAL & RESET --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dhani-blue: #1f58aa;
  --dhani-dark: #0f2b50;
  --dhani-orange: #f47a20;
  --text-gray: #333;
  --text-muted: #64748b;
  --bg-light: #f4f7fa;
  --border-color: #e2e8f0;
  --container-width: 1200px;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-gray);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- PREMIUM NAVIGATION BAR --- */
.premium-nav {
  background: linear-gradient(
    90deg,
    var(--dhani-dark) 0%,
    var(--dhani-blue) 100%
  );
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--dhani-orange);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.8rem;
  color: var(--dhani-orange);
}

.brand-text {
  color: white;
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-sub {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Header Contact Items */
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}
.contact-item:hover {
  color: var(--dhani-orange);
}

.contact-icon-box {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dhani-orange);
  font-size: 0.9rem;
}

.btn-support-nav {
  background: linear-gradient(135deg, var(--dhani-orange), #d35400);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(244, 122, 32, 0.3);
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
  cursor: pointer;
}
.btn-support-nav:hover {
  transform: translateY(-2px);
  color: white;
}

/* --- SECURITY MARQUEE --- */
.marquee-bar {
  background: #fff8e1;
  color: #856404;
  padding: 10px 0;
  border-bottom: 1px solid #ffeeba;
  font-size: 0.85rem;
  font-weight: 600;
}

/* --- MAIN LOGIN CONTAINER --- */
.login-wrapper {
  max-width: var(--container-width);
  width: 95%;
  margin: 40px auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  min-height: 550px; /* Ensure decent height */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* LEFT SIDE: LOGIN FORM */
.login-section {
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff;
}

.login-title {
  color: var(--dhani-blue);
  font-weight: 800;
  margin-bottom: 5px;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

.security-note {
  font-size: 0.85rem;
  color: #10b981; /* Green for security */
  margin-bottom: 30px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Input with Icon */
.input-group-premium {
  position: relative;
  width: 100%;
}

.input-group-premium i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  z-index: 2;
  transition: 0.3s;
}

.form-control-premium {
  width: 100%;
  padding: 14px 15px 14px 45px; /* Left padding for icon */
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  background-color: #f8fafc;
  transition: all 0.3s ease;
  outline: none;
}

.form-control-premium:focus {
  border-color: var(--dhani-blue);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(31, 88, 170, 0.1);
}
.form-control-premium:focus + i {
  color: var(--dhani-blue);
}

/* Captcha Styling */
.captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  width: fit-content;
  margin-bottom: 10px;
}

.captcha-img {
  font-family: "Courier New", monospace;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 4px;
  color: var(--dhani-dark);
  user-select: none;
  background: white;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px dashed #cbd5e1;
}

.captcha-input {
  width: 100%;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Standard Form Control (Used for Captcha Input) */
.form-control-login {
  width: 100% !important; /* Override inline styles from PHP */
  max-width: 100%;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-gray);
  background-color: #f8fafc;
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  outline: none;
}

.form-control-login:focus {
  border-color: var(--dhani-blue);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(31, 88, 170, 0.1);
}

/* Secure Login Button */
.btn-primary-login {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--dhani-orange), #e65100);
  color: white;
  font-weight: 800;
  padding: 16px;
  border-radius: 50px;
  border: none;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 20px rgba(244, 122, 32, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 10px;
}

.btn-primary-login:hover {
  background: linear-gradient(135deg, #e65100, #bf360c);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(244, 122, 32, 0.3);
}

.btn-primary-login:active {
  transform: translateY(1px);
  box-shadow: 0 5px 10px rgba(244, 122, 32, 0.2);
}

/* Links */
.login-links {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}
.login-links a {
  color: var(--dhani-blue);
  text-decoration: none;
  transition: 0.2s;
}
.login-links a:hover {
  color: var(--dhani-dark);
  text-decoration: underline;
}

/* RIGHT SIDE: BANNER */
.banner-section {
  flex: 1.1;
  background: url("https://images.unsplash.com/photo-1565514020175-0c2235d818aa?q=80&w=1920&auto=format&fit=crop")
    no-repeat center center;
  background-size: cover;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-left: 5px solid var(--dhani-orange);
}

.banner-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 43, 80, 0.9),
    rgba(31, 88, 170, 0.8)
  );
  z-index: 1;
}

/* Banner Pattern Overlay */
.banner-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle at 2px 2px,
    rgba(255, 255, 255, 0.1) 1px,
    transparent 0
  );
  background-size: 30px 30px;
  z-index: 1;
}

.shield-icon {
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.banner-text {
  position: relative;
  z-index: 2;
  color: white;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  max-width: 80%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-text h3 {
  margin: 0 0 15px;
  font-weight: 800;
  font-size: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.banner-text p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
  text-align: left;
  display: inline-block;
}
.feature-list li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}
.feature-list i {
  color: #10b981;
  margin-right: 10px;
}

/* --- FOOTER --- */
.portal-footer {
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 30px 0;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: auto; /* Push to bottom */
  text-align: center;
}

.security-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dhani-dark);
  font-weight: 600;
  background: #f8f9fa;
  padding: 6px 15px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
  .login-wrapper {
    flex-direction: column-reverse;
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .banner-section {
    padding: 40px 20px;
    min-height: auto;
    border-left: none;
    border-bottom: 5px solid var(--dhani-orange);
  }

  .login-section {
    padding: 30px 20px;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-around;
    padding-top: 10px;
    gap: 10px;
  }

  .contact-item span {
    display: none !important;
  } /* Icon only on mobile */
  .btn-support-nav span {
    display: inline !important;
  }
  .brand-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .login-links {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .banner-text h3 {
    font-size: 1.5rem;
  }
}
