@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #ff000f;
  --primary-tint: #fff1f2;
  --dark-text: #2c3e50; /* A slightly softer, professional dark blue/grey */
  --light-text: #7f8c8d;
  --background-color: #f4f7fa;
  --white-color: #ffffff;
  --border-color: #e0e0e0;
  --dark-button-color: #34495e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  color: var(--dark-text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 100%;
  background-color: var(--white-color);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== Left Branding Section ====== */
.branding-section {
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--primary-tint);
  background-image: linear-gradient(
      to bottom right,
      var(--primary-tint) 0%,
      var(--white-color) 100%
    ),
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.03),
      rgba(0, 0, 0, 0.03) 1px,
      transparent 1px,
      transparent 10px
    );
}

.branding-content {
  animation: fadeIn 0.8s ease-out;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
.logo-shape {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* SVG icon for logo - e.g., a bolt for electricity */
.logo-shape svg {
  width: 20px;
  height: 20px;
  color: white;
}
.logo span {
  font-size: 1.3rem;
  font-weight: 600;
}

.branding-content h1 {
  font-size: 2.3rem;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 15px;
}
.branding-content .description {
  font-size: 1rem;
  color: var(--light-text);
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 30px;
}

/* NEW: Feature Highlights Section */
.feature-highlights {
  display: flex;
  gap: 25px;
  margin-bottom: 40px;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}
.highlight-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
}

.btn-demo {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--dark-text);
  color: var(--white-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-demo:hover {
  background-color: #000;
  transform: translateY(-2px);
}

/* ====== Right Login Section ====== */
.login-section {
  padding: 40px 50px;
  display: flex;
  flex-direction: column;
}

/* NEW: Header for App/Support links */
.login-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease-out 0.2s;
  animation-fill-mode: both;
}
.btn-app-store {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: #f0f0f0;
  border-radius: 6px;
  text-decoration: none;
  color: var(--dark-text);
  font-size: 0.85rem;
  transition: background-color 0.3s;
}
.btn-app-store:hover {
  background-color: #e0e0e0;
}
.btn-app-store svg {
  width: 18px;
  height: 18px;
}
.contact-support {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--light-text);
}
.contact-support:hover {
  text-decoration: underline;
  color: var(--dark-text);
}

.login-form-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  animation: fadeIn 0.8s ease-out 0.4s;
  animation-fill-mode: both;
}
.login-form h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.login-form .subtitle {
  font-size: 1rem;
  color: var(--light-text);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}
.form-group label,
.form-actions label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.form-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(255, 0, 15, 0.1);
}

.password-toggle {
  position: absolute;
  top: 45px;
  right: 15px;
  cursor: pointer;
  color: var(--light-text);
}
.password-toggle svg {
  width: 20px;
  height: 20px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.forgot-pass {
  font-size: 0.9rem;
  color: var(--light-text);
  text-decoration: none;
}
.forgot-pass:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 15, 0.2);
}
.btn-login:hover {
  background-color: #d6000d;
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(255, 0, 15, 0.3);
}
.btn-login:disabled {
  background-color: #fcc;
  cursor: not-allowed;
  transform: translateY(0);
  box-shadow: none;
}

#error-message {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-top: 15px;
  text-align: center;
  height: 1em;
}

@media (max-width: 992px) {
  .container {
    grid-template-columns: 1fr;
  }
  .branding-section {
    display: none;
  }
  .login-section {
    padding: 40px;
  }
}
@media (max-width: 480px) {
  body {
    padding: 0;
  }
  .container {
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
  }
  .login-section {
    padding: 30px;
  }
  .login-header {
    justify-content: center;
  }
}
