/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --card: #16213e;
  --accent: #e94560;
  --accent2: #0f3460;
  --text: #eaeaea;
  --text-muted: #8a8a9a;
  --success: #4caf50;
  --warn: #ff9800;
  --danger: #e94560;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  min-height: 100dvh;
}

/* ── Layout ──────────────────────────────────────────────────────── */
#app {
  width: min(100%, 480px);
  margin: 0 auto;
  padding-bottom: calc(20px + var(--safe-bottom));
}

header {
  padding: calc(16px + var(--safe-top)) 16px 12px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

header h1 { font-size: 1.2rem; font-weight: 700; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

nav { display: flex; gap: 8px; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background .2s, color .2s;
}
nav a.active, nav a:hover {
  background: var(--accent2);
  color: var(--text);
}

.account-menu {
  position: relative;
}
.account-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.account-button:hover,
.account-button[aria-expanded="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-button img { width: 100%; height: 100%; object-fit: cover; }
#account-initials { font-weight: 700; font-size: .9rem; }
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 300;
}
.account-summary {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 6px;
}
.account-summary strong,
.account-summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary span { color: var(--text-muted); font-size: .8rem; margin-top: 2px; }
.account-dropdown a,
.account-dropdown button {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: .9rem;
  cursor: pointer;
}
.account-dropdown a:hover,
.account-dropdown button:hover { background: rgba(255,255,255,.08); }

main { padding: 16px; }

.hidden { display: none !important; }
.center { text-align: center; padding: 40px 0; color: var(--text-muted); }

/* ── Sections ────────────────────────────────────────────────────── */
section { margin-bottom: 24px; }
section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel h3 { margin-bottom: 12px; }
.status-text { margin-top: 12px; min-height: 1.2em; }
.error-text { color: var(--danger); }
.muted { color: var(--text-muted); font-size: .9rem; line-height: 1.4; margin-bottom: 12px; }
.settings-subhead { font-size: 1rem; margin: 20px 0 6px; }
.settings-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* ── Credit cards ────────────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 10px; }

.credit-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  transition: transform .15s;
  cursor: pointer;
}

.credit-card.swiping { transition: none; }
.credit-card.swipe-right { transform: translateX(100px); opacity: 0; transition: transform .3s, opacity .3s; }
.credit-card.swipe-left  { transform: translateX(-100px); opacity: 0; transition: transform .3s, opacity .3s; }

.credit-card .card-title { font-weight: 600; font-size: .95rem; }
.credit-card .card-meta  { font-size: .8rem; color: var(--text-muted); margin-top: 3px; }
.credit-card .card-value { font-size: 1.4rem; font-weight: 700; margin: 8px 0 4px; }
.credit-card .card-deadline {
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}
.credit-card .card-act-by {
  color: var(--text-muted);
  font-size: .74rem;
  margin-top: 5px;
}
.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 28px 8px;
}
.empty-state p { margin-bottom: 8px; }
.empty-state .btn-link-primary { margin-top: 8px; }
.deadline-urgent   { background: rgba(233,69,96,.2);  color: var(--danger); }
.deadline-soon     { background: rgba(255,152,0,.2);   color: var(--warn); }
.deadline-normal   { background: rgba(76,175,80,.15);  color: var(--success); }

.owner-badge,
.member-pill {
  display: inline-block;
  font-size: .72rem;
  color: var(--text);
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions button { cursor: pointer; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-partial, .btn-danger, .btn-link-primary {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-primary   { background: var(--accent);  color: #fff; }
.btn-secondary { background: rgba(255,255,255,.1); color: var(--text); }
.btn-partial   { background: rgba(255,152,0,.2);   color: var(--warn); }
.btn-danger    { background: rgba(233,69,96,.18); color: var(--danger); }
.btn-link-primary { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; }
.btn-primary:hover, .btn-secondary:hover, .btn-partial:hover, .btn-danger:hover, .btn-link-primary:hover { opacity: .8; }

/* ── Activity list ───────────────────────────────────────────────── */
.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: .88rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-meta { color: var(--text-muted); font-size: .75rem; margin-top: 2px; }
.activity-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.activity-undo-btn,
.activity-delete-btn { font-size: .75rem; padding: 4px 10px; }

/* ── Home and manage filters ─────────────────────────────────────── */
.home-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0 18px;
  align-items: end;
}
.home-filters { margin: 0; }
.manage-filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0 4px;
}
.manage-open-filter { margin-bottom: 8px; }
.manage-list { display: flex; flex-direction: column; gap: 10px; }
.manage-row {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.manage-row:hover { opacity: .9; }
.manage-title { font-weight: 600; font-size: .95rem; }
.manage-meta { color: var(--text-muted); font-size: .78rem; margin-top: 4px; line-height: 1.35; }
.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .72rem;
  font-weight: 700;
}
.status-open { background: rgba(76,175,80,.15); color: var(--success); }
.status-closed { background: rgba(255,255,255,.1); color: var(--text-muted); }
.status-future { background: rgba(255,152,0,.2); color: var(--warn); }
.status-inactive { background: rgba(233,69,96,.2); color: var(--danger); }

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom));
  left: 50%; transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  z-index: 200;
  font-size: .9rem;
  min-width: 240px;
}
.toast button { background: var(--accent); color: #fff; border: none; border-radius: 12px; padding: 4px 12px; cursor: pointer; font-size: .85rem; }
.toast button.toast-secondary { background: rgba(255,255,255,.1); color: var(--text); }
.update-toast { bottom: calc(76px + var(--safe-bottom)); }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  padding: 16px;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 100%; max-width: 480px;
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  overflow-y: auto;
}
.modal-box h3 { margin-bottom: 16px; }
.modal-box label { display: block; margin-bottom: 12px; font-size: .9rem; color: var(--text-muted); }
input, select, textarea,
.modal-box input {
  display: block; width: 100%; margin-top: 4px;
  max-width: 100%;
  min-width: 0;
  background: var(--card); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 10px 12px;
  color: var(--text); font-size: 1rem;
}
input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
}
input[type="date"]::-webkit-date-and-time-value {
  margin: 0;
  min-width: 0;
  text-align: left;
}
input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 0 8px 0 0;
}
.checkbox-label {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: .9rem;
  margin: 12px 0;
}
label { display: block; margin-bottom: 12px; font-size: .9rem; color: var(--text-muted); }
.field-help {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.35;
  margin-top: 4px;
}
textarea { resize: vertical; font-family: inherit; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { margin-bottom: 0; }
.btn-icon { background: none; border: none; color: var(--text-muted); font-size: 1.6rem; cursor: pointer; padding: 4px 10px; border-radius: 8px; line-height: 1; }
.btn-icon:hover { background: rgba(255,255,255,.1); color: var(--text); }
.btn-icon-sm { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 4px 6px; border-radius: 4px; flex-shrink: 0; }
.btn-icon-sm:hover { color: var(--text); background: rgba(255,255,255,.1); }
.cancel-by-row { display: flex; align-items: center; gap: 4px; }
.cancel-by-row .mmdd-picker { flex: 1; }
.cancel-by-label .cancel-by-row { margin-top: 4px; }
.mmdd-picker { display: inline-flex; align-items: center; gap: 4px; }
.mmdd-picker select { width: auto; min-width: 0; flex: 1; }
.mmdd-picker.input-locked { opacity: 0.45; pointer-events: none; }
.input-locked { opacity: 0.45; pointer-events: none; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.save-status { font-size: .85rem; color: var(--success); margin-top: 8px; min-height: 1.2em; }
.toggle-saved { font-size: .75rem; color: var(--success); margin-left: auto; white-space: nowrap; }
.definition-editor,
.alert-editor { margin-top: 16px; }

/* ── Digest ─────────────────────────────────────────────────────── */
#digest-tabs,
#digest-scope-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
}
.switch-label {
  color: var(--text);
  font-size: .95rem;
}
.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-slider {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transition: background .2s;
}
.switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform .2s;
}
.switch-control input:checked + .switch-slider { background: #4a90e2; }
.switch-control input:checked + .switch-slider::after { transform: translateX(16px); }
.switch-control input:focus-visible + .switch-slider {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.digest-help {
  color: var(--text-muted);
  font-size: .86rem;
  margin: 0 0 16px;
}
.tab-btn {
  border: none; border-radius: 20px; padding: 6px 16px; cursor: pointer;
  background: rgba(255,255,255,.08); color: var(--text-muted); font-size: .9rem;
}
.tab-btn.active { background: var(--accent2); color: var(--text); }

.digest-item {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
  font-size: .9rem;
}
.digest-item-title { font-weight: 600; margin-bottom: 4px; }
.digest-item-meta  { color: var(--text-muted); font-size: .8rem; }

@media (max-width: 620px) {
  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  header h1 {
    min-width: 0;
    font-size: 1.05rem;
    line-height: 34px;
  }

  .header-right {
    display: contents;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  nav a {
    min-width: 0;
    padding: 8px 6px;
    text-align: center;
    font-size: .82rem;
  }

  .account-menu {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .account-dropdown {
    right: 0;
    width: min(220px, calc(100vw - 32px));
  }

  main {
    padding: 12px;
  }

  section {
    margin-bottom: 20px;
  }

  .panel {
    padding: 14px;
  }

  .settings-grid,
  .manage-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .manage-open-filter {
    margin-bottom: 0;
  }

  .manage-row,
  .activity-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-pill,
  .activity-actions {
    margin-top: 8px;
  }

  .modal-actions,
  .card-actions,
  #digest-tabs,
  #digest-scope-tabs {
    flex-wrap: wrap;
  }

  .modal-actions > button,
  .card-actions > button,
  .tab-btn {
    flex: 1 1 140px;
    min-height: 40px;
  }

  .switch-control {
    width: 100%;
    justify-content: space-between;
  }

  .toast {
    width: calc(100% - 32px);
    min-width: 0;
  }
}

@media (min-width: 900px) {
  #app {
    width: min(100% - 48px, 1120px);
  }

  header {
    margin-top: 0;
    border-left: 1px solid rgba(255,255,255,.08);
    border-right: 1px solid rgba(255,255,255,.08);
  }

  main {
    padding: 24px 16px 40px;
  }

  #view-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .home-controls {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(220px, 320px);
    justify-content: space-between;
  }

  #home-assigned {
    grid-column: 1 / -1;
  }

  @media (min-width: 1180px) {
    #view-home {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  #view-home.hidden { display: none !important; }

  #recent-activity {
    grid-column: 1 / -1;
  }

  #activity-list {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 4px 16px;
    box-shadow: var(--shadow);
  }

  #view-onboarding .panel,
  #view-login .panel,
  #view-settings .panel,
  #view-add .panel,
  #view-detail,
  #view-digest {
    max-width: 720px;
    margin: 0 auto;
  }

  .card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* My Cards */
.my-cards-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.my-cards-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.my-card-item {
  background: var(--card-bg, #2a2a3e);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.my-card-item:hover { background: var(--card-hover, #3a3a4e); }
.my-card-main { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.my-card-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.25rem; align-items: center; }
.badge { font-size: 0.75rem; background: #444; padding: 0.15rem 0.5rem; border-radius: 4px; }
.badge-inactive { background: #664; color: #ffa; }

/* Catalog search results */
.catalog-results { max-height: 200px; overflow-y: auto; margin: 0.5rem 0; }
.catalog-result {
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.catalog-result:hover { background: var(--card-hover, #3a3a4e); }
.selected-card-info { background: #2a4a3e; padding: 0.5rem; border-radius: 4px; margin-bottom: 0.5rem; }

/* Benefit toggles */
.benefit-toggles { display: flex; flex-direction: column; gap: 0.5rem; }
.benefit-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: var(--card-bg, #2a2a3e);
}
.benefit-toggle input[type="checkbox"] { margin-top: 0.25rem; flex-shrink: 0; }
.benefit-toggle span { display: flex; flex-direction: column; gap: 0.15rem; }
.benefit-tip { font-size: 0.75rem; color: #aaa; }
.btn-danger { background: #a33; color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; }
.card-detail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem; }
.card-detail-fields label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; }
.card-detail-fields input, .card-detail-fields select { font-size: 0.9rem; }
.card-detail-fields label:has(textarea) { grid-column: 1 / -1; }
.card-detail-fields textarea { font-size: 0.9rem; min-height: 3rem; }

/* Feedback button in nav */
.nav-feedback-btn {
  background: transparent;
  border: 1px solid #666;
  color: var(--text, #eee);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0.7;
}
.nav-feedback-btn:hover { opacity: 1; border-color: #aaa; }

/* Card label in My Cards list */
.my-card-label { background: #3a5a4a; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.8rem; }

/* Modal scroll fix */
.modal .modal-box { max-height: 85vh; overflow-y: auto; }

/* ── Travel Credits ─────────────────────────────────────────────────────────── */
.travel-credits-actions { margin-bottom: 1rem; }

.tc-filters { display: flex; gap: 16px; margin-bottom: 1rem; flex-wrap: wrap; }
.tc-filters .checkbox-label { font-size: .85rem; }

.tc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.5rem; }

.tc-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .1s;
}
.tc-card:active { transform: scale(0.98); }

.tc-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tc-card-title { font-weight: 600; font-size: .95rem; }
.tc-card-source { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.tc-card-meta { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }
.tc-card-meta span { margin-right: 12px; }
.tc-card-booking { font-size: .8rem; color: var(--text-muted); margin-top: 4px; font-style: italic; }

.tc-status-badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.tc-status-badge.status-pending { background: #4a4a2e; color: #e8e880; }
.tc-status-badge.status-available { background: #2e4a3a; color: #80e8a0; }
.tc-status-badge.status-booked { background: #2e3a5a; color: #80b0e8; }
.tc-status-badge.status-used { background: #3a3a3a; color: #aaa; }
.tc-status-badge.status-expired { background: #4a2e2e; color: #e88080; }

.tc-collapsible {
  cursor: pointer;
  user-select: none;
  opacity: 0.8;
}
.tc-collapsible:hover { opacity: 1; }
.tc-collapsible.open { }

.cert-booking-fieldset {
  border: 1px solid var(--border, #333);
  border-radius: var(--radius);
  padding: 12px;
  margin: 8px 0;
}
.cert-booking-fieldset legend {
  font-size: .85rem;
  font-weight: 600;
  padding: 0 6px;
}

.tc-period-card { border-left: 3px solid #80b0e8; }
.tc-period-card.tc-urgent { border-left-color: #e8c040; }
.tc-period-card.tc-overdue { border-left-color: #e85050; }
.tc-closed-period { opacity: 0.7; }

/* Feedback screenshot */
.feedback-screenshot-section { margin: 8px 0; }
.screenshot-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.9em; }
.screenshot-label input[type="checkbox"] { width: auto; margin: 0; }
.screenshot-preview { margin-top: 8px; border: 1px solid var(--border, #333); border-radius: 6px; overflow: hidden; max-height: 160px; }
.screenshot-preview img { width: 100%; height: auto; display: block; object-fit: contain; max-height: 160px; }
.screenshot-preview.hidden { display: none; }

/* Assignment section */
.assignment-section { margin-top: 16px; }
.assignment-current { margin: 8px 0 12px; font-size: 0.95em; }
.assignment-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.assignment-controls select { flex: 1; min-width: 140px; }
.card-assignee { font-size: 0.82em; color: #5bb8f0; margin-top: 2px; }

/* Deleted / archived reminder styling */
.definition-archived { opacity: 0.7; }
.deleted-notice { color: var(--danger); font-weight: 500; margin-bottom: 8px; }
.status-deleted { background: var(--danger); color: white; }
.status-done { background: var(--success); color: white; }
.badge-closed { background: var(--text-muted); color: var(--bg); }

/* Travel credits page divider */
.tc-divider { border: none; border-top: 1px solid var(--text-muted); opacity: 0.3; margin: 24px 0; }

/* Floating action button */
.fab {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 28px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 100;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }

/* Quick assign popup */
.quick-assign-popup {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius);
  padding: 4px;
  z-index: 50;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.quick-assign-option {
  background: none;
  border: none;
  color: var(--text);
  padding: 8px 16px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
}
.quick-assign-option:hover { background: var(--card); }
.card-actions { position: relative; }

/* Assigned-to-me list rows */
.assigned-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--card);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.assigned-row:hover { opacity: 0.9; }
.assigned-row-info { display: flex; flex-direction: column; gap: 2px; }
.assigned-row-title { font-weight: 500; font-size: 0.9em; }
.assigned-row-meta { font-size: 0.78em; color: var(--text-muted); }
.btn-sm { font-size: 0.78em; padding: 4px 10px; }
.assigned-row-overdue { background: rgba(233,69,96,.2); color: var(--danger); }
.assigned-row-deadline {
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  background: rgba(76,175,80,.15);
  color: var(--success);
}
.assigned-row-deadline.assigned-row-overdue {
  background: rgba(233,69,96,.2);
  color: var(--danger);
}

/* Activity section pagination */
.activity-more-btn { display: block; width: 100%; margin-top: 8px; }
