:root {
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --page: #f6f7fb;          /* Solid page background fixes the "column" */
  --card-bg: #ffffff;
  --radius: 16px;
  --transition: 0.25s ease;
}

/* Reset & base */
* { box-sizing: border-box; }
html { height: 100%; }
body {
  min-height: 100svh;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--page);
  display: grid;
  place-items: center;       /* centers the card */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 36px;
  background: var(--card-bg);       /* solid white, no frosted blur */
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  text-align: center;
  animation: fade-in 0.45s ease both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 24px;
}

/* ---------- Form ---------- */
.field { position: relative; margin-bottom: 14px; }

.field input {
  width: 100%;
  padding: 14px 44px 14px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #9ca3af;
  padding: 2px 6px;
  border-radius: 8px;
}

.toggle-password:hover { color: var(--primary); }

/* ---------- Button ---------- */
.btn {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), transform 0.05s ease;
}

.btn:hover,
.btn:focus-visible { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }

/* ---------- Messages ---------- */
#message {
  margin-top: 14px;
  font-size: 0.93rem;
  font-weight: 500;
  min-height: 1.2em;
}

.error { color: #d52731; }
.success { color: #269f53; }

/* ---------- Logout button ---------- */
/* Tiny logout icon (top-left of the page) */
.logout-icon {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.12);
  transition: background var(--transition), transform 0.05s ease;
  z-index: 1000;
}
.logout-icon i {
  font-size: 14px;   /* slightly larger than before */
  line-height: 1;
}

.logout-icon:hover { background: var(--primary-dark); }
.logout-icon:active { transform: translateY(1px); }



/* ---------- Floating Action Button (+) ---------- */
.fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.16);
  transition: transform var(--transition), background var(--transition);
  z-index: 1100;
}
.fab i { font-size: 20px; line-height: 1; }
.fab:hover { background: var(--primary-dark); transform: translateY(-2px); }
.fab:active { transform: translateY(0); }

/* ---------- Modal ---------- */
.modal { 
  position: fixed; inset: 0; display: none; z-index: 1200; 
}
.modal.is-open { display: block; }

.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(0.98);
  width: min(92vw, 520px);
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
  padding: 22px 22px 20px;
  opacity: 0;
  animation: modal-in 240ms var(--transition) forwards;
}

@keyframes modal-in {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border: none; border-radius: 10px;
  background: #f3f4f6; color: #111827;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--transition), transform 0.05s ease;
}
.modal__close:hover { background: #e5e7eb; }
.modal__close:active { transform: translateY(1px); }

.modal__content h2 {
  margin: 0 0 8px; font-size: 1.25rem;
}
.modal__content p {
  margin: 0 0 16px; color: #6b7280;
}

.modal__actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px;
}


/* ------ Popup form styles ------ */
.label {
  display: block;
  font-weight: 600;
  margin: 8px 0 6px;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13,110,253,0.12);
}

.req-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 8px;
  font-weight: 600;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: background var(--transition);
}
.icon-btn:hover { background: #f3f4f6; }

.req-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.req-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.req-row .req-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.req-row .remove-btn {
  border: none;
  border-radius: 10px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: #fee2e2;
  color: #991b1b;
  cursor: pointer;
}
.req-row .remove-btn:hover { background: #fecaca; }

/* Secondary button to pair with .btn primary */
.btn.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}
.btn.btn-secondary:hover { background: #d1d5db; }


/* Collapse / reveal animation for the + button */
.fab {
  /* add opacity to the existing transitions so it fades nicely */
  transition: transform var(--transition), background var(--transition), opacity var(--transition), visibility var(--transition);
  transform-origin: center;
}

.fab--hidden {
  opacity: 0;
  transform: scale(0.6);   /* visually "collapses" */
  visibility: hidden;      /* hides it from layout/AT focus */
  pointer-events: none;    /* can't click when hidden */
}


/* Place the Assess FAB above the + FAB */
.fab.fab--secondary {
  left: 16px;
  bottom: 84px; /* ~56px + 12px gap above the + button */
  z-index: 1100;
}

/* Make the Assess modal a bit larger */
.modal__content--large {
  width: min(96vw, 720px);
}

/* Autosuggest dropdown */
.autosuggest {
  position: relative;
}

.autosuggest__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.12);
  padding: 6px;
  display: none;             /* hidden by default */
  z-index: 10;
}

.autosuggest__panel.is-open { display: block; }

.autosuggest__item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}
.autosuggest__item:hover { background: #f3f4f6; }


/* Select styled like input */
.select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13,110,253,0.12);
}


/* Requirements box in Task Picker */
.req-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}
.req-box__title {
  font-weight: 600;
  margin-bottom: 8px;
}
.req-box__list {
  margin: 0;
  padding-left: 18px; /* bullets indent nicely */
}
.req-box__list li {
  margin: 6px 0;
  line-height: 1.35;
}


/* ===== Task Picker: requirement cards ===== */
.req-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.req-box__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.req-box__header i { font-size: 18px; color: var(--primary); }
.req-box__eyebrow { font-size: 12px; color: #6b7280; }
.req-box__task { font-weight: 700; }

.req-grid {
  display: grid;
  gap: 10px;
}
@media (min-width: 700px) {
  .req-grid {
    grid-template-columns: 1fr 1fr; /* two columns on wide screens */
  }
}

.req-card {
  position: relative;
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}
.req-card__left {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
}
.req-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.req-card__badge {
  display: inline-flex;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.9rem;
  align-items: center; justify-content: center;
}
.req-card__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.req-card__text {
  font-size: 0.98rem;
  font-weight: 600;            /* make it feel important */
  color: #111827;
  line-height: 1.35;
}


/* ===== Requirement grading (Pass / Fail) ===== */
.req-card__controls {
  display: inline-flex;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.pill input {
  /* visually hide the native radio but keep it accessible */
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pill span { font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; }

.pill--pass { border-color: #d1fae5; background: #ecfdf5; }
.pill--fail { border-color: #fee2e2; background: #fff7f7; }

.pill.is-selected { 
  box-shadow: 0 0 0 4px rgba(13,110,253,0.12);
  border-color: var(--primary);
  background: #fff;
}

/* reason textarea (shown when Fail) */
.reason {
  margin-top: 10px;
}
.reason.is-hidden { display: none; }

.reason__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  outline: none;
  resize: vertical;
  min-height: 70px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13,110,253,0.12);
}
