:root {
  --brand: #f5a623;
  --brand-dark: #d98c0f;
  --ink: #22252b;
  --ink-muted: #6b7280;
  --surface: #ffffff;
  --surface-muted: #f7f7f5;
  --border: #e8e6e1;
  --radius: 0.9rem;
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.05);
  --shadow-md: 0 10px 25px -8px rgba(20, 20, 20, 0.18);
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  background: var(--surface-muted);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Pushes the footer below the content instead of overlapping it on tall pages
   (e.g. the post form) - the old position:absolute footer trick only worked
   for pages shorter than the viewport. */
body > .container {
  flex: 1 0 auto;
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(245, 166, 35, 0.35);
  border-color: var(--brand);
}

/* Navbar */
.navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.navbar-brand::before {
  content: "";
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.5rem;
  background: var(--brand);
  border-radius: 0.2rem;
  transform: rotate(-8deg);
}

/* Buttons */
.btn-brand, .btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
  font-weight: 600;
}

.btn-brand:hover, .btn-primary:hover,
.btn-brand:focus, .btn-primary:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--ink);
}

/* Hero (logged-out home) */
.hero {
  padding: 5rem 1rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.15);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.small-link {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Cards */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.guild-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--ink);
}

.guild-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

.guild-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: auto;
  margin-right: auto;
}

.guild-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.5rem;
}

.guild-card-add {
  border-style: dashed;
  border-width: 2px;
  background: transparent;
}

.guild-card-add:hover {
  background: rgba(245, 166, 35, 0.08);
}

.add-icon {
  font-size: 2rem;
  font-weight: 300;
  color: var(--brand-dark);
  line-height: 1;
}

/* Tables */
.table {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.table thead th {
  border-bottom-width: 1px;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--border);
}

/* Fixed layout so column widths line up between the separate per-event tables on the Events
   page, instead of each table sizing its own columns based on just its own content. The
   min-width keeps columns readable by scrolling (via the surrounding .table-responsive)
   instead of squeezing on narrow screens. */
.event-posts-table {
  table-layout: fixed;
  min-width: 700px;
}

.event-posts-table td {
  overflow-wrap: break-word;
}

/* Forms */
.form-control, .form-select {
  border-color: var(--border);
}

footer.footer {
  flex-shrink: 0;
  background: transparent;
  color: var(--ink-muted);
}
