:root {
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --page: #f6f7fb;          /* Solid page background fixes the "column" */
  --card-bg: #ffffff;
  --radius: 16px;
  --transition: 0.25s ease;

  /* NEW: control overall page width + side gap */
  --page-max: 1360px;       /* change to 1280px or 1024px if you prefer */
  --page-pad: 16px;         /* the little left/right gap */
}


/* Reset & base */
* { box-sizing: border-box; }
html {
  height: 100%;
  scrollbar-gutter: stable;   /* keeps page width stable when content height changes */
  /* overflow-y: scroll; */    /* fallback: uncomment if you still see a tiny jump */
}

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;
}

/* NEW: when the app is shown, use normal flow (no vertical centering) */
body.app {
  display: block;
  place-items: initial;
}


/* ---------- 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);
  overflow: hidden;

  width: min(92vw, 520px);
  max-height: 88vh;                 /* key: cap modal height */
  display: flex;                    /* key: header + body + footer layout */
  flex-direction: column;
  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: 10px 12px;  /* smaller height */
  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 40px;
  gap: 8px;
  align-items: center;
}


/* Penalty input with a fixed unit suffix ("k ₫") */
.kvnd {
  position: relative;
}
.kvnd input {
  width: 100%;
  padding-right: 48px; /* space for suffix */
  text-align: right;
}
.kvnd .kvnd__suffix {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: #6b7280;
  pointer-events: none;
}

/* Small sub-header labels above the first row */
.req-subhead {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
/* hide label above the trash column */
.req-subhead div:nth-child(2) { visibility: hidden; }




.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;
}

/* When the + button is hidden, put Assess at the true bottom */
.fab.fab--secondary.solo {
  bottom: 16px;
}


/* Make the Assess modal a bit larger */
.modal__content--large {
  width: min(96vw, 840px);
}


/* 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: 10px 12px;  /* smaller height */
  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;
  margin-bottom: 8px;   /* space before sticky area */
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  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: 12px;  /* a touch roomier */
}

@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;
  color: #111827;
  line-height: 1.35;

  /* wrap long / pasted text neatly */
  word-break: break-word;
  overflow-wrap: anywhere;
}



/* ===== 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,
.action.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);
}


/* ===== Assess summary (top of Task Picker) ===== */
.summary {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}
@media (min-width: 700px) {
  .summary {
    grid-template-columns: 1fr 1fr; /* two items side by side on wide screens */
  }
}
.summary__item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}
.summary__item i {
  font-size: 16px;
  color: var(--primary);
}
.summary__label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.summary__value {
  font-weight: 700;
  word-break: break-word;
}
.summary__link {
  text-decoration: none;
}
.summary__link:hover {
  text-decoration: underline;
}


/* Scrollable body inside modal */
/* Scrollable body inside modal */
.modal__scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;

  /* leave room so content doesn’t hide under the sticky footer */
  padding-bottom: 110px;   /* ~height of action bar + breathing room */
}


/* Footer stays pinned at the bottom because the scroller is above it */
.modal__actions--sticky {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), #fff);
  backdrop-filter: blur(2px);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
  z-index: 1;
  box-shadow: 0 -8px 18px rgba(2, 6, 23, 0.06);
}




.req-card {
  min-height: 120px;       /* optional: tidy layout for varied text length */
}

/* nicer scrollbar (webkit) */
.modal__scroll::-webkit-scrollbar { width: 10px; }
.modal__scroll::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 8px; }
.modal__scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.modal__scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* Highlight the whole requirement card when it's marked Pass */
.req-card.is-passed {
  background: #ecfdf5;            /* gentle green */
  border-color: #a7f3d0;          /* mint border */
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}


/* Make the picker form a flex column so the scroll area can grow */
#taskPickerForm {
  display: flex;
  flex-direction: column;
  min-height: 0; /* required so the child with flex:1 can actually shrink */
}

/* The inner area that should scroll */
#taskPickerForm .modal__scroll {
  flex: 1;            /* take the remaining height */
  min-height: 0;      /* allow overflow */
  overflow: auto;     /* this is the scroller */
  padding-right: 4px; /* keep your scrollbar gap */
  padding-bottom: 16px;
}
 

/* Hide native radio dots fully */
.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

/* One column on small screens for readability */
@media (max-width: 560px) {
  .req-grid { grid-template-columns: 1fr; }
}


/* ==== Assessments feed (cards) ==== */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 24px 0 12px;
}

.assessments-grid {
  display: grid;
  gap: 16px;
}

.assessment-card {
  background: #fff;
  /* dotted border using a CSS variable; fallback is a neutral gray */
  border: 2px dotted var(--card-accent, #d0d5dd);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(16,24,40,.06);
}


.assessment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* wrap nicely on small screens */
}

.assessed-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.muted {
  color: #667085;
  font-size: 0.95rem;
}

.dot {
  color: #d0d5dd;
}

.task-badge {
  background: #f1f5ff;
  border: 1px solid #d5e0ff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.9rem;
  color: #1e40af; /* navy-ish */
}

.grader-email, .created-at {
  color: #667085;
  font-size: 0.95rem;
}

.created-at {
  white-space: nowrap;
}


.items {
  border-top: 1px dashed #e6e6e6;
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.item-row {
  display: grid;
  /* Assessment | Status | Reason | Hướng xử lý */
  grid-template-columns: minmax(240px, 3fr) minmax(72px, 0.7fr) minmax(260px, 3fr) minmax(260px, 3fr);
  gap: 12px;
  align-items: start;
}



/* Header row style */
.items-header {
  font-weight: 700;
  color: #475467;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

/* Column labels */
.col-assessment,
.col-reason,
.col-action {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.col-status { text-align: left; }
.col-penalty { text-align: right; }


/* Make penalty values align right like a table */
.item-penalty { text-align: right; }

/* Mobile tweaks */
@media (max-width: 640px) {
  .item-row {
    grid-template-columns: 1fr auto; /* two cols: main + side */
    gap: 8px;
  }
  .items-header {
    display: none; /* hide header on tiny screens */
  }
  .item-req, .col-assessment { grid-column: 1 / 3; }
  .item-reason, .col-reason { grid-column: 1 / 3; }
  .item-action, .col-action { grid-column: 1 / 3; }
  .item-grade, .col-status { grid-column: 1 / 2; }
}



.item-req { font-weight: 600; }

.item-reason,
.item-action {
  color: #475467;
  font-size: .92rem;
  max-width: 520px;
  word-break: break-word;
}


.item-grade { justify-self: start; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 20px;
  border: 1px solid transparent;
}
.badge-pass {
  color: #027a48;
  background: #ecfdf3;
  border-color: #abefc6;
}
.badge-fail {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.item-penalty, .total-penalty {
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 120px;
}

.total {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
  margin-top: 8px;
}

.total-label { color: #667085; }
.total-penalty { font-weight: 700; }

/* Small screens: make each row simpler */
@media (max-width: 560px) {
  .item-row {
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
  }
  .item-reason { grid-column: 1 / -1; }
  .item-penalty { grid-column: 2; }
}


.items { border-top: 1px dashed #e6e6e6; padding-top: 10px; gap: 10px; }
.item-row { gap: 10px; }
.item-req { font-weight: 600; }
.item-reason, .item-action { color: #475467; }

.item-penalty { font-weight: 600; }


/* ===== Filter Bar (top of main page) ===== */
.filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(16,24,40,0.06);
  margin-top: 24px;
}
.filter-group { grid-column: span 12; }
.filter-actions { grid-column: span 12; display: flex; justify-content: flex-end; }

/* Wide screens: 2 rows. Row 1 = 4 selects; Row 2 = Month + Day + Clear (same line). */
@media (min-width: 1024px) {
  .filter-bar {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    align-items: end;
    row-gap: 12px;
  }

  /* Row 1 (by DOM order) */
  #filters .filter-group:nth-of-type(1) { grid-column: 1 / span 3; }   /* Task */
  #filters .filter-group:nth-of-type(2) { grid-column: 4 / span 3; }   /* Person being assessed */
  #filters .filter-group:nth-of-type(3) { grid-column: 7 / span 3; }   /* Status */
  #filters .filter-group:nth-of-type(4) { grid-column:10 / span 3; }   /* Grader */

  /* Row 2 */
  #filters .filter-group:nth-of-type(5) { grid-column: 1 / span 3; grid-row: 2; } /* Month */
  #filters .filter-group:nth-of-type(6) { grid-column: 4 / span 3; grid-row: 2; } /* Day  */
  #filters .filter-actions              { grid-column:10 / span 3; grid-row: 2; justify-content: flex-end; }
}

/* Keep Month/Day inputs compact */
.filter-group input[type="month"],
.filter-group input[type="date"] { max-width: 220px; }


/* Keep Month/Day inputs compact */
.filter-group input[type="month"],
.filter-group input[type="date"] { max-width: 220px; }


.filter-meta {
  margin: 8px 0 0;
  color: #667085;
  font-size: 0.95rem;
}

/* NEW: shared page container for nice side gap + centered content */
.container {
  width: min(100%, var(--page-max));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}


/* Nicer Clear button in the filter bar */
.filter-actions .icon-btn {
  height: 40px;              /* slightly shorter */
  padding: 0 12px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.filter-actions .icon-btn:hover {
  background: #f3f4f6;
  box-shadow: 0 2px 6px rgba(16,24,40,0.06);
  border-color: #dfe3e8;
}

/* Align the count chip with the Clear button */
.filter-actions .total-penalty-chip {
  height: 40px;                 /* same height as the Clear button */
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}



/* Title row: put total on the same line as the heading */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

/* Nice pill for the total penalty */
.total-penalty-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-weight: 700;
  color: #111827;
  box-shadow: 0 2px 8px rgba(16,24,40,.06);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Make sure it wraps nicely on small screens */
@media (max-width: 560px) {
  .section-title-row {
    flex-wrap: wrap;
  }
}


/* Hide the entire app UI until authenticated */
body:not(.app) #filters,
body:not(.app) #assessments-feed,
body:not(.app) #fabAssess,
body:not(.app) #fabAdd,
body:not(.app) #logoutBtn,
body:not(.app) .modal {
  display: none !important;
}

/* Bottom-right FAB helper */
.fab--right {
  left: auto;
  right: 16px;
  bottom: 16px;
}



/* tiny hover lift for delight */
.fab--content:hover { transform: translateY(-3px); }

/* Content FAB (SVG icon size + color) */
#fabContent svg {
  width: 26px;
  height: 26px;
  display: block;   /* removes any inline gap */
  color: #fff;      /* icon color */
}


/* ===== Bottom-right "Content" text button ===== */
.fab-label {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;

  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  white-space: nowrap;
  border-radius: 9999px;

  /* nice, soft depth + subtle inner ring */
  box-shadow:
    0 12px 26px rgba(13,110,253,.30),
    0 3px 8px rgba(2,6,23,.10),
    inset 0 0 0 1px rgba(255,255,255,.35);

  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.fab-label:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.fab-label:active {
  transform: translateY(-1px);
}


.section-title-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin: 1rem 0;
}
.total-penalty-chip {
  font-weight: 600; padding: .5rem .75rem; border-radius: 9999px;
  border: 1px dashed #999;
}


.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}
.total-penalty-chip {
  font-weight: 600;
  padding: .5rem .75rem;
  border-radius: 9999px;
  border: 1px dashed #999;
}


/* Danger button for destructive actions */
.btn-danger {
  background: #e11d48; /* rose-600 */
  color: #fff;
}
.btn-danger:hover { opacity: 0.95; }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }


/* Keep date/month inputs visually compact */
.filter-group input[type="month"],
.filter-group input[type="date"] {
  max-width: 220px;
}
