    :root {
      --bg: #f8fafc;
      --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
      --bg2: rgba(255, 255, 255, 0.95);
      --bg3: #f1f5f9;
      --surface: rgba(255, 255, 255, 0.7);
      --border: rgba(226, 232, 240, 0.6);
      --border2: rgba(203, 213, 225, 0.8);
      --text: #0f172a;
      --text2: #334155;
      --text3: #64748b;
      --accent: #0284c7;
      --accent-hover: #0369a1;
      --red: #ef4444;
      --amber: #f59e0b;
      --green: #22c55e;
      --blue: #3b82f6;
      --purple: #8b5cf6;
      --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.03);
      --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.06);
      --glass-blur: blur(12px);
    }

    .desc-box {
      background: var(--bg3);
      border-left: 4px solid var(--accent);
      padding: 14px 18px;
      margin-bottom: 24px;
      font-size: .88rem;
      color: var(--text2);
      border-radius: 4px;
      line-height: 1.5;
    }

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

    body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      background: var(--bg-gradient);
      background-attachment: fixed;
      color: var(--text);
      min-height: 100vh;
      display: flex;
    }

    /* SIDEBAR */
    .sidebar {
      width: 260px;
      min-height: 100vh;
      background: var(--bg2);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      z-index: 100;
    }

    .logo {
      padding: 28px 24px 22px;
      border-bottom: 1px solid var(--border);
    }

    .logo .brand {
      font-family: inherit; font-weight: 700; letter-spacing: -0.02em;
      font-size: 1.5rem;
      color: var(--accent);
      line-height: 1.1;
    }

    .logo .sub {
      font-size: 0.7rem;
      color: var(--text3);
      letter-spacing: .04em;
      margin-top: 4px;
    }

    .slabel {
      font-size: .65rem;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: var(--text3);
      padding: 18px 24px 7px;
      font-weight: 600;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 24px;
      cursor: pointer;
      color: var(--text2);
      font-size: .88rem;
      transition: all .15s;
      border-left: 2px solid transparent;
    }

    .nav-item:hover {
      background: var(--bg3);
      color: var(--text);
    }

    .nav-item.active {
      background: rgba(45, 212, 191, .08);
      color: var(--accent);
      border-left-color: var(--accent);
      font-weight: 500;
    }

    .nav-item svg {
      width: 17px;
      height: 17px;
      flex-shrink: 0;
      opacity: .8;
    }

    .sfooter {
      margin-top: auto;
      padding: 18px 24px;
      border-top: 1px solid var(--border);
      font-size: .75rem;
      color: var(--text3);
      line-height: 1.6;
    }

    .sfooter span {
      color: var(--text2);
    }

    /* MAIN */
    .main {
      margin-left: 260px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .topbar {
      padding: 18px 36px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.6);
      backdrop-filter: var(--glass-blur);
      -webkit-backdrop-filter: var(--glass-blur);
      box-shadow: var(--shadow-sm);
      position: sticky;
      top: 0;
      z-index: 50;
    }

    .topbar-title {
      font-family: inherit; font-weight: 700; letter-spacing: -0.02em;
      font-size: 1.3rem;
    }

    .topbar-title span {
      color: var(--accent);
    }

    .rag-status {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: .78rem;
      padding: 5px 12px;
      border-radius: 20px;
      border: 1px solid var(--border2);
      color: var(--text3);
    }

    .rag-status.ok {
      border-color: rgba(74, 222, 128, .3);
      color: var(--green);
    }

    .rag-status.warn {
      border-color: rgba(251, 191, 36, .3);
      color: var(--amber);
    }

    .rag-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: currentColor;
    }

    .content {
      padding: 28px 36px;
      flex: 1;
    }

    /* SECTIONS */
    .section {
      display: none;
    }

    .section.active {
      display: block;
      animation: fadeUp .28s ease;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(8px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    /* PAGE HEADER */
    .ph {
      margin-bottom: 24px;
    }

    .ph h2 {
      font-family: inherit; font-weight: 700; letter-spacing: -0.02em;
      font-size: 1.75rem;
    }

    .ph p {
      color: var(--text2);
      font-size: .86rem;
      margin-top: 5px;
      max-width: 540px;
    }

    /* SEARCH BOX */
    .search-hero {
      width: 100%;
      max-width: 900px;
      margin: 0 auto;
      text-align: left;
    }

    .search-hero h1 {
      font-family: inherit; font-weight: 700; letter-spacing: -0.02em;
      font-size: 2.2rem;
      margin-bottom: 8px;
    }

    .search-hero p {
      color: var(--text2);
      font-size: .9rem;
      margin-bottom: 24px;
    }

    .search-wrap {
      position: relative;
    }

    .search-wrap input {
      width: 100%;
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: 12px;
      padding: 14px 18px 14px 48px;
      color: var(--text);
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 1rem;
      outline: none;
      transition: border-color .2s;
    }

    .search-wrap input:focus {
      border-color: var(--accent);
    }

    .search-wrap input::placeholder {
      color: var(--text3);
    }

    .search-wrap svg {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text3);
    }

    .search-results {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 12px;
      margin-top: 16px;
      max-height: calc(100vh - 280px);
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    }

    .search-result-item {
      padding: 13px 18px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background .12s;
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .search-result-item:last-child {
      border-bottom: none;
    }

    .search-result-item:hover {
      background: var(--bg3);
    }

    .sri-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(45, 212, 191, .15);
      border: 1px solid rgba(45, 212, 191, .3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: .85rem;
      color: var(--accent);
      flex-shrink: 0;
    }

    .sri-name {
      font-weight: 500;
      color: var(--text);
      font-size: .9rem;
    }

    .sri-meta {
      font-size: .76rem;
      color: var(--text3);
      margin-top: 2px;
    }

    .sri-arrow {
      margin-left: auto;
      color: var(--text3);
      opacity: .5;
    }

    .sri-insurance {
      margin-left: auto;
      font-size: .72rem;
      font-weight: 500;
      padding: 3px 10px;
      border-radius: 20px;
      background: rgba(45, 212, 191, .1);
      color: var(--accent);
      border: 1px solid rgba(45, 212, 191, .25);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .search-count strong {
      color: var(--text);
    }

    .cohort-btn {
      padding: 5px 14px;
      border-radius: 20px;
      border: 1px solid var(--border2);
      background: var(--bg3);
      color: var(--text2);
      font-size: .78rem;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
      transition: all .15s;
    }

    .cohort-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .cohort-btn.active {
      background: rgba(45, 212, 191, .15);
      border-color: var(--accent);
      color: var(--accent);
      font-weight: 600;
    }

    .patient-card {
      background: var(--surface);
      backdrop-filter: var(--glass-blur);
      -webkit-backdrop-filter: var(--glass-blur);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow-sm);
      overflow: hidden;
      margin-bottom: 22px;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .patient-card:hover {
      transform: translateY(-4px) scale(1.01);
      box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
      border-color: rgba(2, 132, 199, 0.3);
    }

    .pc-header {
      padding: 22px 26px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .pc-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: var(--bg3);
      border: 2px solid var(--border2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 1.4rem;
      flex-shrink: 0;
    }

    .pc-name {
      font-family: 'DM Serif Display', serif;
      font-size: 1.4rem;
      line-height: 1.2;
    }

    .pc-meta {
      font-size: .82rem;
      color: var(--text2);
      margin-top: 4px;
    }

    .pc-id {
      font-family: 'JetBrains Mono', monospace;
      font-size: .72rem;
      color: var(--text3);
      margin-top: 2px;
    }

    .pc-details {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0;
    }

    .pc-detail {
      padding: 16px 22px;
      border-right: 1px solid var(--border);
    }

    .pc-detail:last-child {
      border-right: none;
    }

    .pd-label {
      font-size: .68rem;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--text3);
      font-weight: 600;
      margin-bottom: 6px;
    }

    .pd-value {
      font-size: .92rem;
      color: var(--text);
      font-weight: 500;
    }

    /* RISK CARD */
    .risk-card {
      border-radius: 14px;
      border: 1.5px solid;
      padding: 22px 26px;
      margin-bottom: 22px;
      display: flex;
      gap: 22px;
      align-items: flex-start;
    }

    .risk-card.HIGH {
      background: rgba(248, 113, 113, .06);
      border-color: rgba(248, 113, 113, .3);
    }

    .risk-card.MODERATE {
      background: rgba(251, 191, 36, .06);
      border-color: rgba(251, 191, 36, .3);
    }

    .risk-card.PREVENTIVE {
      background: rgba(96, 165, 250, .06);
      border-color: rgba(96, 165, 250, .3);
    }

    .risk-card.NORMAL {
      background: rgba(74, 222, 128, .06);
      border-color: rgba(74, 222, 128, .3);
    }

    .risk-badge {
      min-width: 96px;
      text-align: center;
      flex-shrink: 0;
    }

    .rb-tier {
      font-family: 'DM Serif Display', serif;
      font-size: 1.1rem;
      font-weight: 600;
    }

    .HIGH .rb-tier {
      color: var(--red);
    }

    .MODERATE .rb-tier {
      color: var(--amber);
    }

    .PREVENTIVE .rb-tier {
      color: var(--blue);
    }

    .NORMAL .rb-tier {
      color: var(--green);
    }

    .rb-score {
      font-family: 'JetBrains Mono', monospace;
      font-size: 2rem;
      font-weight: 500;
      line-height: 1;
    }

    .rb-label {
      font-size: .68rem;
      color: var(--text3);
      margin-top: 2px;
    }

    .risk-body {
      flex: 1;
    }

    .risk-action {
      font-size: .88rem;
      color: var(--text2);
      margin-bottom: 12px;
      line-height: 1.6;
    }

    .risk-reasons {
      list-style: none;
    }

    .risk-reasons li {
      font-size: .82rem;
      color: var(--text3);
      margin-bottom: 5px;
      display: flex;
      align-items: flex-start;
      gap: 7px;
    }

    .risk-reasons li::before {
      content: '→';
      color: var(--text3);
      flex-shrink: 0;
      margin-top: 1px;
    }

    .risk-cta {
      margin-left: auto;
      flex-shrink: 0;
    }

    /* BUTTONS */
    .btn {
      padding: 9px 18px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: .84rem;
      font-weight: 500;
      transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }
    
    .btn:hover {
      transform: translateY(-2px) scale(1.02);
      box-shadow: var(--shadow-sm);
    }

    .btn-primary {
      background: var(--accent);
      color: #ffffff;
    }

    .btn-primary:hover {
      background: var(--accent-hover);
      box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
    }

    .btn-outline {
      background: transparent;
      color: var(--text2);
      border: 1px solid var(--border2);
    }

    .btn-outline:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .btn-danger {
      background: rgba(248, 113, 113, .15);
      color: var(--red);
      border: 1px solid rgba(248, 113, 113, .3);
    }

    .btn-danger:hover {
      background: rgba(248, 113, 113, .25);
    }

    /* PANEL */
    .panel {
      background: var(--surface);
      backdrop-filter: var(--glass-blur);
      -webkit-backdrop-filter: var(--glass-blur);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow-sm);
      margin-bottom: 20px;
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .panel:hover {
      transform: translateY(-4px) scale(1.01);
      box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
      border-color: rgba(2, 132, 199, 0.3);
    }

    .filter-panel {
      border-color: rgba(45, 212, 191, .2);
      box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
    }

    .filter-chip-row {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .filter-chip {
      border-radius: 999px;
      border: 1px solid var(--border);
      background: rgba(45, 212, 191, .08);
      color: var(--accent);
      padding: 6px 14px;
      font-size: .78rem;
      font-weight: 500;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all .15s;
    }

    .filter-chip span {
      font-size: .8rem;
      color: var(--text3);
    }

    .filter-chip:hover {
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .filter-empty {
      color: var(--text3);
      font-size: .85rem;
      margin-top: 4px;
    }

    .filter-summary {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 22px;
      color: var(--text2);
      font-size: .82rem;
    }

    .ins-pill {
      border-radius: 14px;
      border: 1px solid var(--border);
      padding: 5px 12px;
      background: rgba(96, 165, 250, .1);
      color: var(--blue);
      font-size: .78rem;
      margin-right: 8px;
      margin-bottom: 6px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .summary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .summary-card {
      padding: 20px 24px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--surface);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .summary-card .summary-label {
      font-size: .7rem;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--text3);
      font-weight: 600;
    }

    .summary-card .summary-value {
      font-family: 'DM Serif Display', serif;
      font-size: 2rem;
    }

    .tier-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
      margin-top: 12px;
    }

    .tier-card {
      border-radius: 12px;
      border: 1px solid var(--border);
      padding: 14px;
      background: var(--bg3);
      color: var(--text);
      text-align: left;
      cursor: pointer;
      transition: all .15s;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .tier-card.active {
      border-color: var(--accent);
      background: rgba(45, 212, 191, .08);
      box-shadow: 0 0 0 1px rgba(45, 212, 191, .4);
    }

    .tier-card .tier-label {
      font-size: .7rem;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--text3);
    }

    .tier-card .tier-count {
      font-size: 1.6rem;
      font-family: 'JetBrains Mono', monospace;
    }

    .tier-card .tier-sub {
      font-size: .74rem;
      color: var(--text3);
    }

    .tier-detail {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
      font-size: .85rem;
      color: var(--text2);
      line-height: 1.5;
    }

    .charts-shell {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 18px;
      margin-top: 22px;
    }

    .chart-card {
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--surface);
      padding: 18px;
      height: 350px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .chart-card .panel-h {
      margin-bottom: 0;
    }

    .panel-h {
      padding: 16px 22px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .panel-h h3 {
      font-size: .92rem;
      font-weight: 600;
    }

    .panel-h p {
      font-size: .76rem;
      color: var(--text3);
      margin-top: 2px;
    }

    .pbadge {
      font-size: .7rem;
      font-weight: 600;
      padding: 3px 9px;
      border-radius: 20px;
      white-space: nowrap;
    }

    .pbadge-teal {
      background: rgba(45, 212, 191, .12);
      color: var(--accent);
      border: 1px solid rgba(45, 212, 191, .25);
    }

    .pbadge-red {
      background: rgba(248, 113, 113, .12);
      color: var(--red);
      border: 1px solid rgba(248, 113, 113, .25);
    }

    .pbadge-blue {
      background: rgba(96, 165, 250, .12);
      color: var(--blue);
      border: 1px solid rgba(96, 165, 250, .25);
    }

    /* URGENT CARE LIST */
    .uc-list {
      padding: 16px 22px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .uc-item {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px 18px;
      display: flex;
      align-items: flex-start;
      gap: 16px;
      transition: border-color .15s;
    }

    .uc-item:hover {
      border-color: var(--border2);
    }

    .uc-icon {
      width: 40px;
      height: 40px;
      border-radius: 9px;
      background: rgba(248, 113, 113, .1);
      border: 1px solid rgba(248, 113, 113, .25);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--red);
    }

    .uc-name {
      font-weight: 500;
      font-size: .9rem;
      color: var(--text);
    }

    .uc-addr {
      font-size: .78rem;
      color: var(--text3);
      margin-top: 2px;
    }

    .uc-tags {
      display: flex;
      gap: 6px;
      margin-top: 7px;
      flex-wrap: wrap;
    }

    .tag {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 5px;
      font-size: .7rem;
      font-weight: 500;
    }

    .tag-green {
      background: rgba(74, 222, 128, .12);
      color: var(--green);
    }

    .tag-blue {
      background: rgba(96, 165, 250, .12);
      color: var(--blue);
    }

    .tag-red {
      background: rgba(248, 113, 113, .12);
      color: var(--red);
    }

    .tag-gray {
      background: rgba(90, 122, 148, .18);
      color: var(--text2);
    }

    .tag-amber {
      background: rgba(251, 191, 36, .12);
      color: var(--amber);
    }

    .uc-right {
      margin-left: auto;
      text-align: right;
      flex-shrink: 0;
    }

    .uc-rating {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1rem;
      font-weight: 500;
      color: var(--amber);
    }

    .uc-dist {
      font-size: .74rem;
      color: var(--text3);
      margin-top: 2px;
    }

    .uc-phone {
      font-size: .76rem;
      color: var(--text2);
      margin-top: 3px;
    }


    .rag-wrap {
      padding: 22px 26px;
    }

    .rag-loading {
      display: flex;
      gap: 12px;
      color: var(--text2);
      padding: 28px 0;
    }

    .rag-text {
      font-size: .88rem;
      color: var(--text2);
      line-height: 1.8;
      white-space: pre-wrap;
    }

    .rag-meta {
      font-size: .74rem;
      color: var(--text3);
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 16px;
    }

    /* SPINNER */
    .spin {
      width: 18px;
      height: 18px;
      border: 2px solid var(--border2);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    /* EMPTY STATE */
    .empty {
      text-align: center;
      padding: 60px 24px;
      color: var(--text3);
    }

    .empty svg {
      width: 48px;
      height: 48px;
      margin: 0 auto 14px;
      opacity: .3;
    }

    .empty p {
      font-size: .88rem;
    }

    /* TABS */
    .tabs {
      display: flex;
      gap: 0;
      border-bottom: 1px solid var(--border);
      background: var(--bg2);
    }

    .tab {
      padding: 12px 22px;
      cursor: pointer;
      font-size: .84rem;
      color: var(--text3);
      border-bottom: 2px solid transparent;
      transition: all .15s;
    }

    .tab:hover {
      color: var(--text2);
    }

    .tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
      font-weight: 500;
    }

    /* GRID */
    .two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      margin-bottom: 20px;
    }

    /* VITAL PILL */
    .vital {
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px 16px;
    }

    .vital .label {
      font-size: .68rem;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--text3);
      font-weight: 600;
    }

    .vital .value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.4rem;
      color: var(--text);
      margin-top: 4px;
    }

    .vital .unit {
      font-size: .74rem;
      color: var(--text3);
    }

    /* FOLLOWUP CALLOUT */
    .followup-box {
      background: rgba(251, 191, 36, .06);
      border: 1px solid rgba(251, 191, 36, .25);
      border-radius: 10px;
      padding: 16px 20px;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 18px;
    }

    .followup-box svg {
      flex-shrink: 0;
      color: var(--amber);
    }

    .followup-body {
      font-size: .85rem;
      color: var(--text2);
      line-height: 1.6;
    }

    .followup-body strong {
      color: var(--text);
    }

    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: var(--bg2);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border2);
      border-radius: 3px;
    }

    /* AI FLOATING CHATBOT */
    .ai-fab {
      position: fixed;
      right: 30px;
      bottom: 30px;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: var(--accent);
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 30px rgba(13, 148, 136, 0.4);
      cursor: pointer;
      z-index: 1000;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .ai-fab:hover {
      transform: scale(1.1) rotate(5deg);
    }

    .ai-chat-window {
      position: fixed;
      right: 20px;
      bottom: 80px;
      width: 340px;
      max-width: calc(100vw - 40px);
      height: 600px;
      max-height: 80vh;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 20px;
      display: none;
      flex-direction: column;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      overflow: hidden;
      animation: slideIn 0.3s ease-out;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .ai-chat-header {
      padding: 20px;
      background: var(--bg3);
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .ai-chat-body {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      background: var(--bg);
    }

    .ai-chat-footer {
      padding: 16px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 10px;
    }

    .msg {
      max-width: 85%;
      padding: 12px 16px;
      border-radius: 16px;
      margin-bottom: 16px;
      font-size: 0.88rem;
      line-height: 1.5;
    }

    .msg-ai {
      background: var(--bg2);
      color: var(--text);
      border: 1px solid var(--border);
      align-self: flex-start;
      border-bottom-left-radius: 4px;
    }

    .msg-user {
      background: var(--accent);
      color: #ffffff;
      align-self: flex-end;
      border-bottom-right-radius: 4px;
      margin-left: auto;
    }

    /* GLOBAL ANIMATIONS & SCROLLBARS */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    ::-webkit-scrollbar-track {
      background: var(--bg); 
    }
    ::-webkit-scrollbar-thumb {
      background: var(--border2); 
      border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--text3); 
    }

    .spin {
      display: inline-block;
      width: 24px;
      height: 24px;
      border: 3px solid var(--border2);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
