/**
 * CRM RU — guest / login visual system v3
 */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --rs-ink: #12161e;
  --rs-red: #e31b23;
  --rs-red-deep: #c41219;
  --rs-bg: #e9eef4;
  --rs-surface: #ffffff;
  --rs-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --rs-display: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}

body.crm-guest-body {
  background: var(--rs-bg);
  font-family: var(--rs-font) !important;
  color: #151a22;
}

body.crm-guest-body .navbar.navbar-dark {
  background: #fff !important;
  border-bottom: 1px solid #d8e0ea;
}
body.crm-guest-body .navbar.navbar-dark .navbar-brand img {
  max-height: 40px;
  width: auto;
  max-width: 260px;
  border-radius: 8px;
}

.crm-auth-page--stack {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 2rem 1rem 2.5rem;
  background:
    radial-gradient(700px 380px at 50% 0%, rgba(227, 27, 35, 0.14), transparent 55%),
    linear-gradient(180deg, #11151c 0%, #1a1f2a 55%, #12161e 100%);
}
.crm-auth-stack {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  overflow: hidden;
  animation: rs-auth-in 0.35s ease both;
}
.crm-auth-stack__brand {
  background: #11151c;
  color: #fff;
  padding: 1.75rem 1.5rem 1.35rem;
  text-align: left;
}
.crm-auth-stack__lead {
  margin: 0.35rem 0 0;
  opacity: 0.75;
  font-weight: 500;
}
.crm-auth-stack__form {
  padding: 1.5rem 1.5rem 1.75rem;
}
.crm-auth-stack__form .form-control {
  border-radius: 10px;
  border: 1.5px solid #c5d0dd;
  padding: 0.65rem 0.8rem;
}
.crm-auth-stack__form .form-control:focus {
  border-color: var(--rs-red);
  box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.12);
}
.crm-auth-stack__form label {
  font-weight: 700;
  color: #667085;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crm-auth-stack__form .btn-primary {
  border-radius: 10px;
  font-weight: 800;
  background: var(--rs-red);
  border: none;
  box-shadow: 0 8px 20px rgba(227, 27, 35, 0.25);
}

.crm-auth-page {
  min-height: calc(100vh - 56px);
  padding: 2.5rem 1rem 3rem;
  background:
    radial-gradient(700px 380px at 15% 20%, rgba(227, 27, 35, 0.12), transparent 55%),
    linear-gradient(160deg, #eef2f7 0%, #e4ebf3 50%, #dde5ef 100%);
  position: relative;
}

.crm-auth-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(18, 22, 30, 0.12);
  background: var(--rs-surface);
  border: 1px solid #d8e0ea;
  animation: rs-auth-in 0.35s ease both;
}

@keyframes rs-auth-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.crm-auth-brand {
  flex: 1 1 280px;
  background:
    linear-gradient(155deg, #1a1f2a 0%, #12161e 55%, #3a1215 100%);
  color: #fff;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  position: relative;
}
.crm-auth-brand::after {
  content: "CRM RU";
  position: absolute;
  bottom: 1.35rem;
  left: 2rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}
.crm-auth-brand p {
  opacity: 0.85;
  font-size: 0.98rem;
  font-weight: 500;
  margin-top: 0.35rem !important;
}

.crm-auth-form {
  flex: 1 1 320px;
  padding: 2.15rem 2rem 2.35rem;
  background: #fff;
}
.crm-auth-form .form-control {
  border-radius: 10px;
  border: 1.5px solid #c5d0dd;
  padding: 0.6rem 0.8rem;
  background: #fff;
  font-weight: 500;
}
.crm-auth-form .form-control:focus {
  border-color: var(--rs-red);
  box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.12);
}
.crm-auth-form label {
  font-weight: 700;
  color: #667085;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crm-auth-form .btn-primary {
  border-radius: 10px;
  font-weight: 800;
  padding: 0.7rem 1.05rem;
  background: var(--rs-red);
  border: none;
  box-shadow: 0 8px 20px rgba(227, 27, 35, 0.25);
}
.crm-auth-form .btn-primary:hover,
.crm-auth-form .btn-primary:focus {
  background: var(--rs-red-deep);
}
.crm-auth-form .btn-link {
  color: var(--rs-red-deep);
  font-weight: 600;
}

@media (max-width: 767px) {
  .crm-auth-page { padding: 1.2rem 0.75rem 2rem; }
  .crm-auth-brand {
    min-height: auto;
    padding: 1.75rem 1.4rem 2.2rem;
  }
  .crm-auth-form { padding: 1.4rem 1.2rem 1.9rem; }
}

.rs-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  line-height: 1.05;
  white-space: nowrap;
}
.rs-brand__mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  padding: 0;
}
.rs-brand__mark-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.rs-brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.rs-brand__name {
  font-family: var(--rs-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.rs-brand__crm { color: rgba(255, 255, 255, 0.65); }
.rs-brand__product { color: #fff; }
.rs-brand__sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.rs-brand--auth {
  gap: 14px;
  margin: 0 0 0.85rem;
}
.rs-brand--auth .rs-brand__mark {
  width: 66px;
  height: 66px;
  border-radius: 18px;
}
.rs-brand--auth .rs-brand__name { font-size: 32px; }
.rs-brand--auth .rs-brand__sub {
  font-size: 11px;
  letter-spacing: 0.16em;
}
