/**
 * Torobex Client Auth — Login / Register split layout
 * Brand primary: #c20000
 */

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

:root {
  --tb-auth-brand: #c20000;
  --tb-auth-brand-dark: #9a0000;
  --tb-auth-dark: #1a1a1a;
  --tb-auth-shell: #25282d;
  --tb-auth-text: #1a1d26;
  --tb-auth-muted: #6b7280;
  --tb-auth-border: #e5e7eb;
  --tb-auth-radius: 14px;
}

html,
body.torobex-auth-page {
  height: 100%;
  margin: 0;
  padding: 0;
}

body.torobex-auth-page {
  font-family: 'Poppins', 'Inter', 'Tajawal', sans-serif;
  color: var(--tb-auth-text);
  background: var(--tb-auth-dark);
  overflow-x: hidden;
}

html[lang="ar"] body.torobex-auth-page,
html[dir="rtl"] body.torobex-auth-page {
  font-family: 'Tajawal', 'Poppins', 'Inter', sans-serif;
}

.torobex-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ─── Left visual panel ─── */
.torobex-auth-visual {
  position: relative;
  min-height: 100vh;
  background: var(--tb-auth-dark) center center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem 2.75rem;
  overflow: hidden;
}

.torobex-auth-visual__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.25) 0%,
    rgba(26, 26, 26, 0.45) 40%,
    rgba(26, 26, 26, 0.88) 100%
  );
  pointer-events: none;
}

.torobex-auth-visual__copy {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  color: #fff;
}

.torobex-auth-visual__copy h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.torobex-auth-visual__copy p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 400;
}

/* ─── Right form panel ─── */
.torobex-auth-panel {
  min-height: 100vh;
  background: var(--tb-auth-brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.torobex-auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--tb-auth-radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  padding: 1.85rem 1.75rem 1.6rem;
  position: relative;
  animation: torobexAuthIn 0.55s ease both;
}

.torobex-auth-card--wide {
  max-width: 620px;
  padding: 1.85rem 1.85rem 1.6rem;
}

@keyframes torobexAuthIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.torobex-auth-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.torobex-auth-eyebrow {
  display: inline-block;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tb-auth-brand);
}

.torobex-auth-card__top h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--tb-auth-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.torobex-auth-logo {
  flex-shrink: 0;
  width: 72px;
  height: auto;
  object-fit: contain;
}

.torobex-auth-logo a {
  display: block;
  line-height: 0;
}

.torobex-auth-subtitle {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: var(--tb-auth-muted);
  line-height: 1.45;
}

.torobex-auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.torobex-auth-field {
  position: relative;
  margin-bottom: 0.95rem;
}

.torobex-auth-field__icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.torobex-auth-field input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--tb-auth-border);
  border-radius: 10px;
  background: #fafafa;
  padding: 0 2.75rem 0 2.65rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--tb-auth-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}

.torobex-auth-field input::placeholder {
  color: #9ca3af;
}

.torobex-auth-field input:focus {
  background: #fff;
  border-color: var(--tb-auth-brand);
  box-shadow: 0 0 0 3px rgba(194, 0, 0, 0.12);
}

.torobex-auth-field__toggle {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0;
}

.torobex-auth-field__toggle:hover {
  color: var(--tb-auth-brand);
  background: rgba(194, 0, 0, 0.06);
}

.torobex-auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 10px;
  background: var(--tb-auth-brand);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.torobex-auth-submit:hover {
  background: var(--tb-auth-brand-dark);
  box-shadow: 0 8px 20px rgba(194, 0, 0, 0.28);
}

.torobex-auth-submit:active {
  transform: translateY(1px);
}

.torobex-auth-footer-link {
  margin: 1.15rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--tb-auth-muted);
}

.torobex-auth-footer-link a {
  color: var(--tb-auth-brand);
  font-weight: 600;
  text-decoration: none;
}

.torobex-auth-footer-link a:hover {
  text-decoration: underline;
}

.torobex-auth-copy {
  margin-top: 1.15rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

.torobex-auth-copy a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* Hide leftover dashboard chrome on auth pages */
body.torobex-auth-page .main-wrapper,
body.torobex-auth-page .sidebar,
body.torobex-auth-page .navbar,
body.torobex-auth-page .page-wrapper,
body.torobex-auth-page .footer,
body.torobex-auth-page .torobex-header-notice,
body.torobex-auth-page #news-bar {
  display: none !important;
}

body.torobex-auth-page #loading {
  z-index: 9999;
}

@media (max-width: 991px) {
  .torobex-auth-shell {
    grid-template-columns: 1fr;
  }

  .torobex-auth-visual {
    display: none;
  }

  .torobex-auth-panel {
    min-height: 100vh;
    padding: 1.75rem 1rem 2rem;
  }

  .torobex-auth-card,
  .torobex-auth-card--wide {
    max-width: 520px;
  }

  .torobex-auth-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .torobex-auth-card {
    padding: 1.4rem 1.15rem 1.25rem;
  }

  .torobex-auth-logo {
    width: 58px;
  }

  .torobex-auth-card__top h1 {
    font-size: 1.3rem;
  }
}
