/* ================================================================
   TEXOMA HUB — Global Styles
   ================================================================ */

:root {
  --cream:   #F5F0E8;
  --ink:     #1C1812;
  --forest:  #2B5219;
  --forest2: #1e3a12;
  --sage:    #5C7A4E;
  --amber:   #C97B12;
  --amber-l: #E8951A;
  --rust:    #B03A22;
  --sand:    #E4D8C8;
  --sand2:   #D4C4B0;
  --muted:   #7A7068;
  --white:   #FFFFFF;
  --blue:    #2563EB;

  --r-sm:    6px;
  --r:       10px;
  --r-lg:    16px;
  --r-xl:    24px;

  --shadow-sm: 0 1px 8px rgba(28,24,18,.06);
  --shadow:    0 3px 18px rgba(28,24,18,.1);
  --shadow-lg: 0 8px 40px rgba(28,24,18,.16);

  --nav-h: 60px;
  --max-w: 1280px;
  --side-p: clamp(16px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────────── */
h1,h2,h3,h4,h5 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── Layout ──────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--side-p); }
.section { padding: clamp(40px, 6vw, 80px) var(--side-p); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-link { color: var(--forest); font-weight: 600; font-size: 0.9rem; }
.section-link:hover { text-decoration: underline; }
.section-alt { background: var(--sand); }
.section-dark { background: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px; border-radius: 8px;
  font-weight: 600; font-size: 0.88rem; border: none;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
  text-decoration: none;
}
.btn-sm { padding: 6px 13px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: 10px; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest2); }
.btn-secondary { background: var(--sand); color: var(--ink); }
.btn-secondary:hover { background: var(--sand2); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: var(--amber-l); }
.btn-outline { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--sand); color: var(--ink); }
.btn-danger { background: var(--rust); color: #fff; }
.btn-danger:hover { opacity: 0.88; }
.btn-full { width: 100%; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(245,240,232,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sand);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--side-p);
  height: 100%; display: flex; align-items: center; gap: 20px;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 900;
  color: var(--forest); white-space: nowrap;
}
.nav-logo span { color: var(--amber); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  color: var(--muted); font-size: 0.88rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; transition: all 0.15s;
}
.nav-links a:hover { color: var(--ink); background: var(--sand); }
.nav-links a.active { color: var(--forest); font-weight: 700; }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-user {
  display: flex; align-items: center; gap: 8px;
  background: var(--sand); padding: 5px 12px 5px 6px;
  border-radius: 24px; cursor: pointer; font-size: 0.83rem; font-weight: 600;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--forest); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; flex-shrink: 0;
}
.hamburger { display: none; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: 0.3s; }

/* ── Cards ───────────────────────────────────────────────────── */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); transition: all 0.25s; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.form-input {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--sand2); border-radius: var(--r-sm);
  background: var(--cream); color: var(--ink);
  font-size: 0.93rem; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--forest); background: #fff; }
.form-input.error { border-color: var(--rust); }
.form-error { color: var(--rust); font-size: 0.78rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7068' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.06em; }
.badge-admin   { background: rgba(176,58,34,.1);  color: var(--rust);   border: 1px solid rgba(176,58,34,.2);  }
.badge-editor  { background: rgba(43,82,25,.1);   color: var(--forest); border: 1px solid rgba(43,82,25,.2);   }
.badge-owner   { background: rgba(201,123,18,.1); color: var(--amber);  border: 1px solid rgba(201,123,18,.2); }
.badge-user    { background: rgba(122,112,104,.1);color: var(--muted);  border: 1px solid rgba(122,112,104,.2);}
.badge-active  { background: rgba(22,163,74,.1);  color: #16A34A; }
.badge-pending { background: rgba(201,123,18,.1); color: var(--amber);  }
.badge-verified{ background: var(--forest); color: #fff; }
.badge-new     { background: var(--amber); color: #fff; }

/* ── Stars ───────────────────────────────────────────────────── */
.stars { color: var(--amber); letter-spacing: 1px; }
.star-empty { color: var(--sand2); }

/* ── Tags ────────────────────────────────────────────────────── */
.tag { display: inline-block; background: var(--sand); color: var(--ink); font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

/* ── Open/closed ─────────────────────────────────────────────── */
.open   { color: #16A34A; font-weight: 700; }
.closed { color: var(--rust); font-weight: 700; }

/* ── Toast ───────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--ink); color: #fff; padding: 13px 20px;
  border-radius: 10px; font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s; pointer-events: none; max-width: 340px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error { background: var(--rust); }
#toast.success { background: #16A34A; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(28,24,18,.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--r-xl); padding: 32px;
  width: 100%; max-width: 460px; position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  animation: modalIn 0.28s ease;
}
.modal-lg { max-width: 680px; }
@keyframes modalIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--sand); border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.modal h2 { font-size: 1.5rem; margin-bottom: 4px; }
.modal-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 24px; }
.modal-footer { margin-top: 16px; text-align: center; color: var(--muted); font-size: 0.84rem; }
.modal-footer a { color: var(--forest); font-weight: 700; cursor: pointer; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--ink); color: rgba(255,255,255,.55);
  padding: clamp(40px,6vw,72px) var(--side-p) 28px;
}
.footer-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-logo { font-family:'Playfair Display',serif; font-size:1.4rem; font-weight:900; color:#fff; margin-bottom:12px; }
.footer-logo span { color: var(--amber); }
.footer-desc { font-size:0.88rem; line-height:1.7; }
.footer-col h4 { color:#fff; font-family:'DM Sans',sans-serif; font-size:0.85rem; font-weight:700; margin-bottom:14px; text-transform:uppercase; letter-spacing:0.08em; }
.footer-col ul { list-style:none; display:flex; flex-direction:column; gap:8px; }
.footer-col a { color:rgba(255,255,255,.5); font-size:0.87rem; transition:color 0.15s; }
.footer-col a:hover { color:#fff; }
.footer-bottom { max-width:var(--max-w); margin:0 auto; border-top:1px solid rgba(255,255,255,.08); padding-top:24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; font-size:0.8rem; }

/* ── Skeleton loader ─────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--sand) 25%, var(--cream) 50%, var(--sand) 75%); background-size: 200%; animation: skeleton 1.4s infinite; border-radius: 6px; }
@keyframes skeleton { from{background-position:200%} to{background-position:-200%} }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:40px; }
.page-btn { width:36px; height:36px; border:1.5px solid var(--sand2); border-radius:8px; background:#fff; font-weight:600; font-size:0.85rem; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.15s; }
.page-btn:hover { border-color:var(--forest); color:var(--forest); }
.page-btn.active { background:var(--forest); color:#fff; border-color:var(--forest); }
.page-btn:disabled { opacity:.4; cursor:not-allowed; }

/* ── Utility ─────────────────────────────────────────────────── */
.mt-4 { margin-top:4px; } .mt-8 { margin-top:8px; } .mt-16 { margin-top:16px; } .mt-24 { margin-top:24px; } .mt-32 { margin-top:32px; }
.mb-4 { margin-bottom:4px; } .mb-8 { margin-bottom:8px; } .mb-16 { margin-bottom:16px; } .mb-24 { margin-bottom:24px; }
.flex { display:flex; } .items-center { align-items:center; } .gap-8 { gap:8px; } .gap-12 { gap:12px; } .gap-16 { gap:16px; }
.text-muted { color:var(--muted); } .text-sm { font-size:0.85rem; } .text-xs { font-size:0.75rem; }
.fw-7 { font-weight:700; } .hidden { display:none !important; }
.divider { height:1px; background:var(--sand); margin:24px 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media(max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media(max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px; }
}
