/* ===== patient_login.css — styles for pages/patient_login.html ===== */

/* Reset basics */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Poppins", Arial, sans-serif;
  background: url("../..\/uploads/backgroundindex.png") center/cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #003366;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Theme variables */
:root {
  --accent: #0077cc;
  --glass-light: rgba(255,255,255,0.78);
  --glass-dark: rgba(10,14,20,0.6);
  --text: #003366;
  --muted: rgba(0,0,0,0.55);
  --btn-primary: #2d9cdb;
  --btn-primary-hover: #238ac3;
  --shadow: 0 10px 30px rgba(12,30,60,0.12);
  --radius: 14px;
}

/* Dark mode overrides */
body.dark {
  --accent: #5578a4;
  --glass-light: rgba(255,255,255,0.06);
  --glass-dark: rgba(6,12,24,0.75);
  --text: #e6eef9;
  --muted: rgba(255,255,255,0.75);
  --btn-primary: #135f81;
  --btn-primary-hover: #0f4f69;
  --shadow: 0 10px 30px rgba(0,0,0,0.6);
}

/* Split Layout */
.split-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Left panel (form) */
.left-panel {
  width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.form-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--glass-light), rgba(255,255,255,0.6));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  font-family: 'Roboto', sans-serif;
  text-align: center;
  backdrop-filter: blur(8px);
}

/* Dark mode card */
body.dark .form-card {
  background: linear-gradient(180deg, var(--glass-dark), rgba(0,0,0,0.45));
}

/* Labels */
.form-card label {
  display: block;
  text-align: left;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text);
}

/* Inputs */
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 12px;
  font-size: 0.98rem;
  background: rgba(255,255,255,0.9);
  color: #111;
}

body.dark .form-card input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}

/* Password toggle */
.password-wrapper {
  position: relative;
}
.password-wrapper .show-pass {
  position: absolute;
  right: 8px;
  top: 6px;
  padding: 6px 8px;
  background: transparent;
  border: none;
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
}

/* Small row (remember + forgot) */
.row.small {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--muted);
}
.checkbox { display:flex; align-items:center; gap:8px; cursor:pointer; }
.checkbox input { width:16px; height:16px; }

/* Primary button */
.btn {
  display:inline-block;
  background: var(--btn-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  width: 100%;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  margin-top: 6px;
}
.btn:hover {
  transform: translateY(-3px);
  background: var(--btn-primary-hover);
}

/* Muted links */
.muted { color: var(--muted); margin-top: 12px; }
.back-link { display:block; margin-top:14px; color:var(--muted); text-decoration:none; }

/* Right panel */
.right-panel {
  width: 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Overlay gradient */
.right-panel::before{
  content: "";
  position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(0,99,179,0.9), rgba(0,66,140,0.9));
  z-index:0;
}
.right-panel .right-content{
  position: relative;
  z-index:1;
  max-width: 520px;
  color: #fff;
  margin-top: -60px;
}
.right-content h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-weight:100;
  font-family: 'Roboto', sans-serif;
}
.right-content .big {
  font-family: 'Playfair Display', serif;
  display:block;
  font-size:4.4rem;
  font-weight:800;
  margin-top:6px;
}
.right-content .lead {
  margin-bottom:18px;
  opacity:0.95;
  font-size:1rem;
}
.info-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
  margin-top: 18px;
  text-align:left;
}
.info-grid h3 {
  margin-bottom:6px;
  font-size:1rem;
  font-weight:100;
  font-style: italic;
}
.info-grid p {
  font-size:0.95rem;
  opacity:0.95;
  line-height:1.35;
}

/* Dark right panel */
body.dark .right-panel::before {
  background: linear-gradient(135deg, rgba(7,13,27,0.86), rgba(6,11,22,0.86));
}

/* Responsive stack */
@media (max-width: 900px) {
  .split-container { flex-direction: column; }
  .left-panel, .right-panel { width: 100%; padding: 28px; }
  .right-panel { order: 2; padding-top: 20px; padding-bottom: 50px; }
  .form-card { padding: 24px; margin-top: 14px; }
  .right-content .big { font-size: 1.4rem; }
}

/* ============================
   MODERN LOGIN ERROR MODAL
   ============================ */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

/* Modal box */
.modal-content {
  background: linear-gradient(145deg, rgba(255,255,255,0.93), rgba(240,240,240,0.88));
  color: #002b55;
  padding: 32px 42px;
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 90%;
  max-width: 400px;
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
  font-family: 'Roboto', sans-serif;
}

/* Dark mode modal */
body.dark .modal-content {
  background: linear-gradient(145deg, rgba(25, 30, 45, 0.95), rgba(20, 25, 38, 0.9));
  color: #e6eef9;
  box-shadow: 0 10px 35px rgba(0,0,0,0.75);
}

/* Title */
.modal-content h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

/* Message */
.modal-content p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Try Again button */
.modal-content button {
  background: var(--btn-primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}
.modal-content button:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
}

/* Close (×) */
.close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}
.close-btn:hover { color: var(--accent); }
/* Row below password: remember me + forgot password */
.row.small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--muted);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
  transform: translateY(1px);
}

.checkbox span {
  line-height: 1;
  user-select: none;
}

.forgot {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.forgot:hover {
  text-decoration: underline;
}

/* Muted text under button (register link) */
.muted {
  color: var(--muted);
  margin-top: 12px;
  font-size: 0.9rem;
}
.muted a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.muted a:hover {
  text-decoration: underline;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== DARK MODE FONT COLOR FIX ===== */
body.dark h2 {
  color: #ffffff; /* bright white title */
}

body.dark .sub {
  color: #a8c6ff; /* lighter bluish subtext */
}

body.dark label {
  color: #e0e6ff; /* brighter form labels */
}

body.dark input::placeholder {
  color: rgba(255, 255, 255, 0.6); /* readable placeholders */
}

body.dark input {
  color: #ffffff; /* white text inside input */
}

body.dark .show-pass {
  color: #6ea8ff; /* blue tone for "Show" button */
}

body.dark .muted {
  color: #a8c6ff; /* light muted text (Register, etc.) */
}
/* Add spacing above the first label (Email) */
.form-card label:first-of-type {
  margin-top: 18px; /* 👈 adjust this number as you like (12–24px looks good) */
}
/* "Back to Home" link */
.back-home {
  margin-top: 6px;
  font-size: 0.9rem;
}

.back-home a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-home a:hover {
  color: var(--btn-primary-hover);
  text-decoration: underline;
}

/* === Logout Toast Message === */
.logout-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #4aa8f0;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  font-weight: 600;
  z-index: 9999;
  animation: fadeOut 4s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; display: none; }
}
.alert {
  margin-top: 1rem;
  background: rgba(255,255,255,0.8);
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text);
}
body.dark .alert {
  background: rgba(40,44,56,0.85);
  border-left: 4px solid var(--accent);
  color: #e6eef9;
}
