.profile-page { width: 100%; margin: 0; padding: 28px; color: var(--theme-text-color); height: 100%; overflow: auto; }
#Menu_Profile { text-decoration: none; display: block; }
.profile-page-heading { margin-bottom: 24px; }
.profile-page h1 { font-size: 28px; font-weight: 650; margin: 0 0 6px; }
.profile-page-heading p, .profile-section-note { margin: 0; color: var(--theme-text-color); opacity: .75; font-size: 14px; }
#account-profile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; margin-bottom: 20px; }
.profile-card { min-width: 0; padding: 24px; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-Settings-background); box-shadow: 0 2px 5px rgb(0 0 0 / 3%); }
.profile-details-card { grid-row: span 2; }
#account-profile > :only-child { grid-column: 1 / -1; }
#account-profile:not(:has(.profile-card:nth-child(3))) .profile-details-card { grid-row: auto; }
.profile-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.profile-page h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; margin: 0; }
.profile-page h2 > .bi { font-size: 19px; opacity: .65; }
.profile-heading-actions { display: flex; align-items: center; gap: 8px; }
.profile-page button { padding: 9px 14px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-Settings-background); color: var(--theme-text-color); font: inherit; font-size: 14px; cursor: pointer; }
.profile-page button:hover:not(:disabled) { background: var(--theme-button-hover); }
.profile-page button:focus-visible, .profile-ticket-link:focus-visible { outline: 2px solid var(--theme-text-color); outline-offset: 3px; }
.profile-page .profile-edit-button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.profile-page .profile-icon-button { display: inline-grid; place-items: center; padding: 0; width: 36px; height: 36px; border-color: transparent; background: transparent; font-size: 19px; flex-shrink: 0; }
.profile-details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin: 0; }
.profile-detail-item { min-width: 0; padding-bottom: 18px; border-bottom: 1px solid var(--theme-border); }
.profile-card dt { font-size: 13px; font-weight: 500; opacity: .7; margin-bottom: 6px; }
.profile-card dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.profile-company-name { font-size: 20px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.profile-ticket-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0 0 16px; }
.profile-ticket-counts dd { font-size: 32px; font-weight: 650; line-height: 1.15; }
.profile-ticket-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--theme-text-color); text-decoration: none; }
.profile-ticket-link:hover { color: var(--theme-text-color); text-decoration: underline; text-underline-offset: 4px; }
.profile-card fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.profile-card legend { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.profile-appearance-options { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 32px; }
.profile-appearance-options .profile-section-note { margin-bottom: 18px; }
.profile-modes { display: grid; gap: 10px; }
.profile-colours { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.profile-page .profile-choice { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--theme-border); border-radius: 6px; cursor: pointer; font-size: 14px; }
.profile-choice:has(input:checked) { border-color: var(--theme-text-color); box-shadow: inset 0 0 0 1px var(--theme-text-color); font-weight: 600; }
.profile-choice:focus-within { outline: 2px solid var(--theme-text-color); outline-offset: 2px; }
.profile-page input[type=radio] { appearance: auto; width: 15px; height: 15px; margin: 0; flex-shrink: 0; accent-color: var(--Darkest-theme-color); }
.profile-page .ColourBlock { width: 22px; height: 22px; margin: 0; border-radius: 4px; flex-shrink: 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
#profile-form > fieldset > .profile-actions { padding-top: 20px; border-top: 1px solid var(--theme-border); }
.profile-page button:disabled, .profile-page fieldset:disabled { opacity: .65; cursor: default; }
#profile-status { margin: 12px 0 0; font-size: 13px; opacity: .8; }
#profile-retry { margin-top: 12px; }
#profile-retry[hidden] { display: none; }
.account-edit-form { margin-top: 20px; }
.account-edit-form > fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.account-edit-form label { display: grid; gap: 6px; font-size: 13px; margin: 0; }
.account-edit-form .profile-actions { grid-column: 1 / -1; margin-top: 4px; }
.account-edit-form input { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-Settings-background); color: var(--theme-text-color); font-size: 15px; }
.account-editing .profile-detail-editable { display: none; }
#account-profile-status { margin: 20px 0 0; font-size: 14px; }
#account-profile-status:empty { margin: 0; }
@media (min-width: 1600px) {
    #account-profile { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr) minmax(280px, 1fr); }
    .profile-details-card { grid-row: auto; }
}
@media (max-width: 1000px) {
    #account-profile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-details-card { grid-column: 1 / -1; grid-row: auto; }
    .profile-appearance-options { grid-template-columns: 1fr; gap: 28px; }
    .profile-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .profile-page { padding: 16px; }
    #account-profile { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
    .profile-card { padding: 18px; }
    .profile-card-heading { gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
    .profile-details-list, .account-edit-form > fieldset { grid-template-columns: 1fr; gap: 16px; }
    .profile-modes { grid-template-columns: 1fr; }
    .profile-colours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-page .profile-colours .profile-choice { flex-wrap: wrap; gap: 8px; }
    .profile-colours .profile-choice > span:last-child { flex-basis: 100%; }
}
