
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}


.login-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}


.login-panel-left {
  flex: 1;
  background: linear-gradient(145deg, #6e0000 0%, #8b0000 45%, #a30000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}


.login-panel-left::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  top: -80px;
  right: -80px;
}

.login-panel-left::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  bottom: -60px;
  left: -60px;
}

.login-brand-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  margin-bottom: 28px;
  border: 3px solid rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

.login-brand-title {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin: 0 0 12px 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.login-brand-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

.login-brand-powered-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.login-brand-divider {
  width: 48px;
  height: 3px;
  background: rgba(255,255,255,0.5);
  border-radius: 3px;
  margin: 20px auto;
  position: relative;
  z-index: 1;
}


.login-panel-right {
  width: 420px;
  flex-shrink: 0;
  background: #faf8f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  overflow-y: auto;
  position: relative;
}

.login-form-logo {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(230,0,0,0.2);
}

.login-form-title {
  font-size: 24px;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 6px 0;
  text-align: center;
}

.login-form-subtitle {
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
  margin: 0 0 32px 0;
}


.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.3px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #9ca3af;
  pointer-events: none;
  line-height: 1;
}

.login-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14.5px;
  font-family: inherit;
  color: #1c1917;
  background: #ede9e4;
  transition: all 0.2s ease;
  outline: none;
}

.login-input::placeholder {
  color: #c4c9d4;
}

.login-input:focus {
  border-color: #a30000;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(140, 0, 0, 0.1);
}


.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b0000, #a30000);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.4px;
  margin-top: 6px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(140, 0, 0, 0.38);
  filter: brightness(1.06);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(140, 0, 0, 0.3);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}


.login-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s ease;
}

.login-btn:active::after {
  background: rgba(255,255,255,0.12);
}


#message {
  min-height: 20px;
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
  padding: 0;
  transition: all 0.3s ease;
}

#message.text-danger {
  color: #a30000;
  background: #fff5f5;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 10px;
}

#message.text-success {
  color: #16a34a;
}


.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%  { transform: translateX(-8px); }
  30%  { transform: translateX(7px); }
  45%  { transform: translateX(-6px); }
  60%  { transform: translateX(5px); }
  75%  { transform: translateX(-3px); }
  90%  { transform: translateX(2px); }
}

.login-form.shake {
  animation: shake 0.45s ease;
}

.login-input.input-error {
  border-color: #a30000;
  background: #fff8f8;
  box-shadow: 0 0 0 4px rgba(140, 0, 0, 0.1);
}


.login-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  animation: feedbackIn 0.3s ease;
  margin-top: 4px;
}

.login-feedback.feedback-error {
  background: #fff1f1;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.login-feedback.feedback-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.login-feedback-icon {
  font-size: 18px;
  flex-shrink: 0;
}

@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}


.login-success-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #fff;
  border-radius: inherit;
  z-index: 10;
  animation: fadeInScale 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.login-success-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 28px rgba(22, 163, 74, 0.35);
  animation: successCircle 0.5s 0.1s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

.login-success-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e1e2d;
  margin: 0;
  animation: fadeUp 0.35s 0.3s ease both;
}

.login-success-sub {
  font-size: 13.5px;
  color: #9ca3af;
  margin: 0;
  animation: fadeUp 0.35s 0.4s ease both;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes successCircle {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}



@media (max-width: 768px) {
  .login-panel-left {
    display: none;
  }

  .login-panel-right {
    width: 100%;
    padding: 40px 28px;
  }
}

@media (max-width: 400px) {
  .login-panel-right {
    padding: 32px 20px;
  }

  .login-form-title {
    font-size: 21px;
  }
}
