/* MedTech Coast — single stylesheet, no framework */
:root {
  --navy: #0f2a43; --navy-2: #16395c; --teal: #0e8c8c; --teal-dark: #0a6e6e;
  --bg: #f6f8fa; --card: #ffffff; --line: #e3e8ee;
  --text: #1c2733; --muted: #5c6b7a;
  --gold: #c9a227; --platinum: #4e6a85; --silver: #8c9bab; --bronze: #b08d57; --free: #9aa0a6;
  --radius: 10px; --shadow: 0 1px 3px rgba(15,42,67,.08), 0 4px 14px rgba(15,42,67,.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
h1 { font-size: 1.9rem; line-height: 1.25; } h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; }

/* Header */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-size: 1.3rem; font-weight: 700; letter-spacing: -.3px; text-decoration: none !important; }
.logo-med { color: #fff; } .logo-coast { color: #6fd0d0; }
.main-nav a { color: #d6e2ee; margin-left: 22px; font-size: .95rem; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav .nav-cta { background: var(--teal); color: #fff; padding: 8px 16px; border-radius: 6px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, #1c4a74 100%); color: #fff; padding: 64px 0 72px; text-align: center; }
.hero h1 { font-size: 2.3rem; margin-bottom: 10px; }
.hero p { color: #b9cbdd; max-width: 640px; margin: 0 auto 28px; }
.hero-search { display: flex; max-width: 640px; margin: 0 auto; box-shadow: var(--shadow); border-radius: 8px; overflow: hidden; }
.hero-search input { flex: 1; border: 0; padding: 15px 18px; font-size: 1rem; outline: none; }
.hero-search button { border: 0; background: var(--teal); color: #fff; padding: 0 28px; font-size: 1rem; cursor: pointer; }
.hero-search button:hover { background: var(--teal-dark); }
.hero-stats { margin-top: 26px; color: #9fb6cc; font-size: .92rem; }
.hero-stats strong { color: #fff; }

/* Sections */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head a { font-size: .92rem; }

/* Cards grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.card:hover { border-color: #c8d4e0; }
.card .co-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.co-logo { width: 46px; height: 46px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.co-logo-ph { width: 46px; height: 46px; border-radius: 8px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex: none; }
.card h3 a { color: var(--text); }
.co-meta { color: var(--muted); font-size: .85rem; }
.co-desc { color: var(--muted); font-size: .9rem; margin: 8px 0 12px; flex: 1; }
.co-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: #eef3f7; color: #33586e; font-size: .75rem; padding: 3px 9px; border-radius: 20px; }
.tag-fda { background: #e7f4ec; color: #1e6b3c; }

/* Tier badges */
.tier-badge { position: absolute; top: 12px; right: 12px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 4px; color: #fff; }
.tier-platinum { background: var(--platinum); } .tier-gold { background: var(--gold); }
.tier-silver { background: var(--silver); } .tier-bronze { background: var(--bronze); }
.card.is-featured { border-top: 3px solid var(--gold); }
.card.is-platinum { border-top: 3px solid var(--platinum); }

/* Browse chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: 9px 18px; font-size: .93rem; color: var(--text); box-shadow: var(--shadow); }
.chip small { color: var(--muted); }
.chip:hover { border-color: var(--teal); text-decoration: none; }

/* Directory layout */
.dir-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; padding: 34px 0 50px; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; position: sticky; top: 78px; }
.filters h3 { font-size: .95rem; margin: 14px 0 8px; } .filters h3:first-child { margin-top: 0; }
.filters label { display: block; font-size: .9rem; padding: 3px 0; color: var(--muted); }
.filters select, .filters input[type=text] { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }
.filters .btn { width: 100%; margin-top: 14px; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.result-head .count { color: var(--muted); font-size: .93rem; }

/* Buttons */
.btn { display: inline-block; background: var(--teal); color: #fff; border: 0; border-radius: 6px; padding: 10px 20px; font-size: .95rem; cursor: pointer; text-align: center; }
.btn:hover { background: var(--teal-dark); text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid var(--teal); color: var(--teal-dark); }
.btn-outline:hover { background: #eaf5f5; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-danger { background: #b03030; } .btn-danger:hover { background: #8f2626; }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font-size: .9rem; }
.pagination .cur { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Profile page */
.profile-hero { background: var(--card); border-bottom: 1px solid var(--line); padding: 36px 0; }
.profile-top { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.profile-logo { width: 96px; height: 96px; border-radius: 12px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.profile-logo-ph { width: 96px; height: 96px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; }
.profile-title h1 { margin-bottom: 6px; }
.profile-title .co-meta { font-size: .95rem; }
.profile-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.profile-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; padding: 34px 0 56px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.panel h2 { margin-bottom: 12px; font-size: 1.15rem; }
.info-list { list-style: none; }
.info-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .93rem; display: flex; justify-content: space-between; gap: 12px; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--muted); flex: none; }
.info-list .v { text-align: right; overflow-wrap: anywhere; }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-row a { background: #eef3f7; padding: 6px 14px; border-radius: 6px; font-size: .87rem; }
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs a { color: var(--muted); }

/* Products */
.product { padding: 12px 0; border-bottom: 1px solid var(--line); }
.product:last-child { border-bottom: 0; }
.product h3 { margin-bottom: 4px; }
.product p { color: var(--muted); font-size: .92rem; }

/* Footer */
.site-footer { background: var(--navy); color: #b9cbdd; margin-top: 30px; padding: 42px 0 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; padding-bottom: 30px; }
.site-footer h4 { color: #fff; margin-bottom: 10px; font-size: .95rem; }
.site-footer a { display: block; color: #b9cbdd; padding: 3px 0; }
.footer-bottom { border-top: 1px solid #22496e; padding: 16px 20px; font-size: .82rem; color: #7f9ab3; }

/* Forms (public + admin) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: #34455a; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url],
.field input[type=number], .field input[type=date], .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: .93rem; font-family: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.checks label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: 400; font-size: .9rem; }
.help { font-size: .8rem; color: var(--muted); margin-top: 3px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .93rem; }
.alert-ok { background: #e7f4ec; color: #1e6b3c; border: 1px solid #bfe3cc; }
.alert-err { background: #fbeaea; color: #8f2626; border: 1px solid #efc7c7; }

/* ---------- Admin ---------- */
.admin-body { background: #eef1f4; }
.admin-topbar { background: var(--navy); color: #fff; padding: 0 20px; display: flex; align-items: center; height: 54px; gap: 26px; position: sticky; top: 0; z-index: 60; }
.admin-topbar .logo { font-size: 1.05rem; }
.admin-topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-topbar nav a { color: #cfdcea; padding: 6px 12px; border-radius: 6px; font-size: .9rem; }
.admin-topbar nav a.active, .admin-topbar nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.admin-topbar .spacer { margin-left: auto; }
.admin-main { max-width: 1240px; margin: 0 auto; padding: 26px 20px 60px; }
.admin-main h1 { font-size: 1.45rem; margin-bottom: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.stat .l { color: var(--muted); font-size: .85rem; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .9rem; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: #f2f5f8; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: #55677a; }
table.data tr:hover td { background: #fafcfe; }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text], .toolbar select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .76rem; font-weight: 600; }
.pill-not_contacted { background: #eceff2; color: #5c6b7a; }
.pill-contacted { background: #fff3d6; color: #8a6d1a; }
.pill-responded { background: #dcefff; color: #1c5d8f; }
.pill-claimed { background: #e7f4ec; color: #1e6b3c; }
.pill-declined { background: #fbeaea; color: #8f2626; }
.login-box { max-width: 380px; margin: 9vh auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.login-box h1 { text-align: center; margin-bottom: 20px; font-size: 1.3rem; }
.login-box .field { margin-bottom: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .dir-layout, .profile-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .main-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--navy); padding: 12px 20px 18px; }
  .main-nav.open { display: flex; flex-direction: column; gap: 4px; }
  .main-nav a { margin: 6px 0; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 1.7rem; }
  .profile-actions { margin-left: 0; }
}
