/* Google font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', Arial, sans-serif;
  background: linear-gradient(180deg,#0f7aa0 0%, #a5e0f5 48%, #d7f3ff 100%);
}

/* Page wrapper */
.page-wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 36px 18px;
}

.login-card {
  width: 95%;
  max-width: 560px;
  background: linear-gradient(180deg,#49bfe4,#63d0f0);
  padding: 36px 20px;
  border-radius: 26px;
  text-align: center;
  margin: 0 auto;
  box-shadow: 0 18px 34px rgba(0,0,0,0.22);
}

/* Avatar */
.avatar-plate {
  width: 92px;
  height: 92px;
  margin: -12px auto 12px;
  border-radius: 50%;
  background: linear-gradient(180deg,#ffffff33,#ffffff10);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow: hidden;
  box-shadow: -8px -8px 18px rgba(255,255,255,0.6), 8px 8px 18px rgba(0,0,0,0.15);
}

.avatar-logo {
  width: 85%;
  height: 100%;
  object-fit: center;
  border-radius: 50%;
}

/* Titles */
.login-title { font-size: 20px; font-weight:700; margin:6px 0 4px; color: #04303f; }
.login-sub { font-size: 13px; color: rgba(3,38,52,0.75); margin-bottom:12px; }

/* Input Bar */
.input-bar {
  width: 100%;
  max-width: 440px;
  height: 50px;
  margin: 10px auto;
  padding-left: 56px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  position: relative;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.input-icon {
  position: absolute;
  left: 10px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #fff;
  box-shadow: -3px -3px 6px rgba(255,255,255,0.8), 3px 3px 6px rgba(0,0,0,0.08);
}

#searchInput {
  flex: 1;
  height: 100%;
  width: 100%;
  border: none;
  background: transparent !important;
  outline: none;
  padding: 0 12px;
  font-size: 16px;
  color: #042e3a;
}

/* Search Button */
.login-btn {
  margin-top: 12px;
  width: 92%;
  max-width: 420px;
  height: 52px;
  border-radius: 12px;
  border: none;
  font-weight:700;
  background: linear-gradient(180deg,#ffffff,#dff8ff);
  color: #0570a6;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* Result */
#result {
  width: 95%;
  margin: 18px auto 0;
  padding: 16px;
  background: #ffffffee;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
  color: #042e3a;
  text-align: left;
}

/* ------------------------------------------------------ */
/* ⭐ Beautiful Modern Print Button — ONLY CHANGE REQUESTED */
/* ------------------------------------------------------ */
#result button {
  background: #036c94;
  color: #fff;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: 0.15s;

  /* Center the button */
  display: block;
  margin: 16px auto 0;
}

#result button:hover { background: #024f6c; }
#result button:active { transform: scale(0.96); }


/* Print Mode */
@media print {
  body { background: white; }
  .login-card { background: white !important; box-shadow: none !important; }
  .input-bar, .login-btn, .remember { display: none !important; }
  #result { background: white !important; box-shadow: none !important; }
  #result button { display: none !important; }
  @media print {

  /* Remove all extra top/bottom padding that causes blank pages */
  html, body {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Remove card rounding + spacing so it fits perfectly on A4 */
  .login-card {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Avoid any forced page breaks */
  * {
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Ensure only 1 printed page */
  #result {
    page-break-inside: avoid !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
/* ---------- Print fixes: A4 + remove blank page (append to style.css) ---------- */

/* Set A4 as the preferred page size for printers that honor @page */
@page {
  size: A4 portrait;
  margin: 10mm; /* adjust if you want smaller/larger margins */
}

/* Print-specific rules to prevent extra blank pages */
@media print {

  /* Reset page-level spacing that often creates blank pages */
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #fff !important;
    overflow: visible !important;
  }

  /* Keep the visible content compact and avoid creating extra flow space */
  .page-wrap, .login-card {
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    max-height: none !important;
  }

  /* Hide interactive UI that should not be printed */
  .input-bar,
  .input-icon,
  #searchInput,
  .login-btn,
  .remember {
    display: none !important;
  }

  /* Result card prints only the result content and avoids page breaks */
  #result {
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #000 !important;
    font-size: 12.5pt !important;
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
  }

  /* Prevent any element from forcing a new page */
  * {
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
  }

  /* Ensure avatar/logo is visible and positioned inline (not overlapping) */
  .avatar-plate {
    position: static !important;
    width: 64px !important;
    height: 64px !important;
    margin: 6px auto !important;
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .avatar-logo {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
  }

  /* Hide the on-screen Print button for print job (we use browser print) */
  #result button { display: none !important; }

  /* If the printed content is long, allow natural page breaks but avoid empty pages */
  html, body { widows: 2; orphans: 2; }

  /* For mobile webviews that insert header/footer, try to reduce extra white space */
  @page { margin: 8mm; } /* slight override for mobile printers */
}

}
