:root {
      --bg: #09090b;
      --panel: #101114;
      --line: rgba(255,255,255,0.08);
      --line-2: rgba(255,255,255,0.12);
      --text: #f3f3f4;
      --muted: #9a9aa0;
      --shadow: 0 10px 40px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.02);
      --sidebar-w: 244px;
      --content-pad-x: 18px;
      --content-pad-y: 16px;
      --block-gap: 14px;
      --nav-height: 38px;
      --search-h: 44px;
      --header-search-h: 44px;
      --profile-h: 66px;
      --radius: 20px;
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #070708;
      color: var(--text);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: -0.02em;
    }

    body { padding: 0; }

    .view-hidden { display: none !important; }

    .app-shell {
      width: 100vw;
      height: 100dvh;
      display: grid;
      grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
        linear-gradient(90deg, rgba(255,255,255,0.02), transparent 14%, transparent 86%, rgba(255,255,255,0.02)),
        #0c0c0e;
      overflow: hidden;
      position: relative;
    }

    .app-shell::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.02), transparent 18%),
        radial-gradient(circle at 80% 10%, rgba(255,255,255,0.02), transparent 22%),
        radial-gradient(circle at 55% 70%, rgba(255,255,255,0.018), transparent 22%);
      pointer-events: none;
      opacity: 0.45;
    }

    .sidebar,
    .content {
      min-width: 0;
      min-height: 0;
      position: relative;
      z-index: 1;
    }

    .sidebar {
      padding: 14px 10px;
      border-right: 1px solid var(--line);
      background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
      display: flex;
      flex-direction: column;
      gap: 10px;
      overflow: hidden;
      opacity: 0;
      transform: translateY(18px);
      filter: blur(10px);
      transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
    }

    .content {
      padding: var(--content-pad-y) var(--content-pad-x);
      display: flex;
      flex-direction: column;
      gap: var(--block-gap);
      overflow-y: auto;
      overflow-x: hidden;
    }

    body.app-ready .sidebar,
    body.app-ready .content-header,
    body.app-ready #homeView > .home-hero,
    body.app-ready #homeView > .home-metrics,
    body.app-ready #homeView > .home-charts,
    body.app-ready #adLibraryView > .adlib-topbar,
    body.app-ready #adLibraryView > .adlib-controls,
    body.app-ready #adLibraryView > .adlib-resultsbar,
    body.app-ready #adLibraryView > .adlib-grid {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }

    .surface {
      background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
      border: 1px solid var(--line-2);
      box-shadow: var(--shadow);
      border-radius: var(--radius);
    }

    .profile-card {
      min-height: var(--profile-h);
      padding: 12px;
      display: flex;
      align-items: center;
    }

    .profile-card,
    .hero-card,
    .signal-card,
    .metric-card,
    .home-chart-card,
    .adlib-topbar,
    .adlib-controls,
    .ad-card,
    .welcome-card,
    .mobile-unavailable-card,
    .spotlight-shell {
      background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
      border: 1px solid var(--line-2);
      box-shadow: var(--shadow);
    }

    .profile-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .avatar,
    .loading-logo,
    .welcome-logo,
    .mobile-unavailable-logo {
      background: rgba(255,255,255,0.98);
      display: grid;
      place-items: center;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 20px 50px rgba(0,0,0,0.24);
      overflow: hidden;
    }

    .avatar {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      flex: 0 0 auto;
    }

    .avatar svg,
    .loading-logo svg,
    .welcome-logo svg,
    .mobile-unavailable-logo svg { display: block; }
    .avatar svg { width: 24px; height: 24px; }

    .profile-meta h3 {
      margin: 0;
      font-size: 16px;
      line-height: 1.05;
      color: #fff;
      font-weight: 550;
    }

    .search-box {
      border-radius: 999px;
      height: var(--search-h);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      gap: 10px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .search-left {
      display: flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
      flex: 1;
    }

    .sidebar-search-input,
    .spotlight-input {
      flex: 1;
      min-width: 0;
      border: 0;
      outline: 0;
      background: transparent;
      color: rgba(255,255,255,0.92);
      font: inherit;
      font-size: 14px;
      line-height: 1;
      padding: 0;
    }

    .search-shortcut {
      color: rgba(255,255,255,0.42);
      font-size: 12px;
      line-height: 1;
      padding: 5px 8px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.06);
      background: rgba(255,255,255,0.02);
      flex: 0 0 auto;
    }

    .sidebar-section {
      padding: 10px 4px 0;
      border-bottom: 1px solid var(--line);
      padding-bottom: 18px;
      flex: 0 0 auto;
    }

    .section-label,
    .section-header-left {
      font-size: 15px;
      color: #d8d8da;
    }

    .section-label { margin: 0 0 12px; }

    .nav-list,
    .project-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .nav-item,
    .sub-item,
    .project-item {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: var(--nav-height);
      padding: 0 12px;
      border-radius: 12px;
      color: #d6d6d8;
      cursor: pointer;
      transition: background-color 160ms ease;
    }

    .nav-item:hover,
    .sub-item:hover,
    .project-item:hover { background: rgba(255,255,255,0.04); }

    .nav-item.active {
      background: #efefef;
      color: #121214;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
    }

    .nav-item.active svg,
    .nav-item.active span { color: #151517; stroke: #151517; }

    .nav-icon,
    .mini-icon,
    .spotlight-icon {
      width: 17px;
      height: 17px;
      color: #cfcfd1;
      flex: 0 0 auto;
      stroke-width: 1.9;
    }

    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 0 8px;
    }

    .section-header-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .section-tools {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .section-tool {
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      color: #d0d0d2;
      border-radius: 6px;
      cursor: pointer;
    }

    .section-tool:hover { background: rgba(255,255,255,0.05); }

    .project-dot {
      width: 18px;
      height: 18px;
      border-radius: 6px;
      display: inline-grid;
      place-items: center;
      color: white;
      font-size: 11px;
      line-height: 1;
      flex: 0 0 auto;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    }

    .green { background: linear-gradient(180deg, #94e432, #4ba51d); }
    .orange { background: linear-gradient(180deg, #ffcc6f, #ed862b); }
    .blue { background: linear-gradient(180deg, #74b0ff, #3d75f8); }
    .pink { background: linear-gradient(180deg, #ff8db1, #e44f86); }

    .loose-actions {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: auto;
      padding-top: 2px;
    }

    .member-card,
    .bottom-user {
      border-radius: 18px;
      overflow: hidden;
      position: relative;
    }

    .member-card {
      margin-top: 8px;
      padding: 15px;
      background:
        radial-gradient(circle at top left, rgba(255, 233, 176, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(255, 226, 155, 0.14), rgba(191, 132, 44, 0.12) 52%, rgba(92, 62, 24, 0.10));
      border: 1px solid rgba(255, 214, 120, 0.20);
      box-shadow: 0 10px 24px rgba(120, 76, 15, 0.12), inset 0 1px 0 rgba(255, 244, 205, 0.14);
    }

    .member-eyebrow {
      margin: 0 0 10px;
      font-size: 12px;
      line-height: 1.3;
      color: rgba(255, 246, 224, 0.98);
      max-width: 170px;
      font-weight: 500;
    }

    .member-profile,
    .bottom-user {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .member-avatar,
    .bottom-user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      color: #ffffff;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.02em;
      flex: 0 0 auto;
    }

    .member-avatar {
      background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
      border: 1px solid rgba(255,255,255,0.12);
    }

    .bottom-user {
      margin-top: 8px;
      min-height: 50px;
      padding: 10px 12px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .bottom-user-avatar {
      background: linear-gradient(180deg, #2e3138, #1a1c20);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .member-name,
    .bottom-user-name {
      margin: 0;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 500;
    }

    .member-name { color: #f8f5ef; }
    .bottom-user-name { color: #f3f3f4; }
    .member-rank,
    .bottom-user-rank,
    .spotlight-subtitle { margin: 3px 0 0; font-size: 10px; line-height: 1.2; }
    .member-rank { color: rgba(255, 238, 205, 0.66); }
    .bottom-user-rank { color: rgba(255,255,255,0.50); }
    .spotlight-subtitle { color: rgba(255,255,255,0.5); }

    .content-header {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 12px;
      opacity: 0;
      transform: translateY(16px);
      filter: blur(10px);
      transition: opacity 760ms cubic-bezier(0.22, 1, 0.36, 1) 80ms, transform 760ms cubic-bezier(0.22, 1, 0.36, 1) 80ms, filter 760ms ease 80ms;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      padding-top: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .content.home-mode .header-actions { display: none; }
    .content.adlib-mode .header-actions { display: flex; }

    .top-search,
    .top-btn {
      height: var(--header-search-h);
      color: #f1f1f3;
      cursor: pointer;
      appearance: none;
      outline: none;
      border: 1px solid var(--line-2);
      background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
      box-shadow: var(--shadow);
    }

    .top-search {
      width: 260px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
    }

    .top-btn {
      min-width: 94px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-size: 14px;
    }

    .square-btn {
      width: var(--header-search-h);
      min-width: var(--header-search-h);
      padding: 0;
    }

    .home-shell {
      display: flex;
      flex-direction: column;
      gap: var(--block-gap);
      width: 100%;
    }

    .home-hero,
    .home-metrics,
    .home-charts {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: var(--block-gap);
      width: 100%;
      align-items: stretch;
      opacity: 0;
      transform: translateY(22px) scale(0.985);
      filter: blur(12px);
      transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1), transform 820ms cubic-bezier(0.22, 1, 0.36, 1), filter 820ms ease;
    }

    .home-metrics { transition-delay: 120ms; }
    .home-charts { transition-delay: 200ms; }

    .hero-card,
    .signal-card,
    .metric-card,
    .home-chart-card {
      border-radius: var(--radius);
    }

    .hero-card {
      grid-column: span 3;
      padding: 20px;
      min-height: 290px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .signal-card {
      grid-column: span 1;
      min-height: 290px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .metric-card {
      min-height: 164px;
      padding: 18px;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      color: rgba(255,255,255,0.76);
      font-size: 12px;
      width: fit-content;
    }

    .hero-badge-icon,
    .metric-icon {
      width: 18px;
      height: 18px;
      border-radius: 999px;
      display: inline-grid;
      place-items: center;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.08);
      color: #f5f5f6;
      font-size: 10px;
      line-height: 1;
      flex: 0 0 auto;
    }

    .metric-icon {
      width: 30px;
      height: 30px;
      border-radius: 10px;
      background: rgba(255,255,255,0.05);
    }

    .hero-title {
      margin: 14px 0 8px;
      font-size: 32px;
      line-height: 1.02;
      letter-spacing: -0.045em;
      color: #f7f7f8;
      max-width: 13ch;
      font-weight: 430;
    }

    .hero-copy,
    .signal-copy,
    .metric-copy,
    .home-chart-copy,
    .adlib-topbar-copy,
    .mobile-unavailable-copy,
    .welcome-copy {
      color: rgba(255,255,255,0.62);
      line-height: 1.55;
    }

    .hero-copy {
      margin: 0;
      max-width: 52ch;
      font-size: 13px;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 22px;
    }

    .hero-btn,
    .hero-btn-secondary,
    .welcome-btn,
    .welcome-btn-secondary {
      height: 42px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.1);
      padding: 0 18px;
      background: rgba(255,255,255,0.04);
      color: #f6f6f7;
      font: inherit;
      font-size: 13px;
      cursor: pointer;
      white-space: nowrap;
    }

    .hero-btn,
    .welcome-btn {
      background: #f3f3f4;
      color: #111214;
      border-color: transparent;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-top: 18px;
    }

    .hero-mini {
      min-height: 84px;
      border-radius: 16px;
      padding: 12px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.06);
    }

    .hero-mini-label,
    .metric-label,
    .signal-label {
      margin: 0;
      color: rgba(255,255,255,0.46);
      font-size: 11px;
    }

    .hero-mini-value,
    .metric-value {
      margin: 10px 0 6px;
      color: #f6f6f7;
      font-size: 26px;
      line-height: 1;
      letter-spacing: -0.05em;
    }

    .hero-mini-copy,
    .metric-copy,
    .signal-copy {
      margin: 0;
      font-size: 12px;
    }

    .signal-score {
      margin: 8px 0 0;
      font-size: 58px;
      line-height: 0.9;
      letter-spacing: -0.08em;
      color: #f7f7f8;
    }

    .metric-head {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .home-chart-card {
      padding: 16px;
      min-height: 270px;
    }

    .home-chart-card.primary { grid-column: span 3; }
    .home-chart-card.secondary { grid-column: span 1; }

    .home-chart-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .home-chart-title,
    .adlib-topbar-title {
      margin: 0;
      color: #f6f6f7;
      letter-spacing: -0.03em;
    }

    .home-chart-title { font-size: 16px; }
    .adlib-topbar-title { font-size: 24px; line-height: 1; }
    .home-chart-copy,
    .adlib-topbar-copy { margin: 6px 0 0; font-size: 12px; }
    .adlib-topbar-copy { font-size: 13px; max-width: 54ch; }

    .home-chart-wrap {
      position: relative;
      height: 206px;
      border-radius: 18px;
      overflow: hidden;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.06);
    }

    .home-chart-wrap canvas { width: 100%; height: 100%; display: block; }

    .adlib-shell {
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .adlib-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 16px;
      opacity: 0;
      transform: translateY(22px) scale(0.985);
      filter: blur(12px);
      transition: opacity 780ms cubic-bezier(0.22, 1, 0.36, 1), transform 780ms cubic-bezier(0.22, 1, 0.36, 1), filter 780ms ease;
    }

    .adlib-toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px;
      border-radius: 16px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.08);
      flex: 0 0 auto;
    }

    .adlib-toggle-btn {
      height: 38px;
      padding: 0 16px;
      border-radius: 12px;
      border: 0;
      background: transparent;
      color: rgba(255,255,255,0.66);
      font: inherit;
      font-size: 13px;
      cursor: pointer;
    }

    .adlib-toggle-btn.active {
      background: rgba(255,255,255,0.1);
      color: #f7f7f8;
    }

    .adlib-controls {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 16px;
      opacity: 0;
      transform: translateY(24px) scale(0.985);
      filter: blur(12px);
      transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1) 80ms, transform 820ms cubic-bezier(0.22, 1, 0.36, 1) 80ms, filter 820ms ease 80ms;
    }

    .adlib-row {
      display: grid;
      gap: 12px;
    }

    .adlib-row.search { grid-template-columns: 110px 170px minmax(0, 1fr) 64px; }
    .adlib-row.platforms { grid-template-columns: 110px repeat(6, minmax(0, 1fr)); }
    .adlib-row.filters,
    .adlib-row.filters.second,
    .adlib-row.filters.third { grid-template-columns: 110px repeat(4, minmax(0, 1fr)); }

    .adlib-label {
      display: flex;
      align-items: center;
      min-height: 44px;
      color: rgba(255,255,255,0.72);
      font-size: 14px;
    }

    .adlib-input,
    .adlib-select,
    .adlib-search-btn,
    .platform-pill {
      min-height: 44px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.025);
      color: #f4f4f5;
      font: inherit;
      font-size: 14px;
    }

    .adlib-select { position: relative; padding: 0; }

    .adlib-select select {
      width: 100%;
      height: 100%;
      appearance: none;
      border: 0;
      outline: 0;
      background: transparent;
      color: #f4f4f5;
      font: inherit;
      font-size: 14px;
      padding: 0 42px 0 14px;
      cursor: pointer;
    }

    .adlib-select::after {
      content: '⌄';
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: rgba(255,255,255,0.6);
      pointer-events: none;
      font-size: 14px;
    }

    .adlib-input {
      display: flex;
      align-items: center;
      padding: 0 14px;
    }

    .adlib-input input {
      width: 100%;
      height: 100%;
      border: 0;
      outline: 0;
      background: transparent;
      color: #f4f4f5;
      font: inherit;
      font-size: 14px;
      padding: 0;
    }

    .adlib-search-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      background: #f3f3f4;
      color: #0f1012;
      font-size: 22px;
      font-weight: 500;
    }

    .platform-pill {
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 10px;
      padding: 0 14px;
      cursor: pointer;
    }

    .platform-dot,
    .ad-platform-icon {
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.08);
      font-size: 10px;
      line-height: 1;
      flex: 0 0 auto;
    }

    .platform-dot { width: 24px; height: 24px; font-size: 11px; }

    .adlib-resultsbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 2px 2px 0;
      opacity: 0;
      transform: translateY(24px);
      filter: blur(10px);
      transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1) 140ms, transform 820ms cubic-bezier(0.22, 1, 0.36, 1) 140ms, filter 820ms ease 140ms;
    }

    .adlib-results { color: #f7f7f8; font-size: 16px; }
    .adlib-results span { color: rgba(255,255,255,0.52); }

    .adlib-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .adlib-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
      opacity: 0;
      transform: translateY(28px) scale(0.985);
      filter: blur(12px);
      transition: opacity 880ms cubic-bezier(0.22, 1, 0.36, 1) 220ms, transform 880ms cubic-bezier(0.22, 1, 0.36, 1) 220ms, filter 880ms ease 220ms;
    }

    .ad-card {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-height: 460px;
    }

    .ad-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .ad-brand {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      min-width: 0;
    }

    .ad-brand-avatar {
      width: 46px;
      height: 46px;
      border-radius: 16px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.08);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #f7f7f8;
      font-size: 14px;
      font-weight: 600;
      flex: 0 0 auto;
    }

    .ad-brand-name {
      margin: 0;
      color: #f7f7f8;
      font-size: 18px;
      line-height: 1.05;
      letter-spacing: -0.03em;
    }

    .ad-platforms {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
    }

    .ad-platform-icon { width: 22px; height: 22px; }

    .ad-view-btn {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.025);
      color: #f7f7f8;
      font: inherit;
      cursor: pointer;
      flex: 0 0 auto;
    }

    .ad-meta,
    .ad-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: rgba(255,255,255,0.56);
      font-size: 12px;
    }

    .ad-status {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 999px;
      background: rgba(62, 192, 120, 0.14);
      color: #8ce3b1;
      font-size: 13px;
    }

    .ad-status-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #32d27a;
      flex: 0 0 auto;
    }

    .ad-date {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .ad-media {
      flex: 1;
      min-height: 240px;
      border-radius: 18px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.06);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
    }

    .ad-media.has-video::before {
      content: 'VIDEO';
      position: absolute;
      top: 14px;
      left: 14px;
      padding: 6px 8px;
      border-radius: 999px;
      background: rgba(10,10,12,0.56);
      border: 1px solid rgba(255,255,255,0.14);
      color: #ffffff;
      font-size: 10px;
      letter-spacing: 0.08em;
      z-index: 2;
    }

    .ad-media video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      background: #0c0c0e;
    }

    .ad-play {
      position: absolute;
      width: 58px;
      height: 58px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(10,10,12,0.56);
      border: 1px solid rgba(255,255,255,0.14);
      color: #ffffff;
      font-size: 18px;
      pointer-events: none;
      backdrop-filter: blur(6px);
    }

    .spotlight-overlay,
    .welcome-overlay {
      position: fixed;
      inset: 0;
      background: rgba(7,7,8,0.62);
      backdrop-filter: blur(14px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 180ms ease;
      z-index: 60;
    }

    .spotlight-overlay.open,
    .welcome-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

    .spotlight-shell,
    .welcome-card {
      position: fixed;
      left: 50%;
      opacity: 0;
      pointer-events: none;
      transition: opacity 180ms ease, transform 180ms ease;
      z-index: 70;
      overflow: hidden;
      border-radius: 24px;
    }

    .spotlight-shell {
      top: 72px;
      width: min(720px, calc(100vw - 32px));
      transform: translateX(-50%) translateY(-10px) scale(0.985);
    }

    .spotlight-shell.open {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0) scale(1);
    }

    .spotlight-head {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 68px;
      padding: 0 18px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .spotlight-kbd {
      flex: 0 0 auto;
      padding: 6px 8px;
      border-radius: 9px;
      border: 1px solid rgba(255,255,255,0.07);
      background: rgba(255,255,255,0.025);
      color: rgba(255,255,255,0.48);
      font-size: 11px;
      line-height: 1;
    }

    .spotlight-list {
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: min(460px, calc(100vh - 180px));
      overflow: auto;
    }

    .spotlight-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      min-height: 56px;
      padding: 0 12px;
      border-radius: 14px;
      border: 1px solid transparent;
      background: transparent;
      color: inherit;
      cursor: pointer;
      text-align: left;
      transition: background-color 160ms ease;
    }

    .spotlight-item:hover,
    .spotlight-item.active { background: rgba(255,255,255,0.04); }

    .spotlight-item-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .spotlight-badge {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.07);
      color: #f5f5f6;
      font-size: 12px;
      line-height: 1;
      flex: 0 0 auto;
    }

    .spotlight-title { margin: 0; color: #f6f6f7; font-size: 13px; line-height: 1.25; }
    .spotlight-empty { padding: 22px 12px 24px; color: rgba(255,255,255,0.46); font-size: 13px; text-align: center; display: none; }

    .loading-screen {
      position: fixed;
      inset: 0;
      z-index: 120;
      background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)), #0b0b0d;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: opacity 420ms ease, visibility 420ms ease;
    }

    .loading-screen.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .loading-inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }

    .loading-logo {
      width: 82px;
      height: 82px;
      border-radius: 24px;
    }

    .loading-logo svg { width: 40px; height: 40px; }
    .loading-title { margin: 0; color: #f7f7f8; font-size: 16px; letter-spacing: -0.03em; }

    .loading-bar {
      width: 180px;
      height: 4px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      overflow: hidden;
    }

    .loading-bar span {
      display: block;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255,255,255,0.24), rgba(255,255,255,0.94), rgba(255,255,255,0.24));
      transform: translateX(-100%);
      animation: loading-slide 1.15s ease-in-out infinite;
    }

    @keyframes loading-slide {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .welcome-card {
      top: 50%;
      width: min(760px, calc(100vw - 40px));
      transform: translate(-50%, -46%);
      padding: clamp(22px, 3vw, 34px);
      z-index: 90;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: clamp(18px, 2vw, 28px);
      align-items: start;
    }

    .welcome-card.open {
      opacity: 1;
      pointer-events: auto;
      transform: translate(-50%, -50%);
    }

    .welcome-brand {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      padding-top: 4px;
    }

    .welcome-logo {
      width: clamp(64px, 7vw, 84px);
      height: clamp(64px, 7vw, 84px);
      border-radius: clamp(18px, 2vw, 24px);
    }

    .welcome-logo svg { width: clamp(30px, 3.4vw, 40px); height: clamp(30px, 3.4vw, 40px); }
    .welcome-brand-name { margin: 0; color: rgba(255,255,255,0.74); font-size: 13px; line-height: 1; }

    .welcome-content {
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .welcome-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      padding: 0 14px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      color: rgba(255,255,255,0.78);
      font-size: 13px;
      line-height: 1;
      margin-bottom: 18px;
    }

    .welcome-badge-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: rgba(255,255,255,0.92);
      flex: 0 0 auto;
    }

    .welcome-title {
      margin: 0;
      color: #f7f7f8;
      font-size: clamp(22px, 2.7vw, 34px);
      line-height: 1.05;
      letter-spacing: -0.03em;
      max-width: 30ch;
    }

    .welcome-copy {
      margin: 18px 0 0;
      font-size: clamp(14px, 1.2vw, 16px);
      max-width: 52ch;
    }

    .welcome-actions {
      display: flex;
      gap: 12px;
      margin-top: 24px;
      flex-wrap: wrap;
      align-items: center;
    }

    .mobile-unavailable {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 130;
      background: #0b0b0d;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .mobile-unavailable-card {
      width: min(440px, 100%);
      border-radius: 24px;
      padding: 28px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 16px;
    }

    .mobile-unavailable-logo {
      width: 72px;
      height: 72px;
      border-radius: 22px;
    }

    .mobile-unavailable-logo svg { width: 34px; height: 34px; }
    .mobile-unavailable-title { margin: 0; color: #f7f7f8; font-size: 28px; line-height: 1.02; letter-spacing: -0.045em; }
    .mobile-unavailable-copy { margin: 0; font-size: 14px; max-width: 28ch; }

    @media (max-width: 1600px) {
      :root {
        --sidebar-w: 228px;
        --content-pad-x: 16px;
        --content-pad-y: 16px;
        --block-gap: 12px;
      }
      .adlib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-height: 920px) {
      :root {
        --content-pad-y: 12px;
        --block-gap: 10px;
      }
      .hero-card,
      .signal-card { min-height: 270px; }
      .metric-card { min-height: 150px; }
      .home-chart-card { min-height: 244px; }
      .home-chart-wrap { height: 180px; }
      .ad-card { min-height: 420px; }
      .ad-media { min-height: 210px; }
    }

    @media (max-width: 1420px) {
      .adlib-row.search { grid-template-columns: 110px 150px minmax(0, 1fr) 64px; }
      .adlib-row.platforms { grid-template-columns: 110px repeat(3, minmax(0, 1fr)); }
      .adlib-row.filters,
      .adlib-row.filters.second,
      .adlib-row.filters.third { grid-template-columns: 110px repeat(2, minmax(0, 1fr)); }
      .home-hero,
      .home-metrics,
      .home-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .hero-card,
      .home-chart-card.primary { grid-column: span 2; }
      .signal-card,
      .home-chart-card.secondary { grid-column: span 1; }
      .adlib-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 1120px) {
      .adlib-row.search,
      .adlib-row.platforms,
      .adlib-row.filters,
      .adlib-row.filters.second,
      .adlib-row.filters.third { grid-template-columns: 1fr; }
      .adlib-label { min-height: auto; padding-top: 4px; }
      .home-hero,
      .home-metrics,
      .home-charts,
      .hero-grid,
      .adlib-grid { grid-template-columns: 1fr; }
      .hero-card,
      .signal-card,
      .home-chart-card.primary,
      .home-chart-card.secondary { grid-column: span 1; }
      .welcome-card { width: min(680px, calc(100vw - 32px)); }
    }

    @media (max-width: 860px) {
      .app-shell,
      .loading-screen,
      .welcome-overlay,
      .welcome-card { display: none !important; }
      .mobile-unavailable { display: flex; }
    }

/* Refinements for cleaner dashboard layout */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  line-height: 1;
}

img,
svg,
canvas {
  max-width: 100%;
}

.content > *,
.content-header > *,
.home-shell > *,
.adlib-grid > *,
.hero-card > *,
.signal-card > *,
.metric-card > *,
.home-chart-card > *,
.ad-card > * {
  min-width: 0;
}

.sidebar,
.content,
.hero-card,
.signal-card,
.metric-card,
.home-chart-card,
.ad-card,
.ad-card-top,
.adlib-topbar,
.adlib-controls,
.content-header,
.top-search,
.top-btn,
.search-box,
.search-left,
.profile-left,
.profile-meta,
.section-header,
.section-header-left,
.section-tools,
.hero-actions,
.welcome-actions,
.ad-actions,
.ad-meta,
.ad-meta-row,
.ad-card-copy,
.ad-card-top,
.ad-title-row,
.home-chart-head,
.metric-head,
.signal-head,
.member-card,
.member-meta,
.member-top,
.member-bottom,
.nav-item,
.sub-item,
.project-item {
  min-width: 0;
}

.profile-meta h3,
.hero-title,
.welcome-title,
.home-chart-title,
.adlib-topbar-title,
.mobile-unavailable-title,
.section-title,
.ad-title,
.metric-value,
.hero-mini-value,
.signal-value {
  overflow-wrap: anywhere;
}

.top-search,
.top-btn,
.hero-btn,
.hero-btn-secondary,
.welcome-btn,
.welcome-btn-secondary,
.ad-view-btn,
.adlib-search-btn,
.adlib-toggle-btn,
.nav-item,
.sub-item,
.project-item {
  position: relative;
  overflow: hidden;
}

.top-btn,
.hero-btn,
.hero-btn-secondary,
.welcome-btn,
.welcome-btn-secondary,
.ad-view-btn,
.adlib-search-btn,
.adlib-toggle-btn {
  white-space: nowrap;
}

.top-btn span,
.top-search span,
.nav-item span,
.sub-item span,
.project-item span,
.search-left span,
.search-shortcut,
.ad-pill,
.metric-copy,
.signal-copy,
.hero-mini-copy,
.ad-copy,
.ad-meta-value,
.ad-meta-label {
  line-height: 1.25;
}

.top-btn svg,
.top-search svg,
.search-box svg,
.nav-item svg,
.sub-item svg,
.project-item svg,
.hero-btn svg,
.hero-btn-secondary svg,
.welcome-btn svg,
.welcome-btn-secondary svg,
.adlib-search-btn svg,
.adlib-toggle-btn svg,
.ad-view-btn svg {
  flex: 0 0 auto;
}

.content-header,
.adlib-topbar,
.adlib-controls,
.ad-card,
.hero-card,
.signal-card,
.metric-card,
.home-chart-card,
.welcome-card,
.mobile-unavailable-card,
.profile-card {
  backdrop-filter: blur(16px);
}

.hero-actions,
.welcome-actions,
.ad-actions,
.section-tools,
.ad-meta-row {
  flex-wrap: wrap;
}

.top-btn,
.hero-btn,
.hero-btn-secondary,
.welcome-btn,
.welcome-btn-secondary,
.ad-view-btn,
.adlib-search-btn,
.adlib-toggle-btn {
  justify-content: center;
  text-align: center;
}

@media (max-width: 1420px) {
  .content-header {
    gap: 12px;
  }

  .content-header,
  .content-header-right {
    flex-wrap: wrap;
  }

  .top-search {
    width: min(100%, 320px);
  }
}

@media (max-width: 1120px) {
  .hero-actions,
  .welcome-actions {
    gap: 10px;
  }

  .hero-btn,
  .hero-btn-secondary,
  .welcome-btn,
  .welcome-btn-secondary,
  .top-btn {
    min-width: 0;
  }
}

body.auth-locked .app-shell {
  opacity: 0.08;
  filter: blur(18px) saturate(0.8);
  transform: scale(0.985);
  pointer-events: none;
  user-select: none;
}

body.app-authenticated .app-shell {
  opacity: 1;
  filter: none;
  transform: none;
  pointer-events: auto;
}

body .app-shell {
  transition: opacity 280ms ease, filter 280ms ease, transform 280ms ease;
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.05), transparent 22%),
    radial-gradient(circle at 84% 24%, rgba(255,255,255,0.04), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    #050506;
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.16;
  pointer-events: none;
}

.auth-shell.open {
  opacity: 1;
  visibility: visible;
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: min(1460px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) minmax(240px, 300px);
  gap: 30px;
  align-items: center;
}

.auth-copy-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-copy-block-left {
  align-self: start;
  padding-top: 10px;
}

.auth-kicker {
  margin: 0;
  color: #8fe262;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.auth-heading {
  margin: 0;
  font-size: clamp(32px, 3vw, 48px);
  line-height: 0.96;
  color: #f8f8f8;
  max-width: 9ch;
}

.auth-copy,
.auth-copy-panel p,
.auth-card-subtitle,
.auth-switch-copy,
.auth-card-message {
  color: rgba(255,255,255,0.58);
  line-height: 1.45;
}

.auth-copy {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
}

.auth-copy-panel {
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
}

.auth-copy-panel h3 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1;
  color: #f6f6f7;
}

.auth-copy-panel p {
  margin: 0;
  font-size: 14px;
}

.auth-copy-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.78);
  font-size: 13px;
}

.auth-copy-block-right {
  min-height: 720px;
  justify-content: space-between;
}

.auth-copy-panel-bottom {
  align-self: end;
}

.auth-device-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  grid-template-rows: auto auto;
  gap: 26px 24px;
  align-items: start;
  justify-items: center;
  min-height: 760px;
}

.auth-phone-card {
  width: min(100%, 230px);
  min-height: 390px;
  padding: 14px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.11);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  box-shadow: 0 24px 80px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.auth-phone-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

.auth-phone-card.is-active {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 28px 90px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(255,255,255,0.06);
}

.auth-phone-card.is-ready {
  border-color: rgba(143,226,98,0.36);
  box-shadow: 0 26px 90px rgba(0,0,0,0.42), 0 0 0 1px rgba(143,226,98,0.22);
}

.auth-phone-inner {
  height: 100%;
  min-height: 360px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(12,12,14,0.98), rgba(5,5,6,0.98));
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,0.62);
  font-size: 10px;
}

.auth-notch {
  width: 64px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.auth-back-link,
.auth-text-link,
.auth-inline-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.52);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.auth-back-link {
  width: fit-content;
  font-size: 11px;
}

.auth-card-title {
  margin: 0;
  font-size: 18px;
  line-height: 0.96;
  color: #fcfcfd;
  max-width: 8ch;
}

.auth-card-subtitle {
  margin: 0;
  font-size: 11px;
}

.auth-card-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 2px;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}

.auth-field:focus-within,
.verify-digit:focus {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.auth-field-icon {
  color: rgba(255,255,255,0.42);
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

.auth-field input,
.verify-digit {
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font: inherit;
}

.auth-field input {
  width: 100%;
  font-size: 13px;
}

.auth-field input::placeholder,
.verify-digit::placeholder {
  color: rgba(255,255,255,0.28);
}

.auth-text-link {
  align-self: center;
  margin: 2px 0 6px;
  font-size: 11px;
}

.auth-submit {
  min-height: 40px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: #f7f7f8;
  color: #111214;
  font-weight: 650;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(255,255,255,0.08);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-card-message {
  min-height: 36px;
  margin: 0;
  font-size: 11px;
  display: none;
}

.auth-card-message[data-state="error"] {
  color: #ff9090;
}

.auth-card-message[data-state="success"] {
  color: #a7e987;
}

.auth-card-message[data-state="loading"] {
  color: #d2d2d6;
}

.auth-switch-copy {
  margin: auto 0 0;
  font-size: 11px;
  text-align: center;
}

.auth-inline-link {
  color: rgba(255,255,255,0.84);
}

.verify-code-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.verify-digit {
  min-height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-size: 21px;
  font-weight: 650;
}

.card-login {
  grid-column: 1;
  grid-row: 1;
  margin-top: 18px;
}

.card-register {
  grid-column: 2;
  grid-row: 1;
}

.card-forgot {
  grid-column: 3;
  grid-row: 1 / span 2;
  margin-top: 190px;
}

.card-verify {
  grid-column: 1;
  grid-row: 2;
}

.card-reset {
  grid-column: 2;
  grid-row: 2;
}

.header-session {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-user-pill {
  min-height: var(--header-search-h);
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}

.header-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.92);
  color: #0f1012;
  font-size: 11px;
  font-weight: 700;
}

.header-user-name,
.header-user-role,
.nav-item span,
.sub-item span,
.project-item span,
.member-name,
.member-rank,
.bottom-user-name,
.bottom-user-rank,
.profile-meta h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-name {
  color: #f2f2f4;
  font-size: 13px;
  font-weight: 600;
  max-width: 140px;
}

.header-user-role {
  color: rgba(255,255,255,0.48);
  font-size: 12px;
}

.logout-btn {
  min-width: 110px;
}

.hero-title,
.hero-copy,
.ad-brand-name,
.ad-footer span,
.ad-date span,
.hero-mini-label,
.hero-mini-value,
.metric-title,
.metric-value {
  overflow-wrap: anywhere;
}

.ad-footer,
.bottom-user,
.member-profile,
.project-item,
.nav-item,
.sub-item,
.profile-left,
.header-session,
.header-actions {
  min-width: 0;
}

@media (max-width: 1360px) {
  .auth-layout {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }

  .auth-copy-block-right {
    display: none;
  }

  .auth-device-mosaic {
    min-height: auto;
  }
}

@media (max-width: 1120px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-copy-block-left {
    max-width: 720px;
  }

  .auth-device-mosaic {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    justify-items: stretch;
  }

  .auth-phone-card,
  .card-login,
  .card-register,
  .card-forgot,
  .card-verify,
  .card-reset {
    width: 100%;
    margin-top: 0;
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-device-mosaic {
    grid-template-columns: 1fr;
  }

  .auth-heading {
    max-width: none;
  }

  .header-session {
    width: 100%;
    justify-content: space-between;
  }

  .header-user-pill {
    min-width: 0;
    flex: 1;
  }
}

.auth-layout-login-only {
  grid-template-columns: minmax(280px, 360px) minmax(320px, 360px) minmax(240px, 320px);
}

.auth-device-single {
  grid-template-columns: minmax(280px, 320px);
  justify-content: center;
  min-height: auto;
}

.auth-phone-card-login {
  width: 100%;
  min-height: 520px;
}

.auth-phone-card-login .auth-phone-inner {
  min-height: 488px;
  padding: 18px 18px 20px;
  gap: 14px;
}

.auth-card-title-wide {
  max-width: 12ch;
  font-size: 20px;
}

.auth-card-form-spacious {
  gap: 12px;
}

.auth-badge-row {
  display: flex;
  justify-content: flex-start;
}

.auth-badge-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(143,226,98,0.24);
  background: rgba(143,226,98,0.08);
  color: #bbed9f;
  font-size: 11px;
  letter-spacing: 0.01em;
}

.auth-credential-panel {
  margin-top: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
}

.auth-credential-label {
  margin: 0 0 10px;
  color: rgba(255,255,255,0.54);
  font-size: 11px;
}

.auth-credential-line {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
}

.auth-credential-line + .auth-credential-line {
  margin-top: 8px;
}

.auth-credential-line span {
  color: rgba(255,255,255,0.46);
}

.auth-copy-block-login-right {
  min-height: 520px;
}

@media (max-width: 1360px) {
  .auth-layout-login-only {
    grid-template-columns: minmax(280px, 360px) minmax(300px, 360px);
  }
}

@media (max-width: 1120px) {
  .auth-layout-login-only {
    grid-template-columns: 1fr;
  }

  .auth-device-single {
    justify-content: stretch;
  }

  .auth-phone-card-login {
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .auth-phone-card-login {
    max-width: none;
  }
}
