/* Extracted from inline profile styles to satisfy CSP */
.profile-layout--pad { padding:2.8rem 1.25rem 3.4rem; }
@media (max-width:800px){ .profile-layout--pad { padding:2.4rem 1rem 3rem; } }
@media (max-width:520px){ .profile-layout--pad { padding:2rem .85rem 2.6rem; } }
.profile-layout { position:relative; display:flex; flex-direction:column; gap:2rem; }
.profile-backdrop { position:absolute; inset:0; background:
  radial-gradient(circle at 25% 20%, rgba(120,160,255,.20), transparent 60%),
  radial-gradient(circle at 80% 70%, rgba(120,255,200,.15), transparent 65%),
  linear-gradient(140deg, rgba(30,60,120,0.35), rgba(10,20,40,0.35));
  pointer-events:none; filter:blur(2px); opacity:.8; }
.profile-header { width:100%; position:relative; z-index:2; }
.profile-header--v2 { display:flex; flex-direction:column; gap:1rem; padding:1.6rem 0 1rem; }
.profile-header__titlebar { display:flex; align-items:flex-end; justify-content:space-between; gap:1.25rem; flex-wrap:wrap; }
.profile-header__actions { display:flex; align-items:center; gap:.6rem; }
.profile-metrics-row { display:flex; }
.profile-metrics--row { display:flex; flex-wrap:wrap; gap:.75rem; }
.profile-header__utilities { display:flex; flex-direction:column; gap:.6rem; }
@media (min-width:880px){ .profile-header__utilities { flex-direction:row; align-items:flex-start; }
  .profile-header__utilities > #profileStatus { flex:0 0 auto; min-width:260px; }
  .profile-header__utilities > .profile-searchbar { flex:1 1 auto; }
}
@media (max-width:640px){ .profile-header--v2 { padding:1.2rem 0 .8rem; gap:.9rem; } }
/* Full-width search bar alignment */
.profile-header--v2 .profile-searchbar { width:100%; }
.profile-header--v2 .profile-searchbar__input { width:100%; }
/* Full-width relocated search bar (below utilities) */
.profile-header--v2 > .profile-searchbar { margin-top:.15rem; }
.profile-header--v2 > .profile-searchbar .profile-searchbar__input { padding:.75rem .85rem; font-size:.72rem; }
@media (min-width:800px){
  .profile-header--v2 > .profile-searchbar .profile-searchbar__input { font-size:.74rem; }
}
/* Ensure metrics stretch evenly */
.profile-metrics--row .metric { flex:1 1 120px; }
.profile-header__grid { display:grid; grid-template-columns:1fr 1fr; gap:2.2rem; align-items:start; }
@media (max-width:880px){ .profile-header__grid { grid-template-columns:1fr; gap:1.75rem; } }
.profile-header__col { display:flex; flex-direction:column; gap:.9rem; }
.profile-header__col--primary { gap:1rem; }
.profile-metrics-block { background:linear-gradient(145deg,rgba(28,34,44,0.85),rgba(18,22,28,0.9)); border:1px solid var(--color-border); border-radius:18px; padding:1rem 1.1rem 1.15rem; display:flex; flex-direction:column; gap:.95rem; position:relative; overflow:hidden; box-shadow:0 6px 28px -14px rgba(6,30,70,.45), 0 2px 4px -1px rgba(0,0,0,.3); }
.profile-metrics-block:before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 20% 15%,rgba(120,180,255,0.22),transparent 65%); pointer-events:none; opacity:.4; }
.profile-metrics-block__head { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.profile-metrics-block__title { margin:0; font-size:.72rem; letter-spacing:.6px; text-transform:uppercase; font-weight:600; opacity:.8; }
.profile-metrics-block__actions { display:flex; align-items:center; gap:.45rem; }
.profile-metrics--grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:.65rem; }
@media (max-width:520px){ .profile-metrics--grid { grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); } }
body.light .profile-metrics-block { background:linear-gradient(145deg,#ffffff,#edf4fa); border-color:rgba(40,90,160,0.22); box-shadow:0 4px 18px -10px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.65) inset; }
body.light .profile-metrics-block:before { background:radial-gradient(circle at 25% 20%,rgba(40,90,160,0.16),transparent 60%); }
.profile-title { margin:0 0 .35rem; font-size:2.35rem; font-weight:650; letter-spacing:.5px; }
.gradient-text { background:linear-gradient(90deg,#76b8ff,#b0e3ff 45%,#7de7c2 85%); -webkit-background-clip:text; background-clip:text; color:transparent; }
body.light .gradient-text { background:linear-gradient(90deg,#1f4d80,#2e78c4 50%,#1f9071 85%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.profile-tagline { margin:.2rem 0 1rem; font-size:.95rem; color:var(--color-subtle); max-width:660px; line-height:1.45; }
.profile-grid { position:relative; z-index:2; display:grid; gap:1.75rem; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); align-items:start; }
.card--frost { backdrop-filter:blur(14px) saturate(140%); background:linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); border:1px solid rgba(255,255,255,0.08); box-shadow:0 8px 24px -6px rgba(0,0,0,.4), 0 2px 6px -2px rgba(0,0,0,.5); overflow:hidden; }
body.light .card--frost { background:linear-gradient(145deg, rgba(255,255,255,0.55), rgba(255,255,255,0.35)); border-color:rgba(150,170,210,0.4); }
.card__inner { padding:1.15rem 1.25rem 1.35rem; display:flex; flex-direction:column; gap:.95rem; }
.card__head { display:flex; align-items:center; justify-content:space-between; }
.credits-orb { position:relative; width:170px; height:170px; margin:.4rem 0 .4rem; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; font-family:inherit; isolation:isolate; }
.credits-orb__glow { position:absolute; inset:0; border-radius:50%; background:conic-gradient(from 230deg,#5fb1ff,#53e2b2,#5fb1ff); filter:blur(14px) brightness(1.1); opacity:.55; animation:spin 12s linear infinite; }
.credits-orb__value { position:relative; font-size:3.2rem; font-weight:650; letter-spacing:1px; background:linear-gradient(120deg,#88caff,#d2f2ff); -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:0 0 12px rgba(120,200,255,0.35); }
body.light .credits-orb__value { background:linear-gradient(120deg,#2f5c95,#4e8edc); -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:none; }
.credits-orb__label { position:relative; font-size:.65rem; text-transform:uppercase; letter-spacing:1.4px; color:#8ab9d7; margin-top:.15rem; }
body.light .credits-orb__label { color:#365d85; }
.profile-meta { font-size:.7rem; color:#6f8092; margin:-.4rem 0 .2rem; letter-spacing:.4px; }
.profile-hints { font-size:.7rem; display:flex; flex-direction:column; gap:.3rem; color:#7d91a5; }
.sparkline-wrap { margin-top:.4rem; }
.sparkline-label { font-size:.55rem; letter-spacing:1px; text-transform:uppercase; opacity:.7; margin-bottom:.35rem; }
.ledger-table, .analyses-table { width:100%; border-collapse:separate; border-spacing:0; font-size:.7rem; }
.ledger-table thead th, .analyses-table thead th { position:sticky; top:0; background:linear-gradient(180deg,rgba(40,70,110,0.55),rgba(25,40,70,0.4)); backdrop-filter:blur(6px); }
body.light .ledger-table thead th, body.light .analyses-table thead th { background:linear-gradient(180deg,rgba(200,220,245,0.9),rgba(185,205,230,0.8)); }
.ledger-table th, .analyses-table th { text-align:left; font-weight:600; font-size:.6rem; letter-spacing:.55px; padding:.5rem .65rem .45rem; text-transform:uppercase; color:#68839e; border-bottom:1px solid rgba(120,180,255,0.16); }
.ledger-table td, .analyses-table td { padding:.55rem .65rem; border-bottom:1px solid rgba(120,180,255,0.05); vertical-align:top; }
.ledger-table tr:last-child td, .analyses-table tr:last-child td { border-bottom:none; }
.analyses-table tbody tr:hover { background:linear-gradient(90deg,rgba(70,120,200,0.08),rgba(60,110,190,0)); }
.badge { display:inline-flex; align-items:center; gap:.3rem; font-size:.58rem; padding:.25rem .5rem; border-radius:999px; letter-spacing:.5px; font-weight:600; text-transform:uppercase; background:linear-gradient(120deg,#254566,#1d3147); color:#92b9d8; border:1px solid rgba(255,255,255,0.08); }
body.light .badge { background:linear-gradient(120deg,#e1efff,#c1dbf7); color:#2f4e6c; border-color:rgba(0,0,0,0.08); }
.badge--grant { background:linear-gradient(120deg,#14542e,#0a2c1b); color:#74e0a3; }
body.light .badge--grant { background:linear-gradient(120deg,#d8f8e8,#b7f1d5); color:#0c5c33; }
.badge--charge { background:linear-gradient(120deg,#5d1d1d,#311010); color:#ff9f9f; }
body.light .badge--charge { background:linear-gradient(120deg,#ffe0e0,#f6c2c2); color:#5e1f1f; }
.delta-pos { color:#6ad28f; font-weight:600; }
.delta-neg { color:#ff7b7b; font-weight:600; }
.delta-zero { color:#9fb2c2; }
.table-wrapper { max-height:380px; overflow:auto; margin-top:.15rem; border:1px solid rgba(120,180,255,0.08); border-radius:12px; }
.table-wrapper::-webkit-scrollbar { width:10px; }
.table-wrapper::-webkit-scrollbar-track { background:rgba(255,255,255,0.02); }
.table-wrapper::-webkit-scrollbar-thumb { background:linear-gradient(180deg,rgba(120,180,255,0.4),rgba(120,180,255,0.18)); border-radius:8px; }
.table-wrapper::-webkit-scrollbar-thumb:hover { background:linear-gradient(180deg,rgba(130,190,255,0.55),rgba(120,180,255,0.28)); }
.btn--sm { padding:.45rem .7rem; font-size:.65rem; letter-spacing:.6px; border-radius:10px; }
.status-line { display:flex; align-items:center; gap:.55rem; font-size:.72rem; min-height:1.4rem; margin-top:.25rem; }
.spinner { width:14px; height:14px; border-radius:50%; border:2px solid rgba(140,190,255,.35); border-top-color:#82c3ff; animation:spin 1.1s linear infinite; }
.status-line--success .spinner { display:none; }
.skeleton { position:relative; background:linear-gradient(110deg, rgba(255,255,255,0.05) 20%, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.05) 60%); background-size:200% 100%; animation:shimmer 2.2s infinite; }
body.light .skeleton { background:linear-gradient(110deg, rgba(0,0,0,0.08) 20%, rgba(0,0,0,0.14) 40%, rgba(0,0,0,0.08) 60%); }
.skeleton-line { height:.65rem; border-radius:4px; background:linear-gradient(110deg, rgba(255,255,255,0.05) 20%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0.05) 60%); background-size:200% 100%; animation:shimmer 2.2s infinite; }
body.light .skeleton-line { background:linear-gradient(110deg, rgba(0,0,0,0.08) 20%, rgba(0,0,0,0.18) 40%, rgba(0,0,0,0.08) 60%); }
.skeleton-row td { padding:.4rem .55rem; }
.fade-in { animation:fadeIn .55s ease forwards; }
@keyframes spin { to { transform:rotate(360deg);} }
@keyframes shimmer { 0% { background-position:200% 0;} 100% { background-position:-200% 0;} }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px);} to { opacity:1; transform:translateY(0);} }
@media (max-width:640px){ .profile-grid { grid-template-columns:1fr; gap:1.35rem; } .profile-title { font-size:1.9rem; } .credits-orb { width:150px; height:150px; } }
.analyses-table td { max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.analyses-table td:nth-child(2){ max-width:240px; }
.analyses-table td:nth-child(4){ max-width:260px; }
.analyses-table .status-badge { display:inline-block; padding:.25rem .5rem; border-radius:8px; font-size:.55rem; font-weight:600; letter-spacing:.5px; background:rgba(120,180,255,0.15); color:#8ebfff; }
.analyses-table .status-badge--ready { background:linear-gradient(120deg,#14542e,#0a2c1b); color:#74e0a3; }
.analyses-table .status-badge--processing { background:linear-gradient(120deg,#544114,#2c1f0a); color:#e0c074; }
.analyses-table .status-badge--failed { background:linear-gradient(120deg,#5d1d1d,#311010); color:#ff9f9f; }
/* Width utility classes replacing inline styles */
.w-60 { width:60%; }
.w-40 { width:40%; }
.w-70 { width:70%; }
