* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #155233;
  --primary-dark: #0d3a23;
  --primary-light: #1f6b49;
  --accent-gold: #d4af37;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --text-muted: #999999;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --error: #d32f2f;
  --success: #2e7d32;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
}

.login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Panel - Brand Section */
.login-split {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-panel {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px;
  max-width: 600px;
}

.brand-content {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-title {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  color: var(--bg-white);
  letter-spacing: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
  line-height: 1.2;
}

.brand-tagline {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--accent-gold);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.brand-divider {
  width: 80px;
  height: 2px;
  background: var(--accent-gold);
  margin: 0 auto 40px;
}

.brand-description {
  font-size: clamp(18px, 2vw, 24px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  line-height: 1.8;
}

/* Right Panel - Login Form */
.right-panel {
  background: var(--bg-white);
  padding: 40px;
}

.login-container {
  max-width: 480px;
  width: 100%;
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.logo-wrapper {
  text-align: center;
  margin-bottom: 48px;
}

.brand-logo {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(21, 82, 51, 0.2));
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    filter: drop-shadow(0 4px 12px rgba(21, 82, 51, 0.2)) brightness(1);
  }
  50% {
    filter: drop-shadow(0 8px 20px rgba(21, 82, 51, 0.4)) brightness(1.1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 400;
}

/* Form Styles */
.login-form {
  margin-bottom: 32px;
}

.input-group {
  margin-bottom: 28px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.input-container {
  position: relative;
}

.input-container.focused .input-label {
  color: var(--primary);
}

.input-field {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  outline: none;
  direction: ltr;
  text-align: right;
}

.input-field::placeholder {
  color: var(--text-muted);
  direction: ltr;
}

.input-field:hover {
  border-color: var(--primary-light);
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(21, 82, 51, 0.08);
}

.input-focus-border {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.4s ease;
}

.input-container.focused .input-focus-border {
  width: 100%;
}

/* Message Box */
.message-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 24px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-box.error {
  background: rgba(211, 47, 47, 0.08);
  border: 1px solid rgba(211, 47, 47, 0.2);
  color: var(--error);
}

.message-box.success {
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.2);
  color: var(--success);
}

.message-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--bg-white);
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.submit-btn:hover::before {
  width: 300px;
  height: 300px;
}

.submit-btn:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-arrow {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(-4px);
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 48px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .login-wrapper {
    flex-direction: column-reverse;
  }
  
  .login-split {
    min-height: auto;
  }
  
  .left-panel {
    padding: 60px 40px;
  }
  
  .right-panel {
    padding: 60px 40px;
  }
  
  .brand-section {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .left-panel {
    padding: 48px 24px;
  }
  
  .right-panel {
    padding: 48px 24px;
  }
  
  .brand-title {
    letter-spacing: 4px;
  }
  
  .brand-tagline {
    letter-spacing: 2px;
  }
  
  .login-container {
    max-width: 100%;
  }
  
  .logo-wrapper {
    margin-bottom: 36px;
  }
  
  .brand-logo {
    max-width: 110px;
  }
  
  .login-title {
    font-size: 28px;
  }
  
  .login-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .left-panel {
    padding: 36px 20px;
  }
  
  .right-panel {
    padding: 36px 20px;
  }
  
  .input-field {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .submit-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .brand-divider {
    width: 60px;
    margin-bottom: 24px;
  }
}
