/* ============================================================
   ACTOR OUTREACH TRACKER — Luke Nugent Portraits
   Brand: Syne + Syne Mono · Black/white · Status badges = only colour
   ============================================================ */

/* ---- FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Syne+Mono&display=swap');

/* ---- VARIABLES ---- */
:root {
  --bg:        #ffffff;
  --surface:   #f5f5f3;
  --border:    #e0e0e0;
  --border-dk: #c8c8c8;
  --ink:       #0a0a0a;
  --mid:       #444444;
  --muted:     #888888;
  --faint:     #bbbbbb;

  /* Buttons */
  --btn-bg:    #0a0a0a;
  --btn-hover: #333333;

  /* Status — these are the ONLY colours in the UI */
  --c-no-response-bg:    #e8f1fa; --c-no-response:    #3a7cbd;
  --c-responded-bg:      #f0ebfa; --c-responded:      #7a5cbf;
  --c-interested-bg:     #faf4e0; --c-interested:     #b08a2a;
  --c-booked-bg:         #e5f5ec; --c-booked:         #2a8a4a;
  --c-declined-bg:       #faeaea; --c-declined:       #bf3a3a;
  --c-not-suitable-bg:   #f5eaea; --c-not-suitable:   #8a5252;
  --c-contacted-bg:      #e0f5f2; --c-contacted:      #2a7a6a;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { display: block; }

/* ---- LOADING SCREEN ---- */
#loading-screen {
  position: fixed; inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   HEADER
   ============================================================ */
#app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {}

.app-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}

.header-sub {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#user-name {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border-dk);
  color: var(--mid);
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 100px;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ============================================================
   STATS BAR
   ============================================================ */
#stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
#stats-bar::-webkit-scrollbar { display: none; }

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}

.stat-num {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.stat-label {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   TOOLBAR
   ============================================================ */
#toolbar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: 'Syne Mono', monospace;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
  width: 200px;
  transition: border-color 0.15s;
}
#search-input:focus { border-color: var(--border-dk); }
#search-input::placeholder { color: var(--faint); }

#sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--mid);
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.archived-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.toolbar-spacer { flex: 1; }

.btn-primary {
  background: var(--btn-bg);
  color: #ffffff;
  border: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 100px;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--btn-hover); }

.btn-secondary {
  background: none;
  border: 1px solid var(--border-dk);
  color: var(--mid);
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 100px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================================
   FILTER BUTTONS
   ============================================================ */
#filter-bar {
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
#filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--border-dk); color: var(--ink); }
.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ============================================================
   BULK ACTIONS BAR
   ============================================================ */
#bulk-bar {
  background: var(--ink);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#bulk-count {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-right: 4px;
}

.btn-bulk {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-bulk:hover { background: rgba(255,255,255,0.22); }
.btn-bulk.danger { border-color: rgba(255,100,100,0.4); color: #ffaaaa; }

.bulk-spacer { flex: 1; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.badge.large { font-size: 0.72rem; padding: 5px 14px; }

.badge.no-response   { background: var(--c-no-response-bg);  color: var(--c-no-response); }
.badge.responded     { background: var(--c-responded-bg);    color: var(--c-responded); }
.badge.interested    { background: var(--c-interested-bg);   color: var(--c-interested); }
.badge.booked        { background: var(--c-booked-bg);       color: var(--c-booked); }
.badge.declined      { background: var(--c-declined-bg);     color: var(--c-declined); }
.badge.not-suitable  { background: var(--c-not-suitable-bg); color: var(--c-not-suitable); }
.badge.contacted     { background: var(--c-contacted-bg);    color: var(--c-contacted); }

/* ============================================================
   CARDS (mobile)
   ============================================================ */
#cards {
  padding: 12px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--border-dk); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* Left status stripe */
.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.card.no-response::before  { background: var(--c-no-response); }
.card.responded::before    { background: var(--c-responded); }
.card.interested::before   { background: var(--c-interested); }
.card.booked::before       { background: var(--c-booked); }
.card.declined::before     { background: var(--c-declined); }
.card.not-suitable::before { background: var(--c-not-suitable); }
.card.contacted::before    { background: var(--c-contacted); }

.card.overdue { background: #fffdf5; }
.card.archived { opacity: 0.5; }

.card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.card-check input[type="checkbox"] { cursor: pointer; }

.headshot {
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.card-body { flex: 1; min-width: 0; padding-right: 20px; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.actor-name {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.2;
}

.card-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.card-meta .date { color: var(--mid); }

.followup-flag {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px;
}
.followup-flag.overdue-text { color: #b08a2a; font-weight: 600; }

.notes-snippet {
  font-family: 'Syne Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   TABLE (desktop)
   ============================================================ */
#table-wrap {
  display: none;
  overflow-x: auto;
  padding-bottom: 80px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
tbody tr:hover { background: var(--surface); }
tbody tr.overdue { background: #fffdf5; }
tbody tr.archived { opacity: 0.5; }

/* Table status stripe via left border on first cell */
tbody td:first-child { padding-left: 8px; }
tbody tr.no-response  td:first-child { border-left: 3px solid var(--c-no-response); }
tbody tr.responded    td:first-child { border-left: 3px solid var(--c-responded); }
tbody tr.interested   td:first-child { border-left: 3px solid var(--c-interested); }
tbody tr.booked       td:first-child { border-left: 3px solid var(--c-booked); }
tbody tr.declined     td:first-child { border-left: 3px solid var(--c-declined); }
tbody tr.not-suitable td:first-child { border-left: 3px solid var(--c-not-suitable); }
tbody tr.contacted    td:first-child { border-left: 3px solid var(--c-contacted); }

tbody td {
  padding: 10px 16px;
  vertical-align: middle;
  color: var(--mid);
  font-size: 0.82rem;
}

.check-cell { width: 36px; padding-left: 8px !important; }
.check-cell input { cursor: pointer; }
.photo-cell { width: 56px; }
.photo-cell img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}

td.name-cell {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}

td.notes-cell {
  font-family: 'Syne Mono', monospace;
  font-size: 0.75rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overdue-text { color: #b08a2a; font-weight: 600; }

/* ============================================================
   EMPTY STATE / SEED
   ============================================================ */
#empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
#empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--mid);
}
#empty-state p {
  font-family: 'Syne Mono', monospace;
  font-size: 0.8rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ============================================================
   STATUS DROPDOWN (floating)
   ============================================================ */
#status-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid var(--border-dk);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 500;
  min-width: 160px;
  padding: 6px;
  overflow: hidden;
}

.status-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.1s;
}
.status-option:hover { background: var(--surface); }
.status-option.no-response  { color: var(--c-no-response); }
.status-option.responded    { color: var(--c-responded); }
.status-option.interested   { color: var(--c-interested); }
.status-option.booked       { color: var(--c-booked); }
.status-option.declined     { color: var(--c-declined); }
.status-option.not-suitable { color: var(--c-not-suitable); }
.status-option.contacted    { color: var(--c-contacted); }

/* ============================================================
   PROFILE VIEW
   ============================================================ */
#profile-view {
  min-height: calc(100vh - 57px);
}

#profile-nav {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
}

.breadcrumb {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--border-dk); }
.breadcrumb a:hover { text-decoration-color: var(--ink); }

.profile-nav-btns {
  display: flex;
  gap: 8px;
}

.btn-nav {
  background: none;
  border: 1px solid var(--border-dk);
  color: var(--mid);
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-nav:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-nav:disabled { opacity: 0.35; cursor: default; }

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 120px);
}

/* Left column */
.profile-left {
  border-right: 1px solid var(--border);
  padding: 28px 24px;
  overflow-y: auto;
}

/* Photo */
.photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  max-width: 220px;
  margin: 0 auto 20px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}
.photo-wrap:hover .photo-overlay { opacity: 1; }

#profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Profile sections */
.profile-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.profile-section:last-child { border-bottom: none; margin-bottom: 0; }

.section-title {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Profile name + status */
.profile-identity { margin-bottom: 16px; }

#p-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  width: 100%;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  outline: none;
  padding: 2px 0;
  transition: border-color 0.15s;
  line-height: 1.2;
}
#p-name:hover { border-bottom-color: var(--border); }
#p-name:focus { border-bottom-color: var(--border-dk); }

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* Field groups */
.field-group {
  margin-bottom: 14px;
}

.field-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-family: 'Syne Mono', monospace;
  font-size: 0.82rem;
  padding: 5px 0;
  outline: none;
  transition: border-color 0.15s;
}
.profile-field:focus { border-bottom-color: var(--border-dk); }
.profile-field::placeholder { color: var(--faint); }

select.profile-field {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  -webkit-appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center;
  padding-right: 20px;
}

.field-link {
  display: block;
  font-family: 'Syne Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
  word-break: break-all;
}

/* Tags */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border-dk);
  color: var(--mid);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 100px;
}

.tag-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 2px;
  transition: color 0.1s;
}
.tag-remove:hover { color: var(--ink); }

#tag-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border-dk);
  color: var(--ink);
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  padding: 4px 0;
  outline: none;
}
#tag-input::placeholder { color: var(--faint); font-size: 0.72rem; }

/* Right column */
.profile-right {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Profile actions bar */
.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

#save-indicator {
  font-family: 'Syne Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
#save-indicator.saved { color: var(--c-booked); }

.btn-danger {
  background: none;
  border: 1px solid #f0c8c8;
  color: #c04040;
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}
.btn-danger:hover { background: #c04040; color: #fff; border-color: #c04040; }

/* Notes */
.notes-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

#p-notes {
  width: 100%;
  min-height: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-family: 'Syne Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  padding: 14px;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  margin-bottom: 28px;
}
#p-notes:focus { border-color: var(--border-dk); }
#p-notes::placeholder { color: var(--faint); }

/* Activity log */
.log-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.log-title {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

#activity-log {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  max-height: 360px;
  overflow-y: auto;
}

.log-entry {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.log-entry:last-child { border-bottom: none; }

.log-action {
  display: block;
  font-family: 'Syne Mono', monospace;
  font-size: 0.78rem;
  color: var(--mid);
  line-height: 1.4;
  margin-bottom: 2px;
}

.log-meta {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.log-empty {
  padding: 16px 14px;
  font-size: 0.75rem;
  font-family: 'Syne Mono', monospace;
  color: var(--muted);
  text-align: center;
}

.add-log-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#log-note-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font-family: 'Syne Mono', monospace;
  font-size: 0.8rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s;
}
#log-note-input:focus { border-color: var(--border-dk); }
#log-note-input::placeholder { color: var(--faint); }

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-card {
  background: var(--bg);
  border: 1px solid var(--border-dk);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 32px;
  margin: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.1s;
}
.modal-close:hover { color: var(--ink); }

/* Mandy import box */
.mandy-import-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mandy-import-row {
  display: flex;
  gap: 8px;
}

#new-mandy-url {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border-dk);
  border-radius: 6px;
  color: var(--ink);
  font-family: 'Syne Mono', monospace;
  font-size: 0.78rem;
  padding: 8px 10px;
  outline: none;
}
#new-mandy-url::placeholder { color: var(--faint); }

#mandy-import-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-family: 'Syne Mono', monospace;
  color: var(--muted);
}

/* Form fields in modal */
.form-row {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font-family: 'Syne Mono', monospace;
  font-size: 0.85rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--border-dk); }
.form-input::placeholder { color: var(--faint); }

select.form-input {
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 32px;
}

textarea.form-input {
  min-height: 90px;
  resize: vertical;
  font-size: 0.82rem;
  line-height: 1.6;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  background: #fff0f0;
  border: 1px solid #f0c8c8;
  border-radius: 6px;
  color: #c04040;
  font-family: 'Syne Mono', monospace;
  font-size: 0.75rem;
  padding: 8px 12px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   TEMPLATES OVERLAY
   ============================================================ */
.templates-card {
  max-width: 600px;
}

.template-block {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.template-block:last-child { border-bottom: none; margin-bottom: 0; }

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.template-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

.template-content {
  font-family: 'Syne Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--mid);
  background: var(--surface);
  border-radius: 6px;
  padding: 12px 14px;
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
}

/* ============================================================
   BULK STATUS DROPDOWN
   ============================================================ */
#bulk-status-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border-dk);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 300;
  min-width: 160px;
  padding: 6px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 700px) {
  #cards { display: none; }
  #table-wrap { display: block; }

}

@media (max-width: 899px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-left { border-right: none; border-bottom: 1px solid var(--border); }
  .photo-wrap { max-width: 160px; }
}

@media (max-width: 600px) {
  #app-header { padding: 14px 16px; }
  #toolbar { padding: 10px 16px; }
  #filter-bar { padding: 8px 16px; }
  #stats-bar { padding: 10px 16px; }
  .profile-left { padding: 20px 16px; }
  .profile-right { padding: 20px 16px; }
  .modal-card { padding: 24px 20px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  #search-input { width: 100%; }
}
