/* ── GIBS Design System — Dark Professional Theme ─────────────────────────── */
:root {
  --bg:          #1a1a1f;
  --bg-alt:      #141418;
  --surface:     #23232a;
  --surface-2:   #2c2c35;
  --border:      #2e2e3a;
  --border-2:    #3a3a48;
  --accent:      #c9a84c;
  --accent-dark: #a88730;
  --accent-muted:#c9a84c33;
  --text:        #f0f0f0;
  --text-muted:  #9090a0;
  --text-faint:  #606070;
  --success:     #4caf7a;
  --warning:     #e6a817;
  --danger:      #e05252;
  --info:        #5294e0;
  --radius:      6px;
  --radius-lg:   12px;
  --shadow:      0 2px 12px rgba(0,0,0,.45);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.6);
  --transition:  180ms ease;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #e0bf70; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
ul, ol { list-style: none; }

/* ── Typography ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 600; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; color: var(--text); }
small { font-size: .85em; color: var(--text-muted); }
strong { font-weight: 600; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 680px; }
.container-lg { max-width: 1400px; }

/* ── Public Navigation ───────────────────────────────────────────────────────── */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav-logo span { color: var(--text-muted); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { color: var(--text-muted); font-size: .95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: #1a1a1f !important;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
}
.nav-cta:hover { background: var(--accent-dark); color: #fff !important; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--text-muted); }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-alt); border-top: 1px solid var(--border);
    padding: 1rem 1.5rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .site-header { position: relative; }
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.08) 0%, transparent 70%);
}
.hero-eyebrow {
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary { background: var(--accent); color: #1a1a1f; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 4px 16px rgba(201,168,76,.3); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c43d3d; }
.btn-success { background: var(--success); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--surface); }
.btn-sm { padding: .35rem .9rem; font-size: .85rem; }
.btn-lg { padding: .8rem 1.8rem; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card-header { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.25rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.form-control {
  width: 100%;
  padding: .6rem .85rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: var(--text-faint); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: .3rem; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-gold    { background: var(--accent-muted); color: var(--accent); }
.badge-success { background: rgba(76,175,122,.15); color: var(--success); }
.badge-warning { background: rgba(230,168,23,.15); color: var(--warning); }
.badge-danger  { background: rgba(224,82,82,.15);  color: var(--danger); }
.badge-info    { background: rgba(82,148,224,.15); color: var(--info); }
.badge-muted   { background: var(--surface-2); color: var(--text-muted); }

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
.table-actions { display: flex; gap: .5rem; }

/* ── Alerts / Flash Messages ─────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
  border-left: 3px solid;
}
.alert-success { background: rgba(76,175,122,.1);  border-color: var(--success); color: #7de0a8; }
.alert-error   { background: rgba(224,82,82,.1);   border-color: var(--danger);  color: #f08080; }
.alert-warning { background: rgba(230,168,23,.1);  border-color: var(--warning); color: #f0c050; }
.alert-info    { background: rgba(82,148,224,.1);  border-color: var(--info);    color: #80b0f0; }

/* ── Dashboard Stats ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .5rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-sub { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Section dividers ────────────────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--text-muted); max-width: 560px; margin: .75rem auto 0; }
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.5rem; }
.pagination a, .pagination span {
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: .9rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination .current { background: var(--accent); color: #1a1a1f; border-color: var(--accent); font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .logo { font-size: 1rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.footer-brand p { margin-top: .5rem; font-size: .85rem; color: var(--text-muted); }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .75rem; }
.footer-col li + li { margin-top: .5rem; }
.footer-col a { color: var(--text-muted); font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: .8rem; color: var(--text-faint); margin: 0; }
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; gap: .5rem; } }

/* ── Admin/Portal Sidebar Layout ─────────────────────────────────────────────── */
.portal-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sidebar-logo small { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-section { padding: .5rem 1.5rem .25rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem 1.5rem;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.sidebar-nav a:hover { background: var(--surface); color: var(--text); }
.sidebar-nav a.active { background: var(--accent-muted); color: var(--accent); }
.sidebar-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }
.sidebar-footer small { display: block; color: var(--text-faint); font-size: .75rem; margin-bottom: .4rem; }
.portal-main { flex: 1; overflow-x: hidden; }
.portal-topbar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: .85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-topbar h1 { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.portal-content { padding: 2rem; }
@media (max-width: 900px) {
  .portal-layout { flex-direction: column; }
  .sidebar { width: 100%; min-width: 0; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav { display: flex; padding: 0; overflow-x: auto; }
  .sidebar-nav a { white-space: nowrap; }
  .sidebar-section { display: none; }
}

/* ── Course Catalog Cards ─────────────────────────────────────────────────────── */
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: border-color var(--transition); }
.course-card:hover { border-color: var(--accent); }
.course-card-body { padding: 1.25rem; }
.course-card-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.course-card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.course-card-desc { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; }
.course-card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.course-price { font-size: 1.1rem; font-weight: 700; color: var(--accent); }

/* ── Verify Certificate Page ─────────────────────────────────────────────────── */
.verify-box { max-width: 700px; margin: 3rem auto; }
.verify-status { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.verify-status.valid { background: rgba(76,175,122,.1); border: 1px solid var(--success); }
.verify-status.revoked { background: rgba(224,82,82,.1); border: 1px solid var(--danger); }
.verify-icon { font-size: 2rem; }
.verify-embed { width: 100%; height: 600px; border: 1px solid var(--border); border-radius: var(--radius); }

/* ── Misc utilities ──────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .78rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
