@font-face {
  font-family: "Garet";
  src: url("/assets/Garet-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root { --black:#000; --muted:#777; --line:#dedede; }
* { box-sizing:border-box; }
body { margin:0; background:#fff; color:#000; font-family:"Garet",Arial,sans-serif; }
button,input { font:inherit; }
.brand-logo { width:228px; height:auto; display:block; }
.panel { background:#fff; border:1px solid #000; border-radius:12px; }
.profile-button { width:48px; height:48px; border:0; border-radius:999px; background:#000; display:grid; place-items:center; cursor:pointer; transition:transform .15s ease; overflow:hidden; }
.profile-button:hover { transform:scale(1.04); }
.profile-button svg { width:28px; height:28px; }
.gmail-toolbar { height:55px; padding:0 14px; border-bottom:1px solid #ececec; display:flex; align-items:center; justify-content:space-between; }
.gmail-wordmark { font-family:Arial,sans-serif; font-size:18px; font-weight:500; }
.icon-button { width:34px; height:34px; border:0; background:transparent; border-radius:999px; cursor:pointer; }
.icon-button:hover { background:#f4f4f4; }
.gmail-nav { width:100%; border:0; background:transparent; text-align:left; padding:9px 10px; border-radius:0 999px 999px 0; font-size:10px; cursor:pointer; }
.gmail-nav:hover,.gmail-nav.active { background:#f0f0f0; font-weight:600; }
.gmail-search,.database-search { width:100%; height:38px; border:1px solid #ddd; border-radius:7px; padding:0 12px; outline:none; font-size:10px; }
.gmail-search:focus,.database-search:focus,.field input:focus { border-color:#000; }
.gmail-list { background:#fff; }
.gmail-row { width:100%; display:flex; gap:10px; align-items:center; padding:12px; border:0; border-bottom:1px solid #eee; cursor:pointer; text-align:left; background:#fff; }
.gmail-row:hover { background:#f8f8f8; }
.gmail-sender { font-size:10px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gmail-subject { font-size:10px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gmail-snippet { color:#888; font-size:9px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mail-source { border:1px solid #ddd; border-radius:999px; padding:2px 5px; font-size:7px; color:#666; }
.mail-approved { border-radius:999px; background:#eaf7ee; color:#1f6b37; padding:3px 6px; font-size:7px; white-space:nowrap; }
.attachment-badge { border-radius:4px; background:#000; color:#fff; font-size:7px; padding:3px 5px; }
.empty-gmail { padding:55px 25px; text-align:center; color:#888; font-size:10px; line-height:1.7; }
.upload-zone { min-height:125px; border:1px dashed #aaa; border-radius:8px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; cursor:pointer; transition:.15s ease; }
.upload-zone:hover,.upload-zone.dragover,.upload-zone.selected { border-color:#000; background:#fafafa; }
.field { display:block; }
.field span { display:block; font-size:10px; font-weight:600; margin-bottom:6px; }
.field input { width:100%; height:39px; border:1px solid #dedede; border-radius:7px; padding:0 11px; outline:none; font-size:10px; }
.primary-button,.secondary-button { height:37px; border-radius:6px; padding:0 15px; font-size:10px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.primary-button { border:0; background:#000; color:#fff; }
.primary-button:hover { background:#222; }
.primary-button:disabled { opacity:.6; cursor:not-allowed; }
.secondary-button { border:1px solid #ddd; background:#fff; color:#000; }
.secondary-button:hover { border-color:#000; }
.spinner { width:15px; height:15px; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.eyebrow { color:#777; font-size:9px; font-weight:600; text-transform:uppercase; letter-spacing:.14em; }
.source-banner { border:1px solid #dedede; border-radius:8px; padding:10px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.source-banner.hidden { display:none; }
.status-chip { display:inline-flex; align-items:center; min-height:25px; border-radius:999px; padding:4px 8px; font-size:8px; font-weight:600; white-space:nowrap; }
.status-approved { background:#eaf7ee; color:#1f6b37; }
.status-review { background:#fff5df; color:#855d00; }
.status-unknown { background:#f2f2f2; color:#666; }
.analysis-card { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid #ddd; border-radius:8px; background:#ddd; }
.analysis-card div { background:#fff; padding:9px 10px; display:flex; justify-content:space-between; gap:8px; font-size:9px; }
.analysis-card span { color:#777; }
.analysis-card strong { font-weight:600; text-align:right; }
.attachment-card { border:1px solid #ddd; border-radius:8px; background:#fff; padding:8px; text-align:left; cursor:pointer; }
.attachment-card:hover { border-color:#000; }
.photo-card { overflow:hidden; border:1px solid #ddd; border-radius:10px; background:#fff; }
.photo-image-wrap { display:block; background:#f3f3f3; }
.photo-preview { aspect-ratio:16/10; background:#f2f2f2; object-fit:cover; width:100%; display:block; }
.photo-body { padding:12px; }
.photo-title { min-width:0; font-size:11px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.photo-meta { margin-top:9px; display:grid; gap:5px; font-size:9px; color:#777; }
.photo-meta div { display:flex; justify-content:space-between; gap:10px; }
.photo-meta strong { color:#000; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.status-dot { width:8px; height:8px; border-radius:999px; flex:0 0 auto; margin-top:3px; }
.status-dot.status-approved { background:#2f9e57; }
.status-dot.status-review { background:#d89a14; }
.status-dot.status-unknown { background:#c8c8c8; }
.modal { position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.38); display:grid; place-items:center; padding:20px; }
.modal-card { position:relative; width:min(760px,100%); max-height:90vh; overflow:auto; background:#fff; border:1px solid #000; border-radius:12px; padding:24px; }
.modal-close { position:absolute; right:14px; top:10px; border:0; background:transparent; font-size:24px; cursor:pointer; }
.modal.hidden { display:none; }
.message-success { border-color:#b9dec4; background:#f1faf4; color:#1f6b37; }
.message-error { border-color:#f0bcbc; background:#fff5f5; color:#9a2d2d; }
@media (max-width:640px) { .brand-logo{width:190px}.profile-button{width:44px;height:44px}.analysis-card{grid-template-columns:1fr} }

.app-footer { margin-top:18px; padding:10px 2px 2px; font-size:8px; color:#777; text-align:left; }

/* Gmail follow-up helpers */
.gmail-filters { display:flex; gap:6px; padding:8px 10px; border-bottom:1px solid #eee; overflow-x:auto; background:#fff; }
.gmail-filter { flex:0 0 auto; border:1px solid #ddd; border-radius:999px; padding:5px 9px; background:#fff; font-size:8px; font-weight:600; color:#555; cursor:pointer; }
.gmail-filter:hover, .gmail-filter.active { border-color:#111; color:#111; background:#f7f7f7; }
.gmail-star { color:#e5a900; margin-right:5px; font-size:11px; vertical-align:-1px; }
.mail-waiting { display:inline-flex; border:1px solid #f1b55d; background:#fff7e8; color:#8a5200; border-radius:999px; padding:2px 6px; font-size:7px; font-weight:700; white-space:nowrap; }
.mail-answered { display:inline-flex; border:1px solid #d8d8d8; background:#fafafa; color:#666; border-radius:999px; padding:2px 6px; font-size:7px; font-weight:600; white-space:nowrap; }

.mail-status-toggle { cursor:pointer; user-select:none; transition:filter .15s ease, transform .15s ease; }
.mail-status-toggle:hover { filter:brightness(.96); transform:translateY(-1px); }


/* Database card actions */
.copy-value {
  cursor: copy;
  transition: opacity .15s ease;
}
.copy-value:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.copy-value.copied {
  opacity: .45;
}

.photo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eeeeee;
}
.photo-action {
  width: 30px;
  height: 30px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.photo-action:hover {
  border-color: #111111;
  background: #f7f7f7;
  transform: translateY(-1px);
}
.photo-action:disabled {
  opacity: .45;
  cursor: wait;
}
.photo-action svg {
  width: 15px;
  height: 15px;
}
.photo-trash:hover {
  background: #fff7f7;
}


/* Photo editor */
.photo-edit:hover {
  background: #f7f7ff;
}
.edit-photo-modal-card {
  width: min(650px, 100%);
}
.edit-name-preview {
  margin-top: 16px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafafa;
  display: grid;
  gap: 4px;
}
.edit-name-preview span {
  font-size: 8px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.edit-name-preview strong {
  font-size: 10px;
  font-weight: 600;
  word-break: break-word;
}
