/* ==========================================================================
   NCLEX AMPLIFIED | INTERN HOURS PORTAL STYLES
   Brand Identity: Deep Navy (#0A192F, #111C30), Royal Blue (#3B52A5), 
   Accent Red (#DC2626), Clean White, Warm Editorial Accents.
   Font: Poppins (Google Fonts)
   ========================================================================== */

:root {
  /* Brand Colors */
  --color-navy: #0A192F;
  --color-navy-dark: #060F1E;
  --color-navy-surface: #111C30;
  --color-navy-border: #1E2D4A;
  --color-blue: #3B52A5;
  --color-blue-dark: #2E4273;
  --color-blue-light: #EEF2FF;
  --color-blue-accent: #60A5FA;
  --color-red: #DC2626;
  --color-red-hover: #B91C1C;
  --color-red-light: #FEF2F2;
  --color-yellow: #F59E0B;
  --color-green: #10B981;
  --color-white: #FFFFFF;

  /* Neutrals */
  --color-bg-page: #FAF9F6;
  --color-bg-card: #FFFFFF;
  --color-text-main: #0F172A;
  --color-text-muted: #64748B;
  --color-text-subtle: #94A3B8;
  --color-border: #E2E8F0;
  --color-border-subtle: #F1F5F9;

  /* Typography */
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --shadow-card: 0 25px 60px -15px rgba(10, 25, 47, 0.12), 0 0 0 1px rgba(10, 25, 47, 0.05);
  --shadow-btn: 0 8px 24px -4px rgba(220, 38, 38, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg-page);
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Atmospheric Glows matching the Main Landing Page */
.portal-bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.decor-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.65;
}

.glow-1 {
  top: -100px;
  left: -50px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.8) 0%, transparent 70%);
}

.glow-2 {
  top: 50px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.65) 0%, transparent 70%);
}

.glow-3 {
  bottom: -150px;
  left: 30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(254, 226, 226, 0.6) 0%, transparent 70%);
}

/* Main Container */
.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

/* Header / Topbar */
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 40px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(10, 25, 47, 0.08);
  transition: transform 0.2s ease;
}

.brand-lockup:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-names {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  gap: 6px;
  line-height: 1.1;
}

.brand-word-nclex {
  color: var(--color-blue);
  font-weight: 800;
}

.brand-word-amplified {
  color: var(--color-red);
  font-weight: 800;
}

.brand-badge-portal {
  font-size: 0.6875rem;
  font-weight: 800;
  background-color: var(--color-blue);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(59, 82, 165, 0.3);
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.back-home-link:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
  transform: translateX(-2px);
  box-shadow: 0 4px 12px rgba(59, 82, 165, 0.12);
}

/* ==========================================================================
   LOGIN CARD (1:1 LOOKALIKE JPCS / ACADEMIC PORTAL AESTHETIC)
   ========================================================================== */

/* Centered Viewport Mode for Login View with Landing Page Atmospheric Glows */
body.portal-login-active,
body:has(#login-view:not([hidden])) {
  background: radial-gradient(circle at 10% 22%, rgba(219, 234, 254, 0.75) 0%, transparent 45%),
              radial-gradient(circle at 90% 18%, rgba(254, 240, 138, 0.65) 0%, transparent 42%),
              radial-gradient(circle at 50% 6%, rgba(254, 226, 226, 0.55) 0%, transparent 45%),
              radial-gradient(circle at 50% 70%, rgba(243, 232, 255, 0.45) 0%, transparent 55%),
              #FAF9F6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

body.portal-login-active .portal-shell,
body:has(#login-view:not([hidden])) .portal-shell {
  padding: 0;
  margin: auto;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.portal-login-active .portal-topbar,
body:has(#login-view:not([hidden])) .portal-topbar {
  display: none !important;
}

body.portal-login-active .portal-bg-decor,
body:has(#login-view:not([hidden])) .portal-bg-decor {
  opacity: 0.65;
}

.portal-card {
  animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-card {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 32px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 24px 60px -12px rgba(10, 25, 47, 0.1), 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

/* Gradient accent bar on top of the card (NCLEX Royal Blue to Crimson Red to Amber) */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #3B52A5 0%, #2563EB 35%, #DC2626 70%, #F59E0B 100%);
  z-index: 2;
}

/* Window Controls Header Bar (Matches NCLEX Amplified Hero Demo Window) */
.card-window-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 12px;
  background: #F8FAFC;
  border-bottom: 1px solid #F1F5F9;
}

.card-window-topbar .dash-os-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-window-topbar .os-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.card-window-topbar .dot-red { background-color: #EF4444; }
.card-window-topbar .dot-yellow { background-color: #F59E0B; }
.card-window-topbar .dot-green { background-color: #10B981; }

.card-window-topbar .window-title-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.02em;
}

.card-window-topbar .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  display: inline-block;
  animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Card Content Area */
.login-card-content {
  padding: 34px 38px 32px;
  text-align: center;
}

/* Official Circular Logo & Brand Badge */
.login-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-logo-link {
  display: inline-flex;
}

.login-brand-logo {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  border-radius: 50% !important;
  object-fit: contain !important;
  background: #FFFFFF;
  padding: 3px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 6px 18px rgba(10, 25, 47, 0.1), 0 0 0 1px rgba(59, 82, 165, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
  margin: 0 auto;
}

.login-logo-link:hover .login-brand-logo {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(59, 82, 165, 0.22);
}

/* NCLEX Amplified Intern Portal Pill Badge */
.jpcs-portal-badge,
.nclex-portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid rgba(59, 82, 165, 0.18);
  padding: 6px 14px 6px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
  box-shadow: 0 2px 10px rgba(59, 82, 165, 0.08);
}

.nclex-portal-badge .badge-word-nclex {
  color: #3B52A5;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.nclex-portal-badge .badge-word-amplified {
  color: #DC2626;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.nclex-portal-badge .badge-portal-pill {
  background-color: #3B52A5;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  transform: rotate(-2.5deg);
  box-shadow: 0 2px 6px rgba(59, 82, 165, 0.35);
  transition: transform 0.2s ease;
}

.nclex-portal-badge:hover .badge-portal-pill {
  transform: rotate(0deg) scale(1.04);
}

.login-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.login-card-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #0A192F;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.login-card-header .intro-copy {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 320px;
}

/* Form Styles */
.login-card .form-field-group {
  margin-bottom: 20px;
  text-align: left;
}

.login-card label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0A192F;
  margin-bottom: 8px;
}

.login-card .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-card input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: #0A192F;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 18px;
  outline: none;
  transition: all 0.2s ease;
}

.login-card input#password {
  padding-right: 48px;
}

.login-card input:focus {
  border-color: #3B52A5;
  box-shadow: 0 0 0 3px rgba(59, 82, 165, 0.18);
}

.login-card input::placeholder {
  color: #8E9BAE;
  font-size: 0.95rem;
}

.login-card input#password::placeholder {
  color: #8E9BAE;
  font-size: 1.15rem;
  letter-spacing: 1.5px;
}

.btn-toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #8A99AD;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #0A192F;
}

.form-error {
  margin: -6px 0 16px;
  padding: 10px 14px;
  background-color: var(--color-red-light);
  border: 1px solid #FECACA;
  border-radius: 10px;
  color: var(--color-red);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
}

/* Action Button (NCLEX Amplified Signature Crimson Red matching CTA) */
.login-card .btn-login-action {
  width: 100%;
  min-height: 52px;
  background-color: #DC2626;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
  margin-top: 12px;
  margin-bottom: 24px;
}

.login-card .btn-login-action:hover {
  background-color: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.4);
}

.login-card .btn-login-action:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* Back to Home Button (Pill button matching landing page navbar login button) */
.login-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 12px;
  flex-wrap: wrap;
}

.login-secure-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.02em;
}

.login-secure-tag .secure-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
}

.btn-card-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 9999px;
  padding: 8px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0A192F;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-card-back-home svg {
  color: #3B52A5;
  stroke: #3B52A5;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.btn-card-back-home:hover {
  background: #EEF2FF;
  border-color: #3B52A5;
  color: #3B52A5;
  box-shadow: 0 4px 12px rgba(59, 82, 165, 0.12);
}

.btn-card-back-home:hover svg {
  transform: translateX(-3px);
}

/* Security Note */
.security-note {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
}

.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803D;
  margin-bottom: 6px;
}

.sec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22C55E;
}

.security-note p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   DASHBOARD VIEW (STYLING WITH NCLEX AMPLIFIED COLORS)
   ========================================================================== */
.dashboard-view {
  animation: rise 0.45s ease both;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.dashboard-header h1 {
  font-size: 2.25rem;
  color: var(--color-navy);
}

.last-login {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.quiet-button {
  background: #FFFFFF;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiet-button:hover {
  border-color: var(--color-red);
  color: var(--color-red);
  background-color: var(--color-red-light);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.25fr;
  gap: 16px;
  margin-bottom: 36px;
}

.summary-card {
  min-height: 160px;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(10, 25, 47, 0.04);
}

.total-card {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #FFFFFF;
}

.card-label {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.total-card .card-label {
  color: #93C5FD;
}

.summary-card > strong {
  display: block;
  margin: 18px 0 10px;
  color: var(--color-navy);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.total-card > strong {
  color: #FFFFFF;
}

.summary-card small {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.total-card small {
  color: #CBD5E1;
}

.card-foot {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.total-card .card-foot {
  color: #FDE68A;
}

.status-completed {
  color: #34D399 !important;
}

.status-on-track {
  color: #6EE7B7 !important;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-heading strong {
  font-size: 0.875rem;
  color: var(--color-navy);
}

.progress-track {
  height: 8px;
  margin: 28px 0 14px;
  overflow: hidden;
  background: #E2E8F0;
  border-radius: var(--radius-pill);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-blue-accent));
  border-radius: var(--radius-pill);
  transition: width 0.5s ease;
}

/* Attendance Section */
.attendance-section {
  padding: 30px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(10, 25, 47, 0.04);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 1.5rem;
  color: var(--color-navy);
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.section-actions {
  display: flex;
  gap: 10px;
}

.secondary-button, .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.secondary-button {
  color: var(--color-navy);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
}

.secondary-button:hover {
  border-color: var(--color-navy);
  background-color: var(--color-border-subtle);
}

.small-button {
  background-color: var(--color-blue);
  color: #FFFFFF;
  border: none;
}

.small-button:hover {
  background-color: var(--color-blue-dark);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  text-align: left;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.8125rem;
}

th {
  color: var(--color-text-muted);
  background: #F8FAFC;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

td strong {
  color: var(--color-navy);
}

.loading-cell, .empty-cell {
  padding: 36px;
  color: var(--color-text-muted);
  text-align: center;
}

.read-only-note {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

/* Animations */
[hidden] {
  display: none !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsiveness */
@media (max-width: 768px) {
  .portal-shell {
    width: calc(100% - 32px);
    padding-top: 20px;
  }

  .login-card {
    margin-top: 20px;
  }

  .login-card-content {
    padding: 28px 22px;
  }

  h1 {
    font-size: 1.4375rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-actions {
    width: 100%;
  }

  .section-actions > * {
    flex: 1;
  }
}
