/* Inventra light auth shell — modern trending light theme
   Unified onto the app-wide indigo design system (see sma-light.css). */

:root {
  --auth-bg: #f4f6f8;
  --auth-panel: #ffffff;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-accent: #4F46E5;
  --auth-accent-hover: #4338CA;
  --auth-accent-soft: #EEF2FF;
  --auth-sky: #e0f2fe;
  --auth-danger: #dc2626;
  --auth-danger-bg: #fef2f2;
  --auth-success: #059669;
  --auth-success-bg: #ecfdf5;
  --auth-warning: #d97706;
  --auth-warning-bg: #fffbeb;
  --auth-radius: 10px;
  --auth-radius-lg: 14px;
  --auth-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --auth-shadow-lift: 0 8px 30px rgba(16, 24, 40, 0.08);
  --auth-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --auth-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-bg);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: authFade 0.45s ease-out;
}

@keyframes authFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, var(--auth-accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, var(--auth-sky) 0%, transparent 50%),
    linear-gradient(160deg, #f0fdfa 0%, #f8fafc 45%, #e0f2fe 100%);
  overflow: hidden;
}

.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234f46e5' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  animation: authOrbFloat 9s ease-in-out infinite;
}

.auth-orb-a {
  width: 260px;
  height: 260px;
  top: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.22), transparent 70%);
}

.auth-orb-b {
  width: 220px;
  height: 220px;
  bottom: -70px;
  left: -50px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
  animation-delay: 2.5s;
}

@keyframes authOrbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, -14px) scale(1.06);
  }
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
  text-align: left;
}

.auth-brand-logo {
  display: block;
  max-width: min(280px, 70vw);
  max-height: 88px;
  width: auto;
  height: auto;
  margin-bottom: 28px;
  object-fit: contain;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin-bottom: 24px;
  font-size: 1.6rem;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-accent), #6366F1);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.auth-brand-name {
  font-family: var(--auth-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--auth-text);
  margin: 0 0 12px;
}

.auth-brand-tagline {
  margin: 0 0 26px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--auth-muted);
  font-weight: 500;
  max-width: 28ch;
}

.auth-brand-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-brand-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--auth-text);
}

.auth-brand-points li i {
  color: var(--auth-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--auth-panel);
  box-shadow: var(--auth-shadow-lift);
}

.auth-panel-inner {
  width: 100%;
  max-width: 400px;
  animation: authSlide 0.5s ease-out 0.08s both;
}

@keyframes authSlide {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-panel-title {
  font-family: var(--auth-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--auth-text);
}

.auth-panel-sub {
  margin: 0 0 28px;
  color: var(--auth-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-alert {
  border-radius: var(--auth-radius);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.auth-alert-danger {
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
  border-color: #fecaca;
}

.auth-alert-success {
  background: var(--auth-success-bg);
  color: var(--auth-success);
  border-color: #a7f3d0;
}

.auth-alert-warning {
  background: var(--auth-warning-bg);
  color: var(--auth-warning);
  border-color: #fde68a;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--auth-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input.has-icon {
  padding-left: 44px;
}

.auth-input.has-toggle {
  padding-right: 48px;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--auth-accent);
}

.auth-toggle-pw {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-toggle-pw:hover,
.auth-toggle-pw:focus {
  color: var(--auth-accent);
  outline: none;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--auth-muted);
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
  cursor: pointer;
}

.auth-link {
  color: var(--auth-accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-link:hover,
.auth-link:focus {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--auth-radius);
  background: var(--auth-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-btn:hover,
.auth-btn:focus {
  background: var(--auth-accent-hover);
  outline: none;
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-btn-secondary {
  background: #fff;
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
  margin-top: 12px;
}

.auth-btn-secondary:hover,
.auth-btn-secondary:focus {
  background: var(--auth-bg);
  color: var(--auth-text);
}

.auth-footer-link {
  margin-top: 22px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 32px 24px 28px;
    min-height: auto;
  }

  .auth-brand-inner {
    text-align: center;
    max-width: 100%;
  }

  .auth-brand-logo {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 16px;
    max-height: 64px;
  }

  .auth-brand-name {
    font-size: 1.75rem;
  }

  .auth-brand-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-brand-mark {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-brand-points {
    display: none;
  }

  .auth-orb {
    display: none;
  }

  .auth-panel {
    padding: 28px 20px 40px;
    box-shadow: none;
  }

  .auth-panel-inner {
    animation: authFade 0.4s ease-out;
  }
}

@media (max-width: 380px) {
  .auth-panel-title {
    font-size: 1.4rem;
  }

  .auth-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* —— Profile (in-app light panels) —— */
.profile-modern {
  max-width: 920px;
}

.profile-modern-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  margin-bottom: 20px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, var(--auth-accent-soft) 0%, transparent 60%),
    #fff;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  box-shadow: var(--auth-shadow-lift);
  overflow: hidden;
}

.profile-modern-avatar-ring {
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--auth-accent), #6366F1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-modern-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  display: block;
}

.profile-modern-meta {
  position: relative;
  z-index: 1;
}

.profile-modern-meta h2 {
  margin: 0 0 4px;
  font-family: var(--auth-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--auth-text);
}

.profile-modern-meta p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.95rem;
}

.profile-modern-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--auth-accent-soft);
  color: var(--auth-accent-hover);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-modern-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  border: 0;
}

.profile-modern-tabs > li {
  float: none;
  margin: 0;
}

.profile-modern-tabs > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--auth-border);
  background: #fff;
  color: var(--auth-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1.2;
}

.profile-modern-tabs > li.active > a,
.profile-modern-tabs > li > a:hover {
  background: var(--auth-accent-soft);
  border-color: #C7D2FE;
  color: var(--auth-accent-hover);
}

.profile-modern-panel {
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  box-shadow: var(--auth-shadow-lift);
  padding: 24px;
  margin-bottom: 0;
}

.profile-modern-panel .box {
  border: 0;
  box-shadow: none;
  margin: 0;
  background: transparent;
}

.profile-modern-panel .box-header {
  background: transparent;
  border: 0;
  padding: 0 0 12px;
}

.profile-modern-panel .box-header h2 {
  margin: 0;
  font-family: var(--auth-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--auth-text);
}

.profile-modern-panel .box-content {
  padding: 8px 0 0;
  border: 0;
}

.profile-modern-panel .form-control {
  height: 44px;
  border-radius: var(--auth-radius);
  border-color: var(--auth-border);
  box-shadow: none;
}

.profile-modern-panel .form-control:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.profile-modern-panel .btn-primary {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
  border-radius: var(--auth-radius);
  min-height: 42px;
  padding: 8px 18px;
  font-weight: 600;
}

.profile-modern-panel .btn-primary:hover,
.profile-modern-panel .btn-primary:focus {
  background: var(--auth-accent-hover);
  border-color: var(--auth-accent-hover);
}

.profile-modern-avatar-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.profile-modern-avatar-preview img {
  max-width: 180px;
  border-radius: var(--auth-radius);
}

.profile-modern-avatar-preview .btn-danger {
  position: absolute;
  top: 8px;
  right: 8px;
}

@media (max-width: 640px) {
  .profile-modern-header {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
  }

  .profile-modern-tabs {
    justify-content: center;
  }

  .profile-modern-panel {
    padding: 18px 16px;
  }

  .profile-modern-panel .col-md-5 {
    width: 100%;
  }
}
