/* =========================================================
   LOGIN PAGE STYLES
   ========================================================= */

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
}

/* Background decoration */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(81,217,214,0.08) 0%, transparent 70%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: stretch;
}

/* Left — branding panel */
.login-brand {
  flex: 1;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
  gap: 40px;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(81,217,214,0.10) 0%, transparent 65%);
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(81,217,214,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.brand-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.brand-logo-img {
  height: 76px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-tag-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  background: rgba(81,217,214,.1);
  border: 1px solid rgba(81,217,214,.25);
  padding: 3px 12px;
  border-radius: 20px;
}

.brand-main {
  position: relative;
  z-index: 1;
  width: 100%;
}

.brand-main h2 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.brand-main h2 span {
  color: var(--accent);
}

.brand-main p {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 32px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
}

.brand-feature-icon {
  width: 38px;
  height: 38px;
  background: rgba(81,217,214,0.12);
  border: 1px solid rgba(81,217,214,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-feature-text .title {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.brand-feature-text .sub {
  font-size: 12px;
  color: rgba(255,255,255,0.40);
}

.brand-footer {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

/* Extras row: remember-me + forgot link */
.login-form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.remember-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.forgot-link {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 500;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.forgot-link:hover { opacity: 0.7; }

.back-to-login {
  display: block;
  text-align: center;
  width: 100%;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 16px;
  padding: 8px 0;
  transition: color var(--transition);
}

.back-to-login:hover { color: var(--text-primary); }

.forgot-success-msg {
  background: var(--success-bg);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: #065F46;
  line-height: 1.55;
  margin-bottom: 20px;
}

#forgot-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Right — login form */
.login-form-panel {
  width: 460px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
}

.login-form-inner {
  width: 100%;
  max-width: 360px;
}

.login-form-header {
  margin-bottom: 36px;
}

.login-form-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}

.login-form-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form .form-group { gap: 7px; }

.login-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.login-form .form-control {
  height: 48px;
  font-size: 14px;
  padding: 0 16px;
  background: #F8FAFC;
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px;
  transition: color var(--transition);
}

.password-toggle:hover { color: var(--text-secondary); }

.login-submit {
  height: 48px;
  width: 100%;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  background: var(--accent);
  color: #0b1120;
  box-shadow: 0 4px 16px rgba(81,217,214,0.35);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
}

.login-error {
  background: var(--danger-bg);
  border: 1px solid rgba(239,68,68,0.25);
  color: #B91C1C;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  display: none;
  align-items: center;
  gap: 8px;
}

.login-error.show { display: flex; }

.demo-accounts {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.demo-accounts h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.demo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-app);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
}

.demo-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.demo-card:active,
.demo-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 2px var(--accent);
}

.demo-card:last-child { margin-bottom: 0; }

.demo-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.demo-card-avatar.partner {
  background: rgba(81,217,214,0.15);
  color: var(--accent-dark);
}

.demo-card-avatar.reseller {
  background: rgba(59,130,246,0.15);
  color: #3B82F6;
}

.demo-card-info .demo-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-card-info .demo-email {
  font-size: 11.5px;
  color: var(--text-muted);
}

.demo-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.demo-badge.partner {
  background: rgba(81,217,214,0.12);
  color: var(--accent-dark);
}

.demo-badge.reseller {
  background: rgba(59,130,246,0.12);
  color: #3B82F6;
}

.demo-card-avatar.fonia_team {
  background: rgba(245,158,11,0.15);
  color: #b45309;
}

.demo-badge.fonia_team {
  background: rgba(245,158,11,0.12);
  color: #b45309;
}

/* Responsive */
@media (max-width: 900px) {
  .login-brand { display: none; }
  .login-form-panel {
    width: 100%;
    padding: 40px 28px;
    background: var(--bg-app);
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 60px;
  }
}
