/* ════════════════════════════════════════════════
   RA LOGIN MODAL — ra-login.css
   ════════════════════════════════════════════════ */

:root {
  --ra-gold:      #B0893C;
  --ra-gold2:     #C9A85C;
  --ra-navy:      #00072D;
  --ra-nav-bg:    #030A1A;
  --ra-section-b: #F4F6FA;
  --ra-card-bg:   #ffffff;
  --ra-card-border: rgba(16,24,40,0.10);
  --ra-text-2:    #4A5578;
  --ra-rule:      rgba(16,24,40,0.14);
  --ra-f:         'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Overlay ── */
#ra-login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--ra-f);
  box-sizing: border-box;
}

#ra-login-overlay.is-open {
  display: flex;
}

/* ── Modal box ── */
.ra-login-modal {
  position: relative;
  width: min(calc(100vw - 48px), 960px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--ra-nav-bg);
  border: 1px solid rgba(176,137,60,0.22);
  box-shadow: 0 28px 80px rgba(0,0,0,0.46);
  animation: raModalRise 0.28s cubic-bezier(0.2,0.85,0.25,1) both;
  will-change: transform, opacity;
}

.ra-login-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(176,137,60,0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.08), transparent 32%);
  pointer-events: none;
}

@keyframes raModalRise {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Inner grid ── */
.ra-login-modal > .ra-login-brand,
.ra-login-modal > .ra-login-form-panel {
  /* fallback for no-grid */
  display: block;
}

@supports (display: grid) {
  .ra-login-modal {
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1fr);
    min-height: 520px;
  }
}

/* ── Brand panel ── */
.ra-login-brand {
  position: relative;
  padding: 52px 52px 44px;
  background: var(--ra-nav-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
}

/* ── Close button ── */
.ra-login-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: auto;
  min-width: 56px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  padding: 0 8px;
  z-index: 10;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: color 0.2s, opacity 0.2s;
}
.ra-login-close:hover { color: #fff; opacity: 0.9; }

/* ── Brand content ── */
.ra-login-brand-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ra-login-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ra-gold);
  margin-bottom: 10px;
}

.ra-login-title {
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.05;
  margin: 0;
  padding: 0;
  border: none;
}

.ra-login-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  line-height: 1.78;
  max-width: 40ch;
  margin: 14px 0 0;
}

/* ── Form panel ── */
.ra-login-form-panel {
  background: var(--ra-section-b);
  padding: 48px 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Card ── */
.ra-login-card {
  width: min(100%, 400px);
  background: var(--ra-card-bg);
  border: 1px solid var(--ra-card-border);
  border-left: 4px solid var(--ra-gold);
  border-radius: 2px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  padding: 36px 32px 30px;
  min-height: 422px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.25s cubic-bezier(0.22,1,0.36,1),
              border-color 0.25s;
  box-sizing: border-box;
}

.ra-login-card:hover {
  transform: translateY(-3px);
  border-left-color: var(--ra-gold2);
  box-shadow:
    0 0 0 1px rgba(176,137,60,0.18),
    0 8px 32px rgba(176,137,60,0.16),
    0 18px 48px rgba(0,0,0,0.10);
}

/* ── Card header ── */
.ra-login-card-header { margin-bottom: 24px; }

.ra-login-form-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--ra-navy);
  font-family: var(--ra-f);
}

.ra-login-form-sub {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ra-text-2);
  font-family: var(--ra-f);
}

/* ── Fields ── */
.ra-login-fields { display: grid; gap: 16px; }

.ra-field-group { position: relative; }

.ra-field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ra-gold);
  margin-bottom: 8px;
  font-family: var(--ra-f);
}

.ra-field-input {
  width: 100% !important;
  height: 44px !important;
  border: 1px solid rgba(16,24,40,0.16) !important;
  background: rgba(255,255,255,0.96) !important;
  color: var(--ra-navy) !important;
  padding: 12px 44px 12px 14px !important;
  border-radius: 0 !important;
  font-family: var(--ra-f) !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  transition: border-color 0.18s, box-shadow 0.18s !important;
}

.ra-field-input:focus {
  outline: none !important;
  border-color: var(--ra-gold) !important;
  box-shadow: 0 0 0 2px rgba(176,137,60,0.18) !important;
}

.ra-field-input.is-invalid {
  border-color: #A64B4B !important;
  box-shadow: 0 0 0 1px rgba(166,75,75,0.14) !important;
  background: rgba(166,75,75,0.03) !important;
}

/* ── Password toggle ── */
.ra-pw-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ra-text-2);
  padding: 0;
}
.ra-pw-toggle svg {
  width: 16px;
  height: 16px;
}

/* ── Forgot / error ── */
.ra-forgot { margin-top: 12px; font-size: 12px; }
.ra-forgot a { color: var(--ra-gold); text-decoration: none; }
.ra-forgot a:hover { text-decoration: underline; }

.ra-login-error {
  display: none;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(166,75,75,0.08);
  border: 1px solid rgba(166,75,75,0.28);
  border-left: 3px solid #A64B4B;
  color: #A64B4B;
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--ra-f);
}
.ra-login-error.visible { display: block; }

/* ── Submit ── */
.ra-submit {
  width: 100%;
  margin-top: 18px;
  height: 44px;
  border-radius: 0;
  border: none;
  background: var(--ra-gold);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--ra-f);
  transition: background 0.15s, transform 0.15s;
}
.ra-submit:hover { background: var(--ra-gold2); }
.ra-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.ra-submit.is-shaking { animation: raShake 0.28s ease; }

@keyframes raShake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  50%      { transform: translateX(3px); }
  75%      { transform: translateX(-2px); }
}

/* ── Card foot ── */
.ra-card-foot { margin-top: auto; padding-top: 18px; }
.ra-card-legal { font-size: 12px; line-height: 1.6; color: #131B38; }
.ra-card-legal a { color: var(--ra-gold); text-decoration: none; }
.ra-card-legal a:hover { text-decoration: underline; }

/* ── Loading state ── */
.ra-submit.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .ra-login-modal {
    grid-template-columns: 1fr;
    min-height: 0;
    width: min(calc(100vw - 28px), 520px);
  }
  .ra-login-brand { padding: 34px 32px 28px; }
  .ra-login-title { font-size: 32px; }
  .ra-login-form-panel { padding: 30px 28px 32px; }
  .ra-login-card { width: 100%; min-height: 0; }
}

@media (max-width: 600px) {
  #ra-login-overlay { padding: 12px; }
  .ra-login-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    grid-template-columns: 1fr;
  }
  .ra-login-brand { padding: 40px 20px 28px; min-height: 180px; }
  .ra-login-title { font-size: 38px; }
  .ra-login-form-panel { padding: 24px 18px; }
  .ra-login-card { padding: 28px 20px 24px; }
}