:root {
  --brand: #0d6efd;
  --brand-dark: #0a58ca;
  --surface: #f7f9fc;
  --ink: #1a2332;
  --muted: #5c6b7a;
  --card-bg: #ffffff;
  --shadow: 0 8px 24px rgba(26, 35, 50, 0.08);
  --radius: 12px;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  min-height: 100vh;
}

a {
  text-decoration: none;
}

/* Public layout */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(13, 110, 253, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand);
  font-size: 1.25rem;
}

.hero {
  background:
    radial-gradient(circle at 10% 20%, rgba(13, 110, 253, 0.12), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(32, 201, 151, 0.1), transparent 35%),
    linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
  padding: 4.5rem 0 3.5rem;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
  animation: fadeUp 0.6s ease both;
}

.hero .lead {
  color: var(--muted);
  max-width: 40rem;
  animation: fadeUp 0.7s ease 0.05s both;
}

.hero .btn {
  animation: fadeUp 0.75s ease 0.1s both;
}

.section-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid rgba(26, 35, 50, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(26, 35, 50, 0.12);
}

.contact-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #e9eef5;
}

.contact-photo-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8eef8, #f3f6fb);
  color: var(--brand);
  font-size: 2.5rem;
  font-weight: 700;
}

.contact-body {
  padding: 1.25rem;
}

.contact-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.contact-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.contact-notes {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(26, 35, 50, 0.08);
}

.contact-notes-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.contact-notes-body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.contact-note-line {
  display: block;
  min-height: 1.35em;
}

.site-footer {
  background: #fff;
  border-top: 1px solid rgba(26, 35, 50, 0.06);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--muted);
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(13, 110, 253, 0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(32, 201, 151, 0.12), transparent 40%),
    var(--surface);
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border: 1px solid rgba(26, 35, 50, 0.06);
  animation: fadeUp 0.45s ease both;
}

/* Admin layout */
.admin-shell {
  min-height: 100vh;
  display: flex;
  background: var(--surface);
}

.admin-sidebar {
  width: 260px;
  background: #12263a;
  color: #fff;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.5rem 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.admin-nav .nav-link {
  color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.25rem;
  transition: background var(--transition), color var(--transition);
}

.admin-nav .nav-link:hover,
.admin-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(26, 35, 50, 0.06);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-content {
  padding: 1.5rem;
  animation: fadeUp 0.35s ease both;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 35, 50, 0.06);
  padding: 1.25rem;
  height: 100%;
  transition: transform var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}

.stat-card .stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 35, 50, 0.06);
  padding: 1.25rem;
}

.table img.thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #e9eef5;
}

.badge-published {
  background: #d1e7dd;
  color: #0f5132;
}

.badge-hidden {
  background: #e2e3e5;
  color: #41464b;
}

.photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(26, 35, 50, 0.1);
  background: #e9eef5;
}

#global-loader {
  position: fixed;
  inset: 0;
  background: rgba(247, 249, 252, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#global-loader.show {
  display: flex;
}

.toast-container {
  z-index: 2100;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

@media (max-width: 991.98px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }

  .admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .admin-nav .nav-link {
    margin-bottom: 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
