:root, [data-theme="light"] {
      --bg-canvas: #F2F4F7;
      --bg-surface: #FFFFFF;
      --bg-elevated: #F8FAFC;
      --bg-hover: #EDF2F7;
      --bg-input: #F1F5F9;
      --text-primary: #0F172A;
      --text-secondary: #475569;
      --text-muted: #64748B;
      --border-color: #E2E8F0;
      --brand-primary: #FF4500;
      --brand-hover: #E03D00;
      --brand-light: rgba(255, 69, 0, 0.1);
      --accent-blue: #2563EB;
      --accent-blue-light: rgba(37, 99, 235, 0.1);
      --star-gold: #F59E0B;
      --upvote: #FF4500;
      --downvote: #6366F1;
      --success: #10B981;
      --danger: #EF4444;
      --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
      --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
      --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.16);
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-pill: 9999px;
      --header-h: 60px;
    }

    [data-theme="dark"] {
      --bg-canvas: #0B0F17;
      --bg-surface: #151C28;
      --bg-elevated: #1E293B;
      --bg-hover: #263349;
      --bg-input: #1E293B;
      --text-primary: #F8FAFC;
      --text-secondary: #CBD5E1;
      --text-muted: #94A3B8;
      --border-color: #293548;
      --brand-primary: #FF571A;
      --brand-hover: #FF6D38;
      --brand-light: rgba(255, 87, 26, 0.15);
      --accent-blue: #3B82F6;
      --accent-blue-light: rgba(59, 130, 246, 0.15);
      --star-gold: #FBBF24;
      --upvote: #FF571A;
      --downvote: #818CF8;
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
      --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
      --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.65);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
      background-color: var(--bg-canvas);
      color: var(--text-primary);
      line-height: 1.5;
      min-height: 100vh;
      transition: background-color 0.2s ease, color 0.2s ease;
      overflow-x: hidden;
    }

    button, input, select, textarea {
      font-family: inherit;
      font-size: inherit;
      color: inherit;
    }

    button {
      cursor: pointer;
      border: none;
      background: none;
    }

    /* TOP NAVBAR */
    .navbar {
      position: sticky;
      top: 0;
      z-index: 200;
      height: var(--header-h);
      background: var(--bg-surface);
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      gap: 8px;
      box-shadow: var(--shadow-sm);
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .hamburger-btn {
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.35rem;
      color: var(--text-primary);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      transition: all 0.15s ease;
    }

    .hamburger-btn:hover {
      background: var(--bg-hover);
      border-color: var(--brand-primary);
      color: var(--brand-primary);
    }

    .brand-logo {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
      padding: 4px 8px 4px 4px;
      border-radius: var(--radius-pill);
      transition: background 0.15s ease;
      cursor: pointer;
    }

    .brand-logo:hover {
      background: var(--bg-hover);
    }

    .logo-badge {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      background: linear-gradient(135deg, #FF4500 0%, #FF8C00 100%);
      color: #FFFFFF;
      font-weight: 800;
      font-size: 0.95rem;
      display: flex;
      align-items: center;
      justify-content: center;
      letter-spacing: -0.5px;
      box-shadow: 0 3px 8px rgba(255, 69, 0, 0.35);
      flex-shrink: 0;
    }

    .brand-text {
      display: flex;
      flex-direction: column;
      text-align: left;
    }

    .brand-title {
      font-weight: 800;
      font-size: 1rem;
      line-height: 1.15;
      color: var(--text-primary);
    }

    .brand-sub {
      font-size: 0.7rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* SEARCH + MINI FILTER BAR */
    .nav-center {
      flex: 1;
      max-width: 660px;
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .search-wrapper {
      flex: 1;
      position: relative;
      display: flex;
      align-items: center;
      min-width: 0;
    }

    .search-icon {
      position: absolute;
      left: 12px;
      color: var(--text-muted);
      pointer-events: none;
      font-size: 0.9rem;
    }

    .search-input {
      width: 100%;
      height: 40px;
      padding: 0 32px 0 36px;
      border-radius: var(--radius-pill);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      font-size: 0.88rem;
      color: var(--text-primary);
      transition: all 0.15s ease;
    }

    .search-input:focus {
      outline: none;
      background: var(--bg-surface);
      border-color: var(--brand-primary);
      box-shadow: 0 0 0 3px var(--brand-light);
    }

    .clear-search-btn {
      position: absolute;
      right: 10px;
      color: var(--text-muted);
      font-size: 0.85rem;
      display: none;
    }

    /* COMPACT MINI FILTER BUTTON + POPUP */
    .filter-mini-wrap {
      position: relative;
      flex-shrink: 0;
    }

    .filter-mini-btn {
      height: 40px;
      padding: 0 12px;
      border-radius: var(--radius-pill);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s ease;
      white-space: nowrap;
    }

    .filter-mini-btn:hover, .filter-mini-btn.active {
      border-color: var(--brand-primary);
      background: var(--brand-light);
      color: var(--brand-primary);
    }

    .filter-dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 240px;
      max-height: 360px;
      overflow-y: auto;
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      padding: 6px;
      display: none;
      z-index: 300;
    }

    .filter-dropdown-menu.open {
      display: block;
    }

    .filter-dropdown-item {
      width: 100%;
      text-align: left;
      padding: 8px 10px;
      border-radius: var(--radius-sm);
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: background 0.12s ease;
    }

    .filter-dropdown-item:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    .filter-dropdown-item.active {
      background: var(--brand-light);
      color: var(--brand-primary);
      font-weight: 700;
    }

    /* NAV RIGHT */
    .nav-right {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .icon-btn {
      position: relative;
      width: 40px;
      height: 40px;
      border-radius: var(--radius-pill);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      color: var(--text-primary);
      transition: all 0.15s ease;
    }

    .icon-btn:hover {
      background: var(--bg-hover);
      border-color: var(--brand-primary);
    }

    .badge-count {
      position: absolute;
      top: -3px;
      right: -3px;
      background: var(--brand-primary);
      color: #FFF;
      font-size: 0.68rem;
      font-weight: 800;
      min-width: 18px;
      height: 18px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      border: 2px solid var(--bg-surface);
    }

    .btn-primary {
      background: var(--brand-primary);
      color: #FFFFFF;
      font-weight: 700;
      font-size: 0.85rem;
      padding: 0 14px;
      height: 40px;
      border-radius: var(--radius-pill);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s ease, transform 0.1s ease;
      box-shadow: 0 2px 6px rgba(255, 69, 0, 0.25);
      white-space: nowrap;
    }

    .btn-primary:hover {
      background: var(--brand-hover);
    }

    .btn-secondary {
      background: var(--bg-input);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      font-weight: 600;
      font-size: 0.85rem;
      padding: 0 14px;
      height: 40px;
      border-radius: var(--radius-pill);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s ease;
      white-space: nowrap;
    }

    .btn-secondary:hover {
      background: var(--bg-hover);
    }

    .user-pill {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 4px 10px 4px 4px;
      border-radius: var(--radius-pill);
      border: 1px solid var(--border-color);
      background: var(--bg-input);
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .user-pill:hover {
      background: var(--bg-hover);
      border-color: var(--brand-primary);
    }

    .avatar-sm {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      background: var(--brand-primary);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.82rem;
      flex-shrink: 0;
      overflow: hidden;
    }

    .user-pill-info {
      display: flex;
      flex-direction: column;
      text-align: left;
      line-height: 1.15;
    }

    .user-pill-name {
      font-size: 0.8rem;
      font-weight: 700;
      max-width: 110px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .user-pill-handle {
      font-size: 0.68rem;
      color: var(--text-muted);
    }

    /* NOTIFICATION DROPDOWN */
    .notif-wrapper {
      position: relative;
    }

    .notif-dropdown {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: 340px;
      max-height: 440px;
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      display: none;
      flex-direction: column;
      overflow: hidden;
      z-index: 300;
    }

    .notif-dropdown.open {
      display: flex;
    }

    .notif-header {
      padding: 12px 16px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-weight: 700;
      font-size: 0.92rem;
    }

    .notif-actions {
      display: flex;
      gap: 8px;
    }

    .notif-link-btn {
      font-size: 0.75rem;
      color: var(--accent-blue);
      font-weight: 600;
    }

    .notif-list {
      overflow-y: auto;
      max-height: 360px;
      divide-y: 1px solid var(--border-color);
    }

    .notif-item {
      padding: 12px 16px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      gap: 10px;
      align-items: flex-start;
      cursor: pointer;
      transition: background 0.15s ease;
      font-size: 0.84rem;
    }

    .notif-item:hover {
      background: var(--bg-hover);
    }

    .notif-item.unread {
      background: var(--brand-light);
    }

    .notif-icon {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.95rem;
      flex-shrink: 0;
      background: var(--bg-elevated);
    }

    .notif-body {
      flex: 1;
    }

    .notif-time {
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-top: 3px;
    }

    /* SLIDE-OUT DRAWER MENU (WORKS ON MOBILE & DESKTOP HAMBURGER) */
    .drawer-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.55);
      backdrop-filter: blur(2px);
      z-index: 350;
      display: none;
    }

    .drawer-backdrop.open {
      display: block;
    }

    .drawer-menu {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 280px;
      max-width: 85vw;
      background: var(--bg-surface);
      border-right: 1px solid var(--border-color);
      z-index: 360;
      transform: translateX(-100%);
      transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      flex-direction: column;
      padding: 16px;
      overflow-y: auto;
      box-shadow: var(--shadow-lg);
    }

    .drawer-menu.open {
      transform: translateX(0);
    }

    .drawer-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 12px;
    }

    /* MAIN LAYOUT */
    .layout-container {
      max-width: 1280px;
      margin: 0 auto;
      padding: 18px 14px 60px;
      display: grid;
      grid-template-columns: 240px minmax(0, 1fr) 300px;
      gap: 20px;
      align-items: start;
    }

    /* SIDEBAR LEFT */
    .sidebar-left {
      position: sticky;
      top: calc(var(--header-h) + 18px);
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 12px;
      box-shadow: var(--shadow-sm);
      max-height: calc(100vh - var(--header-h) - 36px);
      overflow-y: auto;
    }

    .nav-section-title {
      font-size: 0.72rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      padding: 8px 10px 6px;
    }

    .side-nav-btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 9px 10px;
      border-radius: var(--radius-sm);
      font-size: 0.87rem;
      font-weight: 600;
      color: var(--text-secondary);
      transition: all 0.15s ease;
      text-align: left;
      margin-bottom: 2px;
    }

    .side-nav-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    .side-nav-btn.active {
      background: var(--brand-light);
      color: var(--brand-primary);
      font-weight: 700;
    }

    .tag-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      margin-right: 8px;
    }

    /* FEED CENTER */
    .feed-column {
      display: flex;
      flex-direction: column;
      gap: 14px;
      min-width: 0;
    }

    /* SYNC STATUS BANNER */
    .sync-bar {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 10px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      font-size: 0.8rem;
      box-shadow: var(--shadow-sm);
    }

    .sync-status-left {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text-secondary);
      font-weight: 600;
    }

    .sync-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    }

    /* QUICK CREATE BAR */
    .create-post-bar {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 12px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: var(--shadow-sm);
    }

    .create-fake-input {
      flex: 1;
      height: 40px;
      border-radius: var(--radius-pill);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      padding: 0 16px;
      display: flex;
      align-items: center;
      color: var(--text-muted);
      font-size: 0.88rem;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .create-fake-input:hover {
      border-color: var(--brand-primary);
      background: var(--bg-surface);
    }

    /* SORT & ACTIVE TAG BAR */
    .filter-strip {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 10px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      box-shadow: var(--shadow-sm);
    }

    .sort-tabs {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .sort-tab {
      padding: 6px 12px;
      border-radius: var(--radius-pill);
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text-secondary);
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .sort-tab:hover {
      background: var(--bg-hover);
    }

    .sort-tab.active {
      background: var(--brand-primary);
      color: #FFFFFF;
    }

    /* POST CARD */
    .post-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      display: flex;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .post-card:hover {
      border-color: #CBD5E1;
      box-shadow: var(--shadow-md);
    }

    .vote-column {
      width: 48px;
      background: var(--bg-elevated);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 12px 4px;
      gap: 4px;
      border-right: 1px solid var(--border-color);
      flex-shrink: 0;
    }

    .vote-btn {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      color: var(--text-muted);
      transition: all 0.15s ease;
    }

    .vote-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    .vote-btn.upvoted {
      color: var(--upvote);
      background: var(--brand-light);
    }

    .vote-btn.downvoted {
      color: var(--downvote);
      background: rgba(99, 102, 241, 0.15);
    }

    .vote-score {
      font-weight: 800;
      font-size: 0.85rem;
      color: var(--text-primary);
    }

    .post-main {
      flex: 1;
      padding: 14px 16px;
      min-width: 0;
    }

    .post-meta {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 8px;
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .post-author {
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 700;
      color: var(--text-primary);
    }

    .author-avatar-xs {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--brand-primary);
      color: #fff;
      font-size: 0.68rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .author-avatar-xs img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .subject-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 10px;
      border-radius: var(--radius-pill);
      font-size: 0.73rem;
      font-weight: 700;
      cursor: pointer;
    }

    .post-title {
      font-size: 1.08rem;
      font-weight: 800;
      color: var(--text-primary);
      margin-bottom: 8px;
      line-height: 1.35;
      word-break: break-word;
    }

    .post-body {
      font-size: 0.92rem;
      color: var(--text-secondary);
      white-space: pre-line;
      margin-bottom: 12px;
      word-break: break-word;
    }

    .post-media-container {
      margin-bottom: 12px;
      border-radius: var(--radius-sm);
      overflow: hidden;
      border: 1px solid var(--border-color);
      background: #000;
      max-height: 520px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .post-media-container img,
    .post-media-container video {
      max-width: 100%;
      max-height: 500px;
      object-fit: contain;
      display: block;
    }

    /* 0-5 STAR RATING BAR + ACTIONS */
    .post-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--border-color);
    }

    .footer-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .action-chip {
      padding: 6px 12px;
      border-radius: var(--radius-pill);
      background: var(--bg-input);
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-secondary);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s ease;
    }

    .action-chip:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    .star-rating-box {
      display: flex;
      align-items: center;
      gap: 6px;
      background: var(--bg-elevated);
      padding: 4px 10px;
      border-radius: var(--radius-pill);
      border: 1px solid var(--border-color);
    }

    .star-btn {
      font-size: 1rem;
      color: #CBD5E1;
      transition: transform 0.1s ease, color 0.1s ease;
      padding: 0 1px;
    }

    .star-btn.filled {
      color: var(--star-gold);
    }

    .star-btn:hover {
      transform: scale(1.2);
    }

    .zero-star-btn {
      font-size: 0.7rem;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 6px;
      background: var(--bg-input);
      color: var(--text-muted);
      border: 1px solid var(--border-color);
    }

    .zero-star-btn.active {
      background: var(--brand-light);
      color: var(--brand-primary);
      border-color: var(--brand-primary);
    }

    .star-avg-label {
      font-size: 0.76rem;
      font-weight: 700;
      color: var(--text-secondary);
      margin-left: 2px;
    }

    /* COMMENTS SECTION */
    .comments-section {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px dashed var(--border-color);
      display: none;
    }

    .comments-section.open {
      display: block;
    }

    .comment-form {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }

    .comment-input {
      flex: 1;
      padding: 8px 12px;
      border-radius: var(--radius-pill);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      font-size: 0.84rem;
    }

    .comment-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .comment-item {
      background: var(--bg-elevated);
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      font-size: 0.84rem;
    }

    .comment-item-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 3px;
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .comment-author {
      font-weight: 700;
      color: var(--text-primary);
    }

    /* RIGHT SIDEBAR: PROFILE CARD ONLY */
    .sidebar-right {
      position: sticky;
      top: calc(var(--header-h) + 18px);
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .side-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }

    .profile-cover {
      height: 85px;
      background: linear-gradient(135deg, #FF4500 0%, #FF8C00 100%);
      background-size: cover;
      background-position: center;
      position: relative;
    }

    .profile-card-body {
      padding: 0 16px 16px;
      position: relative;
    }

    .profile-avatar-lg {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: 4px solid var(--bg-surface);
      background: var(--brand-primary);
      color: #fff;
      font-size: 1.4rem;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: -32px;
      margin-bottom: 8px;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }

    .profile-avatar-lg img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* MODALS */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(3px);
      z-index: 400;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      overflow-y: auto;
    }

    .modal-backdrop.open {
      display: flex;
    }

    .modal-box {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 520px;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      max-height: 92vh;
      display: flex;
      flex-direction: column;
    }

    .modal-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-weight: 800;
      font-size: 1.05rem;
    }

    .modal-body {
      padding: 20px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-label {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text-secondary);
    }

    .form-input, .form-textarea, .form-select {
      width: 100%;
      padding: 10px 14px;
      border-radius: var(--radius-sm);
      background: var(--bg-input);
      border: 1px solid var(--border-color);
      font-size: 0.9rem;
      color: var(--text-primary);
    }

    .form-textarea {
      min-height: 110px;
      resize: vertical;
    }

    .form-input:focus, .form-textarea:focus, .form-select:focus {
      outline: none;
      border-color: var(--brand-primary);
      background: var(--bg-surface);
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      background: var(--bg-input);
      padding: 4px;
      border-radius: var(--radius-sm);
    }

    .auth-tab-btn {
      padding: 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.86rem;
      color: var(--text-secondary);
    }

    .auth-tab-btn.active {
      background: var(--bg-surface);
      color: var(--brand-primary);
      box-shadow: var(--shadow-sm);
    }

    .upload-dropzone {
      border: 2px dashed var(--border-color);
      border-radius: var(--radius-md);
      padding: 18px;
      text-align: center;
      cursor: pointer;
      transition: all 0.15s ease;
      background: var(--bg-elevated);
    }

    .upload-dropzone:hover {
      border-color: var(--brand-primary);
      background: var(--brand-light);
    }

    .toast-container {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 600;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .toast {
      background: var(--text-primary);
      color: var(--bg-surface);
      padding: 12px 16px;
      border-radius: var(--radius-sm);
      font-size: 0.86rem;
      font-weight: 600;
      box-shadow: var(--shadow-lg);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .empty-state {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 40px 20px;
      text-align: center;
    }

    /* RESPONSIVE MOBILE RULES */
    @media (max-width: 1024px) {
      .layout-container {
        grid-template-columns: 210px minmax(0, 1fr);
      }
      .sidebar-right {
        display: none;
      }
    }

    @media (max-width: 768px) {
      .layout-container {
        grid-template-columns: 1fr;
        padding: 12px 10px 60px;
      }
      .sidebar-left {
        display: none;
      }
      .brand-text {
        display: none;
      }
      .filter-mini-label {
        display: none;
      }
      .filter-mini-btn {
        padding: 0 10px;
        width: 40px;
        justify-content: center;
      }
      .hide-mobile {
        display: none !important;
      }
      .user-pill-info {
        display: none;
      }
      .user-pill {
        padding: 4px;
      }
    }