:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #d97706;
  --nav-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; background: var(--surface); }
body {
  height: calc(100% + env(safe-area-inset-top, 0px));
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
}

/* ── Page ── */
.page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
}

/* ── Header ── */
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-header h1 { font-size: 1.2rem; font-weight: 700; flex: 1; }

.header-title { flex: 1; min-width: 0; }
.header-title h1 { font-size: 1.1rem; }
.header-biz-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.project-property-tag { font-size: 0.75rem; color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: var(--accent); text-decoration: none;
}
.back-btn svg { width: 22px; height: 22px; }

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: var(--accent);
  background: var(--accent-light); border-radius: 8px; text-decoration: none;
}
.btn-icon svg { width: 20px; height: 20px; }

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: none; cursor: pointer; color: var(--text-muted); padding: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.danger-icon:hover, .danger-icon:active { color: var(--danger); }

/* ── Bottom nav ── */
.bottom-nav {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  height: calc(var(--nav-h) + var(--safe-bottom));
  flex-shrink: 0;
}

.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--text-muted); font-size: 0.7rem;
  padding: 8px 0; transition: color 0.15s;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--accent); }
button.nav-item { border: none; background: none; cursor: pointer; font-family: inherit; }

/* ── Drawer ── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  pointer-events: none;
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0; left: 0;
  width: 240px; height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 101;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 12px 12px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border);
}
.drawer-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); border-radius: 8px;
}
.drawer-close svg { width: 20px; height: 20px; }
.drawer-close:active { background: var(--bg); }

.drawer-nav {
  display: flex; flex-direction: column;
  padding: 8px;
  flex: 1;
}
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  font-size: 1rem; font-weight: 500;
}
.drawer-item svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--text-muted); }
.drawer-item.active { color: var(--accent); background: var(--accent-light); }
.drawer-item.active svg { color: var(--accent); }
.drawer-item:active { background: var(--bg); }
.drawer-admin { margin-top: auto; color: var(--danger); border-top: 1px solid var(--border); border-radius: 0; }
.drawer-admin svg { color: var(--danger); }
.drawer-admin:active { background: #fee2e2; }
.drawer-admin.active { color: var(--danger); background: #fee2e2; }
.drawer-admin.active svg { color: var(--danger); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 10px; font-size: 1rem;
  font-weight: 600; text-decoration: none; border: none; cursor: pointer;
  background: var(--border); color: var(--text);
}
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-danger { background: var(--danger); color: #fff; width: 100%; margin-top: 8px; }
.btn-sm {
  padding: 6px 12px; font-size: 0.85rem; font-weight: 600;
  background: var(--accent-light); color: var(--accent);
  border-radius: 8px; text-decoration: none;
}

/* ── Forms ── */
.form-page { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.form-inset { padding-top: 12px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 1rem; background: var(--surface);
  color: var(--text); appearance: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}

.field-group { display: flex; gap: 10px; }
.field-group .field { flex: 1; }

.file-pick {
  display: flex; align-items: center; justify-content: center;
  padding: 14px; border: 2px dashed var(--border); border-radius: 10px;
  color: var(--text-muted); font-size: 0.9rem; cursor: pointer;
  background: var(--bg);
}
.file-pick input[type="file"] { display: none; }
.file-pick.has-file { border-color: var(--success); color: var(--success); background: #f0fdf4; }

.hidden-file { display: none; }

/* ── Filter bar ── */
.filter-bar {
  display: flex; gap: 8px; padding: 10px 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  background: var(--bg); color: var(--text-muted); border: 1px solid var(--border);
}
.filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Tabs ── */
.tabs {
  display: flex; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1; text-align: center; padding: 12px 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Project cards ── */
.project-section { padding: 0 16px 8px; }
.section-label {
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 14px 0 6px;
}

.project-card {
  display: block; background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border); padding: 14px 16px; margin-bottom: 8px;
  text-decoration: none; color: var(--text);
}
.project-card-name { font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.project-card-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.project-card-status { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.project-property { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2px; }
.status-not_started { background: var(--bg); color: var(--text-muted); }
.status-active { background: #dcfce7; color: var(--success); }
.status-completed { background: var(--bg); color: var(--text-muted); }
.status-suspended { background: #fef9c3; color: var(--warn); }

.status-select {
  border: none; border-radius: 10px; padding: 4px 8px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.status-select.status-not_started { background: var(--bg); color: var(--text-muted); }
.status-select.status-active { background: #dcfce7; color: var(--success); }
.status-select.status-completed { background: var(--bg); color: var(--text-muted); }
.status-select.status-suspended { background: #fef9c3; color: var(--warn); }

.biz-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  background: var(--accent-light); color: var(--accent);
  margin-bottom: 4px;
}

/* ── Messages ── */
.messages-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }

.message-bubble {
  background: var(--surface); border-radius: 12px; border: 1px solid var(--border); padding: 12px;
}
.message-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.msg-byline { display: flex; align-items: center; gap: 6px; }
.msg-byline strong { font-size: 0.85rem; }
.msg-actions { display: flex; align-items: center; gap: 2px; }
.msg-time { font-size: 0.75rem; color: var(--text-muted); }
.message-text { font-size: 0.95rem; line-height: 1.5; }
.msg-edit-form textarea { width: 100%; font-size: 1rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; resize: none; font-family: inherit; background: var(--bg); margin-top: 4px; }
.msg-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.message-text p { margin: 0 0 0.4em; }
.message-text p:last-child { margin-bottom: 0; }
.message-text a { color: var(--accent); }
.message-text strong, .message-text b { font-weight: 700; }
.message-text em, .message-text i { font-style: italic; }
.message-text code { font-family: monospace; font-size: 0.875em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.message-text pre { background: var(--bg); padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 4px 0; }
.message-text pre code { background: none; padding: 0; }
.message-text ul, .message-text ol { padding-left: 1.4em; margin: 4px 0; }
.file-ref { color: var(--accent); font-weight: 600; font-family: monospace; font-size: 0.9em; text-decoration: none; }

.message-attachment { margin-top: 8px; }
.thumb { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; }
.file-link { color: var(--accent); font-size: 0.9rem; text-decoration: none; }

.message-form {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  z-index: 5;
}
.message-input-row { display: flex; gap: 8px; align-items: flex-end; }
.message-input-row textarea {
  flex: 1; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 1rem; resize: none;
  font-family: inherit; background: var(--bg);
}
.attach-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: var(--text-muted); cursor: pointer;
  flex-shrink: 0;
}
.attach-btn svg { width: 22px; height: 22px; }
.send-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--accent); color: #fff;
  border: none; border-radius: 10px; cursor: pointer; flex-shrink: 0;
}
.send-btn svg { width: 18px; height: 18px; }

.attach-preview { margin-top: 8px; }
.attach-preview img { max-height: 80px; border-radius: 6px; }
.hidden { display: none; }

/* ── Todos ── */
.messages-list { padding-bottom: 80px; }
.todos-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; padding-bottom: 80px; }

.todo-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 10px; border: 1px solid var(--border);
  padding: 13px 14px; cursor: pointer;
}
.todo-item.completed .todo-title { text-decoration: line-through; color: var(--text-muted); }
.todo-check {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--accent); flex-shrink: 0; display: flex;
}
.todo-check svg { width: 22px; height: 22px; }
.todo-title { font-size: 0.95rem; flex: 1; text-align: left; }

.add-todo-form {
  display: flex; gap: 8px; padding: 10px 16px;
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 5;
}
.add-todo-form input {
  flex: 1; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font-size: 1rem; background: var(--bg);
}
.add-todo-form .btn { padding: 11px 18px; width: auto; }

/* ── Files grid ── */
.upload-form { padding: 12px 16px 4px; }
.upload-area {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border: 2px dashed var(--border); border-radius: 12px;
  color: var(--text-muted); cursor: pointer; background: var(--surface);
}
.upload-area svg { width: 22px; height: 22px; }
.upload-area span { font-size: 0.9rem; font-weight: 500; }

.files-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 12px 16px;
}
.file-thumb-wrap { position: relative; }
.file-thumb-wrap .file-delete-btn {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  border: none; font-size: 1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.file-thumb {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.file-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.file-icon { font-size: 2rem; text-align: center; padding: 20px; background: var(--bg); }
.file-name { font-size: 0.78rem; font-weight: 600; padding: 6px 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.72rem; color: var(--text-muted); padding: 0 8px 8px; }

/* ── Receipts ── */
.receipt-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }

.receipt-card {
  background: var(--surface); border-radius: 12px; border: 1px solid var(--border); padding: 14px;
}
.receipt-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.receipt-header-left { display: flex; align-items: center; gap: 6px; }
.receipt-date { font-size: 0.82rem; color: var(--text-muted); }
.receipt-desc { font-weight: 600; margin-bottom: 3px; }
.receipt-project { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.receipt-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.receipt-footer-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.receipt-footer-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.receipt-amount { font-size: 1.05rem; color: var(--success); }
.receipt-img-link { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.receipt-note-btn { font-size: 0.82rem; color: var(--accent); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.receipt-who { font-size: 0.78rem; color: var(--text-muted); }
.reimb-tag { display: inline-flex; align-items: center; padding: 2px 7px; background: #fef3c7; color: #92400e; font-size: 0.68rem; font-weight: 700; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.03em; }

.field-inline { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.field-inline input[type="checkbox"] {
  width: 20px; height: 20px; flex-shrink: 0;
  padding: 0; border-radius: 4px;
  appearance: auto; -webkit-appearance: checkbox;
  background: none; border: none; cursor: pointer;
}
.field-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }

.note-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 24px; }
.note-modal.open { display: flex; }
.note-modal-box { background: var(--surface); border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; }
.note-modal-box p { font-size: 0.95rem; line-height: 1.55; white-space: pre-wrap; margin-bottom: 16px; }

.add-section { margin: 8px 16px 0; }
.add-section summary { list-style: none; cursor: pointer; }
.add-section summary::-webkit-details-marker { display: none; }
details[open] summary { margin-bottom: 8px; }

/* ── Paint ── */
.paint-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }

.paint-card {
  display: flex; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  text-decoration: none; color: var(--text); align-items: center;
}
.paint-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.paint-thumb-placeholder { width: 64px; height: 64px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; }
.paint-card-info { flex: 1; min-width: 0; }
.paint-card-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.paint-num { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.paint-brand { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.paint-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.paint-finish { font-size: 0.72rem; color: var(--text-muted); }

.label-badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.badge-yes { background: #dcfce7; color: var(--success); }
.badge-no { background: #fee2e2; color: var(--danger); }
.badge-maybe { background: #fef9c3; color: var(--warn); }

.queue-btn { background: #fef9c3; color: var(--warn); }

.paint-images { display: flex; gap: 10px; padding: 12px 16px 0; }
.paint-img-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--text-muted); }
.paint-detail-img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

.dispose-form { margin-top: 0; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  touch-action: none;
  user-select: none;
}
.lightbox-counter {
  position: absolute; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.6); font-size: 0.85rem; pointer-events: none;
}

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}

/* ── Paint property tag ── */
.paint-property-tag {
  font-size: 0.72rem; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px;
}

/* ── Login ── */
.login-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  background: var(--bg);
}
.login-title { font-size: 2rem; font-weight: 800; margin-bottom: 32px; color: var(--accent); }
.login-form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 14px; }
.login-error {
  background: #fee2e2; color: var(--danger);
  padding: 10px 14px; border-radius: 8px; font-size: 0.9rem;
}

/* ── Settings ── */
.settings-body { padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.settings-section { display: flex; flex-direction: column; gap: 8px; }
.settings-label {
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; padding: 0 4px;
}
.settings-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-key { font-weight: 600; font-size: 0.95rem; }
.settings-val { color: var(--text-muted); font-size: 0.9rem; }
.settings-role { text-transform: capitalize; }
.settings-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); }
.settings-banner {
  padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; font-weight: 500;
}
.settings-banner.success { background: #dcfce7; color: var(--success); }
.settings-banner.error { background: #fee2e2; color: var(--danger); }
.settings-banner.reset-pass { background: #fef9c3; color: #713f12; }
.reset-pass-row { display: inline-flex; align-items: center; gap: 8px; }
.reset-pass-code { font-family: monospace; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.08em; }
.reset-pass-note { font-size: 0.8rem; margin-top: 4px; opacity: 0.75; }
.copy-btn { font-size: 0.78rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; border: 1px solid #a16207; background: none; color: #713f12; cursor: pointer; }
.copy-btn.copied { border-color: var(--success); color: var(--success); }
.settings-flags-form { border-top: 1px solid var(--border); }
.settings-flags { display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
.settings-delete-form { padding: 10px 16px; border-top: 1px solid var(--border); }
.settings-action-row { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
.admin-view-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--border); }
.admin-view-info { display: flex; flex-direction: column; gap: 2px; }
.admin-view-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-view-val { font-size: 0.95rem; display: flex; gap: 6px; flex-wrap: wrap; }
.admin-edit-section { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--bg); }
.admin-edit-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-edit-btns { display: flex; gap: 8px; flex-shrink: 0; }
.admin-edit-input { flex: 1; min-width: 120px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 0.95rem; background: var(--surface); color: var(--text); }
.priv-chip { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--accent-light); color: var(--accent); }
.btn-deactivate { background: none; color: var(--danger); border: 1px solid var(--danger); }
.btn-deactivate:active { background: #fee2e2; }
.deactivated-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; }
.user-inactive { opacity: 0.6; }
.settings-flags select { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.9rem; background: var(--bg); color: var(--text); }
.flag-inline { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.flag-inline label { cursor: pointer; }
.receipt-actions { display: flex; align-items: center; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.receipt-action-btn { font-size: 0.85rem; font-weight: 500; color: var(--accent); background: none; border: none; padding: 0; cursor: pointer; text-decoration: none; white-space: nowrap; }
.receipt-action-btn:active { opacity: 0.6; }
.receipt-action-paid { color: #065f46; font-weight: 700; }
