* {
      box-sizing: border-box;
    }


    :root {
      --page: #f5f8fd;
      --border: #dbe4f0;
      --text: #111827;
      --muted: #64748b;
      --blue: #2563eb;
      --purple: #7c3aed;
      --green: #16a34a;
      --orange: #ea580c;
      --red: #b91c1c;
    }


    body {
      margin: 0;
      min-height: 100vh;
      font-family: 'Poppins', sans-serif;
      background:
        radial-gradient(circle at 90% 0%, #dbeafe 0, transparent 24%),
        var(--page);
      color: var(--text);
    }


    button {
      font-family: inherit;
    }


    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 260px minmax(0,1fr);
    }


    /* =====================================
       SIDEBAR
    ===================================== */

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 22px 16px;
      display: flex;
      flex-direction: column;
      background: rgba(255,255,255,.98);
      border-right: 1px solid var(--border);
      overflow-y: auto;
    }


    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 5px 9px 18px;
    }


    .brand-icon {
      width: 46px;
      height: 46px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      background: linear-gradient(135deg,#1e3a8a,#2563eb);
      color: white;
      font-size: 21px;
    }


    .brand strong {
      display: block;
      color: #12327e;
      font-size: 17px;
    }


    .brand span {
      display: block;
      margin-top: 3px;
      color: #b91c1c;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 2px;
    }


    .side-label {
      padding: 0 12px 8px;
      color: #94a3b8;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
    }


    .side-link {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 11px 13px;
      border-radius: 11px;
      color: #334155;
      text-decoration: none;
      font-size: 12px;
      font-weight: 600;
      transition: .17s;
    }


    .side-link:hover {
      background: #eef4ff;
      color: #2563eb;
    }


    .side-link.active {
      background: linear-gradient(135deg,#991b1b,#dc2626);
      color: white;
    }


    .sidebar-bottom {
      margin-top: auto;
    }


    /* =====================================
       MAIN
    ===================================== */

    .main {
      min-width: 0;
      padding: 28px 30px 60px;
    }


    .page-header {
      position: relative;
      overflow: hidden;
      margin-bottom: 20px;
      padding: 29px;
      border-radius: 22px;
      color: white;
      background:
        radial-gradient(circle at 90% 15%,rgba(255,255,255,.18),transparent 30%),
        linear-gradient(135deg,#172554,#1d4ed8 48%,#7c3aed);
      box-shadow: 0 16px 35px rgba(37,99,235,.18);
    }


    .page-header::after {
      content: "⌁";
      position: absolute;
      right: 34px;
      top: 3px;
      color: rgba(255,255,255,.11);
      font-size: 130px;
      transform: rotate(-18deg);
    }


    .header-label {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      margin-bottom: 10px;
      padding: 6px 10px;
      border: 1px solid rgba(255,255,255,.25);
      border-radius: 999px;
      background: rgba(255,255,255,.14);
      font-size: 10px;
      font-weight: 700;
    }


    .page-header h1 {
      position: relative;
      z-index: 1;
      margin: 0 0 7px;
      font-size: 32px;
    }


    .page-header p {
      position: relative;
      z-index: 1;
      margin: 0;
      max-width: 760px;
      color: rgba(255,255,255,.9);
      font-size: 12px;
      line-height: 1.65;
    }


    .top-actions {
      display: flex;
      justify-content: flex-end;
      margin: -4px 0 14px;
    }


    .refresh-button {
      border: none;
      padding: 9px 12px;
      border-radius: 10px;
      background: #eef2ff;
      color: #4f46e5;
      cursor: pointer;
      font-size: 9px;
      font-weight: 700;
    }


    /* =====================================
       KPI CARDS
    ===================================== */

    .stats {
      display: grid;
      grid-template-columns: repeat(4,minmax(0,1fr));
      gap: 12px;
      margin-bottom: 18px;
    }


    .stat-card {
      position: relative;
      overflow: hidden;
      padding: 17px;
      background: white;
      border: 1px solid var(--border);
      border-radius: 17px;
      box-shadow: 0 7px 20px rgba(15,23,42,.05);
    }


    .stat-card-icon {
      width: 35px;
      height: 35px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      background: #eff6ff;
      color: #2563eb;
      font-size: 14px;
    }


    .stat-card.green .stat-card-icon {
      background: #ecfdf5;
      color: #16a34a;
    }


    .stat-card.purple .stat-card-icon {
      background: #f5f3ff;
      color: #7c3aed;
    }


    .stat-card.orange .stat-card-icon {
      background: #fff7ed;
      color: #ea580c;
    }


    .stat-card span {
      display: block;
      color: #64748b;
      font-size: 8px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .6px;
    }


    .stat-card strong {
      display: block;
      margin-top: 5px;
      font-size: 24px;
    }


    .stat-card small {
      display: block;
      margin-top: 4px;
      color: #94a3b8;
      font-size: 8px;
    }


    /* =====================================
       GRID / PANELS
    ===================================== */

    .analytics-grid {
      display: grid;
      grid-template-columns: minmax(0,1.6fr) minmax(280px,.8fr);
      gap: 16px;
      margin-bottom: 16px;
    }


    .panel {
      background: white;
      border: 1px solid var(--border);
      border-radius: 19px;
      box-shadow: 0 7px 20px rgba(15,23,42,.05);
      overflow: hidden;
    }


    .panel-heading {
      padding: 18px 19px;
      border-bottom: 1px solid #edf1f6;
    }


    .panel-heading h2 {
      margin: 0;
      font-size: 16px;
    }


    .panel-heading p {
      margin: 4px 0 0;
      color: #64748b;
      font-size: 9px;
    }


    .panel-body {
      padding: 18px 19px;
    }


    /* =====================================
       SIGNUP GRAPH
    ===================================== */

    .signup-chart {
      min-height: 235px;
      display: flex;
      align-items: flex-end;
      gap: 5px;
      overflow-x: auto;
      padding: 18px 5px 2px;
      border-bottom: 1px solid #e2e8f0;
    }


    .signup-column {
      min-width: 18px;
      height: 200px;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      align-items: center;
      gap: 5px;
    }


    .signup-bar {
      width: 100%;
      min-height: 2px;
      border-radius: 6px 6px 2px 2px;
      background: linear-gradient(180deg,#8b5cf6,#2563eb);
      transition: .2s;
    }


    .signup-column:hover .signup-bar {
      filter: brightness(1.07);
      transform: translateY(-2px);
    }


    .signup-label {
      height: 15px;
      color: #94a3b8;
      font-size: 7px;
      white-space: nowrap;
      transform: rotate(-45deg);
      transform-origin: center;
    }


    /* =====================================
       BREAKDOWNS
    ===================================== */

    .breakdown-list {
      display: grid;
      gap: 13px;
    }


    .breakdown-row {
      display: grid;
      grid-template-columns: 90px minmax(0,1fr) 35px;
      align-items: center;
      gap: 8px;
    }


    .breakdown-name {
      overflow: hidden;
      color: #334155;
      font-size: 9px;
      font-weight: 600;
      text-overflow: ellipsis;
      white-space: nowrap;
    }


    .breakdown-track {
      height: 7px;
      overflow: hidden;
      border-radius: 999px;
      background: #eef2f7;
    }


    .breakdown-fill {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg,#2563eb,#8b5cf6);
    }


    .breakdown-value {
      color: #64748b;
      text-align: right;
      font-size: 8px;
      font-weight: 700;
    }


    /* =====================================
       ACTIVITY
    ===================================== */

    .activity-grid {
      display: grid;
      grid-template-columns: repeat(4,minmax(0,1fr));
      gap: 11px;
    }


    .activity-card {
      padding: 14px;
      border: 1px solid #e2e8f0;
      border-radius: 14px;
      background: #f8fafc;
    }


    .activity-card i {
      color: #2563eb;
      font-size: 14px;
    }


    .activity-card strong {
      display: block;
      margin-top: 8px;
      color: #111827;
      font-size: 19px;
    }


    .activity-card span {
      display: block;
      margin-top: 2px;
      color: #64748b;
      font-size: 8px;
    }


    /* =====================================
       SKILLS
    ===================================== */

    .skill-table {
      width: 100%;
      border-collapse: collapse;
    }


    .skill-table th,
    .skill-table td {
      padding: 10px 9px;
      border-bottom: 1px solid #edf1f6;
      text-align: left;
      font-size: 9px;
    }


    .skill-table th {
      color: #64748b;
      background: #f8fafc;
      font-size: 8px;
      text-transform: uppercase;
      letter-spacing: .4px;
    }


    .skill-table td:first-child {
      color: #1e3a8a;
      font-weight: 700;
    }


    .empty {
      padding: 25px;
      color: #64748b;
      text-align: center;
      font-size: 10px;
    }


    /* =====================================
       GATES
    ===================================== */

    #loadingScreen,
    #deniedScreen {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: #eef4ff;
    }


    #deniedScreen {
      display: none;
      text-align: center;
    }


    .denied-box {
      max-width: 470px;
      padding: 26px;
      background: white;
      border: 1px solid #fecaca;
      border-radius: 18px;
      box-shadow: 0 14px 35px rgba(15,23,42,.1);
    }


    .denied-box i {
      color: #dc2626;
      font-size: 30px;
    }


    .denied-box h2 {
      margin: 11px 0 5px;
      font-size: 20px;
    }


    .denied-box p {
      margin: 0 0 16px;
      color: #64748b;
      font-size: 11px;
      line-height: 1.55;
    }


    .denied-box a {
      display: inline-block;
      padding: 9px 13px;
      border-radius: 9px;
      background: #2563eb;
      color: white;
      text-decoration: none;
      font-size: 10px;
      font-weight: 700;
    }


    #passwordGate {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background:
        radial-gradient(circle at 80% 10%, #dbeafe 0, transparent 30%),
        #eef4ff;
    }


    .password-gate-card {
      width: min(440px,100%);
      padding: 28px;
      background: white;
      border: 1px solid #dbe4f0;
      border-radius: 22px;
      box-shadow: 0 18px 45px rgba(15,23,42,.14);
    }


    .password-gate-icon {
      width: 55px;
      height: 55px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 15px;
      border-radius: 16px;
      background: linear-gradient(135deg,#991b1b,#dc2626);
      color: white;
      font-size: 22px;
    }


    .password-gate-card h2 {
      margin: 0 0 6px;
      font-size: 21px;
    }


    .password-gate-card p {
      margin: 0 0 18px;
      color: #64748b;
      font-size: 11px;
      line-height: 1.55;
    }


    .password-field {
      position: relative;
    }


    .password-field input {
      width: 100%;
      padding: 12px 42px 12px 12px;
      border: 1px solid #dbe4f0;
      border-radius: 11px;
      background: #f8fafc;
      color: #111827;
      outline: none;
      font-family: inherit;
      font-size: 12px;
    }


    .password-toggle {
      position: absolute;
      top: 50%;
      right: 10px;
      transform: translateY(-50%);
      border: none;
      background: transparent;
      color: #64748b;
      cursor: pointer;
    }


    .password-submit {
      width: 100%;
      margin-top: 11px;
      padding: 11px 13px;
      border: none;
      border-radius: 10px;
      background: linear-gradient(135deg,#991b1b,#dc2626);
      color: white;
      cursor: pointer;
      font-size: 11px;
      font-weight: 700;
    }


    .password-message {
      display: none;
      margin-top: 11px;
      padding: 10px 11px;
      border-radius: 9px;
      background: #fef2f2;
      border: 1px solid #fecaca;
      color: #991b1b;
      font-size: 10px;
      font-weight: 600;
    }


    .password-message.show {
      display: block;
    }


    @media(max-width: 1050px) {
      .stats,
      .activity-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
      }

      .analytics-grid {
        grid-template-columns: 1fr;
      }
    }


    @media(max-width: 900px) {
      .app {
        display: block;
      }

      .sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
      }

      .main {
        padding: 18px 14px 40px;
      }
    }


    @media(max-width: 520px) {
      .stats,
      .activity-grid {
        grid-template-columns: 1fr;
      }
    }
