#page-profiles [hidden], #profile-modal [hidden] { display: none !important; }
.profiles-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:20px; }
.profiles-heading h2, .profile-detail-head h2 { font-size:clamp(24px,2.5vw,32px); letter-spacing:-.035em; line-height:1.15; }
.profiles-heading p, .profile-detail-head p { color:var(--ink-m); margin-top:6px; }
.profiles-heading-actions, .profile-header-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.profiles-report-menu { position:relative; }
.profiles-report-menu summary { display:inline-flex; align-items:center; list-style:none; cursor:pointer; }
.profiles-report-menu summary::-webkit-details-marker { display:none; }
.profiles-report-menu>div { position:absolute; top:calc(100% + 6px); right:0; z-index:20; min-width:180px; padding:6px; background:#fff; border:1px solid var(--bd); border-radius:10px; box-shadow:0 14px 30px rgba(16,45,61,.15); }
.profiles-report-menu button { display:block; width:100%; text-align:left; border:0; border-radius:6px; background:transparent; color:var(--ink); padding:9px 10px; }
.profiles-report-menu button:hover { background:var(--sunken); }
.profiles-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.profiles-totals>div, .profile-progress-grid>div { background:var(--raised); border:1px solid var(--bd); border-radius:14px; padding:18px 20px; min-width:0; box-shadow:var(--shad); }
.profiles-totals small, .profile-progress-grid small { display:block; font-size:10px; font-weight:800; letter-spacing:.09em; color:var(--ink-m); }
.profiles-totals strong, .profile-progress-grid strong { display:block; margin-top:8px; font-size:clamp(16px,1.6vw,23px); line-height:1.2; letter-spacing:-.025em; overflow-wrap:anywhere; }
.profiles-totals span { display:block; margin-top:5px; color:var(--ink-m); font-size:11px; }
.profile-progress-grid strong { font-size:16px; letter-spacing:-.035em; }
.profiles-totals>div:last-child strong, .profile-progress-grid>div:nth-child(3) strong { color:var(--primary); }
.profiles-list-card { overflow:hidden; }
.profiles-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:18px 20px; border-bottom:1px solid var(--bd); }
.profiles-filters label { display:flex; flex-direction:column; gap:5px; color:var(--ink-s); font-size:12px; font-weight:700; min-width:150px; }
.profiles-filters label:first-child { flex:1 1 240px; }
.profiles-filters input, .profiles-filters select { width:100%; height:40px; border:1px solid var(--bd-s); border-radius:9px; color:var(--ink); background:#fff; padding:0 12px; outline:none; }
.profiles-filters input:focus, .profiles-filters select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(18,109,105,.12); }
.profiles-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:20px; }
.profiles-cards>.empty { grid-column:1/-1; }
.profile-card { border:1px solid var(--bd); border-radius:14px; padding:20px; background:#fff; box-shadow:0 3px 14px rgba(16,45,61,.035); }
.profile-card:hover { border-color:var(--bd-s); box-shadow:0 8px 24px rgba(16,45,61,.08); }
.profile-card-top { display:flex; align-items:start; justify-content:space-between; gap:12px; }
.profile-card-top h3 { font-size:17px; line-height:1.25; overflow-wrap:anywhere; }
.profile-card-top span:not(.profile-status) { display:block; color:var(--ink-m); font-size:12px; margin-top:4px; }
.profile-status { display:inline-flex; align-items:center; white-space:nowrap; padding:5px 9px; border-radius:99px; background:var(--blu-bg); color:var(--blu); font-size:11px; font-weight:800; }
.profile-status.in-progress { background:var(--amb-bg); color:var(--amb); }
.profile-status.complete { background:var(--grn-bg); color:var(--grn); }
.profile-status.exceeds-target { background:var(--red-bg); color:var(--red); }
.profile-status.no-target { background:#edf1f3; color:var(--ink-s); }
.profile-card-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0; }
.profile-card-metrics div { min-width:0; }
.profile-card-metrics dt { color:var(--ink-m); font-size:11px; }
.profile-card-metrics dd { margin:3px 0 0; font-size:15px; font-weight:800; overflow-wrap:anywhere; }
.profile-track { height:8px; background:#e8efef; border-radius:100px; overflow:hidden; }
.profile-track span { display:block; height:100%; background:linear-gradient(90deg,var(--primary),#51a79c); border-radius:inherit; }
.profile-card-footer { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-top:9px; }
.profile-card-footer small { color:var(--ink-m); font-size:11px; white-space:nowrap; }
.profile-card-footer>div { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.profile-card-footer .btn { white-space:nowrap; }
.profile-back { margin-bottom:14px; }
.profile-detail-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:22px 24px; margin-bottom:16px; }
.profile-progress-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.profile-progress-card { padding:16px 20px; margin-bottom:16px; }
.profile-progress-label { display:flex; justify-content:space-between; gap:16px; margin-bottom:10px; }
.profile-progress-label span { color:var(--ink-m); }
.profile-section { overflow:hidden; margin-bottom:16px; }
.profile-section .card-head { align-items:center; }
.profile-selection-bar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 20px; border-bottom:1px solid var(--bd); background:#f5faf8; }
.profile-line-actions { display:flex; flex-wrap:wrap; gap:7px; }
.profile-action-summary { margin:14px 0; padding:12px; border:1px solid var(--bd); border-radius:9px; background:#f2f8f6; color:var(--ink); font-size:12px; font-weight:750; line-height:1.6; }
.profile-school-id { display:block; color:var(--ink-m); font-size:11px; font-weight:400; }
.profile-bottom-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.profile-notes { display:flex; justify-content:space-between; align-items:start; gap:16px; padding:18px 20px; border-bottom:1px solid var(--bd); }
.profile-notes p { color:var(--ink-s); }
.profile-history { list-style:none; padding:16px 20px 20px; margin:0; max-height:330px; overflow:auto; }
.profile-history li { position:relative; padding:0 0 16px 19px; border-left:2px solid var(--bd); margin-left:5px; }
.profile-history li::before { content:''; position:absolute; width:9px; height:9px; top:5px; left:-5px; background:var(--primary); border-radius:50%; }
.profile-history li:last-child { padding-bottom:0; }
.profile-history strong, .profile-history span { display:block; }
.profile-history span, .profile-history p { color:var(--ink-m); font-size:12px; }
.profile-modal { width:min(520px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow-y:auto; }
.profile-modal .fg { margin:12px 0; }
.profile-modal input:not([type=radio]), .profile-modal textarea { width:100%; }
.profile-remove-options { display:flex; flex-direction:column; gap:8px; margin:16px 0; }
.profile-remove-options label { display:flex; align-items:center; gap:8px; }
.profile-modal-actions { position:sticky; bottom:-28px; display:flex; justify-content:flex-end; gap:8px; padding:16px 0 8px; background:#fff; }
.profile-input-hint { min-height:18px; color:var(--primary); font-size:11px; line-height:1.4; margin-top:5px; }
.supplier-integration-card { margin-top:18px; }
.supplier-integration-form { display:flex; flex-direction:column; gap:7px; margin-top:14px; }
.supplier-integration-form label { font-weight:700; font-size:12px; }
.supplier-integration-form input { min-width:0; flex:1; }
.supplier-integration-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:12px; }
.supplier-integration-actions span { color:var(--ink-m); font-size:11px; }
.supplier-integration-results { display:grid; gap:7px; margin-top:13px; }
.supplier-integration-results>div { display:flex; justify-content:space-between; gap:12px; padding:9px 12px; border:1px solid var(--bd); border-radius:8px; background:var(--sunken); }
.integration-ok { color:var(--grn); }
.integration-warning { color:var(--amb); }
@media(max-width:1050px) { .profiles-cards { grid-template-columns:1fr; } .profile-progress-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) { .profiles-heading,.profile-detail-head { align-items:start; flex-direction:column; } .profiles-totals,.profile-progress-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .profile-bottom-grid { grid-template-columns:1fr; } .profile-card-footer { align-items:start; flex-direction:column; } .profile-card-footer>div { justify-content:flex-start; } }
@media(max-width:450px) { .profile-card-metrics { grid-template-columns:1fr 1fr; } .profiles-totals>div,.profile-progress-grid>div { padding:13px; } }
.profile-page-options { display:flex; align-items:center; flex-wrap:wrap; gap:16px; }
.profile-page-options label { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ink-m); white-space:nowrap; }
.profile-page-options select { width:auto; min-width:72px; padding:7px 26px 7px 10px; }
.profile-lines-pagination { flex-wrap:wrap; gap:12px; }

.supplier-edit-name { border:0; background:none; padding:0; color:inherit; font:inherit; font-weight:inherit; text-align:inherit; cursor:pointer; }
.supplier-edit-name span { color:var(--primary); font-size:.78em; opacity:.65; }
.supplier-edit-name:hover { color:var(--primary); text-decoration:underline; }
.supplier-edit-name:focus-visible { outline:2px solid var(--primary); outline-offset:4px; border-radius:3px; }
.supplier-edit-control { border:0; background:none; color:var(--primary); font:inherit; font-size:12px; font-weight:700; cursor:pointer; float:right; padding:0 0 4px; }
.supplier-edit-overlay { z-index:1200; }
#supplier-edit-modal [hidden] { display:none !important; }
.supplier-edit-pair { display:grid; grid-template-columns:2fr 1fr; gap:16px; }
@media(max-width:520px) { .supplier-edit-pair { grid-template-columns:1fr; gap:0; } }

.summary-supplier-row { grid-template-columns:minmax(0,1fr) auto auto auto; }
@media(max-width:1250px) { .summary-supplier-row { grid-template-columns:minmax(0,1fr) auto; } }
@media(max-width:640px) { .summary-supplier-row { grid-template-columns:1fr; } }
