/* ============================================================
   MASTER STYLESHEET — Gracia Group
   One demure, unified look for all forward-facing pages.
   Link this on every page. It restyles plain HTML elements
   AND the component classes already used across your pages.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

:root {
  /* Surfaces & ink — taken from the Portfolio page */
  --paper:          #f4f2ee;   /* cream page background */
  --surface:        #ffffff;   /* white card / table surface */
  --ink:            #16181d;   /* headings, primary buttons */
  --text:           #16181d;   /* body text */
  --text-secondary: #6b7280;   /* secondary / supporting text */
  --text-muted:     #6b7280;   /* labels, captions, timestamps */

  /* Lines */
  --border:         #e7e5e0;
  --border-strong:  #cdc9c0;

  /* Accent */
  --accent:         #3d5a73;   /* muted slate — primary buttons */

  /* Semantic, understated */
  --pos:            #1f7a4d;   /* gains */
  --neg:            #b23b3b;   /* losses / errors */

  /* Type */
  --font-display:   "Fraunces", Georgia, serif;
  --font-ui:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Shape & depth */
  --radius:         9px;
  --radius-lg:      14px;
  --shadow:         0 1px 24px rgba(20,24,29,0.05);
  --focus-ring:     0 0 0 3px rgba(26,26,26,.12);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--paper);
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 19px; line-height: 1.3; margin: 32px 0 16px; }
h3 { font-size: 16px; margin: 24px 0 10px; }
.page-title { font-size: 40px; line-height: 1.1; margin: 0 0 4px; }

p  { margin: 0 0 14px; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color .15s, color .15s;
}
a:hover { border-bottom-color: var(--ink); }

hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* Page content panel — white card on the cream body, like Portfolio */
.page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Small uppercase eyebrow / section label (the "demure" signature) */
.eyebrow,
.filter-label,
.bid-current-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Tables ---------- */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 24px;
  background: var(--surface);
}

th, td {
  text-align: left;
  padding: 13px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  white-space: normal;
  word-wrap: break-word;
}

thead, thead tr, thead th, th {
  background: var(--surface);
}

th {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}

td {
  font-size: 15px;
  color: var(--text);
}

tr:nth-child(even) { background: transparent; }
tbody tr:hover     { background: #faf8f3; }

thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* gain / loss helpers */
.pos, .up   { color: var(--pos); }
.neg, .down { color: var(--neg); }

/* ---------- Buttons ---------- */
.btn,
.primary-btn,
.modal-btn,
.bid-button {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: var(--surface);
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: opacity .15s, background-color .15s;
}
.btn:hover,
.primary-btn:hover,
.modal-btn:hover,
.bid-button:hover { opacity: .85; background-color: var(--accent); box-shadow: none; }

/* secondary / outline button */
.btn.secondary,
.btn-cancel,
.modal-btn.secondary {
  background-color: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn.secondary:hover,
.btn-cancel:hover { background-color: #f4f2ec; opacity: 1; }

.bid-button:disabled { background: var(--border-strong); border-color: var(--border-strong); cursor: not-allowed; }

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

/* pill-style company filter buttons */
.company-btn {
  font-family: var(--font-ui);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 5px 12px;
  margin: 3px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.company-btn:hover { background-color: #f4f2ec; }
.company-btn.active { background-color: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ---------- Inputs ---------- */
input[type=text],
input[type=number],
input[type=date],
input[type=email],
select,
textarea,
.bid-amount-input {
  font-family: var(--font-ui);
  font-size: 15px;
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus, .bid-amount-input:focus {
  outline: none;
  border-color: var(--ink) !important;
  box-shadow: var(--focus-ring) !important;
}

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

.checkbox-label { display: inline-flex; align-items: center; margin-right: 15px; cursor: pointer; font-weight: 500; }
.checkbox-label input { margin-right: 6px; width: auto; }

/* ---------- Cards, header, containers ---------- */
.header,
.ticket-size-filter,
.bid-container,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; }

.deal-id, .deal-count, .bid-timestamp { color: var(--text-muted); }
.deal-count { font-family: var(--font-display); font-size: 28px; color: var(--ink); }

/* filter scaffolding */
.filter-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filter-group, .right-filters, .slider-group, .bottom-filter-group,
.data-room-group, .highlighted-group {
  display: flex; align-items: center;
}
.slider-group, .bottom-filter-group, .data-room-group, .highlighted-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  gap: 12px;
}

.bid-current-info { background: #faf8f3; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; }
.bid-current-value { font-size: 18px; font-weight: 600; color: var(--ink); margin-right: 15px; }
.bid-timestamp { margin-left: auto; font-size: 13px; }
.bid-message.error   { color: var(--neg); }
.bid-message.success { color: var(--pos); }
.bid-notes { margin-top: 15px; font-size: 13px; color: var(--text-muted); }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(28,26,23,.45); z-index: 1000; opacity: 0; transition: opacity .3s; }
.modal.show { display: block; opacity: 1; }
.modal-content { background: var(--surface); margin: 12% auto; padding: 32px; width: 80%; max-width: 500px; border-radius: var(--radius-lg); box-shadow: var(--shadow); text-align: center; }

/* ---------- News / lists ---------- */
.news-section ul { list-style: none; padding-left: 0; }
.news-section li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.news-section li:last-child { border-bottom: none; }
.news-section a { border-bottom: none; color: var(--text-secondary); }
.news-section a:hover { color: var(--ink); }

/* ---------- Daily Brief — filter bar (web view only) ---------- */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 28px; }
.filter-btn, .refresh-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.filter-btn:hover, .refresh-btn:hover { background: #faf8f3; color: var(--ink); }
.filter-btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.refresh-btn:disabled { opacity: .55; cursor: default; }

/* ---------- Misc ---------- */
#disclaimer, .subtitle { font-size: 14px; color: var(--text-muted); }
.greyed-out { opacity: .5; pointer-events: none; }