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

:root {
  --navy: #0f2044;
  --navy-mid: #1a3a6b;
  --blue: #2563eb;
  --gold: #f59e0b;
  --green: #059669;
  --orange: #f97316;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1e4d8c 100%);
  padding: 56px 0 52px;
  color: white;
}

.profile {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.profile-photo {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.1);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  color: white;
  letter-spacing: -1px;
}

.profile-info {
  padding-top: 4px;
}

.profile-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.profile-info h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.profile-title {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 14px;
  font-weight: 400;
}

.profile-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* Hero star display */
.stars-display {
  position: relative;
  display: inline-block;
  font-size: 24px;
  line-height: 1;
}
.stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: var(--gold);
  white-space: nowrap;
}
.stars-empty {
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
}

.rating-number {
  font-size: 28px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.rating-count {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

.profile-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.15s;
}
.contact-link:hover { color: white; }
.contact-link svg { flex-shrink: 0; opacity: 0.7; }

/* ── ABOUT ── */
.about {
  background: white;
  border-bottom: 1px solid var(--border);
}

.about-inner {
  padding: 44px 0;
  max-width: 720px;
}

.about h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.about p {
  font-size: 15px;
  color: #374151;
  line-height: 1.75;
  margin-bottom: 24px;
}

.about-specialties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.specialty-group h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.specialty-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.specialty-group li {
  font-size: 14px;
  color: #374151;
  padding-left: 14px;
  position: relative;
}

.specialty-group li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--navy);
  font-weight: 700;
}

@media (max-width: 500px) {
  .about-specialties { grid-template-columns: 1fr; }
}

/* ── STATS ── */
.stats-bar {
  background: var(--navy);
  padding: 28px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 40px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
}

/* ── REVIEWS SECTION ── */
.reviews-section {
  padding: 52px 0 64px;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.reviews-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.reviews-note {
  font-size: 13px;
  color: var(--text-muted);
}

#filter-select {
  appearance: none;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
#filter-select:focus { outline: none; border-color: var(--blue); }

/* ── REVIEW GRID ── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.review-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.review-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Inline star rating for cards */
.review-stars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.star-rating {
  position: relative;
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}

.star-bg {
  color: #e2e8f0;
  white-space: nowrap;
}

.star-fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
}

.rating-val {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.source-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.review-reviewer {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.review-body {
  flex: 1;
}

.review-text {
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}

.review-no-comment {
  color: var(--text-muted);
  font-style: italic;
}

.review-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.review-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.tag-ftb {
  background: #dbeafe;
  color: #1d4ed8;
}

.tag-new {
  background: #d1fae5;
  color: #065f46;
}

.tag-nc {
  background: #fef3c7;
  color: #92400e;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--navy);
  padding: 32px 0;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  line-height: 1.8;
}

.site-footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}
.site-footer a:hover { color: white; }

/* ── STATES ── */
.loading, .no-results, .error-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ── ADMIN STYLES (used in admin.html) ── */
.admin-body {
  min-height: 100vh;
  background: var(--bg);
}

.admin-nav {
  background: var(--navy);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-nav .brand {
  color: white;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.admin-nav .nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: white;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); }

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.btn-danger:hover { background: #fecaca; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.admin-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.login-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.login-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.login-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

/* Form */
.form-group {
  margin-bottom: 18px;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.error-msg-inline {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Admin review list */
.admin-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-review-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-review-info {
  flex: 1;
  min-width: 0;
}

.admin-review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.admin-review-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-review-comment {
  font-size: 13px;
  color: #374151;
  margin-top: 6px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-review-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 200;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #059669; }
.toast.error-toast { background: #dc2626; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .profile { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .profile-info h1 { font-size: 28px; }
  .profile-contact { justify-content: center; }
  .profile-rating { justify-content: center; }
  .stats-grid { gap: 0; }
  .stat-item { padding: 10px 20px; }
  .stat-divider { display: none; }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-header { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 24px 20px; }
}
