:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5a6578;
  --accent: #0b6e4f;
  --accent-hover: #095a41;
  --accent-soft: #e7f5ef;
  --border: #e3e8ef;
  --shadow: 0 10px 36px rgba(26, 35, 50, 0.07);
  --radius: 14px;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dceee6 0%, transparent 55%),
    radial-gradient(900px 400px at 90% 0%, #e8eef8 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.site-header {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text) !important;
  letter-spacing: -0.02em;
}

.brand-text span { color: var(--accent); }

.brand-logo {
  height: 64px;
  width: auto;
  max-width: 280px;
  display: block;
  object-fit: contain;
}

.brand-logo-sm {
  height: 40px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

@media (max-width: 575.98px) {
  .brand-logo { height: 52px; max-width: 200px; }
}

.nav-link-custom {
  color: var(--muted) !important;
  font-weight: 500;
  padding: 0.4rem 0.75rem !important;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.nav-link-custom:hover,
.nav-link-custom.active {
  background: var(--accent-soft);
  color: var(--accent) !important;
}

.hero {
  padding: 4.5rem 0 3rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.hero-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 34rem;
}

.search-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  padding: 0.65rem;
  margin-top: 1.75rem;
  max-width: 640px;
  position: relative;
}
.search-shell .form-control {
  border: 0;
  box-shadow: none !important;
  font-size: 1.05rem;
}
.search-shell .btn-accent {
  border-radius: 12px;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.section {
  padding: 2.5rem 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}
.section-sub {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.company-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  height: 100%;
  color: inherit;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.company-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #c9d7cc;
  color: inherit;
}
.company-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.company-meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.company-excerpt {
  margin-top: 0.65rem;
  color: var(--text);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  margin: 0 0.4rem 0.55rem 0;
  transition: background .2s ease, border-color .2s ease;
}
.cat-chip:hover {
  background: var(--accent-soft);
  border-color: #b9d8c8;
  color: var(--accent);
}

.page-hero {
  padding: 2.25rem 0 1.25rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.4rem;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.logo-frame {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 50;
  overflow: hidden;
}
.search-suggest a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.search-suggest a:last-child { border-bottom: 0; }
.search-suggest a:hover { background: var(--accent-soft); }
.search-suggest small { color: var(--muted); }

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  background: rgba(255,255,255,0.55);
}

.fade-in {
  animation: fadeUp .45s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.admin-wrap { background: #f3f5f8; min-height: 100vh; }
.admin-side {
  background: #122033;
  color: #d7e0ea;
  min-height: 100vh;
  padding: 1.5rem 1rem;
}
.admin-side a {
  display: block;
  color: #c5d2e0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
}
.admin-side a:hover,
.admin-side a.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.admin-brand {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  display: block;
}

.badge-pending { background: #fff3cd; color: #7a5b00; }
.badge-approved { background: var(--accent-soft); color: var(--accent); }
.badge-rejected { background: #fde2e2; color: #9b1c1c; }

.api-code {
  background: #122033;
  color: #e8eef6;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0;
}
.api-code code {
  color: inherit;
  white-space: pre;
}

.ad-unit {
  min-height: 90px;
  background: #f1f4f8;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 0.5rem;
}

.phone-ad-box {
  min-height: 250px;
  background: #f7f9fc;
  border-radius: 10px;
  overflow: hidden;
}

.phone-masked {
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
