/* ===== Sidebar ===== */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column; z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), background 0.35s ease;
}
.sidebar-logo {
  padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(8,145,178,0.12));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo .logo-title {
  font-size: 18px; font-weight: 700;
  background: linear-gradient(135deg, var(--text-link), var(--text-link-hover));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar-logo .logo-sub {
  font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em;
  -webkit-text-fill-color: var(--text-muted);
}
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.snav-label {
  padding: 12px 16px 6px; font-size: 10px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
}
.snav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  margin: 2px 0; border-radius: 8px; cursor: pointer;
  border: none; background: transparent; color: var(--text-secondary);
  font-size: 13px; font-weight: 500; width: 100%; text-align: left;
  transition: all 0.25s; font-family: inherit;
}
.snav-item:hover { background: rgba(124,58,237,0.12); color: var(--text-primary); }
.snav-item.active { background: rgba(124,58,237,0.15); color: #7C3AED; }
.snav-item .sicon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.snav-item .sbadge {
  margin-left: auto; padding: 1px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600; background: #7C3AED; color: #FFFFFF;
}
.snav-item .sbadge.red { background: #F87171; }
.sidebar-foot {
  margin: 8px; padding: 10px 8px; border: 1px solid var(--border-color);
  border-radius: 14px; background: var(--bg-card); background-color: var(--bg-card-solid);
  display: flex; flex-direction: column; gap: 8px;
}
.foot-actions { display: flex; gap: 16px; justify-content: center; }
.foot-icon {
  flex: 0 0 auto; width: auto; gap: 8px;
  padding: 6px 12px; border-radius: 10px; position: relative;
}
.sidebar-foot .theme-btn { margin-top: 2px; justify-content: center; }
.sicon-chip {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: transform 0.25s, box-shadow 0.25s;
}
.sicon-chip svg { width: 12px; height: 12px; }
.chip-help { background: linear-gradient(135deg, #7C3AED, #5B21B6); box-shadow: 0 2px 6px rgba(124,58,237,0.25); }
.chip-support { background: linear-gradient(135deg, #7C3AED, #5B21B6); box-shadow: 0 2px 6px rgba(124,58,237,0.25); }
.snav-item:hover .sicon-chip { transform: scale(1.12) rotate(-4deg); }
.snav-item:hover .chip-help { box-shadow: 0 3px 10px rgba(124,58,237,0.55); }
.snav-item:hover .chip-support { box-shadow: 0 3px 10px rgba(124,58,237,0.55); }

/* Footer label: icon on top, text below in two lines of 2 chars */
.foot-label {
  display: flex; flex-direction: row; align-items: center;
  font-size: 11px; font-weight: 500; line-height: 1.2;
  color: var(--text-secondary); white-space: nowrap;
}
.foot-label b { font-weight: 500; }
.foot-icon:hover .foot-label { color: var(--text-primary); }
.foot-icon.active .foot-label { color: #7C3AED; }

/* ===== Header ===== */
.header {
  position: fixed; left: 240px; right: 0; top: 0; height: 64px;
  background: var(--bg-header); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; padding: 0 32px; gap: 16px; z-index: 99;
  transition: background 0.35s ease;
}
.menu-toggle {
  display: none; width: 36px; height: 36px; border-radius: 8px;
  border: none; background: transparent; color: var(--text-primary);
  cursor: pointer; font-size: 20px; align-items: center; justify-content: center;
}
.menu-toggle:hover { background: rgba(124,58,237,0.12); }
.search-wrap { flex: 1; max-width: 380px; position: relative; }
.search-wrap input {
  width: 100%; height: 36px; padding: 0 16px 0 36px;
  border-radius: 18px; border: 1px solid var(--border-color);
  background: var(--bg-input); color: var(--text-primary);
  font-size: 13px; outline: none; font-family: inherit;
  transition: border-color 0.3s, background 0.35s ease, color 0.35s ease;
}
.search-wrap input:focus { border-color: rgba(124,58,237,0.5); }
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap .s-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px; pointer-events: none;
}
.h-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.h-btn {
  width: 36px; height: 36px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-size: 17px; transition: all 0.2s; position: relative; display: flex;
  align-items: center; justify-content: center;
}
.h-btn:hover { background: rgba(124,58,237,0.12); color: var(--text-primary); }
.h-btn .h-dot {
  position: absolute; top: 6px; right: 6px; width: 6px; height: 6px;
  border-radius: 50%; background: #F87171;
}
.h-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; margin-left: 8px;
}
.header .h-divider { width: 1px; height: 24px; background: var(--border-color); }

/* ===== Main ===== */
.main { margin-left: 240px; padding-top: 64px; }
.main-content { max-width: 1280px; margin: 0 auto; }

/* ===== Footer ===== */
.footer {
  padding: 48px 48px 24px; border-top: 1px solid var(--border-color);
  margin-top: 48px; transition: border-color 0.35s ease;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.f-brand .f-title {
  font-size: 18px; font-weight: 700; margin-bottom: 8px; display: block;
  background: linear-gradient(135deg, var(--text-link), var(--text-link-hover));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.f-brand .f-title::before {
  content: ""; display: inline-block; width: 13px; height: 13px;
  border: 1.5px solid var(--text-link); border-radius: 50%;
  margin-right: 8px; vertical-align: -1px;
}
.f-brand p { font-size: 13px; color: var(--text-muted); max-width: 280px; line-height: 1.7; }
.f-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 14px; color: var(--text-primary); }
.f-col a { display: block; padding: 4px 0; font-size: 13px; color: var(--text-muted); }
.f-col a:hover { color: var(--text-link); }
.f-bottom {
  margin-top: 32px; padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted);
}
.f-links { display: flex; gap: 20px; }

/* ===== Drawer ===== */
.drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; left: 0; top: 0; bottom: 0; width: 280px;
  background: var(--bg-secondary); z-index: 201;
  transform: translateX(-100%); overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), background 0.35s ease;
  border-right: 1px solid var(--border-color);
}
.drawer.open { transform: translateX(0); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .header { left: 0; }
  .main { margin-left: 0; }
  .menu-toggle { display: flex; }
  .hero { padding: 40px 24px 32px; }
  .section { padding: 32px 24px; }
  .announce-bar { margin: 0 24px; }
  .stats-row { margin: 0 24px; grid-template-columns: repeat(2,1fr); padding: 24px; }
  .steps-grid { grid-template-columns: repeat(2,1fr); }
  .audience-grid { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
  .cta-banner { margin: 0 24px; padding: 32px 24px; }
  .footer { padding: 32px 24px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 16px 24px; }
  .section { padding: 24px 16px; }
  .announce-bar { margin: 0 16px; }
  .stats-row { margin: 0 16px; padding: 20px; }
  .cta-banner { margin: 0 16px; padding: 28px 16px; }
  .cta-banner h2 { font-size: 20px; }
  .footer { padding: 24px 16px 16px; }
  .security-grid { grid-template-columns: 1fr; }
}
