/* ══════════════════════════════════════════════
   Sultana EMR Login Plugin — Styles
   Colors: Navy #1B3A6B · Red #C0392B · Grey #F4F6F9
   Fonts: Barlow Condensed (display) + Source Serif 4 (body)
══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Source+Serif+4:wght@300;400;600&display=swap');

:root {
  --navy:      #1B3A6B;
  --navy-dark: #142D55;
  --navy-lite: #2a5298;
  --red:       #C0392B;
  --red-dark:  #a93226;
  --grey-bg:   #F4F6F9;
  --grey-lite: #EDF0F5;
  --border:    #D4DBE8;
  --text:      #0f1c35;
  --muted:     #5a6d8c;
  --white:     #ffffff;
  --font-disp: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Serif 4', serif;
  --radius:    12px;
  --shadow:    0 8px 40px rgba(27,58,107,.18);
}

/* ─── RESET WITHIN PLUGIN ─── */
.seml-login-wrap *,
.seml-landing-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ══════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════ */

.seml-login-wrap {
  font-family: var(--font-body);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1f3c 0%, #1B3A6B 50%, #0f2647 100%);
}

/* Background decorations */
.seml-bg-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.seml-bg-cross {
  position: absolute;
  opacity: .06;
}
.seml-bg-cross::before,
.seml-bg-cross::after {
  content: '';
  position: absolute;
  background: var(--white);
  border-radius: 4px;
}
.seml-bg-cross--1 {
  width: 120px; height: 120px;
  top: 8%; right: 12%;
  transform: rotate(15deg);
}
.seml-bg-cross--1::before { width: 100%; height: 22px; top: 49px; }
.seml-bg-cross--1::after  { width: 22px; height: 100%; left: 49px; top: 0; }

.seml-bg-cross--2 {
  width: 80px; height: 80px;
  bottom: 15%; left: 8%;
  transform: rotate(-10deg);
}
.seml-bg-cross--2::before { width: 100%; height: 16px; top: 32px; }
.seml-bg-cross--2::after  { width: 16px; height: 100%; left: 32px; top: 0; }

.seml-bg-pulse {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 20%, var(--white) 40%, var(--red) 60%, transparent 100%);
  background-size: 200% 100%;
  animation: seml-pulse-line 4s linear infinite;
  opacity: .4;
}
@keyframes seml-pulse-line {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── CARD ─── */
.seml-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.08);
  overflow: hidden;
  animation: seml-card-in .5s cubic-bezier(.22,1,.36,1) both;
}
@keyframes seml-card-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CARD HEADER ─── */
.seml-login-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 32px 36px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.seml-star-of-life {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(192,57,43,.4));
  animation: seml-star-spin 20s linear infinite;
}
@keyframes seml-star-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.seml-login-title {
  font-family: var(--font-disp);
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .5px;
  line-height: 1;
  margin-bottom: 4px;
}
.seml-login-subtitle {
  font-family: var(--font-disp);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.seml-login-school {
  font-size: 11.5px;
  color: rgba(255,255,255,.45);
  font-family: var(--font-disp);
  letter-spacing: .5px;
}

/* ─── DIVIDER ─── */
.seml-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 36px;
  margin: 24px 0 20px;
}
.seml-divider::before,
.seml-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.seml-divider span {
  font-family: var(--font-disp);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── ERROR ─── */
.seml-error {
  margin: 0 36px 16px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── FORM ─── */
.seml-form {
  padding: 0 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seml-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.seml-field label {
  font-family: var(--font-disp);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.seml-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.seml-input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--grey-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
  -webkit-appearance: none;
}
.seml-input-wrap input:focus {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(27,58,107,.12);
}
.seml-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.seml-toggle-pass:hover { color: var(--navy); }

/* ─── REMEMBER ─── */
.seml-remember { margin-top: -4px; }
.seml-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.seml-check-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
}

/* ─── SUBMIT BUTTON ─── */
.seml-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 4px 16px rgba(192,57,43,.4);
  margin-top: 4px;
}
.seml-submit:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,57,43,.5);
}
.seml-submit:active { transform: translateY(0); }

/* ─── FOOTER ─── */
.seml-login-footer {
  padding: 16px 36px 24px;
  border-top: 1px solid var(--grey-lite);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.seml-login-footer p {
  font-size: 12px;
  color: var(--muted);
}
.seml-login-footer a {
  font-size: 12px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.seml-login-footer a:hover { color: var(--red); text-decoration: underline; }

/* ══════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════ */

.seml-landing-wrap {
  font-family: var(--font-body);
  color: var(--text);
}

/* ─── HERO ─── */
.seml-hero {
  background: linear-gradient(135deg, #0d1f3c 0%, var(--navy) 60%, #1a3060 100%);
  color: var(--white);
  padding: 80px 40px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 48px;
}
.seml-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,.015) 40px,
    rgba(255,255,255,.015) 41px
  );
}
.seml-hero__content { position: relative; z-index: 1; max-width: 520px; }

.seml-hero__badge {
  display: inline-block;
  background: rgba(192,57,43,.25);
  border: 1px solid rgba(192,57,43,.5);
  color: #f9a8a8;
  font-family: var(--font-disp);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.seml-hero__title {
  font-family: var(--font-disp);
  font-size: clamp(48px, 7vw, 76px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.seml-hero__accent { color: var(--red); }

.seml-hero__desc {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,.72);
  margin-bottom: 32px;
  font-weight: 300;
}

.seml-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(192,57,43,.5);
}
.seml-hero__btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192,57,43,.6);
  color: var(--white);
}

.seml-hero__visual {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.seml-hero__star-wrap {
  width: 200px;
  height: 200px;
  animation: seml-star-spin 30s linear infinite;
  opacity: .6;
}
@media (max-width: 640px) {
  .seml-hero { flex-direction: column; padding: 48px 24px; }
  .seml-hero__visual { display: none; }
}

/* ─── FEATURES ─── */
.seml-features { margin-bottom: 48px; }
.seml-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 720px) {
  .seml-features__grid { grid-template-columns: 1fr; }
}

.seml-feat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(27,58,107,.06);
  transition: transform .2s, box-shadow .2s;
}
.seml-feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(27,58,107,.12);
}
.seml-feat-card__icon {
  font-size: 32px;
  margin-bottom: 14px;
  display: block;
}
.seml-feat-card h3 {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--navy);
  margin-bottom: 10px;
}
.seml-feat-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* ─── CTA ─── */
.seml-cta {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  color: var(--white);
}
.seml-cta__text {
  font-family: var(--font-disp);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}
.seml-cta__btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background .15s;
}
.seml-cta__btn:hover { background: var(--red-dark); color: var(--white); }
.seml-cta__note {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

/* ─── LOGOUT LINK ─── */
.seml-logout-link {
  font-family: var(--font-disp);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color .15s, border-color .15s;
}
.seml-logout-link:hover { color: var(--red); border-color: var(--red); }

/* ─── TABLET TWEAKS ─── */
@media (max-width: 600px) {
  .seml-login-header   { padding: 24px 24px 20px; }
  .seml-form           { padding: 0 24px 24px; }
  .seml-login-footer   { padding: 14px 24px 20px; }
  .seml-divider        { padding: 0 24px; }
  .seml-error          { margin: 0 24px 14px; }
  .seml-login-title    { font-size: 22px; }
  .seml-star-of-life   { width: 48px; height: 48px; }
}
