/* =============================================
   DARK AUTH THEME — Brand Colors (Green/White)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-body: #0d0f12;
  --bg-input: #1a1e2a;
  --bg-card: #151820;
  --border-color: rgba(255,255,255,0.06);
  --accent: #3ecf8e;
  --accent-hover: #34b87a;
  --accent-glow: rgba(62,207,142,0.15);
  --text-primary: #e4e8f0;
  --text-secondary: #8b92a5;
  --text-muted: #535b6e;
  --font-main: 'Heebo', 'Inter', 'Open Sans', sans-serif;
}

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

html, body {
  font-family: var(--font-main);
  background: var(--bg-body);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); text-decoration: none; }

/* Layout */
.login-wrapper { height: 100vh; width: 100%; }
.login-row { display: flex; height: 100%; }

/* Left Panel - Form */
.login-left::-webkit-scrollbar { width: 0; background: transparent; }
.login-left { scrollbar-width: none; -ms-overflow-style: none; }
.login-left {
  flex: 0 0 50%; max-width: 50%; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 40px; background: var(--bg-body); overflow-y: auto;
}
.login-left-inner { width: 100%; max-width: 440px; }

/* Brand */
.login-brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 40px;
}
.login-brand img {
  width: 42px; height: 42px; border-radius: 10px; object-fit: cover;
}
.login-brand span {
  font-size: 22px; font-weight: 700; color: #fff;
}

/* Right Panel - Visual */
.login-right {
  flex: 0 0 50%; max-width: 50%; position: relative;
  background: linear-gradient(135deg, #0f1a14 0%, #0d1f18 50%, #0a2a1e 100%);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.login-right::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(62,207,142,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(62,207,142,0.06) 0%, transparent 50%);
}
.login-right-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url('../images/login-banner2@2x.jpg') center/cover no-repeat;
  opacity: 0.2;
}
.login-right-content {
  position: relative; z-index: 2; padding: 60px; text-align: right; width: 100%;
}
.login-right-content h1 {
  font-size: 48px; font-weight: 700; color: #fff; line-height: 1.2; margin: 0;
}
.login-right-content h1.highlight {
  color: var(--accent); margin-bottom: 16px;
}
.login-right-content .login-right-subtitle {
  font-size: 16px; color: rgba(255,255,255,0.5);
}

/* Auth Form Styles */
.auth-title {
  font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 6px; text-align: left;
}
.auth-subtitle {
  font-size: 15px; color: var(--text-muted); margin-bottom: 32px;
}
.auth-field { margin-bottom: 20px; }
.auth-field label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 8px;
}
.auth-field label .required { color: var(--accent); }
.auth-input {
  width: 100%; padding: 14px 16px; background: var(--bg-input);
  border: 1px solid var(--border-color); border-radius: 10px;
  color: #fff; font-size: 15px; font-family: inherit; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-input::placeholder { color: var(--text-muted); }

/* Password toggle */
.auth-password-wrap { position: relative; }
.auth-password-wrap .auth-input { padding-right: 48px; }
.auth-eye-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); cursor: pointer; padding: 4px; display: flex;
  transition: color 0.2s;
}
.auth-eye-toggle:hover { color: var(--text-secondary); }

/* Checkbox & Options Row */
.auth-options {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.auth-checkbox {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 14px; color: var(--text-secondary);
}
.auth-checkbox input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
.auth-forgot {
  font-size: 14px; color: var(--accent) !important; font-weight: 500;
}

/* Button */
.auth-btn {
  display: block; width: 100%; padding: 14px;
  background: var(--accent); color: #fff !important;
  border: none; border-radius: 10px; font-size: 16px; font-weight: 800; letter-spacing: 0.5px;
  font-family: inherit; cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-align: center; margin-bottom: 20px;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.auth-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(62,207,142,0.25);
}
.auth-btn:active { transform: scale(0.99); }

/* Link-style Button (for OTP flows) */
.auth-link-btn {
  background: none; border: none; padding: 4px 0;
  color: var(--accent); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: color 0.2s;
}
.auth-link-btn:hover { color: var(--accent-hover); text-decoration: none; }

/* Footer Links */
.auth-footer-link {
  text-align: center; font-size: 14px; color: var(--text-muted);
}
.auth-footer-link a { color: var(--accent) !important; font-weight: 600; }
.auth-back-link {
  color: var(--text-muted) !important; font-weight: 400 !important; font-size: 13px;
}
.auth-back-link:hover { color: var(--text-secondary) !important; }

.mt-2 { margin-top: 8px; }

/* Error Messages */
form .errorMessage {
  text-align: left; font-size: 12px; color: #ff4444; padding: 5px 0 0;
}

/* Alert */
.alert-danger {
  background: rgba(255,59,48,0.1); border: 1px solid rgba(255,59,48,0.3);
  color: #ff3b30; padding: 12px 16px; border-radius: 10px;
  font-size: 14px; margin-bottom: 20px;
}
.alert-success {
  background: rgba(62,207,142,0.1); border: 1px solid rgba(62,207,142,0.3);
  color: var(--accent); padding: 12px 16px; border-radius: 10px;
  font-size: 14px; margin-bottom: 20px;
}

/* Demo box */
.auth-demo-box {
  margin-top: 20px; padding: 16px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 10px; text-align: center;
}
.auth-demo-box p { font-size: 13px; color: var(--text-secondary); margin: 2px 0; }
.auth-btn-small {
  display: inline-block; margin-top: 8px; padding: 6px 16px;
  background: var(--accent); color: #fff; border-radius: 6px;
  font-size: 13px; font-weight: 600;
}

/* Signup specific */
.auth-back-top {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 24px;
}
.auth-back-top:hover { color: var(--text-primary); }

/* Hide Yii required star in labels */
label span.required { display: none; }
.auth-field label .required { display: inline; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
  .login-right { display: none; }
  .login-left { flex: 0 0 100%; max-width: 100%; }
  body { overflow-y: auto; }
}
@media (max-width: 576px) {
  .login-left { padding: 24px; }
  .login-left-inner { max-width: 100%; }
  .auth-title { font-size: 24px; }
  .auth-options { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Language Switcher */
.lang-switcher {
  position: absolute; top: 20px; right: 20px; z-index: 10;
}
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: 8px; color: var(--text-secondary); font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.lang-btn:hover { border-color: var(--accent); color: var(--text-primary); text-decoration: none; }
.lang-btn svg { width: 16px; height: 16px; opacity: 0.6; }
[dir="rtl"] .lang-switcher { right: auto; left: 20px; }

/* =============================================
   RTL SUPPORT
   ============================================= */
[dir="rtl"] .login-left { text-align: right; }
[dir="rtl"] .login-brand { flex-direction: row-reverse; }
[dir="rtl"] .auth-title, [dir="rtl"] .auth-subtitle { text-align: right; }
[dir="rtl"] .auth-field label { text-align: right; }
[dir="rtl"] .auth-input { text-align: right; direction: rtl; }
[dir="rtl"] .auth-password-wrap .auth-input { padding-right: 16px; padding-left: 48px; }
[dir="rtl"] .auth-eye-toggle { right: auto; left: 14px; }
[dir="rtl"] .auth-options { flex-direction: row-reverse; }
[dir="rtl"] .auth-checkbox { flex-direction: row-reverse; }
[dir="rtl"] .auth-back-top { flex-direction: row-reverse; }
[dir="rtl"] .auth-back-link { direction: rtl; }
[dir="rtl"] .login-right-content { text-align: left; }
[dir="rtl"] .auth-footer-link { text-align: center; direction: rtl; }
[dir="rtl"] .auth-demo-box { text-align: center; }
[dir="rtl"] form .errorMessage { text-align: right; }
[dir="rtl"] .alert-danger, [dir="rtl"] .alert-success { text-align: right; direction: rtl; }
