/* Opportunity Radar. Uses the site's tokens from style1.css (--color-primary, fonts). */
.opp-page main { padding-top: 90px; min-height: 70vh; }
.opp-hero { padding: 40px 0 10px; }
.opp-hero h1 { font-family: var(--font-primary); font-weight: 700; font-size: 2rem; margin: 0 0 6px; }
.opp-hero p { color: #5c6168; margin: 0; max-width: 620px; }
.opp-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.opp-btn { font: 600 14px var(--font-primary); border: 1px solid var(--color-primary); color: var(--color-primary); background: #fff; padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: .2s; }
.opp-btn:hover { background: rgba(0,148,172,.08); color: var(--color-primary); }
.opp-btn.primary { background: var(--color-primary); color: #fff; }
.opp-btn.primary:hover { filter: brightness(.92); background: var(--color-primary); color: #fff; }
.opp-btn.danger { border-color: #c0392b; color: #c0392b; }
.opp-btn.danger.primary { background: #c0392b; color: #fff; }
.opp-btn.sm { padding: 6px 12px; font-size: 13px; }
.opp-btn.on { background: var(--color-primary); color: #fff; }
.opp-btn:focus-visible, 
.opp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 6px; }
.opp-stat { background: #f6fafb; border: 1px solid #e3eef0; border-radius: 12px; padding: 12px 14px; }
.opp-stat b { display: block; font: 700 1.6rem var(--font-primary); color: var(--color-primary); }
.opp-stat span { font-size: 13px; color: #5c6168; }

.opp-input { width: 100%; border: 1px solid #cfd6da; border-radius: 8px; padding: 10px 12px; font: 400 15px var(--font-default); background: #fff; color: var(--color-default); }

.opp-count b { font-size: 1.7rem; } .opp-tag { display: inline-block; font: 600 11px var(--font-primary); background: rgba(0,148,172,.12); color: #006b7c; padding: 2px 9px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.opp-note { font-size: 14px; margin: 4px 0; overflow-wrap: anywhere; }
.opp-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; margin-right: 10px; vertical-align: middle; }
.opp-confirm { font-size: 13px; color: #c0392b; font-weight: 600; }
.opp-empty { text-align: center; padding: 50px 10px; color: #5c6168; }
.opp-empty h3 { font-family: var(--font-primary); }

/* Modal: centered on desktop, bottom sheet on mobile */
.opp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 16px; }
.opp-overlay[hidden] { display: none; }
.opp-modal { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 14px; padding: 22px; }
.opp-modal h2 { font: 700 1.25rem var(--font-primary); margin: 0 0 14px; }
.opp-field { margin-bottom: 12px; }
.opp-field label { display: block; font: 600 13px var(--font-primary); margin-bottom: 4px; }
.opp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opp-err { color: #c0392b; font-size: 13px; margin: 6px 0; min-height: 1em; }
.opp-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.opp-preview { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-top: 8px; }
.opp-preview[hidden] { display: none; }
#f-image-clear { margin-top: 8px; }
input[type="file"].opp-input { padding: 8px; }
.opp-list { list-style: none; padding: 0; margin: 12px 0; }
.opp-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 14px; overflow-wrap: anywhere; }
.opp-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 9999; font-size: 14px; }
.opp-toast[hidden] { display: none; }

@media (max-width: 600px) {
  .opp-overlay { align-items: flex-end; padding: 0; }
  .opp-modal { border-radius: 16px 16px 0 0; max-height: 94vh; }
  .opp-hero h1 { font-size: 1.6rem; }
        .opp-row { grid-template-columns: 1fr; }
}

.opp-wide { max-width: 1180px; }
.opp-hero { text-align: left; padding-top: 28px; }
.opp-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.opp-hero p { margin: 0; }
.opp-hero a { color: var(--color-primary); font-weight: 700; }
.opp-toolbar[hidden] { display: none; }
.opp-org { color: #5c6168; font-size: 14px; }
.opp-page { background: #f4f7f8; }
.g-switch { position: sticky; top: 70px; z-index: 20; display: flex; align-items: center; gap: 8px; background: #f4f7f8; border-bottom: 1px solid #e3eef0; margin: 0 -12px; padding: 0 12px; }
.g-switch > button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 16px 8px 12px; font: 700 15px var(--font-primary); color: #5c6168; }
.g-switch > button[aria-pressed="true"] { color: #0b1f26; border-color: var(--color-primary); }
.g-count { background: var(--color-primary); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
.g-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.g-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #cfd6da; border-radius: 12px; padding: 0 12px; height: 44px; color: #5c6168; }
.g-search input { border: 0; outline: 0; flex: 1; background: transparent; font: 400 15px var(--font-default); }
.g-filters .opp-input { width: auto; height: 44px; border-radius: 12px; }
.g-countline { color: #5c6168; font-size: 13px; margin: 8px 0 14px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding-bottom: 40px; }
.g-card { background: #fff; border: 1px solid #e3eef0; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.g-card:hover { box-shadow: 0 14px 30px -18px rgba(0,148,172,.45); }
.g-cover { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--color-primary), #0b1f26); }
.g-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-badge, .g-days { position: absolute; top: 10px; z-index: 1; border-radius: 99px; font: 700 11px var(--font-primary); padding: 4px 9px; }
.g-badge { left: 10px; background: #fff; color: #0b1f26; letter-spacing: .04em; text-transform: uppercase; }
.g-days { right: 10px; background: rgba(11,31,38,.82); color: #fff; }
.g-days.hot { background: #c0392b; }
.g-mark { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #5c6168; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.g-mark.on { background: var(--color-primary); color: #fff; }
.g-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.g-org { font: 600 12px var(--font-primary); color: #5c6168; display: flex; gap: 8px; align-items: center; }
.g-pill { background: rgba(0,148,172,.12); color: #006b7c; border-radius: 99px; padding: 2px 8px; font-size: 11px; }
.g-pill.ok { background: #e5f6ee; color: #1e9a62; }
.g-body h3 { font: 700 17px var(--font-primary); margin: 4px 0 6px; }
.g-body p { margin: 0 0 10px; color: #3b4b53; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; color: #5c6168; font-size: 13px; margin-bottom: 12px; }
.g-foot { margin-top: auto; display: flex; gap: 8px; }
.g-foot .opp-btn { flex: 1; justify-content: center; }
.g-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 48px; }
.g-col { background: #e7eef0; border-radius: 16px; padding: 12px; min-height: 180px; }
.g-col h2 { font: 700 14px var(--font-primary); margin: 2px 6px 10px; display: flex; justify-content: space-between; }
.g-col h2 span { background: #fff; border-radius: 99px; padding: 1px 8px; font-size: 12px; color: #5c6168; }
.g-bcard { background: #fff; border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 64px 1fr; gap: 10px; margin-bottom: 10px; cursor: pointer; }
.g-bcard img, .g-ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--color-primary); }
.g-bcard h3 { font: 700 14px var(--font-primary); margin: 2px 0; }
.g-bcard .when { font-size: 12px; color: #5c6168; display: flex; justify-content: space-between; }
.g-bcard .when b.hot { color: #c0392b; }
.g-acts { grid-column: 1 / -1; display: flex; gap: 6px; }
.g-acts .opp-btn { flex: 1; justify-content: center; padding: 7px 8px; }
.g-tabs { display: none; }
.g-tabbar { display: none; }
.g-drawer-bg { position: fixed; inset: 0; background: rgba(11,31,38,.45); z-index: 80; }
.g-drawer-bg[hidden], .g-drawer[hidden] { display: none; }
.g-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #f4f7f8; z-index: 81; overflow: auto; box-shadow: -16px 0 40px rgba(0,0,0,.2); }
.g-drawer .g-cover { aspect-ratio: 16/8; }
.g-drawer .pad { padding: 18px 18px 28px; }
.g-drawer h2 { font: 700 1.5rem var(--font-primary); margin: 6px 0; }
.g-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.g-facts div { background: #fff; border-radius: 12px; padding: 10px 12px; }
.g-facts span { display: block; font-size: 11px; color: #5c6168; text-transform: uppercase; letter-spacing: .04em; }
.g-drawer-x { position: absolute; top: 12px; left: 12px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; }

@media (max-width: 800px) {
  .opp-hero-top { flex-direction: column; align-items: stretch; }
  .opp-toolbar .opp-btn { flex: 1; justify-content: center; min-height: 44px; }
  .g-filters { flex-direction: column; }
  .g-search, .g-filters .opp-input { width: 100%; min-width: 0; }
  .opp-pills { justify-content: flex-start; }
  .g-foot { flex-wrap: wrap; }
  .g-drawer { width: 100%; }
  .g-columns { display: block; }
  .g-col { display: none; background: transparent; padding: 0; min-height: 0; }
  .g-col.on { display: block; }
  .g-col h2 { display: none; }
  .g-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #e7eef0; border-radius: 14px; padding: 4px; margin-bottom: 12px; }
  .g-tabs button { border: 0; background: transparent; border-radius: 10px; height: 44px; font: 700 13px var(--font-primary); color: #5c6168; }
  .g-tabs button[aria-pressed="true"] { background: #fff; color: #0b1f26; }
  .g-grid { grid-template-columns: 1fr; }
}

.opp-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 18px; }
.opp-pill { border: 0; background: #1e7f91; color: #fff; border-radius: 999px; padding: 8px 18px; font: 500 14px var(--font-default); cursor: pointer; transition: .2s; }
.opp-pill:hover { filter: brightness(1.12); }
.opp-pill[aria-pressed="true"] { background: #0b1f26; box-shadow: 0 0 0 2px #10E9FF inset; }
.opp-pill:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }

.opp-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin-bottom: 20px; }
.opp-f { display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.opp-f label { font: 700 14px var(--font-primary); }
.opp-f-search { min-width: 240px; }

.opp-table-wrap { border-radius: 8px; border: 1px solid #dfe5e8; }
.opp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.opp-table thead th { position: sticky; top: 70px; z-index: 10; background: #0b1f26; color: #fff; font: 700 14px var(--font-primary); text-align: left; padding: 10px 12px; white-space: nowrap; }
.opp-table td { padding: 7px 12px; border-bottom: 1px solid #e6eaec; vertical-align: top; }
.opp-tr:nth-child(even) td { background: #f7fafb; }
.opp-tr:hover td { background: #eef6f8; }
.opp-sec td { background: #000; padding: 0; }
.opp-sec button { width: 100%; text-align: left; background: #000; color: #fff; border: 0; padding: 6px 12px; font: 600 15px var(--font-primary); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.opp-sec button:focus-visible { outline: 3px solid #f5a623; outline-offset: -3px; }
.opp-sec-ic { display: inline-block; width: 16px; text-align: center; }
.opp-sec small { background: rgba(255,255,255,.18); border-radius: 999px; padding: 1px 9px; font-size: 12px; }

.opp-c-title { min-width: 260px; }
.opp-c-title a { color: #3b3fb6; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.opp-c-title a:hover { text-decoration: underline; }
.opp-c-title a i { font-size: 11px; opacity: .6; }
.opp-c-title > span:first-child { font-weight: 600; }
.opp-c-title .opp-note { font-size: 12.5px; color: #5c6168; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.opp-c-org { font-weight: 600; }

.opp-status { width: 100%; min-width: 118px; border: 1px solid #cfd6da; border-radius: 6px; padding: 4px 6px; background: #fff; font: italic 14px var(--font-default); color: #c0392b; }
.opp-status.s-saved { color: #8a5a00; background: #fff6d8; font-style: normal; font-weight: 600; }
.opp-status.s-applied { color: #1c6b34; background: #dff3e5; font-style: normal; font-weight: 600; }
.opp-status:focus-visible { outline: 3px solid #f5a623; outline-offset: 1px; }

.opp-date { white-space: nowrap; text-align: center; }
.opp-date b { display: block; font-weight: 600; }
.opp-date small { display: block; font-size: 11px; opacity: .8; }
.opp-tr .d-open { background: #b6dca6 !important; }
.opp-tr .d-soon { background: #ffe39a !important; }
.opp-tr .d-urgent { background: #ffb8a0 !important; color: #7a1d00; }
.opp-tr .d-urgent b { font-weight: 800; }
.opp-tr .d-upcoming { background: #bcd7ff !important; color: #123f86; }
.opp-tr .d-closed { background: #e4e4e4 !important; color: #777; }
.opp-tr.st-closed td:not(.opp-date) { color: #888; }
.opp-c-act { white-space: nowrap; }

/* Phones: keep the table, make it scroll sideways */
.opp-swipe-hint { display: none; }
@media (max-width: 800px) {
  .opp-swipe-hint { display: block; font-size: 12px; color: #5c6168; margin: 0 0 6px; text-align: right; }
  .opp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; margin: 0 -4px; }
  .opp-table { min-width: 880px; font-size: 13px; }
  .opp-table thead th { position: static; }
  .opp-table td { padding: 8px 10px; }
  .opp-sec button { position: sticky; left: 0; width: calc(100vw - 40px); }
  .opp-c-title { min-width: 230px; }
  .opp-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .opp-f, .opp-f-search { min-width: 0; width: 100%; }
  .opp-f-search { grid-column: 1 / -1; }
  .opp-pills { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .opp-pill { white-space: nowrap; }
}

/* ---- Sharing ---- */
.opp-share { border: 0; background: transparent; color: #0094Ac; padding: 2px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; vertical-align: baseline; }
.opp-share:hover { background: rgba(0,148,172,.12); }
.opp-share:focus-visible { outline: 3px solid #f5a623; outline-offset: 1px; }
.opp-shared-banner { background: #fff7dc; border: 1px solid #f1d98a; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; font-size: 14px; }
.opp-shared-banner[hidden] { display: none; }
.opp-tr.opp-shared td { box-shadow: inset 0 2px 0 #f5a623, inset 0 -2px 0 #f5a623; }
.opp-tr.opp-shared td:first-child { box-shadow: inset 4px 0 0 #f5a623, inset 0 2px 0 #f5a623, inset 0 -2px 0 #f5a623; }
