/* ============================================================
   main.css
   Shared styles for Login, Register, Check-in, and Welcome
   pages of the NEU Library Visitor Management System.
   Color palette: Navy Blue #0A2463, Gold #F9C61F, White #FFFFFF
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --blue-dark:   #0A2463;
  --blue-mid:    #1A4B9B;
  --blue-light:  #2E6FD9;
  --blue-pale:   #E8F0FE;
  --gold:        #F9C61F;
  --gold-dark:   #D4A200;
  --gold-light:  #FFF3CC;
  --white:       #FFFFFF;
  --gray-100:    #F5F7FA;
  --gray-200:    #E8EBF0;
  --gray-400:    #9AA3B2;
  --gray-700:    #444D60;
  --red-err:     #D32F2F;
  --success:     #1B8B3E;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Segoe UI', sans-serif;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow-card: 0 8px 32px rgba(10,36,99,0.13);
  --shadow-btn:  0 4px 14px rgba(10,36,99,0.25);
  --transition:  0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--blue-dark);
  color: var(--gray-700);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Page Layout (split: left content + right image bg) ────── */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Left panel */
.left-panel {
  width: 480px;
  min-width: 320px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  z-index: 2;
  box-shadow: 4px 0 40px rgba(10,36,99,0.18);
}

/* Right panel – library background */
.right-panel {
  flex: 1;
  background:
    linear-gradient(160deg, rgba(10,36,99,0.82) 0%, rgba(26,75,155,0.55) 100%),
    url('../assets/library-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.right-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(249,198,31,0.03) 0px,
    rgba(249,198,31,0.03) 1px,
    transparent 1px,
    transparent 20px
  );
}

.right-tagline {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}

.right-tagline h2 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 3px 20px rgba(0,0,0,0.4);
  margin-bottom: 16px;
}

.right-tagline h2 span {
  color: var(--gold);
  display: block;
}

.right-tagline p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 380px;
  line-height: 1.7;
}

/* ── Left Panel Inner ──────────────────────────────────────── */
.left-panel-inner {
  padding: 40px 44px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Logo / Header ─────────────────────────────────────────── */
.neu-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 32px;
}

.neu-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
}

.neu-logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.neu-title {
  display: flex;
  flex-direction: column;
}

.neu-title .school-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
}

.neu-title .system-name {
  font-size: 0.78rem;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Page Title ────────────────────────────────────────────── */
.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 6px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--gray-400);
  margin-bottom: 28px;
}

/* ── Form ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group label .req {
  color: var(--red-err);
  margin-left: 2px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gray-700);
  background: var(--gray-100);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,75,155,0.12);
}

.form-group input::placeholder { color: var(--gray-400); }

.form-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
}

.form-row .mi-field { width: 70px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  width: 100%;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--blue-dark);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--blue-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10,36,99,0.32);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-google {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-google:hover {
  background: var(--gray-100);
  border-color: var(--blue-light);
  transform: translateY(-1px);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.btn-gold {
  background: var(--gold);
  color: var(--blue-dark);
  box-shadow: 0 4px 14px rgba(249,198,31,0.35);
}

.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--gray-400);
  font-size: 0.82rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Error message ─────────────────────────────────────────── */
.error-msg {
  display: none;
  background: #FDECEA;
  border: 1px solid #FFCDD2;
  border-left: 4px solid var(--red-err);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--red-err);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Footer links ──────────────────────────────────────────── */
.page-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
}

.page-footer a {
  color: var(--blue-mid);
  text-decoration: none;
  font-weight: 600;
}

.page-footer a:hover { text-decoration: underline; }

/* ── Check-in page ─────────────────────────────────────────── */
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--blue-dark);
  padding: 16px 22px;
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  background: var(--blue-mid);
}

.user-info-bar .user-details { flex: 1; }
.user-info-bar .user-name {
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
}
.user-info-bar .user-sub {
  font-size: 0.82rem;
  color: var(--gold);
  opacity: 0.9;
}

.btn-logout-sm {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.btn-logout-sm:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Welcome screen ────────────────────────────────────────── */
.welcome-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--blue-dark);
  padding: 24px;
}

.welcome-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 52px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
  animation: welcomeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes welcomeIn {
  from { opacity: 0; transform: scale(0.85) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-light), var(--gold));
}

.welcome-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--success), #27AE60);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(27,139,62,0.35);
}

.welcome-icon svg { width: 46px; height: 46px; }

.welcome-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 6px;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 1.1rem;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 28px;
}

.visitor-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
  text-align: left;
}

.info-chip {
  background: var(--blue-pale);
  border-radius: 10px;
  padding: 13px 16px;
  border-left: 4px solid var(--blue-dark);
}

.info-chip.full { grid-column: 1 / -1; }
.info-chip .label {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-400);
  font-weight: 600;
  margin-bottom: 3px;
}
.info-chip .value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.visit-time-line {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 28px;
}

.countdown-text {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-top: 14px;
}

.countdown-text span {
  font-weight: 700;
  color: var(--blue-mid);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-wrapper { flex-direction: column; }
  .left-panel { width: 100%; box-shadow: none; }
  .right-panel { display: none; }
  .left-panel-inner { padding: 28px 24px; }

  .welcome-card { padding: 36px 28px; }
  .welcome-title { font-size: 1.7rem; }
  .visitor-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .left-panel-inner { padding: 22px 18px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row .mi-field { width: 100%; }
}
