/* ===================================================================
   Scholarly Journals – Auth CSS v3
   Login, Register, Forgot Password, Subscription Detail Cards
   =================================================================== */

/* ── Auth wrap ──────────────────────────────────────────────── */
.sj-auth-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 70vh; padding: 40px 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.sj-auth-card {
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  width: 100%; max-width: 460px; overflow: hidden;
}

/* ── Brand header ───────────────────────────────────────────── */
.sj-auth-brand {
  background: linear-gradient(135deg, var(--sj-blue,#1e40af) 0%, var(--sj-blue-light,#3b82f6) 100%);
  padding: 28px 32px 22px; text-align: center;
}
.sj-auth-brand .custom-logo-link img { max-height: 54px; width: auto; }
.sj-auth-sitename { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.sj-auth-tagline  { color: rgba(255,255,255,.72); font-size: .75rem; margin: 5px 0 0;
                    text-transform: uppercase; letter-spacing: .08em; }

/* ── Body ───────────────────────────────────────────────────── */
.sj-auth-body { padding: 28px 32px 32px; }
.sj-auth-desc { font-size: .875rem; color: #6b7280; margin: 0 0 18px; line-height: 1.6; }

/* ── Google button ──────────────────────────────────────────── */
.sj-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 20px; border-radius: 9px;
  background: #fff; color: #374151; font-weight: 600; font-size: .9rem;
  border: 1.5px solid #d1d5db; text-decoration: none; cursor: pointer;
  transition: background .15s, box-shadow .15s; font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.sj-google-btn:hover { background: #f9fafb; box-shadow: 0 3px 10px rgba(0,0,0,.12); color: #111827; }

/* ── Divider ────────────────────────────────────────────────── */
.sj-auth-divider {
  position: relative; text-align: center; margin: 18px 0;
  color: #9ca3af; font-size: .78rem;
}
.sj-auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: #e5e7eb;
}
.sj-auth-divider span {
  position: relative; background: #fff; padding: 0 12px;
}

/* ── Fields ─────────────────────────────────────────────────── */
.sj-auth-form { display: flex; flex-direction: column; gap: 0; }
.sj-af        { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.sj-af label  {
  font-size: .8rem; font-weight: 700; color: #374151;
  display: flex; justify-content: space-between; align-items: center;
}
.sj-inline-link { font-size: .77rem; font-weight: 400; color: var(--sj-blue,#1e40af); text-decoration: none; }
.sj-inline-link:hover { text-decoration: underline; }

.sj-af input[type="text"],
.sj-af input[type="email"],
.sj-af input[type="password"] {
  padding: 10px 14px; border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: .9rem; font-family: inherit; color: #111827; background: #fff;
  width: 100%; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.sj-af input:focus {
  outline: none; border-color: var(--sj-blue,#1e40af);
  box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}

.sj-af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) { .sj-af-row { grid-template-columns: 1fr; } }

/* ── Password wrap + eye toggle ─────────────────────────────── */
.sj-pw-wrap   { position: relative; }
.sj-pw-wrap input { padding-right: 44px; }
.sj-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #9ca3af; display: flex; align-items: center; transition: color .15s;
}
.sj-eye:hover { color: #374151; }

/* ── Password strength ──────────────────────────────────────── */
.sj-strength-track {
  height: 4px; border-radius: 2px; background: #e5e7eb;
  margin-top: 6px; overflow: hidden;
}
.sj-strength-fill {
  height: 100%; border-radius: 2px; width: 0;
  transition: width .3s ease, background .3s ease;
}
.sj-strength-label { font-size: .72rem; color: #9ca3af; margin-top: 3px; display: block; }

/* ── Remember checkbox ──────────────────────────────────────── */
.sj-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: #6b7280; cursor: pointer; margin-bottom: 18px;
}
.sj-remember input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--sj-blue,#1e40af); }

/* ── Submit button ──────────────────────────────────────────── */
.sj-auth-btn {
  display: block; width: 100%; padding: 12px 20px;
  background: var(--sj-blue,#1e40af); color: #fff !important;
  border: none; border-radius: 9px; font-size: .95rem; font-weight: 700;
  cursor: pointer; text-align: center; text-decoration: none;
  font-family: inherit; transition: filter .15s; margin-bottom: 14px;
}
.sj-auth-btn:hover { filter: brightness(1.1); }

/* ── Footer link ────────────────────────────────────────────── */
.sj-auth-switch { text-align: center; font-size: .82rem; color: #6b7280; margin: 0; }
.sj-auth-switch a { color: var(--sj-blue,#1e40af); text-decoration: none; font-weight: 600; }
.sj-auth-switch a:hover { text-decoration: underline; }

/* ── Messages ───────────────────────────────────────────────── */
.sj-auth-success {
  background: #d1fae5; color: #065f46; border-radius: 8px;
  padding: 12px 16px; font-size: .875rem; line-height: 1.6; margin-bottom: 16px;
}
.sj-auth-error {
  background: #fee2e2; color: #7f1d1d; border-radius: 8px;
  padding: 12px 16px; font-size: .875rem; line-height: 1.6; margin-bottom: 16px;
}
.sj-auth-notice {
  background: #dbeafe; color: #1e3a8a; border-radius: 8px;
  padding: 12px 16px; font-size: .875rem;
}

/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION DETAIL CARDS (subscriber dashboard)
═══════════════════════════════════════════════════════════════ */
.sj-sub-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06);
  margin-bottom: 16px; transition: box-shadow .2s;
}
.sj-sub-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.sj-sub-card-hdr {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px;
  padding: 18px 22px 14px; border-bottom: 1px solid #f3f4f6;
}
.sj-sub-jthumb { width: 40px; height: 54px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.sj-sub-card-title { flex: 1; min-width: 0; }
.sj-sub-card-title h4 { margin: 0 0 5px; font-size: .95rem; color: #111827; }
.sj-expiry-warn {
  padding: 4px 12px; border-radius: 20px; font-size: .73rem;
  font-weight: 700; white-space: nowrap; align-self: center;
}

.sj-sub-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 1px; background: #f3f4f6;
}
.sj-sd-item {
  background: #fff; padding: 12px 18px;
  display: flex; flex-direction: column; gap: 3px;
}
.sj-sd-item > span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; font-weight: 700; }
.sj-sd-item > strong { font-size: .875rem; color: #111827; }

.sj-sub-card-foot {
  padding: 12px 22px; background: #f9fafb; border-top: 1px solid #f3f4f6;
}

/* ═══════════════════════════════════════════════════════════════
   FILE MANAGER UI
═══════════════════════════════════════════════════════════════ */
.sj-file-manager { margin-bottom: 4px; }

.sj-drop-zone {
  border: 2px dashed #d1d5db; border-radius: 10px;
  padding: 28px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 14px; background: #fafafa;
}
.sj-drop-zone:hover, .sj-drop-zone.drag-over {
  border-color: var(--sj-blue,#1e40af); background: #eff6ff;
}
.sj-drop-icon { font-size: 2rem; margin-bottom: 8px; }
.sj-drop-zone p { margin: 0; font-size: .85rem; color: #6b7280; }
.sj-drop-zone strong { color: var(--sj-blue,#1e40af); }

.sj-up-progress { display: none; margin: 8px 0; }
.sj-up-bar      { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.sj-up-fill     { height: 100%; background: var(--sj-blue,#1e40af); border-radius: 3px; width: 0; transition: width .3s; }
.sj-up-status   { font-size: .78rem; margin-top: 5px; border-radius: 6px; padding: 6px 10px; display: none; }
.sj-up-ok  { background: #d1fae5; color: #065f46; }
.sj-up-err { background: #fee2e2; color: #7f1d1d; }

.sj-file-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.sj-file-row  {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 9px 12px; transition: box-shadow .15s;
}
.sj-file-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sj-file-row.sj-file-selected { border-color: var(--sj-blue,#1e40af); background: #eff6ff; }
.sj-fi-icon  { font-size: 1.4rem; flex-shrink: 0; }
.sj-fi-info  { flex: 1; min-width: 0; }
.sj-fi-name  { font-size: .83rem; font-weight: 600; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sj-fi-meta  { font-size: .72rem; color: #9ca3af; margin-top: 2px; }
.sj-fi-btns  { display: flex; gap: 5px; flex-shrink: 0; }
.sj-fi-use   { background: #eff6ff; color: #1e40af; border: none; border-radius: 5px; padding: 4px 10px; font-size: .73rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.sj-fi-use:hover   { background: #dbeafe; }
.sj-fi-del   { background: #fef2f2; color: #b91c1c; border: none; border-radius: 5px; padding: 4px 10px; font-size: .73rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.sj-fi-del:hover   { background: #fee2e2; }

/* ═══════════════════════════════════════════════════════════════
   MODAL (edit subscription)
═══════════════════════════════════════════════════════════════ */
.sj-modal { position: fixed; inset: 0; z-index: 99990; display: none; align-items: center; justify-content: center; }
.sj-modal.open { display: flex; }
.sj-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sj-modal-box {
  position: relative; z-index: 1; background: #fff; border-radius: 12px;
  width: 580px; max-width: 95vw; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.sj-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.sj-modal-head h3 { margin: 0; font-size: .95rem; color: #111827; }
.sj-modal-x {
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: #9ca3af; padding: 4px 8px; border-radius: 5px; line-height: 1;
}
.sj-modal-x:hover { background: #f3f4f6; color: #374151; }
.sj-modal-meta {
  padding: 12px 24px; background: #f9fafb; border-bottom: 1px solid #f3f4f6;
  font-size: .8rem; color: #6b7280;
}
.sj-modal-form { padding: 20px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sj-mfield-full { grid-column: 1/-1; }
.sj-mg         { display: flex; flex-direction: column; gap: 4px; }
.sj-mg label   { font-size: .77rem; font-weight: 700; color: #374151; }
.sj-mg input,
.sj-mg select,
.sj-mg textarea {
  padding: 8px 10px; border: 1.5px solid #d1d5db; border-radius: 6px;
  font-size: .85rem; font-family: inherit; width: 100%; box-sizing: border-box; color: #111827;
}
.sj-mg input:focus, .sj-mg select:focus { outline: none; border-color: #1e40af; }
.sj-modal-foot {
  grid-column: 1/-1; display: flex; gap: 10px; padding-top: 12px;
  border-top: 1px solid #f3f4f6; margin-top: 4px;
}
