:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --light: #f8fafc;
  --dark: #1e293b;
  --gray: #94a3b8;
  --gray-light: #e2e8f0;
  --border-radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 100%;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 700px;
}

.login-left {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.05)"><polygon points="0,0 100,0 100,100"/></svg>');
  background-size: cover;
}

/* ===== ENHANCED LOGO STYLES FOR LOGIN ===== */
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.logo-image {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.logo-container:hover .logo-image {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.logo-text h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-text p {
  opacity: 0.9;
  font-size: 1.1rem;
  color: white;
}

/* Hapus styling untuk logo placeholder yang lama */
.logo-placeholder {
  display: none;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-item i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.25rem;
}

.feature-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  opacity: 0.8;
  line-height: 1.5;
}

.login-right {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--secondary);
  font-size: 1.1rem;
}

.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.alert-error {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #d1fae5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group input {
  padding: 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
  color: var(--gray);
}

.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.toggle-password:hover {
  color: var(--primary);
  background: var(--gray-light);
}

.captcha-container {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.captcha-code {
  flex: 1;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-family: "Courier New", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  color: var(--dark);
  border: 2px dashed var(--gray);
}

.refresh-captcha {
  background: var(--gray-light);
  border: none;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--dark);
}

.refresh-captcha:hover {
  background: var(--gray);
  color: white;
}

.login-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remember-me input {
  width: auto;
}

.remember-me label {
  font-weight: normal;
  color: var(--secondary);
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.forgot-password:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.demo-accounts {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary);
}

.demo-accounts h4 {
  margin-bottom: 1rem;
  color: var(--dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-item {
  font-size: 0.9rem;
  color: var(--secondary);
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--gray-light);
}

/* Responsive Design */
@media (max-width: 968px) {
  .login-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-left {
    padding: 2rem;
    order: 2;
  }

  .login-right {
    padding: 2rem;
    order: 1;
  }

  .logo-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .logo-image {
    width: 70px;
    height: 70px;
  }

  .logo-text h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }

  .login-container {
    border-radius: 8px;
  }

  .login-left,
  .login-right {
    padding: 1.5rem;
  }

  .logo-image {
    width: 60px;
    height: 60px;
    padding: 6px;
    border-radius: 10px;
  }

  .logo-text h1 {
    font-size: 1.5rem;
  }

  .logo-text p {
    font-size: 1rem;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }

  .captcha-container {
    flex-direction: column;
  }

  .login-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* ===== PUBLIC METER ACCESS DI LOGIN LEFT ===== */
.public-meter-access-left {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.public-meter-access-left::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.05)"><rect x="10" y="10" width="8" height="8" rx="1"/><rect x="30" y="25" width="6" height="6" rx="1"/><rect x="50" y="15" width="5" height="5" rx="1"/><rect x="70" y="30" width="7" height="7" rx="1"/><rect x="85" y="10" width="4" height="4" rx="1"/></svg>');
  background-size: 150px 150px;
  animation: float 15s infinite linear;
}

/* ===== LIVE MONITORING ACCESS DI LOGIN RIGHT ===== */
.live-monitoring-access {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-monitoring-access::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.05)"><circle cx="50" cy="50" r="2"/><circle cx="20" cy="20" r="1"/><circle cx="80" cy="80" r="1.5"/><circle cx="30" cy="70" r="1"/><circle cx="70" cy="30" r="1.2"/></svg>');
  background-size: 200px 200px;
  animation: float 20s infinite linear;
}

/* Floating Icons untuk Left Side */
.floating-icons {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon-1,
.floating-icon-2,
.floating-icon-3 {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.3;
  color: white;
}

.floating-icon-1 {
  top: 20%;
  left: 10%;
  animation: float-icon-1 8s infinite ease-in-out;
}

.floating-icon-2 {
  top: 60%;
  right: 15%;
  animation: float-icon-2 10s infinite ease-in-out;
}

.floating-icon-3 {
  bottom: 30%;
  left: 20%;
  animation: float-icon-3 12s infinite ease-in-out;
}

@keyframes float-icon-1 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

@keyframes float-icon-2 {
  0%,
  100% {
    transform: translateX(0px) translateY(0px);
  }
  33% {
    transform: translateX(10px) translateY(-15px);
  }
  66% {
    transform: translateX(-5px) translateY(10px);
  }
}

@keyframes float-icon-3 {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
}

/* Pulse Avatar untuk Left Side */
.pulse-avatar {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
  animation: pulse-glow 2s infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.pulse-avatar::before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: pulse-ring 3s infinite;
}

.pulse-avatar i {
  font-size: 2rem;
  color: white;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6),
      0 0 40px rgba(255, 255, 255, 0.4);
  }
}

/* Access Header */
.access-header {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.access-header h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.access-header p {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Access Features */
.access-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Feature Cards untuk Left Side */
.feature-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.feature-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon i {
  font-size: 1.2rem;
  color: white;
}

.feature-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.feature-content p {
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0;
}

/* Features untuk Right Side */
.feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.feature span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Stats Preview untuk Left Side */
.stats-preview {
  display: flex;
  justify-content: space-around;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fbbf24;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.public-access-btn,
.live-access-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  width: 100%;
}

.public-access-btn:hover,
.live-access-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.access-badge,
.live-badge {
  background: #f59e0b;
  color: #1e293b;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.access-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.8;
  text-align: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Pulse Animation untuk Right Side */
.pulse-animation {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  animation: pulse 2s infinite;
}

.pulse-animation::before {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

.pulse-animation i {
  font-size: 1.5rem;
  color: white;
}

/* Animated Icons untuk Right Side */
.animated-eye {
  animation: blink 3s infinite;
}

.animated-chart {
  animation: bounce 2s infinite;
}

.animated-clock {
  animation: rotate 4s infinite linear;
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200px 200px;
  }
}

/* Responsive Design */
@media (max-width: 968px) {
  .login-container {
    grid-template-columns: 1fr;
  }

  .public-meter-access-left {
    order: 3;
    margin-top: 1.5rem;
  }

  .live-monitoring-access {
    order: 4;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .public-meter-access-left,
  .live-monitoring-access {
    padding: 1.5rem;
  }

  .pulse-avatar {
    width: 60px;
    height: 60px;
  }

  .pulse-avatar::before {
    width: 80px;
    height: 80px;
  }

  .pulse-animation {
    width: 50px;
    height: 50px;
  }

  .pulse-animation::before {
    width: 70px;
    height: 70px;
  }

  .access-header h3 {
    font-size: 1.2rem;
  }

  .feature-card {
    padding: 0.75rem;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
  }

  .stats-preview {
    padding: 0.75rem;
  }

  .public-access-btn,
  .live-access-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}
