/* NetworkHub Styles
   Main stylesheet — loaded on every page via layouts/base.html
   Based on Bamya Leads (outreach_crm) design system */

/* =====================================================
   BASE / BODY
   ===================================================== */
body { background: #f0f0f0; }
.navbar-brand { font-weight: 700; }

/* =====================================================
   UNIFIED BUTTON SYSTEM
   All buttons: white outline on dark backgrounds.
   Primary = bold, Secondary = normal weight, Danger = red.
   ===================================================== */

/* ── Base ── */
.btn {
  border-radius: 8px;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}
.btn:hover, .btn:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ── PRIMARY ── */
.btn-primary,
.btn-outline-primary,
.btn-success,
.btn-outline-success {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary.active,
.btn-success:hover, .btn-success:focus, .btn-success:active,
.btn-outline-success:hover, .btn-outline-success:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

/* ── SECONDARY ── */
.btn-secondary,
.btn-outline-secondary,
.btn-warning, .btn-outline-warning,
.btn-info, .btn-outline-info {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active, .btn-secondary.active,
.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary.active,
.btn-warning:hover, .btn-info:hover,
.btn-outline-warning:hover, .btn-outline-info:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* ── DANGER ── */
.btn-danger,
.btn-outline-danger {
  border-color: rgba(220, 53, 69, 0.5);
  color: #ff6b7a;
  font-weight: 600;
}
.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active,
.btn-outline-danger:hover, .btn-outline-danger:focus, .btn-outline-danger.active {
  background: rgba(220, 53, 69, 0.25);
  border-color: rgba(220, 53, 69, 0.7);
  color: #fff;
}

/* =====================================================
   NAVBAR — landing page style (same design as CRM)
   ===================================================== */
.nh-navbar {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e0e0e0;
  padding-top: 0;
  padding-bottom: 0;
}
.nh-navbar .container-fluid { height: 64px; align-items: center; }

/* Logo box */
.nh-navbar .navbar-brand {
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #141414;
  border: 1px solid #141414;
  padding: 0.3em 0.5em;
  border-radius: 4px;
  text-decoration: none;
}
.nh-navbar .navbar-brand:hover { color: #141414; }
.nh-navbar .navbar-brand .logo-network { color: #141414; font-weight: 900; }
.nh-navbar .navbar-brand .logo-hub {
  background-color: #141414;
  color: #fff;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  margin-left: 0.1em;
}

/* Nav links */
.nh-navbar .nav-link            { font-size: 0.875rem; font-weight: 500; color: #525252 !important; }
.nh-navbar .nav-link:hover,
.nh-navbar .nav-link:focus      { color: #141414 !important; }
.nh-navbar .nav-link.active     { color: #141414 !important; font-weight: 600; }
.nh-navbar .dropdown-toggle     { color: #525252 !important; }
.nh-navbar .dropdown-toggle:hover { color: #141414 !important; }
.nh-navbar .navbar-toggler      { border-color: #ddd; }
.nh-navbar .navbar-collapse     { background: #fff; padding: 0 12px; }
.nh-navbar .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(20,20,20,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

/* Badges in nav */
.nh-navbar .badge { font-size: 0.7rem; }

/* =====================================================
   MOBILE: icon-only header buttons
   ===================================================== */
@media (max-width: 575.98px) {
  .page-header-actions .action-btn {
    font-size: 0 !important;
    letter-spacing: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .page-header-actions .action-btn .bi {
    font-size: 1rem !important;
  }
  .page-header-actions .action-btn::after {
    font-size: 0.75rem;
  }
}

/* =====================================================
   PAGE LAYOUT
   ===================================================== */
.page-wrapper {
  margin-top: 1.5rem;
}

.content-container {
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

/* Page Header — dark gradient */
.page-header-card {
  background: linear-gradient(135deg, #0f3460, #16213e);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.4);
  margin-bottom: 2rem;
  padding: 2rem;
  color: #fff;
}

.page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.page-header-text {
  flex: 1;
}

.page-title {
  margin-bottom: 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.page-description {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  font-weight: 500;
}

.page-header-card .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

.page-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .page-header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  .page-header-actions {
    justify-content: flex-start;
  }
  .container-fluid.px-4 { padding-left: 5px !important; padding-right: 5px !important; }
  .page-wrapper { margin-top: 0.5rem; }
  .page-header-card { border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
  .page-header-card .page-title { font-size: 1.25rem; }
}

/* Content card — white container for body sections */
.content-card {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  padding: 2rem;
}

/* Table header gradient */
.content-card .table.table-gradient thead tr {
  background: linear-gradient(135deg, #0f3460, #16213e);
  border-radius: 8px 8px 0 0;
}
.content-card .table.table-gradient thead th {
  background: transparent;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
}
.content-card .table.table-gradient thead th:first-child { border-radius: 8px 0 0 0; }
.content-card .table.table-gradient thead th:last-child  { border-radius: 0 8px 0 0; }

/* =====================================================
   ACTION BUTTONS
   ===================================================== */
.action-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff !important;
}

.action-btn.primary,
.action-btn.success   { border-color: rgba(255, 255, 255, 0.5); color: #fff !important; font-weight: 700; }
.action-btn.primary:hover,
.action-btn.success:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.8); }

.action-btn.secondary { border-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.7) !important; }

.action-btn.danger    { border-color: rgba(220, 53, 69, 0.5); color: #ff6b7a !important; }
.action-btn.danger:hover { background: rgba(220, 53, 69, 0.25); border-color: rgba(220, 53, 69, 0.7); color: #fff !important; }

.action-btn.sm {
  padding: 0.25rem;
  min-width: 28px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.action-btn.sm i { margin: 0; font-size: 0.75rem; }

.action-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.action-btn.disabled:hover {
  background: transparent;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  color: #6c757d;
}

/* =====================================================
   OFFER CARD
   ===================================================== */
.offer-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.offer-card.pinned {
  border-color: #ffc107;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}
.offer-card .offer-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.offer-card .offer-body {
  padding: 1rem;
}
.offer-card .offer-discount {
  font-size: 1.5rem;
  font-weight: 800;
  color: #198754;
}
.offer-card .offer-free {
  font-size: 1rem;
  font-weight: 700;
  color: #0d6efd;
}
.offer-card .offer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.offer-card .offer-author {
  font-size: 0.8rem;
  color: #6c757d;
}
.offer-card .offer-expiry {
  font-size: 0.75rem;
  color: #dc3545;
}
.offer-card .cross-tenant-tag {
  font-size: 0.7rem;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: #e3f2fd;
  color: #1565c0;
}

/* =====================================================
   MEMBER CARD (catalog)
   ===================================================== */
.member-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1.25rem;
  transition: transform 0.15s ease;
}
.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.member-card .member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.member-card .member-name {
  font-size: 1rem;
  font-weight: 600;
}
.member-card .member-business {
  font-size: 0.85rem;
  color: #6c757d;
}

/* =====================================================
   SPOTLIGHT CARD
   ===================================================== */
.spotlight-card {
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.spotlight-card .spotlight-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #856404;
  margin-bottom: 0.5rem;
}

/* =====================================================
   LOOKING FOR CARD
   ===================================================== */
.looking-for-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.looking-for-card.urgent {
  border-left: 4px solid #dc3545;
}
.looking-for-card.fulfilled {
  opacity: 0.6;
  background: #f8f9fa;
}

/* =====================================================
   UTILITY: COLORS
   ===================================================== */
.text-orange { color: #fd7e14 !important; }
.bg-orange { background-color: #fd7e14 !important; }

/* =====================================================
   UTILITY: BADGE SIZES
   ===================================================== */
.badge-sm { font-size: 0.7em; padding: 0.2em 0.5em; }

/* =====================================================
   UTILITY: FONT SIZES
   ===================================================== */
.fs-07  { font-size: 0.7rem !important; }
.fs-075 { font-size: 0.75rem !important; }
.fs-08  { font-size: 0.8rem !important; }
.fs-085 { font-size: 0.85rem !important; }
.fs-09  { font-size: 0.9rem !important; }

/* =====================================================
   UTILITY: DYNAMIC BADGE
   ===================================================== */
.badge-dynamic {
  background-color: var(--badge-bg, #6c757d);
  color: var(--badge-color, #fff);
}

/* =====================================================
   UTILITY: CURSOR
   ===================================================== */
.cursor-pointer  { cursor: pointer !important; }

/* =====================================================
   UTILITY: CLICKABLE TABLE ROWS
   ===================================================== */
tr.clickable-row { cursor: pointer; }
tbody tr.clickable-row td { user-select: none; }
