:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e2e5eb;
  --text: #1f2430;
  --text-muted: #6b7280;
  --primary: #2f6fed;
  --primary-dark: #244fc4;
  --success: #1a9e6b;
  --success-bg: #e7f8f1;
  --error: #d64545;
  --error-bg: #fbe9e9;
  --warning-bg: #fff6e0;
  --warning-text: #9a6b00;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  background: linear-gradient(rgba(20, 22, 26, 0.72), rgba(20, 22, 26, 0.72)),
    url("background.jpg") center center / cover no-repeat;
  background-attachment: scroll;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Navbar ---------- */

.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-logo {
  height: 32px;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.navbar-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.4rem 0.65rem;
  border-radius: 7px;
}

.navbar-links a:hover {
  color: var(--primary);
  background: var(--bg);
  text-decoration: none;
}

.navbar-links a.active {
  color: var(--primary-dark);
  font-weight: 700;
  background: #eef2ff;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.navbar-user .user-name {
  font-weight: 600;
}

.role-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #eef2ff;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.navbar-user .logout-link {
  color: var(--error);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
}

/* ---------- Layout ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.55rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.card h3 {
  margin-top: 0;
  font-size: 1.02rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* ---------- Employee dashboard: big simple navigation ---------- */

.next-step-card {
  display: block;
  text-align: center;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  border: 2px solid var(--primary);
}

.next-step-card:hover {
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.25);
}

.next-step-card.next-step-done {
  border-color: var(--success);
}

.next-step-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.next-step-done .next-step-label {
  color: var(--success);
}

.next-step-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.7rem;
}

.btn-huge {
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
}

.big-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.big-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.85rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.big-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.18);
  text-decoration: none;
}

.big-tile-icon {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.big-tile-label {
  font-weight: 700;
  font-size: 1.05rem;
}

.big-tile-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.big-tile-alert {
  border-color: var(--error);
  background: var(--error-bg);
}

.big-tile-alert .big-tile-sub {
  color: var(--error);
  font-weight: 700;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: var(--surface);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.list-item-info strong {
  display: block;
  font-size: 1rem;
}

.list-item-info span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Forms ---------- */

.form-group {
  margin-bottom: 1.1rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.textarea-large {
  min-height: 380px;
  font-size: 1rem;
  line-height: 1.6;
  padding: 0.85rem 1rem;
}

.textarea-caption-inline {
  min-height: 90px;
  font-size: 0.92rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-row input {
  width: auto;
}

.checkbox-row label {
  margin-bottom: 0;
  font-weight: 500;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #b93838;
}

.btn-small {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ---------- Badges / status ---------- */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge-muted {
  background: #eef0f4;
  color: var(--text-muted);
}

/* ---------- Progress bar ---------- */

.progress-track {
  width: 100%;
  height: 10px;
  background: #eaedf3;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* ---------- Table ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---------- Flash messages ---------- */

.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success);
}

.flash-error {
  background: var(--error-bg);
  color: var(--error);
}

/* ---------- Auth pages ---------- */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.auth-logo {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.25rem;
}

.auth-card h1 {
  margin-top: 0;
  font-size: 1.4rem;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.confirm-box {
  border: 1px solid var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-top: 1rem;
}

.confirm-box p {
  margin-top: 0;
  color: var(--error);
  font-weight: 600;
  font-size: 0.9rem;
}

.doc-content {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

/* ---------- Slideshow ---------- */

.slideshow {
  margin-bottom: 1.25rem;
}

.slideshow-viewport {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.slide {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.slide.active {
  display: flex;
}

.slide > img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.slide-caption {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  text-align: center;
  max-width: 640px;
  line-height: 1.5;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Canvas-mode slide (built with the slide editor) ---------- */

.slide-canvas {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.slide-el {
  position: absolute;
  overflow: hidden;
}

.slide-el img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.slide-el-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 1.35;
}

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.85rem;
}

.slideshow-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 3.5rem;
  text-align: center;
}

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}

.dot.active {
  background: var(--primary);
}

/* ---------- Slide thumbnail grid (admin) ---------- */

.slide-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

.slide-thumb {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.slide-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.slide-thumb .caption-form {
  padding: 0.75rem 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slide-thumb .caption-form textarea {
  width: 100%;
  min-height: 130px;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.65rem 0.75rem;
}

.slide-thumb .caption-form .btn {
  align-self: flex-end;
}

.slide-thumb form {
  padding: 0.75rem;
}

.slide-thumb form:last-child .btn {
  width: 100%;
}

/* ---------- Advanced slide editor: filmstrip ---------- */

.filmstrip {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.filmstrip-thumb {
  flex: 0 0 auto;
  width: 150px;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  cursor: grab;
}

.filmstrip-thumb.active {
  border-color: var(--primary);
}

.filmstrip-thumb.dragging {
  opacity: 0.4;
}

.filmstrip-thumb-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
}

.filmstrip-thumb-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.35rem 0.4rem 0;
}

.filmstrip-thumb-actions {
  display: flex;
  gap: 0.3rem;
  padding: 0.4rem;
}

.filmstrip-thumb-actions form {
  flex: 1;
}

.filmstrip-thumb-actions .btn {
  width: 100%;
  padding: 0.3rem 0.4rem;
  font-size: 0.72rem;
}

.filmstrip-add {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
}

/* ---------- Advanced slide editor: canvas ---------- */

.slide-editor-layout {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.slide-editor-canvas-wrap {
  flex: 1 1 560px;
  min-width: 320px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.bg-color-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

.bg-color-label input[type="color"] {
  width: 36px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.editor-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}

.canvas-el {
  position: absolute;
  overflow: hidden;
  border: 1px dashed transparent;
  cursor: move;
  box-sizing: border-box;
}

.canvas-el:hover {
  border-color: var(--border);
}

.canvas-el.selected {
  border: 2px solid var(--primary);
}

.canvas-el.editing {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.2);
  cursor: text;
}

.canvas-el.editing .el-text-content {
  outline: none;
  cursor: text;
}

.save-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.save-status.saving {
  color: var(--text-muted);
}

.save-status.saved {
  color: #1a8a4a;
  font-weight: 600;
}

.save-status.error {
  color: var(--error);
  font-weight: 600;
}

.canvas-el img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.canvas-el video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.canvas-el-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 1.35;
  padding: 2px;
}

.resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
  display: none;
}

.canvas-el.selected .resize-handle {
  display: block;
}

.slide-editor-panel {
  flex: 0 0 280px;
  min-width: 240px;
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

.slide-editor-panel .btn-row .align-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ---------- Tabs ---------- */

.tab-buttons {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------- Inline note edit disclosure ---------- */

details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker,
details > summary::marker {
  display: none;
  content: "";
}

/* ---------- Responsive (tablet / phone) ---------- */

@media (max-width: 860px) {
  .slide-editor-layout {
    flex-direction: column;
  }

  .slide-editor-panel {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 1.25rem 1rem 3rem;
  }

  .navbar {
    padding: 0.6rem 1rem;
    position: relative;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-links,
  .navbar-user {
    display: none;
    width: 100%;
  }

  .navbar-open .navbar-links,
  .navbar-open .navbar-user {
    display: flex;
  }

  .navbar-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    order: 3;
  }

  .navbar-links a {
    padding: 0.75rem 0.65rem;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .navbar-user {
    order: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  .navbar-user .logout-link {
    padding: 0.6rem 0.65rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .page-header h1 {
    font-size: 1.3rem;
  }

  .card {
    padding: 1.1rem;
  }

  .card-grid,
  .slide-thumb-grid {
    grid-template-columns: 1fr;
  }

  .list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row {
    width: 100%;
  }

  .btn-row .btn {
    flex: 1 1 auto;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .filmstrip-thumb,
  .filmstrip-add {
    width: 120px;
  }

  /* Bigger touch targets */
  .btn,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    min-height: 44px;
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px;
    height: 20px;
  }

  .big-tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Scroll hint on wide tables that still need horizontal scroll */
  .table-scroll {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.1rem;
    padding: 0 1.1rem;
  }

  /* Card-style tables: rows become stacked cards instead of a scrolling grid */
  table.responsive-table thead {
    display: none;
  }

  table.responsive-table,
  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table td {
    display: block;
    width: 100%;
    white-space: normal;
  }

  table.responsive-table tr {
    margin-bottom: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
  }

  table.responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0;
    border: none;
    border-bottom: 1px solid var(--bg);
    text-align: right;
  }

  table.responsive-table td:last-child {
    border-bottom: none;
  }

  table.responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    margin-right: auto;
  }

  table.responsive-table td:empty::before {
    content: none;
  }

  /* Progress bars need their own row, not squeezed next to the label */
  table.responsive-table td:has(.progress-track) {
    flex-direction: column;
    align-items: stretch;
  }

  table.responsive-table td:has(.progress-track)::before {
    margin-bottom: 0.3rem;
  }
}

@media (max-width: 420px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-logo {
    height: 26px;
  }

  .page-header h1 {
    font-size: 1.15rem;
  }

  .auth-card {
    padding: 1.1rem;
  }

  .auth-logo {
    max-width: 170px;
  }

  .big-tile-grid {
    grid-template-columns: 1fr;
  }

  .big-tile {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 1rem;
    gap: 0.85rem;
  }

  .big-tile-icon {
    font-size: 1.9rem;
    margin-bottom: 0;
  }
}
