/* Sutraatman Portal: design tokens and components. Every rule is scoped to .sp-* classes
   so the Royal Elementor Kit theme and Elementor widgets keep their own styling. */
:root {
  --sp-navy: #002352;
  --sp-navy-deep: #001634;
  --sp-blue: #1264C4;
  --sp-blue-tint: #E8F0FB;
  --sp-ink: #0F1B2D;
  --sp-text: #2D3A4D;
  --sp-muted: #4A5568;
  --sp-line: #DCE3EC;
  --sp-field: #A9B6C8;
  --sp-ground: #F4F7FB;
  --sp-green: #0E7A3E;
  --sp-orange: #A84B00;
  --sp-red: #B42318;
  --sp-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sp-display: Montserrat, system-ui, sans-serif;
  --sp-mono: "IBM Plex Mono", ui-monospace, monospace;
  --sp-radius: 12px;
}

.sp-reg, .sp-account, .sp-card { font-family: var(--sp-font); color: var(--sp-ink); line-height: 1.55; box-sizing: border-box; }
.sp-reg *, .sp-account *, .sp-card * { box-sizing: border-box; }

/* Cards and form */
.sp-card { background: #fff; color: var(--sp-ink); border: 1px solid var(--sp-line); border-radius: 14px; padding: 32px; }
.sp-card__title { font-family: var(--sp-display); font-weight: 800; font-size: 22px; color: var(--sp-navy); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sp-form { display: flex; flex-direction: column; gap: 16px; }
.sp-form__title, .sp-panel h3 { font-family: var(--sp-display); font-weight: 800; font-size: 22px; line-height: 1.25; color: var(--sp-navy); margin: 0; outline: none; }
.sp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sp-fields-row > .sp-field { flex: 1 1 180px; }
.sp-field label { font-weight: 600; font-size: 15px; color: var(--sp-ink); }
.sp-req { color: var(--sp-red); }
.sp-opt { font-weight: 400; color: var(--sp-muted); }
.sp-fields-row { display: flex; flex-wrap: wrap; gap: 16px; }
.sp-reg input[type="text"], .sp-reg input[type="email"], .sp-reg select,
.sp-account input[type="text"], .sp-account input[type="email"], .sp-account input[type="password"] {
  min-height: 48px; width: 100%; padding: 0 14px; border: 1px solid var(--sp-field); border-radius: 8px;
  font: inherit; font-size: 16px; color: var(--sp-ink); background: #fff; margin: 0;
}
.sp-reg input:focus, .sp-reg select:focus, .sp-account input:focus,
.sp-btn:focus-visible, .sp-link:focus-visible { outline: 3px solid #9cc3f0; outline-offset: 1px; }
.sp-consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--sp-ground); border-radius: 8px; font-size: 15px; cursor: pointer; color: var(--sp-ink); }
.sp-consent input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--sp-blue); }
.sp-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp-error { margin: 0; padding: 12px 14px; border-radius: 8px; background: #FDECEA; color: #8A1C12; font-size: 15px; }
.sp-small { margin: 0; font-size: 13px; color: var(--sp-muted); }
.sp-small--dark { font-size: 14px; color: var(--sp-text); }
.sp-muted { color: var(--sp-muted); margin: 0 0 14px; }
.sp-note { margin-top: 12px; color: var(--sp-green); font-weight: 500; }
.sp-reg a, .sp-account a { color: var(--sp-blue); }
.sp-reg a:hover, .sp-account a:hover { color: var(--sp-navy); }
.sp-turnstile { min-height: 65px; }

/* Buttons */
.sp-btn.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 8px; border: 1px solid transparent; font-family: var(--sp-font); font-weight: 700; font-size: 16px; line-height: 1;
  text-decoration: none !important; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.sp-btn:disabled { opacity: .6; cursor: progress; }
.sp-btn.sp-btn--primary { background: var(--sp-blue); color: #fff !important; }
.sp-btn.sp-btn--primary:hover { background: #0B4F9E; }
.sp-btn.sp-btn--dark { background: var(--sp-navy); color: #fff !important; }
.sp-btn.sp-btn--dark:hover { background: #0A3470; }
.sp-btn.sp-btn--ghost { background: #fff; color: var(--sp-navy) !important; border-color: #C5D0DE; }
.sp-btn.sp-btn--ghost:hover { border-color: var(--sp-navy); }
.sp-btn.sp-btn--light { background: #fff; color: var(--sp-navy) !important; }
.sp-btn.sp-btn--outline-light { background: transparent; color: #fff !important; border-color: #5B7BA6; }
.sp-btn.sp-btn--block { width: 100%; min-height: 52px; font-size: 17px; }
.sp-link.sp-link { background: none; border: 0; padding: 0; font: inherit; color: var(--sp-blue); text-decoration: underline; cursor: pointer; }

/* State panels */
.sp-panel { display: flex; flex-direction: column; gap: 10px; }
.sp-panel[hidden], .sp-form[hidden] { display: none; }
.sp-panel p { margin: 0; color: var(--sp-text); }
.sp-panel__icon { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.sp-panel__icon--blue { background: var(--sp-blue-tint); color: var(--sp-blue); }
.sp-panel__icon--green { background: #E5F4EC; color: var(--sp-green); }
.sp-panel__icon--orange { background: #FDF0E6; color: var(--sp-orange); }
.sp-panel__icon--grey { background: #EEF1F5; color: var(--sp-text); }
.sp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.sp-actions form { margin: 0; }
.sp-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sp-inline input { flex: 1 1 220px; }

/* Badges */
.sp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--sp-blue-tint);
  color: #0B3D7A; font-family: var(--sp-font); font-size: 12px; font-weight: 600; line-height: 1.6; vertical-align: middle; }
.sp-badge::before { content: ""; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/contain no-repeat; }
.sp-badge--team { background: var(--sp-navy); color: #fff; }
.sp-badge--team::before { display: none; }

/* Account */
.sp-account__grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.sp-account__grid > .sp-card { flex: 1 1 320px; min-width: 0; }
.sp-account #loginform p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.sp-account #loginform label { font-weight: 600; font-size: 15px; }
.sp-account #loginform .login-remember label { flex-direction: row; display: flex; gap: 8px; align-items: center; font-weight: 400; }
.sp-account #loginform .button-primary { min-height: 48px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--sp-navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sp-links { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }

@media (max-width: 520px) {
  .sp-card { padding: 22px 18px; }
  .sp-actions .sp-btn, .sp-actions form, .sp-inline .sp-btn { width: 100%; }
}

/* Footer stays at the bottom of short pages (empty forum, sign-in, policy pages). Only on pages that carry
   the Sutraatman footer; the theme's centred content box keeps its full width inside the flex column. */
body:has(.sp-footer) { display: flex; flex-direction: column; min-height: 100vh; }
body.admin-bar:has(.sp-footer) { min-height: calc(100vh - 32px); }
@media (max-width: 782px) { body.admin-bar:has(.sp-footer) { min-height: calc(100vh - 46px); } }
body:has(.sp-footer) > .main-container { width: 100%; }
body:has(.sp-footer) > :has(.sp-footer) { margin-top: auto; }
