/* ============================================================
   TrustIPX — Global Stylesheet v1.0
   Fonts: Syne (headings) · DM Sans (body)
   Colours: navy #0D1B3E · card #112251 · border #1e3a6e · teal #0E9F8E
   Cleaned: 2026-05-19
   ============================================================ */


/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* ── Typography ── */
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #e2e8f0;
  background: #0D1B3E;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: #ffffff;
}


/* ── Auth page layout (register / login) ── */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 3rem;
  min-height: 100vh;
}


/* ── Navbar / site header ── */
.site-header {
  width: 100%;
  max-width: 480px;
  margin-bottom: 2rem;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0E9F8E;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span { color: #ffffff; }


/* ── Cards ── */
.card {
  width: 100%;
  max-width: 480px;
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 16px;
  padding: 2.5rem 2rem;
}

.card h1 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.card .subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}


/* ── Forms ── */
.field { margin-bottom: 1.2rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0D1B3E;
  border: 1px solid #1e3a6e;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

input:focus { border-color: #0E9F8E; }

input::placeholder { color: #475569; }


/* ── Buttons ── */
.btn {
  width: 100%;
  padding: 0.85rem;
  background: #0E9F8E;
  color: #ffffff;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  letter-spacing: 0.3px;
}

.btn:hover { background: #0b8a7b; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }


/* ── Role selector ── */
.role-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.role-card {
  background: #0D1B3E;
  border: 1.5px solid #1e3a6e;
  border-radius: 10px;
  padding: 0.9rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  user-select: none;
}

.role-card:hover { border-color: #0E9F8E; }

.role-card.selected {
  border-color: #0E9F8E;
  background: #0a2a28;
}

.role-card .emoji {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.35rem;
}

.role-card .role-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  display: block;
  margin-bottom: 0.2rem;
}

.role-card .role-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}


/* ── Alerts ── */
.message {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.2rem;
}

.message.error {
  display: block;
  background: #450a0a;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
}

.message.success {
  display: block;
  background: #052e16;
  color: #86efac;
  border: 1px solid #14532d;
}


/* ── Footer link ── */
.footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.footer-link a { color: #0E9F8E; text-decoration: none; }
.footer-link a:hover { text-decoration: underline; }

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: none;
  margin-top: -0.6rem;
  margin-bottom: 1.2rem;
}

.forgot-link:hover { color: #0E9F8E; }


/* ── Role selector — read-only variant ── */
.role-card.readonly {
  cursor: default;
  pointer-events: none;
  opacity: 0.45;
}

.role-card.readonly.selected {
  opacity: 1;
}


/* ── Dashboard layout ── */
.dashboard-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0D1B3E;
}

.topnav {
  width: 100%;
  background: #112251;
  border-bottom: 1px solid #1e3a6e;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-right { display: flex; align-items: center; gap: 1rem; }

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #1e3a6e;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  width: auto;
}

.btn-ghost:hover { color: #ffffff; border-color: #94a3b8; }

.main-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}


/* ── Welcome section ── */
.welcome-section { margin-bottom: 2.5rem; }

.welcome-section h1 {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

.role-badge {
  display: inline-block;
  background: rgba(14, 159, 142, 0.12);
  color: #0E9F8E;
  border: 1px solid rgba(14, 159, 142, 0.3);
  border-radius: 20px;
  padding: 0.25rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}


/* ── Action cards ── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.action-card {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}

.action-card:hover {
  border-color: #0E9F8E;
  transform: translateY(-2px);
}

.action-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.action-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  display: block;
  margin-bottom: 0.3rem;
}

.action-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
}


/* ── Page header row (title + action button) ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header h1      { font-size: 1.8rem; margin-bottom: 0.3rem; }
.page-header .subtitle { color: #94a3b8; font-size: 0.9rem; }

.btn-sm {
  padding: 0.5rem 1.1rem;
  background: #0E9F8E;
  color: #ffffff;
  font-family: 'Syne', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-sm:hover { background: #0b8a7b; }


/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.badge-domain    { background: rgba(99,102,241,0.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }
.badge-sale      { background: rgba(245,158,11,0.12); color: #fcd34d; border: 1px solid rgba(245,158,11,0.25); }
.badge-license   { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.25); }
.badge-both      { background: rgba(14,159,142,0.12); color: #5eead4; border: 1px solid rgba(14,159,142,0.25); }
.badge-pending   { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-active    { background: rgba(14,159,142,0.12); color: #0E9F8E; border: 1px solid rgba(14,159,142,0.3); }
.badge-archived  { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }
.badge-verified  { background: rgba(14,159,142,0.12); color: #0E9F8E; border: 1px solid rgba(14,159,142,0.3); }
.badge-unverified{ background: rgba(100,116,139,0.12); color: #64748b; border: 1px solid rgba(100,116,139,0.2); }


/* ── Patent listing cards ── */
.patent-list { display: flex; flex-direction: column; gap: 1rem; }

.patent-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.patent-card {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.patent-card:hover { border-color: #2a4a8e; }

.patent-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.patent-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.patent-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #1e3a6e;
}

.patent-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.patent-price { font-size: 0.875rem; color: #cbd5e1; }
.patent-date  { font-size: 0.75rem; color: #64748b; }


/* ── Empty & loading states ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #112251;
  border: 1px dashed #1e3a6e;
  border-radius: 14px;
}

.empty-icon   { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.empty-state p  { color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.75rem; }

.loading-state {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  font-size: 0.9rem;
}


/* ── Back link ── */
.back-link {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover { color: #0E9F8E; }


/* ── Patent detail card ── */
.detail-card {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 16px;
  padding: 2rem 2rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.detail-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #1e3a6e;
}

.detail-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.detail-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.detail-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #1e3a6e;
}

.detail-section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0E9F8E;
  margin-bottom: 0.75rem;
}

.detail-abstract {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.detail-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.detail-field { display: flex; gap: 1rem; align-items: flex-start; }

.detail-label {
  font-size: 0.8rem;
  color: #64748b;
  min-width: 160px;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.detail-value { font-size: 0.9rem; color: #e2e8f0; line-height: 1.4; }


/* ── Action bar ── */
.action-bar {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid #1e3a6e;
}

.btn-danger {
  padding: 0.7rem 1.25rem;
  background: transparent;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: auto;
}

.btn-danger:hover  { background: #450a0a; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }


/* ── Form page layout (list-patent, etc.) ── */
.form-page-header {
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.form-page-header h1      { font-size: 1.8rem; margin-bottom: 0.4rem; }
.form-page-header .subtitle { color: #94a3b8; font-size: 0.95rem; }

.form-card {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.section-heading {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0E9F8E;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 2rem 0 1.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid #1e3a6e;
}

.section-heading:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }


/* ── Textarea ── */
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0D1B3E;
  border: 1px solid #1e3a6e;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
  min-height: 130px;
  line-height: 1.5;
}

textarea:focus       { border-color: #0E9F8E; }
textarea::placeholder { color: #475569; }


/* ── Select ── */
select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: #0D1B3E;
  border: 1px solid #1e3a6e;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

select:focus { border-color: #0E9F8E; }
select option { background: #112251; }


/* ── Helper note & char counter ── */
.helper-note {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.field-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.char-counter        { font-size: 0.78rem; color: #64748b; }
.char-counter.warn   { color: #f59e0b; }
.char-counter.ready  { color: #0E9F8E; }


/* ── Radio group ── */
.radio-group { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid #1e3a6e;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  transition: border-color 0.2s, background 0.2s;
}

.radio-option:has(input:checked) { border-color: #0E9F8E; background: #0a2a28; }

.radio-option input[type="radio"] {
  accent-color: #0E9F8E;
  width: 15px;
  height: 15px;
  cursor: pointer;
}


/* ── Listing type cards (3-col) ── */
.listing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}


/* ── File input ── */
input[type="file"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0D1B3E;
  border: 1px dashed #1e3a6e;
  border-radius: 8px;
  color: #94a3b8;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
}

input[type="file"]:hover { border-color: #0E9F8E; }


/* ── Checkbox field ── */
.checkbox-field {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: #0E9F8E;
  cursor: pointer;
}

.checkbox-field label {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 0;
  cursor: pointer;
}


/* ── Nav extras ── */
.nav-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.nav-link:hover { color: #ffffff; }

.nav-admin-link {
  color: #0E9F8E;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(14,159,142,0.3);
  border-radius: 6px;
  transition: background 0.2s;
}
.nav-admin-link:hover { background: rgba(14,159,142,0.1); }


/* ── Search & filter bar ── */
.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 10px;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus       { border-color: #0E9F8E; }
.search-input::placeholder { color: #475569; }

.filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-row select { flex: 1; min-width: 150px; padding: 0.6rem 2.5rem 0.6rem 0.85rem; font-size: 0.875rem; }

.btn-clear {
  padding: 0.6rem 1rem;
  background: transparent;
  color: #64748b;
  border: 1px solid #1e3a6e;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  width: auto;
}
.btn-clear:hover { color: #e2e8f0; border-color: #94a3b8; }

.results-count { font-size: 0.85rem; color: #64748b; margin-bottom: 1rem; }

.patent-abstract-preview {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0.65rem 0 0.75rem;
}


/* ── Admin stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0E9F8E;
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label { font-size: 0.8rem; color: #64748b; }


/* ── Admin sections ── */
.admin-section { margin-bottom: 2.5rem; }

.admin-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1e3a6e;
}

.admin-empty { font-size: 0.875rem; color: #64748b; padding: 1rem 0; }

.admin-item {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-item-info    { flex: 1; min-width: 0; }
.admin-item-title   { font-size: 0.95rem; font-weight: 600; color: #ffffff; margin-bottom: 0.3rem; }
.admin-item-meta    { font-size: 0.78rem; color: #64748b; line-height: 1.5; }
.admin-item-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.btn-approve {
  padding: 0.4rem 0.85rem;
  background: rgba(14,159,142,0.12);
  color: #0E9F8E;
  border: 1px solid rgba(14,159,142,0.3);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  width: auto;
}
.btn-approve:hover    { background: rgba(14,159,142,0.25); }
.btn-approve:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-reject {
  padding: 0.4rem 0.85rem;
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  width: auto;
}
.btn-reject:hover    { background: rgba(239,68,68,0.18); }
.btn-reject:disabled { opacity: 0.5; cursor: not-allowed; }


/* ── Users table ── */
.users-table-wrapper {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 12px;
  overflow: hidden;
  overflow-x: auto;
}

.users-table { width: 100%; border-collapse: collapse; }

.users-table th {
  text-align: left;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1e3a6e;
}

.users-table td {
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  border-bottom: 1px solid #1a2f55;
}

.users-table tr:last-child td { border-bottom: none; }


/* ── Express Interest section ── */
.interest-section {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid #1e3a6e;
}

.interest-section h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.interest-gate {
  background: rgba(14,159,142,0.05);
  border: 1px solid rgba(14,159,142,0.15);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.7;
}

.interest-gate a { color: #0E9F8E; text-decoration: none; }
.interest-gate a:hover { text-decoration: underline; }

.interest-already { color: #0E9F8E; font-size: 0.9rem; }

.label-note  { font-weight: 400; color: #475569; }
.text-danger { color: #ef4444; }

.owner-notice {
  background: rgba(14,159,142,0.07);
  border: 1px solid rgba(14,159,142,0.25);
  border-left: 3px solid #0E9F8E;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  color: #a0e0da;
  font-size: 0.88rem;
  line-height: 1.6;
}


/* ── Loading screen (app/index.html session-check entry point) ── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1.5rem;
}

.loading-screen .logo {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(14,159,142,0.2);
  border-top-color: #0E9F8E;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ── Abstract teaser (browse cards, non-logged-in) ── */
.abstract-teaser {
  position: relative;
  max-height: 4.5rem;
  overflow: hidden;
}

.abstract-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3rem;
  background: linear-gradient(transparent, #112251);
}

.login-prompt-overlay {
  color: #0E9F8E;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Abstract gate (detail page, non-logged-in) ── */
.abstract-gate {
  position: relative;
  padding-bottom: 3rem;
}

.abstract-gate-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4.5rem;
  background: linear-gradient(transparent, #112251);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.25rem;
}

/* ── Login-gated field values ── */
.login-to-view {
  color: #64748b;
  font-size: 0.875rem;
  font-style: italic;
}

.btn-link {
  background: none;
  border: none;
  color: #0E9F8E;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

.btn-link:hover { color: #0cc9b3; }


/* ── Profile completion banner ── */
.profile-banner {
  background: rgba(14,159,142,0.08);
  border: 1px solid rgba(14,159,142,0.22);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-banner-text { color: #a0e0da; font-size: 0.875rem; }

.profile-banner-actions { display: flex; align-items: center; gap: 0.75rem; }

.profile-banner-dismiss {
  background: none;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  width: auto;
  transition: color 0.2s;
}
.profile-banner-dismiss:hover { color: #94a3b8; }


/* ── Org Yes/No toggle (profile) ── */
.org-toggle { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; }

.org-toggle-btn {
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1.5px solid #1e3a6e;
  border-radius: 8px;
  color: #64748b;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  width: auto;
}
.org-toggle-btn.active {
  background: rgba(14,159,142,0.1);
  border-color: #0E9F8E;
  color: #0E9F8E;
}
.org-toggle-btn:hover:not(.active) { border-color: #94a3b8; color: #94a3b8; }


/* ── Entity type badges ── */
.badge-entity-individual  { background: rgba(100,116,139,0.12); color: #94a3b8;  border: 1px solid rgba(100,116,139,0.25); }
.badge-entity-company     { background: rgba(59,130,246,0.12);  color: #93c5fd;  border: 1px solid rgba(59,130,246,0.25); }
.badge-entity-institution { background: rgba(168,85,247,0.12);  color: #d8b4fe;  border: 1px solid rgba(168,85,247,0.25); }
.badge-entity-government  { background: rgba(14,159,142,0.12);  color: #5eead4;  border: 1px solid rgba(14,159,142,0.25); }


/* ── Read-only value display (forms) ── */
.readonly-field {
  padding: 0.75rem 1rem;
  background: #0D1B3E;
  border: 1px solid #1e3a6e;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.4;
}


/* ── Last role-card full width when odd count ── */
.roles .role-card:last-child:nth-child(odd) { grid-column: span 2; }


/* ── Document viewer (owner + admin) ── */
.doc-owner-note {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.6rem;
  font-style: italic;
}

.doc-iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 8px;
  display: block;
  background: #0D1B3E;
}

.admin-doc-viewer {
  margin-top: 0.85rem;
}

.admin-doc-warning {
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 6px;
  color: #fbbf24;
  font-size: 0.8rem;
  line-height: 1.5;
}


/* ── My Interests cards ── */
.interest-card {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}

.patent-title-link {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: block;
}

.patent-title-link:hover { color: #0E9F8E; }

.interest-card .patent-card-badges { margin-bottom: 0.5rem; }

.interest-message-block {
  background: #0D1B3E;
  border-left: 3px solid #1e3a6e;
  border-radius: 0 6px 6px 0;
  padding: 0.65rem 0.9rem;
  margin: 0.75rem 0;
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.55;
  font-style: italic;
}

.interest-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #1e3a6e;
  margin-top: 0.75rem;
}

.interest-date { font-size: 0.78rem; color: #64748b; }

.btn-withdraw {
  padding: 0.35rem 0.85rem;
  background: transparent;
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  width: auto;
}
.btn-withdraw:hover    { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.5); }
.btn-withdraw:disabled { opacity: 0.5; cursor: not-allowed; }


/* ── Landing page ── */
.landing-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0D1B3E;
}

.landing-nav {
  width: 100%;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e3a6e;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}

.landing-eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0E9F8E;
  margin-bottom: 1.25rem;
}

.landing-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.landing-headline span { color: #0E9F8E; }

.landing-sub {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.landing-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-outline {
  padding: 0.85rem 1.75rem;
  background: transparent;
  color: #e2e8f0;
  border: 1px solid #1e3a6e;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
  width: auto;
}
.btn-outline:hover { border-color: #94a3b8; color: #ffffff; }

.landing-features {
  padding: 4rem 2rem;
  background: #0a1730;
  border-top: 1px solid #1e3a6e;
}

.landing-features-inner {
  max-width: 900px;
  margin: 0 auto;
}

.landing-features h2 {
  text-align: center;
  font-size: 1.65rem;
  margin-bottom: 2.5rem;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.landing-feature {
  background: #112251;
  border: 1px solid #1e3a6e;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
}

.landing-feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.85rem;
}

.landing-feature h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.landing-feature p {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
}

.landing-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #1e3a6e;
  text-align: center;
  font-size: 0.8rem;
  color: #475569;
}


/* ── Responsive (375px+) ── */
@media (max-width: 480px) {
  .card        { padding: 2rem 1.25rem; }
  .form-card   { padding: 1.75rem 1.25rem; }
  .roles       { gap: 0.5rem; }
  .topnav      { padding: 1rem; }
  .main-content { padding: 1.5rem 1rem 2rem; }
  .action-grid  { grid-template-columns: 1fr; }
  .listing-cards { grid-template-columns: 1fr; }
  .welcome-section h1 { font-size: 1.5rem; }
  .radio-group  { flex-direction: column; }
  .stats-row    { grid-template-columns: repeat(2, 1fr); }
  .filter-row   { flex-direction: column; }
  .filter-row select { min-width: unset; }
  .admin-item   { flex-direction: column; align-items: flex-start; }
  .landing-nav  { padding: 1rem; }
  .landing-nav-links .btn-sm { display: none; }
  .landing-hero { padding: 3rem 1rem 2.5rem; }
  .landing-features { padding: 2.5rem 1rem; }
  .landing-features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .landing-cta  { flex-direction: column; align-items: center; }
  .landing-cta .btn, .landing-cta .btn-outline { width: 100%; max-width: 320px; text-align: center; }
}
