/* ==========================================================================
   7CUTS DESIGN SYSTEM & CORE FOUNDATIONAL STYLES
   ========================================================================== */

/* DESIGN TOKENS & ROOT VARIABLES */
:root {
  /* Cinematic Color Palette */
  --bg-primary: #0a0b0e;
  --bg-secondary: #12141a;
  --bg-elevated: #1a1d26;
  --bg-surface: #222634;
  --bg-glass: rgba(18, 20, 26, 0.75);
  --bg-glass-heavy: rgba(10, 11, 14, 0.88);
  --bg-card: rgba(26, 29, 38, 0.6);
  --bg-card-hover: rgba(34, 38, 52, 0.85);

  /* Accent & Cinema Neon Colors */
  --accent-red: #ff2a55;
  --accent-red-hover: #ff476e;
  --accent-red-glow: rgba(255, 42, 85, 0.35);
  --accent-cyan: #00e5ff;
  --accent-amber: #ffb300;
  --accent-violet: #8a2be2;

  /* Typography & Neutral Spectrum */
  --text-primary: #ffffff;
  --text-secondary: #a0a6b5;
  --text-muted: #656b7c;
  --text-disabled: #414656;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(255, 42, 85, 0.5);

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 25px var(--accent-red-glow);

  /* Layout Dimensions */
  --header-height: 70px;
  --mobile-nav-height: 64px;
  --sidebar-width: 280px;
  --content-max-width: 1560px;
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* THEME: MIDNIGHT CYBERPUNK */
body.theme-midnight {
  --bg-primary: #080c14;
  --bg-secondary: #0d1527;
  --bg-elevated: #131f38;
  --bg-surface: #1a2a4c;
  --accent-red: #00e5ff;
  --accent-red-hover: #33ebff;
  --accent-red-glow: rgba(0, 229, 255, 0.35);
}

/* THEME: OLED TRUE BLACK */
body.theme-oled {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-elevated: #101010;
  --bg-surface: #181818;
  --border-subtle: rgba(255, 255, 255, 0.12);
}

/* RESET & BASE SYSTEM */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* TYPOGRAPHY STANDARDS */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* SVG ICON SYSTEM */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 28px;
  height: 28px;
}

/* UTILITY CLASSES */
.hide {
  display: none !important;
}

.w-100 {
  width: 100%;
}

.title-with-accent {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accent-bar {
  width: 4px;
  height: 22px;
  background: var(--accent-red);
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   PRIMARY APP HEADER & NAVIGATION BAR
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-logo {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}

.logo-accent {
  color: var(--accent-red);
  font-size: 1.75rem;
  line-height: 1;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-surface);
  font-weight: 600;
}

/* HEADER CENTER & SEARCH BAR */
.header-center {
  flex: 0 1 540px;
  margin: 0 20px;
}

.search-bar-wrapper {
  position: relative;
  width: 100%;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-full);
  padding: 2px 8px;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.search-form:focus-within {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.search-submit-btn {
  padding: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans-fast);
}

.search-form:focus-within .search-submit-btn {
  color: var(--accent-red);
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 6px;
  color: var(--text-primary);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.clear-search-btn {
  padding: 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* HEADER RIGHT & USER POPUPS */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-full);
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.notification-dropdown-wrapper {
  position: relative;
}

.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-primary);
}

/* AVATAR BUBBLE */
.profile-avatar-btn {
  padding: 0;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-full);
  background: linear-gradient(135deg, var(--accent-red), #990033);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.profile-avatar-btn:hover .avatar-circle {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   PAGE LAYOUT MAIN CONTAINER
   ========================================================================== */
.page-content {
  flex: 1 0 auto;
  margin-top: var(--header-height);
  padding: 24px 32px 64px;
  max-width: var(--content-max-width);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* SECTION CONTAINERS */
.content-section-container {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-red);
  transition: opacity var(--trans-fast);
}

.section-link:hover {
  opacity: 0.85;
}

/* ==========================================================================
   BUTTONS & FORM ELEMENTS
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-red);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-glow);
  transition: all var(--trans-fast);
}

.btn-primary:hover {
  background: var(--accent-red-hover);
  transform: translateY(-2px);
}

.btn-primary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 9px 20px;
  border-radius: var(--border-radius-md);
  transition: all var(--trans-fast);
}

.btn-primary-outline:hover {
  background: var(--accent-red);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(10px);
  transition: all var(--trans-fast);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-strong);
}

.btn-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
}

.btn-text:hover {
  color: var(--text-primary);
}

.btn-text-danger {
  color: var(--accent-red);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--trans-fast);
}

.btn-text-danger:hover {
  opacity: 0.8;
}

/* CUSTOM SELECT */
.custom-select {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
  padding: 8px 14px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans-fast);
}

.custom-select:focus {
  border-color: var(--accent-red);
}

/* ==========================================================================
   FOOTER COMPONENT
   ========================================================================== */
.app-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 32px 32px;
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand-col {
  flex: 1 1 320px;
}

.footer-tagline {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-copyright {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links-group {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--trans-fast);
}

.footer-col a:hover {
  color: var(--accent-red);
}

/* ==========================================================================
   MOBILE SIDEBAR DRAWER
   ========================================================================== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-smooth);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform var(--trans-smooth);
  display: flex;
  flex-direction: column;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-link {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.side-link:hover, .side-link.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.side-link.active {
  color: var(--accent-red);
  font-weight: 600;
}

.mobile-menu-toggle {
  display: none;
}