/* login.css ---------------------------------------------------------
   0. Re-use everything from styles.css first */
@import url('/styles.css');

/* 1. Palette + variables (override or add) */
:root {
  --primary:       #008D9E;
  --primary-dark:  #1a3662;   /* deeper teal/blue for hover + footer */
  --slate-200:     #e2e8f0;
}

/* 2. Layout tweaks only for login page
      (these rules override the defaults pulled in above) */

/* --- page chrome --- */
header {
  background: linear-gradient(to right, #ffffff 0%, var(--primary) 100%);
  color: #fff;
  text-align: left;
  padding: .75rem 1rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / .15);
}
header h1 { font-size: 1.5rem; }

main {
  width: 100%;
  max-width: 420px;
  margin: 2.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}


footer {
  width: 100%;
  background: var(--primary-dark);
  color: #fff;
  font-size: .875rem;
  text-align: center;
  padding: 1rem 0;
  margin-top: 3rem;
}

/* --- reusable “pretty button” class --- */
.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .6rem 1.25rem;
  border-radius: .375rem;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: var(--primary-dark); }

/* --- login card --- */
.login-card {
  width: 100%;
  max-width: 420px;       /* narrower than dashboard’s tables */
  background: #fff;
  padding: 2.5rem 3rem;   /* roomy */
  border-radius: .75rem;
  box-shadow: 0 2px 18px rgb(13 148 136 / .25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.login-card h2 { margin-bottom: .25rem; }
.login-card p  { margin-bottom: .5rem; color: #475569; }

.login-card input {
  width: 100%;
  padding: .75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  box-sizing: border-box; /* respect inner padding */
}

/* --- logo in header --- */
.site-logo {
  height: 48px;
  width: auto;
  display: block;
  margin-left: 1.5rem;    /* align left */
}

/* --- error text --- */
.error {
  color: #dc2626;
  min-height: 1.5rem;
  font-size: .925rem;
}

/* style dropdowns the same as text inputs */
.login-card select {
  width: 100%;
  padding: .75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--slate-200);
  border-radius: .5rem;
  background: #fff;            /* ensure white bg */
  appearance: none;            /* remove OS arrow */
}




/* ─── FORM GRID (sign-up only) ───────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* two equal columns */
  gap: 1rem;                        /* space between fields */
}

/* make wider cards so two columns feel roomy */
.login-card { max-width: 600px; }

/* anything that needs the whole row */
.full { grid-column: 1 / 3; }

/* keep “Sign Up” button left-aligned but full-width on mobile */
.form-grid .btn { grid-column: 1 / 3; }
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }  /* stack on tiny screens */
}


/*------ sign up modal pop up ------*/
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.6);   /* soft slate overlay */
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
}
.modal-overlay.open{ display:flex; }

.modal{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:.65rem;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  width:min(520px, 92vw);
  padding:1.5rem;
  text-align:center;
  animation:modal-in .18s ease-out;
}
.modal h3{
  margin:0 0 .5rem 0;
  color:#0f172a;
}
.modal p{
  margin:0 0 1rem 0;
  color:#475569;
}
.modal .actions{
  display:flex;
  gap:.5rem;
  justify-content:center;
  margin-top:.5rem;
}

/* Buttons inside modal – align with your existing btn styles */
.modal .btn{
  padding:.55rem 1.1rem;
  font-size:.875rem;
  border:none;
  border-radius:.375rem;
  cursor:pointer;
  background:#1a3662;
  color:#fff;
}
.modal .btn:hover{ filter:brightness(1.05); }
.modal .btn.secondary{
  background:#7c7c7c;
}
.modal .btn:focus-visible{
  outline:2px solid #2563eb;
  outline-offset:2px;
}

/* Disabled buttons – consistent across the app */
button:disabled,
.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
  filter:none;
}

/* Subtle motion for modal */
@keyframes modal-in{
  from{ opacity:0; transform:translateY(8px); }
  to{ opacity:1; transform:translateY(0); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .modal{ animation:none; }
}


/* Embedded mode: remove page chrome, no internal scrollbars, transparent bg */
html.embedded, body.embedded {
  margin: 0 !important;
  height: auto !important;      /* override any 100% height */
  overflow: hidden !important;  /* prevent inner scrollbar in the iframe */
  background: transparent !important;
}
body.embedded header,
body.embedded footer {
  display: none !important;
}
body.embedded main {
  margin: 0 !important;
  padding: 1rem !important;     /* small breathing room */
  max-width: 100%;
}
body.embedded .login-card {
  margin: 0 auto;               /* center within iframe width */
}