/* ============================================================
   OORKANAKU ERP — Auth Pages Shared Stylesheet
   Frontend-only mode · No backend validation
   Font Awesome 6 icon system only
   ============================================================ */

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

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Poppins', 'Noto Sans Tamil', sans-serif;
  background: #070D1A;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── CSS Variables ── */
:root {
  --accent:          #FF6B00;
  --accent-light:    #FF8C2D;
  --accent-dark:     #CC4400;
  --accent-glow:     rgba(255,107,0,0.25);
  --accent-subtle:   rgba(255,107,0,0.08);
  --gold:            #F0A500;
  --gold-light:      #FFD060;
  --panel-dark:      #070D1A;
  --panel-bg:        #0D1421;
  --card-bg:         rgba(255,255,255,0.03);
  --border:          rgba(255,255,255,0.08);
  --text-primary:    #FFFFFF;
  --text-secondary:  rgba(255,255,255,0.6);
  --text-muted:      rgba(255,255,255,0.35);
  --input-bg:        rgba(255,255,255,0.05);
  --input-border:    rgba(255,255,255,0.1);
  --input-focus:     rgba(255,107,0,0.4);
  --success:         #4CAF50;
  --radius:          12px;
  --transition:      0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ============================================================
   LEFT PANEL — Temple Visual
   ============================================================ */
.auth-left {
  width: 58%;
  min-height: 100vh;
  position: relative;
  background: var(--panel-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* Temple background image */
.auth-left-bg {
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1582510003544-4d00b7f74220?w=1200&q=80&fit=crop&auto=format')
    center/cover no-repeat;
  opacity: 0.15;
  filter: saturate(0.6) contrast(1.1);
}

/* Gradient overlay */
.auth-left-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(7,13,26,0.92) 0%,
    rgba(7,13,26,0.75) 40%,
    rgba(7,13,26,0.88) 100%
  );
}

/* Role-specific glow */
.auth-left-glow {
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse at 30% 50%,
    var(--role-glow, rgba(255,107,0,0.12)) 0%,
    transparent 60%
  );
}

/* Floating particles */
.auth-particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  animation: authParticleFloat linear infinite;
}
@keyframes authParticleFloat {
  0%   { transform: translateY(100vh); opacity: 0; }
  8%   { opacity: 0.6; }
  92%  { opacity: 0.3; }
  100% { transform: translateY(-5vh) translateX(30px); opacity: 0; }
}

/* Left Content */
.auth-left-content {
  position: relative; z-index: 2;
  padding: 60px 52px;
  max-width: 520px;
  width: 100%;
}

/* Brand */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 52px;
  text-decoration: none;
}
.auth-brand-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  box-shadow: 0 8px 24px rgba(255,107,0,0.35);
  flex-shrink: 0;
}
.auth-brand-name {
  display: block;
  font-size: 1.25rem; font-weight: 900; color: #fff;
  letter-spacing: 0.5px; line-height: 1.1;
}
.auth-brand-sub {
  display: block;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 0.68rem; color: var(--gold-light); margin-top: 2px;
}

/* Role Badge */
.auth-role-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 50px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 20px;
}
.auth-role-badge-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--role-color, var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff;
  box-shadow: 0 4px 10px var(--role-glow, var(--accent-glow));
}
.auth-role-badge-text {
  font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
}

/* Role Title */
.auth-left-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900; color: #fff;
  line-height: 1.1; margin-bottom: 8px;
}
.auth-left-title-tamil {
  display: block;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--role-color, var(--accent-light));
  margin-top: 4px;
}
.auth-left-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 400px;
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* Features List */
.auth-features-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 12px;
}
.auth-features-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
  transition: all var(--transition);
}
.auth-features-list li:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
}
.auth-features-list li .feat-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--role-color, var(--accent));
  opacity: 0.9;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: #fff; flex-shrink: 0;
}

/* Bottom tagline */
.auth-left-tagline {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* ============================================================
   RIGHT PANEL — Login Form
   ============================================================ */
.auth-right {
  flex: 1;
  min-height: 100vh;
  background: var(--panel-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
  position: relative;
}

/* Subtle grid bg */
.auth-right::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.016'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-form-wrap {
  width: 100%; max-width: 390px;
  position: relative; z-index: 1;
}

/* Back to roles */
.auth-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem; text-decoration: none;
  margin-bottom: 32px;
  transition: color var(--transition);
}
.auth-back-link:hover { color: var(--text-secondary); }
.auth-back-link i { font-size: 0.72rem; }

/* Form Header */
.auth-form-header { margin-bottom: 28px; }
.auth-form-greeting {
  font-size: 0.78rem; color: var(--text-muted);
  font-family: 'Noto Sans Tamil', sans-serif;
  margin-bottom: 8px;
}
.auth-form-title {
  font-size: 1.55rem; font-weight: 800; color: var(--text-primary);
  line-height: 1.15; margin-bottom: 6px;
}
.auth-form-title-tamil {
  display: block;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  color: var(--role-color, var(--accent-light));
  margin-top: 2px;
}
.auth-form-subtitle {
  font-size: 0.78rem; color: var(--text-muted);
  font-family: 'Noto Sans Tamil', sans-serif;
  margin-top: 6px;
}

/* Divider */
.auth-divider {
  height: 1px; background: var(--border);
  margin: 20px 0;
}

/* ── Form Controls ── */
.auth-form-group { margin-bottom: 18px; }
.auth-form-label {
  display: block;
  font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.auth-input-wrap {
  position: relative; display: flex; align-items: center;
}
.auth-input-icon {
  position: absolute; left: 14px;
  color: rgba(255,255,255,0.28);
  font-size: 0.9rem;
  pointer-events: none;
  transition: color var(--transition);
}
.auth-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: 'Poppins', sans-serif;
  transition: all var(--transition);
  outline: none;
}
.auth-input::placeholder {
  color: rgba(255,255,255,0.25);
  font-size: 0.82rem;
}
.auth-input:focus {
  border-color: var(--role-color, var(--accent));
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px var(--input-focus);
}
.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--role-color, var(--accent-light));
}

/* Password Toggle */
.auth-pw-toggle {
  position: absolute; right: 13px;
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer; padding: 4px;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.auth-pw-toggle:hover { color: rgba(255,255,255,0.6); }
.auth-input.has-toggle { padding-right: 42px; }

/* ── Form Options Row ── */
.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 0.78rem;
}
.auth-remember-me {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary); cursor: pointer;
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.auth-remember-me input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--role-color, var(--accent));
  cursor: pointer;
}
.auth-forgot-link {
  color: var(--role-color, var(--accent-light));
  text-decoration: none;
  transition: opacity var(--transition);
  font-family: 'Noto Sans Tamil', 'Poppins', sans-serif;
}
.auth-forgot-link:hover { opacity: 0.75; text-decoration: underline; }

/* ── Login Button ── */
.auth-login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--role-color, var(--accent)), var(--role-color-light, var(--accent-light)));
  border: none; border-radius: var(--radius);
  color: #fff;
  font-size: 0.92rem; font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px var(--role-glow, var(--accent-glow));
  display: flex; align-items: center; justify-content: center; gap: 9px;
  position: relative; overflow: hidden;
  text-decoration: none;
}
.auth-login-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
}
.auth-login-btn:hover::before { background: rgba(255,255,255,0.08); }
.auth-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--role-glow, var(--accent-glow));
  color: #fff;
}
.auth-login-btn:active { transform: translateY(0); }
.auth-login-btn.loading { pointer-events: none; opacity: 0.85; }
.auth-login-btn .btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  display: none;
}
.auth-login-btn.loading .btn-spinner { display: block; }
.auth-login-btn.loading .btn-label { display: none; }
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ── Footer Links ── */
.auth-form-footer {
  margin-top: 28px;
  text-align: center;
}
.auth-support-text {
  font-size: 0.7rem; color: var(--text-muted);
  font-family: 'Noto Sans Tamil', sans-serif;
  margin-bottom: 14px;
}
.auth-support-links {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.auth-support-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--text-muted);
  text-decoration: none; transition: color var(--transition);
}
.auth-support-link:hover { color: var(--text-secondary); }
.auth-support-link i { font-size: 0.7rem; }
.auth-bottom-text {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.65rem; color: var(--text-muted);
  text-align: center;
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes authFadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-left-content  { animation: authFadeSlideUp 0.7s ease both; }
.auth-form-wrap     { animation: authFadeSlideUp 0.7s ease 0.1s both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .auth-left { width: 50%; }
  .auth-left-content { padding: 40px 36px; }
}
@media (max-width: 768px) {
  body { flex-direction: column; overflow-y: auto; }
  .auth-left {
    width: 100%; min-height: 220px; max-height: 240px;
    align-items: flex-end;
    padding-bottom: 0;
  }
  .auth-left-content { padding: 28px 24px; }
  .auth-left-title { font-size: 1.6rem; }
  .auth-features-list { display: none; }
  .auth-left-tagline { display: none; }
  .auth-left-desc { margin-bottom: 0; font-size: 0.78rem; }
  .auth-right { padding: 32px 20px; }
  .auth-form-wrap { max-width: 100%; }
}
@media (max-width: 480px) {
  .auth-left { max-height: 180px; }
  .auth-right { padding: 24px 16px; }
}
