/* ═══════════════════════════════════════════════════
   NEMTHQ — Global Stylesheet
   Design System: Clean Royal (blue + orange)
   ═══════════════════════════════════════════════════ */

:root {
  --royal: #1B3A8C;
  --royal-light: #2E5BD6;
  --royal-pale: #EBF0FF;
  --royal-bg: #F0F4FF;
  --orange: #FF6B2C;
  --orange-light: #FF8F5C;
  --orange-glow: rgba(255,107,44,.12);
  --lime: #22C55E;
  --lime-bg: rgba(34,197,94,.08);
  --gold: #FFB800;
  --white: #FFFFFF;
  --snow: #FAFBFF;
  --dark: #0F172A;
  --mid: #475569;
  --light: #94A3B8;
  --border: rgba(27,58,140,.08);
  --display: 'Bricolage Grotesque', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 4px 16px rgba(27,58,140,.06);
  --shadow-lg: 0 12px 40px rgba(27,58,140,.08);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--display);
  background: var(--snow);
  color: var(--dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; display: block; }

/* ═══ UTILITY ═══ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* ═══ BUTTONS ═══ */
.btn {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  padding: 14px 32px; border-radius: var(--radius); border: none;
  cursor: pointer; transition: all .25s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-sm { padding: 8px 20px; font-size: .85rem; }
.btn-royal { background: var(--royal); color: #fff; box-shadow: 0 4px 16px rgba(27,58,140,.15); }
.btn-royal:hover { background: var(--royal-light); color: #fff; transform: translateY(-2px); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 16px rgba(255,107,44,.15); }
.btn-orange:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,44,.2); }
.btn-white { background: var(--white); color: var(--royal); border: 2px solid var(--border); }
.btn-white:hover { border-color: var(--royal); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--royal); border: 2px solid var(--royal); }
.btn-outline:hover { background: var(--royal); color: #fff; }
.btn-danger { background: #DC2626; color: #fff; }

/* ═══ HEADER / NAV ═══ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.main-nav { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--dark); }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--royal);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; line-height: 1; flex-shrink: 0;
}
.logo-mark .lm-top { font-size: .55rem; letter-spacing: .02em; }
.logo-mark .lm-bot { font-size: .7rem; color: var(--orange); }
.logo-right { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text { font-weight: 800; font-size: 1.15rem; }
.logo-text .hq { color: var(--orange); }
.logo-tagline { font-size: .55rem; font-weight: 700; color: var(--light); text-transform: uppercase; letter-spacing: .1em; }
.logo-text { font-weight: 800; font-size: 1.15rem; }
.nav-links {
  display: flex; align-items: center; gap: 28px; list-style: none;
}
.nav-links a { color: var(--mid); font-size: .88rem; font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--royal); }
.nav-login { color: var(--royal) !important; }
.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 22px; position: relative;
}
.mobile-menu-btn span {
  display: block; height: 2px; background: var(--dark); border-radius: 2px;
  position: absolute; left: 0; right: 0; transition: all .3s;
}
.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 10px; }
.mobile-menu-btn span:nth-child(3) { top: 20px; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--border); padding: 20px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
}

/* ═══ FLASH MESSAGES ═══ */
.flash {
  padding: 14px 0; font-size: .9rem; font-weight: 600;
}
.flash-success { background: var(--lime-bg); color: #16A34A; }
.flash-error { background: rgba(220,38,38,.08); color: #DC2626; }

/* ═══ AUTH PAGES ═══ */
.auth-page {
  min-height: 80vh; display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.auth-card {
  background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 40px; max-width: 440px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 8px; }
.auth-sub { color: var(--mid); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: .82rem; font-weight: 700; color: var(--mid);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: 10px; font-family: var(--display); font-size: .95rem;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--royal);
}
.auth-links {
  margin-top: 20px; text-align: center; font-size: .85rem; color: var(--mid);
}
.auth-links a { color: var(--royal); font-weight: 600; }
.auth-links span { margin: 0 8px; }

/* ═══ DASHBOARD ═══ */
.dash-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.dash-sidebar {
  background: var(--white); border-right: 1px solid var(--border);
  padding: 24px; overflow-y: auto; position: sticky; top: 60px; height: calc(100vh - 60px);
}
.dash-main { padding: 32px; }
.dash-sidebar h3 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--light); margin: 20px 0 10px; padding-left: 12px;
}
.dash-sidebar h3:first-child { margin-top: 0; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: .88rem;
  font-weight: 600; color: var(--mid); transition: all .15s; margin-bottom: 2px;
}
.side-link:hover { background: var(--royal-bg); color: var(--royal); }
.side-link.active { background: var(--royal); color: #fff; }
.side-link .icon { font-size: 1.1rem; }

/* Dashboard cards */
.dash-header { margin-bottom: 32px; }
.dash-header h1 { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 4px; }
.dash-header p { color: var(--mid); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dash-stat {
  background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
}
.dash-stat .ds-icon { font-size: 1.6rem; margin-bottom: 8px; }
.dash-stat .ds-num { font-family: var(--serif); font-size: 1.8rem; font-weight: 800; }
.dash-stat .ds-label { font-size: .82rem; color: var(--mid); }

/* Progress bar */
.progress-bar-wrap {
  background: var(--royal-pale); border-radius: 10px; height: 12px;
  overflow: hidden; margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--royal), var(--royal-light));
  transition: width .5s ease;
}

/* Checklist */
.checklist { list-style: none; }
.checklist li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: .92rem; cursor: pointer; transition: background .15s;
}
.checklist li:hover { background: var(--royal-bg); }
.checklist li.done { color: var(--light); }
.checklist li.done .check-title { text-decoration: line-through; }
.check-box {
  width: 24px; height: 24px; min-width: 24px; border-radius: 8px;
  border: 2px solid var(--border); display: grid; place-items: center;
  font-size: .7rem; font-weight: 800; color: transparent; transition: all .2s;
}
.checklist li.done .check-box {
  background: var(--royal); border-color: var(--royal); color: #fff;
}
.check-title { font-weight: 600; }
.check-desc { font-size: .8rem; color: var(--light); margin-top: 2px; }

/* Content area */
.content-card {
  background: var(--white); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.content-card h2 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 16px; }
.content-card h3 { font-size: 1.1rem; margin: 20px 0 8px; }
.content-card p { color: var(--mid); margin-bottom: 12px; }
.content-card ul, .content-card ol { margin-left: 20px; margin-bottom: 12px; color: var(--mid); }
.content-card li { margin-bottom: 6px; }

@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ═══ BLOG ═══ */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; padding: 40px 0; }
.blog-card {
  background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: all .3s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-body { padding: 24px; }
.blog-card h3 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 8px; }
.blog-card p { color: var(--mid); font-size: .88rem; }
.blog-card .meta { font-size: .78rem; color: var(--light); margin-top: 12px; }

.blog-post { max-width: 760px; margin: 0 auto; padding: 60px 20px; }
.blog-post h1 { font-family: var(--serif); font-size: 2.2rem; margin-bottom: 12px; }
.blog-post .post-meta { color: var(--mid); font-size: .88rem; margin-bottom: 32px; }
.blog-post .post-content { color: var(--mid); line-height: 1.8; font-size: 1.05rem; }
.blog-post .post-content h2 { font-family: var(--serif); font-size: 1.5rem; color: var(--dark); margin: 32px 0 12px; }
.blog-post .post-content h3 { font-size: 1.2rem; color: var(--dark); margin: 24px 0 8px; }
.blog-post .post-content ul, .blog-post .post-content ol { margin: 12px 0 12px 24px; }
.blog-post .post-content p { margin-bottom: 16px; }
.blog-post .post-cta {
  background: var(--royal-bg); border: 2px solid var(--royal-pale);
  border-radius: var(--radius-lg); padding: 32px; margin-top: 48px; text-align: center;
}

/* ═══ ADMIN ═══ */
.admin-header { background: var(--dark); color: #fff; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.admin-body { padding: 32px 24px; max-width: 1200px; margin: 0 auto; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th { text-align: left; padding: 10px 12px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--light); border-bottom: 2px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.admin-table tr:hover td { background: var(--royal-bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.badge-green { background: var(--lime-bg); color: #16A34A; }
.badge-blue { background: var(--royal-pale); color: var(--royal); }
.badge-orange { background: var(--orange-glow); color: var(--orange); }
.badge-gray { background: rgba(148,163,184,.1); color: var(--light); }

/* ═══ FOOTER ═══ */
.site-footer { border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--mid); font-size: .85rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--mid); font-size: .85rem; padding: 3px 0; }
.footer-col a:hover { color: var(--royal); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; color: var(--light); font-size: .78rem; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
