/* Enterprise Resource Hub — shared site styles */

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --surface-alt: #f1f5f9;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-color); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ===== HEADER / NAV ===== */
.header {
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: inline-block;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li > a[aria-current="page"] {
  background: var(--surface-alt);
  color: var(--primary-color);
  text-decoration: none;
}

/* Dropdown */
.nav-menu .dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 280px; background: var(--surface-color); box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 0.5rem; list-style: none; z-index: 200; }
.nav-menu > li:hover .dropdown,
.nav-menu > li:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-color);
  border-radius: 0.375rem;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.dropdown li a:hover { background: var(--surface-alt); color: var(--primary-color); text-decoration: none; }

/* Mobile (very simple — stacks) */
@media (max-width: 720px) {
  .nav-container { flex-wrap: wrap; height: auto; padding: 0.5rem 1rem; }
  .nav-menu { flex-wrap: wrap; }
  .nav-menu .dropdown { position: static; box-shadow: none; border: none; padding-left: 1rem; }
  .nav-menu > li:hover .dropdown { display: block; }
}

/* ===== MAIN / LAYOUT ===== */
main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 4rem; }

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}
.hero h1 { font-size: 2.25rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.1rem; opacity: 0.95; max-width: 70ch; }

/* ===== CARDS (hub + vertical landings) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  text-decoration: none;
  color: inherit;
}
.card .card-icon { font-size: 2rem; line-height: 1; }
.card .card-title { font-size: 1.15rem; font-weight: 700; color: var(--text-color); }
.card .card-desc { color: var(--text-muted); font-size: 0.95rem; }
.card .card-meta { margin-top: auto; font-size: 0.82rem; color: var(--text-muted); padding-top: 0.5rem; }

/* ===== CONTENT (doc pages) ===== */
.doc {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem 2.5rem 3rem;
  box-shadow: var(--shadow-sm);
}
.doc h1 { font-size: 2rem; margin-bottom: 1rem; color: var(--text-color); }
.doc h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--border-color); color: var(--text-color); }
.doc h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; color: var(--text-color); }
.doc h4 { font-size: 1rem; margin: 1.25rem 0 0.5rem; color: var(--text-color); }
.doc p { margin: 0.6rem 0; }
.doc ul, .doc ol { margin: 0.5rem 0 0.5rem 1.5rem; }
.doc li { margin: 0.25rem 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.93rem; box-shadow: var(--shadow-sm); border-radius: var(--radius); overflow: hidden; }
.doc table th, .doc table td { border: 1px solid var(--border-color); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.doc table th { background: var(--surface-alt); font-weight: 600; }
.doc table tr:nth-child(even) td { background: #fafbfc; }

/* Doc meta header strip */
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
}
.doc-meta span strong { color: var(--text-color); font-weight: 600; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb .sep { margin: 0 0.4rem; opacity: 0.5; }

/* Footer */
.site-footer {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

/* Page-list (vertical landing) */
.page-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; margin-top: 1.5rem; }
.page-list li { display: flex; }
.page-list li a {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.page-list li a:hover { border-color: var(--primary-color); transform: translateY(-2px); text-decoration: none; }
.page-list .doc-id { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; letter-spacing: 0.04em; text-transform: uppercase; }
.page-list .doc-name { font-weight: 600; }

/* "Coming soon" badge */
.badge { display: inline-block; padding: 0.15rem 0.55rem; background: var(--surface-alt); color: var(--text-muted); border-radius: 999px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge.soon { background: #fef3c7; color: #92400e; }
.badge.live { background: #dcfce7; color: #166534; }
