/* A4T Hub — shared styles. Brand tokens from advertising4trades.co.uk
   (same palette as the A4T promo videos). Mobile-first. */
:root {
  --bg-0: #10221c;
  --bg-1: #0d5345;
  --ink: #f6f8f5;
  --muted: #9db8ae;
  --accent: #a8c93e;
  --accent-2: #c8e06b;
  --accent-deep: #8fb02a;
  --pale: #eef6e6;
  --green: #39d36a;
  --green-2: #6fe394;
  --card: #143229;
  --card-2: #1a3f33;
  --line: rgba(255, 255, 255, 0.1);
  --danger: #e66a5c;
  --amber: #e8b84b;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(168, 201, 62, 0.12), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(57, 211, 106, 0.07), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-0) 55%) fixed;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }

/* ---- header / nav ---- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  position: sticky; top: 0; z-index: 30;
  background: rgba(13, 38, 31, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: baseline; gap: 7px; font-weight: 900; font-size: 18px; text-decoration: none; color: var(--ink); }
.logo .a4t { color: var(--accent); }
.logo small { color: var(--muted); font-weight: 600; }
.topbar nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav button {
  background: none; border: none; color: var(--muted);
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 9px; cursor: pointer;
}
.topbar nav button.active { color: var(--bg-0); background: var(--accent); }
.topbar nav button:not(.active):hover { color: var(--ink); background: var(--card-2); }

/* ---- cards / layout ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.card h2 { font-size: 17px; margin-bottom: 12px; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.stat { text-align: left; padding: 16px; }
.stat .num { font-size: 28px; font-weight: 900; color: var(--accent); line-height: 1.1; }
.stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---- forms ---- */
label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 0 5px; }
input, select, textarea {
  width: 100%;
  font: inherit; font-size: 15px;
  color: var(--ink);
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 15px;
  color: var(--bg-0);
  background: var(--accent);
  border: none; border-radius: 11px;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-2); }
.btn.secondary { background: var(--card-2); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: #225043; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- lists & chips ---- */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; font-size: 15px; }
.row .sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.click { cursor: pointer; }
.row.click:hover .title { color: var(--accent-2); }

.chip {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  padding: 4px 10px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--card-2); color: var(--muted);
  white-space: nowrap;
}
.chip.new { background: rgba(232, 184, 75, 0.16); color: var(--amber); }
.chip.sent { background: rgba(111, 227, 148, 0.13); color: var(--green-2); }
.chip.accepted, .chip.signed_off { background: rgba(168, 201, 62, 0.2); color: var(--accent-2); }
.chip.declined { background: rgba(230, 106, 92, 0.15); color: var(--danger); }
.chip.planned { background: rgba(232, 184, 75, 0.16); color: var(--amber); }
.chip.in_progress { background: rgba(111, 227, 148, 0.13); color: var(--green-2); }
.chip.complete { background: rgba(168, 201, 62, 0.2); color: var(--accent-2); }

.money { font-weight: 900; color: var(--accent); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; }
.tabs button {
  font: inherit; font-weight: 700; font-size: 14px;
  background: var(--card); color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 16px; cursor: pointer; white-space: nowrap;
}
.tabs button.active { background: var(--accent); color: var(--bg-0); border-color: transparent; }

/* ---- photo grid ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-grid .ph { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--bg-0); }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .ph .del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 13px;
}

/* ---- toast & misc ---- */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px);
  background: var(--accent); color: var(--bg-0);
  font-weight: 800; font-size: 14px;
  padding: 12px 22px; border-radius: 99px;
  transition: transform 0.25s ease; z-index: 99;
  max-width: 90vw; text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); color: #fff; }

.note-card { background: var(--bg-0); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.note-card .tag { font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.note-card ul { margin: 6px 0 0 18px; font-size: 14px; }
.note-card details { margin-top: 8px; }
.note-card summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }

.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }

@media print {
  body { background: #fff; color: #111; }
  .no-print { display: none !important; }
}
