/* ============================================
   Modern Login Page with Advertisement Section
   ============================================ */

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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Elements */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  opacity: 0.1;
}

body::before {
  background: white;
  top: -150px;
  left: -150px;
  height: 400px;
  width: 400px;
  animation: float 20s ease-in-out infinite;
}

body::after {
  background: white;
  bottom: -200px;
  right: -200px;
  height: 500px;
  width: 500px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(30px);
  }
}

/* ============================================
   Main Login Container
   ============================================ */

.login-container {
  width: 100%;
  max-width: calc(100vw - 80px);
  position: relative;
  z-index: 1;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  min-height: calc(100vh - 80px);
}

/* ============================================
   Left Side - Advertisement Section
   ============================================ */

.login-left {
  background: linear-gradient(135deg, #087a52 0%, #06663f 100%);
  color: white;
  padding: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.login-left::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.promo-section {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.promo-header {
  text-align: center;
  margin-bottom: 30px;
}

.promo-logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 15px;
  background: white;
  padding: 15px 25px;
}

.promo-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Updates Carousel */
.updates-carousel {
  position: relative;
  min-height: 280px;
  margin: 30px 0;
}

.update-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.update-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.update-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 20px;
  backdrop-filter: blur(10px);
}

.update-slide h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.update-slide p {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  opacity: 0.95;
}

/* Carousel Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: white;
  width: 30px;
  border-radius: 10px;
}

/* Quick Stats */
.quick-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-item i {
  font-size: 24px;
  margin-bottom: 5px;
}

.stat-item strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
}

.stat-item span {
  font-size: 13px;
  opacity: 0.9;
}

/* Powered by Badge */
.powered-by {
  text-align: center;
  margin-top: 20px;
}

.powered-by a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.powered-by a:hover {
  opacity: 1;
}

.powered-by i {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ============================================
   Right Side - Login Form
   ============================================ */

.login-right {
  padding: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.login-form-container {
  width: 100%;
  max-width: 560px;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header h3 {
  font-size: 28px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}

.form-header p {
  color: #7f8c8d;
  font-size: 14px;
}

/* Form Styling */
.login-form {
  width: 100%;
}

.login-form .form-group {
  margin-bottom: 25px;
}

.login-form label {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
}

.login-form label i {
  color: #087a52;
  margin-right: 5px;
}

.login-form .form-control {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.login-form .form-control:focus {
  border-color: #087a52;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
  outline: none;
}

.login-form .form-control.is-invalid {
  border-color: #087a52;
}

/* Password Input with Toggle */
.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #7f8c8d;
  transition: color 0.3s;
}

.password-toggle:hover {
  color: #087a52;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.custom-control-label {
  font-size: 14px;
  color: #2c3e50;
  user-select: none;
  cursor: pointer;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: #087a52;
  border-color: #087a52;
}

.forgot-link {
  font-size: 14px;
  color: #087a52;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-link:hover {
  color: #06663f;
  text-decoration: underline;
}

/* Login Button */
.btn-login {
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #087a52 0%, #06663f 100%);
  border: none;
  color: white;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
  background: linear-gradient(135deg, #06663f 0%, #055434 100%);
}

.btn-login i {
  margin-right: 8px;
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.form-footer p {
  color: #7f8c8d;
  font-size: 14px;
  margin: 0;
}

.form-footer a {
  color: #087a52;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.form-footer a:hover {
  color: #06663f;
  text-decoration: underline;
}

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

.alert i {
  font-size: 18px;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 992px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .login-left {
    padding: 40px 30px;
    min-height: 400px;
  }
  
  .login-right {
    padding: 40px 30px;
  }
  
  .promo-title {
    font-size: 24px;
  }
  
  .update-slide h3 {
    font-size: 20px;
  }
  
  .update-slide p {
    font-size: 14px;
  }
  
  .quick-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .stat-item {
    flex: 1 1 30%;
  }
}

@media (max-width: 576px) {
  body {
    padding: 10px;
  }
  
  .login-wrapper {
    border-radius: 15px;
  }
  
  .login-left {
    padding: 30px 20px;
    min-height: 350px;
  }
  
  .login-right {
    padding: 30px 20px;
  }
  
  .promo-logo {
    max-width: 180px;
  }
  
  .promo-title {
    font-size: 20px;
  }
  
  .form-header h3 {
    font-size: 24px;
  }
  
  .update-icon {
    width: 60px;
    height: 60px;
    font-size: 26px;
  }
  
  .update-slide h3 {
    font-size: 18px;
  }
  
  .update-slide p {
    font-size: 13px;
  }
  
  .quick-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .stat-item {
    flex-direction: row;
    justify-content: center;
  }
  
  .form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}

/* ============================================
   Registration Page Compatibility
   ============================================ */

.form-signup {
  font-family: 'Poppins', sans-serif;
  width: 100%;
}

.form-signup .btn {
  font-size: 14px;
  letter-spacing: .1rem;
  padding: 12px 20px;
  transition: all 0.2s;
}

.form-signup .form-control {
  padding: 12px 20px;
  height: auto;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
}

.form-signup .form-control:focus {
  border: 2px solid #087a52;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

select.form-control {
  padding: 12px 20px;
  height: 51px !important;
}

.btn-register {
  text-align: center;
  display: block;
  color: #000000;
  font-size: 16px !important;
}

.btn-register:hover {
  color: #000000;
}

/* ============================================
   Button Styles
   ============================================ */

.btn-primary {
  background-color: #087a52 !important;
  border-color: #087a52 !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #06663f !important;
  border-color: #06663f !important;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ============================================
   Custom Controls
   ============================================ */

.custom-control {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding-left: 1.5rem;
}

.custom-control-input {
  position: absolute;
  z-index: -1;
  opacity: 0;
}

.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: top;
}

.custom-control-label::before {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  content: "";
  background-color: #fff;
  border: 1px solid #adb5bd;
  border-radius: 0.25rem;
}

.custom-control-label::after {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  content: "";
  background: no-repeat 50% / 50% 50%;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #087a52;
  border-color: #087a52;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

/* ============================================
   Utility Classes
   ============================================ */

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

.text-muted {
  color: #7f8c8d !important;
}

.d-block {
  display: block;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

/* ============================================
   Invalid Feedback
   ============================================ */

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 80%;
  color: #087a52;
}

.is-invalid ~ .invalid-feedback {
  display: block;
}

/* ============================================
   Bankora247 SaaS Auth Theme
   ============================================ */

:root {
  --bankora-blue: #08275c;
  --bankora-green: #159a39;
  --bankora-light-green: #e9f8ee;
  --bankora-gold: #d4a642;
  --bankora-text: #152238;
}

body {
  background: linear-gradient(135deg, #f4fff7 0%, #eef6ff 100%) !important;
}

.bankora-auth-shell {
  min-height: calc(100vh - 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bankora-auth-card,
.bankora-register-card {
  width: min(1120px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(8, 39, 92, 0.14);
  overflow: hidden;
  border: 1px solid rgba(21, 154, 57, 0.14);
}

.bankora-auth-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}

.bankora-auth-brand {
  padding: 44px;
  background:
    radial-gradient(circle at top right, rgba(21, 154, 57, .24), transparent 34%),
    linear-gradient(145deg, #07265a 0%, #0d3d7a 54%, #159a39 100%);
  color: #fff;
}

.bankora-logo {
  width: min(280px, 85%);
  max-height: 180px;
  object-fit: contain;
  background: rgba(255,255,255,.96);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 14px 38px rgba(0,0,0,.16);
}

.bankora-logo.small {
  width: 190px;
  max-height: 130px;
}

.bankora-auth-brand h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 28px 0 12px;
  color: #fff;
}

.bankora-auth-brand p {
  font-size: 15px;
  line-height: 1.7;
  max-width: 520px;
  color: rgba(255,255,255,.88);
}

.bankora-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.bankora-feature-grid span {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.bankora-auth-form {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bankora-auth-form .form-header h3,
.register-intro h2 {
  color: var(--bankora-blue);
  font-weight: 700;
}

.login-form label i,
.forgot-link,
.bankora-register-cta a {
  color: var(--bankora-green) !important;
}

.login-form .form-control,
.business-register-form .form-control {
  border: 1px solid #d6e4dc;
  border-radius: 8px;
  min-height: 46px;
}

.login-form .form-control:focus,
.business-register-form .form-control:focus {
  border-color: var(--bankora-green);
  box-shadow: 0 0 0 .18rem rgba(21,154,57,.15);
}

.btn-primary,
.btn-login {
  background: linear-gradient(135deg, #159a39 0%, #0b7c2b 100%) !important;
  border-color: #159a39 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-login:hover {
  background: linear-gradient(135deg, #0b7c2b 0%, #075d20 100%) !important;
  border-color: #0b7c2b !important;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--bankora-green);
  border-color: var(--bankora-green);
}

.bankora-register-cta {
  margin-top: 18px;
  padding: 14px;
  background: var(--bankora-light-green);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bankora-register-card {
  padding: 34px;
}

.register-intro {
  text-align: center;
  margin-bottom: 24px;
}

.register-intro p {
  color: #607080;
  margin-bottom: 0;
}

.form-section-title {
  color: var(--bankora-blue);
  font-weight: 700;
  margin: 18px 0 12px;
  padding: 9px 12px;
  border-left: 4px solid var(--bankora-green);
  background: var(--bankora-light-green);
  border-radius: 6px;
}

.business-register-form label {
  color: var(--bankora-text);
  font-weight: 600;
  font-size: 13px;
}

.register-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.alert-danger {
  background-color: #fff2f2;
  border-color: #ffd4d4;
  color: #8a1f1f;
}

.invalid-feedback {
  color: #b42318;
}

@media (max-width: 900px) {
  .bankora-auth-card {
    grid-template-columns: 1fr;
  }

  .bankora-auth-brand,
  .bankora-auth-form,
  .bankora-register-card {
    padding: 26px;
  }
}

/* Final Bankora247 green theme override */
a,
.forgot-link,
.login-form label i,
.bankora-register-cta a,
.form-section-title,
.custom-control-label::before {
  color: var(--bankora-green) !important;
}

.btn-primary,
.btn-login,
.login-container .btn-primary,
.auth-form .btn-primary,
.register-actions .btn-primary {
  background: linear-gradient(135deg, #159a39 0%, #087a52 100%) !important;
  border-color: #159a39 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-login:hover,
.login-container .btn-primary:hover,
.auth-form .btn-primary:hover,
.register-actions .btn-primary:hover {
  background: linear-gradient(135deg, #087a52 0%, #06663f 100%) !important;
  border-color: #087a52 !important;
  color: #fff !important;
}

.form-control:focus,
.login-form .form-control:focus,
.business-register-form .form-control:focus {
  border-color: var(--bankora-green) !important;
  box-shadow: 0 0 0 .18rem rgba(21, 154, 57, .15) !important;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--bankora-green) !important;
  border-color: var(--bankora-green) !important;
}

.invalid-feedback,
.alert-danger {
  color: #166534 !important;
}

.alert-danger {
  background-color: #ecfdf3 !important;
  border-color: #bbf7d0 !important;
}
