/* ============================================================
   Site-wide styles (shared header + footer). Generated from the
   former inline <style> blocks — edit here, not in the templates.
   ============================================================ */
/* ── Reset & Variables ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary:    #0f6fff;
  --primary-text: #6ea8ff;   /* blue for TEXT on dark grounds (>= 4.5:1); --primary stays for fills */
  --primary-btn:  #0a5ce0;   /* button fill: white text reaches 5:1 */
  --primary-dk: #0a52cc;
  --accent:     #00d4aa;
  --dark:       #0b0e1a;
  --dark2:      #111627;
  --dark3:      #1a2035;
  --card:       #161d30;
  --border:     rgba(255,255,255,.08);
  --text:       #e4e9f5;
  --muted:      #99a3bd;
  --white:      #ffffff;
  --radius:     14px;
  --shadow:     0 8px 40px rgba(0,0,0,.45);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark); color: var(--text);
  line-height: 1.65; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Utility ────────────────────────────────────────── */
.container { max-width: 1160px; margin: auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-alt{ background: var(--dark2); }
.text-center{ text-align: center; }
.highlight  { color: var(--primary-text); }
.accent-text{ color: var(--accent); }
.badge-pill {
  display: inline-block;
  background: rgba(15,111,255,.15); color: var(--primary-text);
  border: 1px solid rgba(15,111,255,.35);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 40px;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 14px;
}
.section-sub {
  color: var(--muted); font-size: 1.05rem;
  max-width: 560px; margin: 0 auto 52px;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 8px;
  font-weight: 700; font-size: .95rem;
  cursor: pointer; border: none; transition: all .22s ease;
  text-decoration: none;
}
.btn-primary { background: var(--primary-btn); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(15,111,255,.4); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-accent  { background: var(--accent); color: #0b0e1a; }
.btn-accent:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,212,170,.35); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ── Navbar ─────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 999;
  background: rgba(11,14,26,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 68px;
}
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; }
.logo span { color: var(--primary); }
.nav-links { display: flex; align-items: center; flex-wrap: nowrap; gap: 30px; list-style: none; }
.nav-links > li { flex-shrink: 0; display: flex; align-items: center; }
.nav-links a {
  color: var(--muted); font-size: .92rem; font-weight: 600;
  transition: color .2s; position: relative; padding-bottom: 2px;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--primary); border-radius: 2px;
}
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-cta .btn { padding: 9px 20px; font-size: .9rem; }
.nav-login { color: var(--muted); font-weight: 600; font-size: .92rem; transition: color .2s; }
.nav-login:hover { color: var(--white); }

/* Mobile menu */
.mobile-toggle {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.4rem; cursor: pointer; padding: 4px;
}
.mobile-menu {
  display: none; background: var(--dark2);
  border-top: 1px solid var(--border); padding: 16px 24px 20px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 10px 0; color: var(--muted);
  font-weight: 600; font-size: .95rem; border-bottom: 1px solid rgba(255,255,255,.05);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--white); }

/* ── Applications dropdown ──────────────────────────── */
.app-menu { position: relative; }
.app-trigger {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: .92rem; font-weight: 600;
  transition: color .2s; cursor: pointer;
  position: relative; background: none; border: none; outline: none;
  font-family: inherit; padding: 0; padding-bottom: 2px;
}
.app-trigger:hover { color: var(--white); }
.app-trigger.has-items { color: var(--white); }
.app-caret { font-size: .7rem; transition: transform .2s; }
.app-trigger[aria-expanded="true"] { color: var(--white); }
.app-trigger[aria-expanded="true"] .app-caret { transform: rotate(180deg); }
.app-dropdown {
  display: none; position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(100% + 10px);
  background: var(--dark2); border: 1px solid var(--border);
  border-radius: 14px; width: 360px;
  box-shadow: var(--shadow); z-index: 200; overflow: hidden;
}
.app-dropdown.open { display: block; }
.app-dropdown-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  font-size: .78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.app-item {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.app-item:last-child { border-bottom: none; }
.app-item:hover { background: rgba(15,111,255,.06); }
.app-item-icon {
  font-size: 1.5rem; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(15,111,255,.18), rgba(0,212,170,.12));
  display: flex; align-items: center; justify-content: center;
}
.app-item-body { flex: 1; min-width: 0; }
.app-item-title {
  font-size: .92rem; font-weight: 800; color: var(--text);
  margin-bottom: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.app-item-tag {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--accent);
  background: rgba(0,212,170,.12); border: 1px solid rgba(0,212,170,.3);
  padding: 1px 7px; border-radius: 20px;
}
.app-item-body p {
  font-size: .8rem; color: var(--muted); line-height: 1.5;
}

/* ── Announcements dropdown ─────────────────────────── */
.ann-menu { position: relative; }
.ann-trigger {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: .92rem; font-weight: 600;
  transition: color .2s; cursor: pointer;
  padding-bottom: 2px; position: relative;
  background: none; border: none; outline: none;
  font-family: inherit; padding: 0;
}
.ann-trigger:hover { color: var(--white); }
.ann-trigger.has-items { color: var(--white); }
.ann-trigger[aria-expanded="true"] { color: var(--white); }
.ann-trigger[aria-expanded="true"]::after,
.ann-trigger.has-items::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--primary); border-radius: 2px;
}
.ann-badge {
  background: var(--primary); color: #fff;
  font-size: .65rem; font-weight: 800;
  border-radius: 10px; padding: 1px 6px;
  line-height: 1.5; min-width: 18px; text-align: center;
}
.ann-dropdown {
  display: none; position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(100% + 10px);
  background: var(--dark2); border: 1px solid var(--border);
  border-radius: 14px; width: 340px;
  box-shadow: var(--shadow); z-index: 200; overflow: hidden;
}
.ann-dropdown.open { display: block; }
.ann-dropdown-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  font-size: .8rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.ann-dropdown-header a { color: var(--primary-text); font-size: .8rem; font-weight: 700; }
.ann-item {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  display: flex; gap: 10px; align-items: flex-start;
  transition: background .15s;
}
.ann-item:last-child { border-bottom: none; }
.ann-item:hover { background: rgba(255,255,255,.03); }
.ann-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.ann-item-body { flex: 1; min-width: 0; }
.ann-item-title {
  font-size: .88rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.ann-item-body p {
  font-size: .8rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.ann-empty {
  padding: 28px 18px; text-align: center;
  color: var(--muted); font-size: .88rem;
}
.ann-type-info    { color: var(--primary); }
.ann-type-success { color: var(--accent); }
.ann-type-warning { color: #f59e0b; }
.ann-type-danger  { color: #e05470; }

/* User dropdown */
.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  cursor: pointer; font-size: .88rem; font-weight: 700;
  transition: border-color .2s;
}
.user-trigger:hover { border-color: var(--primary); }
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800;
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--dark2); border: 1px solid var(--border);
  border-radius: 12px; min-width: 180px; overflow: hidden;
  box-shadow: var(--shadow); z-index: 100;
}
.user-menu:hover .user-dropdown { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .88rem; color: var(--muted);
  font-weight: 600; transition: background .2s, color .2s;
}
.user-dropdown a:hover { background: rgba(255,255,255,.04); color: var(--white); }
.user-dropdown .sep { height: 1px; background: var(--border); }

/* ── Toast ──────────────────────────────────────────── */
#site-toast-zone {
  position: fixed; bottom: 22px; right: 22px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.site-toast {
  background: var(--card); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; box-shadow: var(--shadow);
  animation: stIn .3s ease; pointer-events: all;
  font-size: .88rem; font-weight: 600;
}
@keyframes stIn { from { transform: translateX(110%); opacity: 0; } }
.site-toast.t-success { border-left: 3px solid var(--accent); }
.site-toast.t-error   { border-left: 3px solid #e05470; }
.site-toast.t-info    { border-left: 3px solid var(--primary); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .mobile-toggle { display: block; }
}

/* ── Footer ── */
footer { background: var(--dark2); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin: 14px 0 22px; max-width: 280px; }
.social-links { display: flex; gap: 12px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: border-color .2s, background .2s;
}
.social-btn:hover { border-color: var(--primary); background: rgba(15,111,255,.15); }
.footer-col h3 { font-size: .9rem; font-weight: 700; margin-bottom: 18px; color: var(--white); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--muted); font-size: .88rem; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { color: var(--muted); font-size: .85rem; }
.footer-bottom-links { display: flex; gap: 22px; }
.footer-bottom-links a { color: var(--muted); font-size: .82rem; transition: color .2s; }
.footer-bottom-links a:hover { color: var(--white); }

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