.admin-page { background: #f5f0f4; }
.admin-header { background: #211421; color: #fff7fb; }
.admin-header-inner { min-height: 4.6rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.admin-header .brand-name small { color: #e6beda; }
.admin-header nav { display: flex; align-items: center; gap: .65rem; }
.admin-header nav :is(a, button) { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .38rem .7rem; background: transparent; border: 1px solid #815570; color: white; border-radius: .35rem; font-size: .86rem; font-weight: 800; text-decoration: none; }
.admin-header nav :is(a, button):hover { background: #4c2340; }
.admin-main { padding-block: clamp(1.3rem, 4vw, 4rem); }

.auth-panel { max-width: 56rem; margin: clamp(.3rem, 3vw, 2.5rem) auto; display: grid; grid-template-columns: .72fr 1fr; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 1rem 3rem #3c18301c; }
.auth-side { display: grid; place-items: center; background: radial-gradient(ellipse, #78254e, #38152e 64%, #221523); isolation: isolate; position: relative; overflow: hidden; }
.auth-side::before { content: ''; position: absolute; z-index: -1; width: 160%; height: 160%; transform: rotate(-20deg); background: repeating-linear-gradient(0deg, transparent 0 34px, #ffd2e824 34px 35px), repeating-linear-gradient(90deg, transparent 0 55px, #ffd2e824 55px 56px); }
.auth-side .club-logo { width: clamp(6.5rem, 13vw, 11rem); box-shadow: 0 0 0 .5rem #fff3, 0 1.1rem 2rem #2400139c; }
.auth-content { padding: clamp(1.2rem, 4.8vw, 3.8rem); }
.auth-content h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); }
.auth-content > p { margin-top: .6rem; color: var(--muted); }
.auth-content form { display: grid; gap: .9rem; margin-top: 1.35rem; }
.auth-content .button, #retry-connection { margin-top: .25rem; justify-self: start; }

.dashboard-hero { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.35rem; padding: clamp(1.15rem, 3.5vw, 3rem); color: white; background: linear-gradient(122deg, #211421 17%, #4b1e42 64%, #791944); border-radius: .85rem; }
.dashboard-hero h1 { font-size: clamp(2.1rem, 5.25vw, 4.1rem); }
.dashboard-hero p { color: #f6bddc; font-size: .9rem; font-weight: 800; margin-bottom: .32rem; }
.dashboard-hero > span { font-size: .84rem; font-weight: 800; border: 1px solid #ca8aaf; border-radius: .3rem; padding: .3rem .6rem; overflow-wrap: anywhere; }
.dashboard-layout { display: grid; grid-template-columns: minmax(10rem, .23fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dashboard-nav { display: grid; gap: .32rem; padding: .65rem; background: #fff; border: 1px solid var(--line); border-radius: .65rem; }
.dashboard-nav button { display: flex; align-items: center; justify-content: space-between; gap: .42rem; padding: .46rem .7rem; min-height: 2.75rem; border: 0; border-radius: .38rem; background: transparent; color: var(--ink); text-align: left; font-size: .9rem; font-weight: 800; }
.dashboard-nav button:hover { background: #f8eef4; }
.dashboard-nav [aria-pressed='true'] { background: #f3dfec; color: #70032e; }
.dashboard-nav span { min-width: 1.4rem; text-align: center; font-size: .75rem; background: white; border-radius: .3rem; }
.admin-list-panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: .65rem; padding: clamp(.85rem, 2.7vw, 1.8rem); }
.admin-list-head { display: flex; align-items: start; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
.admin-list-head h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); }
.admin-list-head p { color: var(--muted); margin-top: .25rem; }
.admin-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-block: 1.15rem .85rem; }
.admin-toolbar .admin-field { width: min(100%, 17.5rem); }
.admin-toolbar .button { font-size: .85rem; min-height: 2.75rem; }
.admin-records { list-style: none; padding: 0; margin: 0; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .55rem .8rem; border-top: 1px solid var(--line); padding: .78rem 0; }
.admin-row h3 { font-size: 1rem; overflow-wrap: anywhere; }
.admin-row p { color: var(--muted); font-size: .86rem; margin-top: .18rem; overflow-wrap: anywhere; }
.admin-row .button { font-size: .83rem; min-height: 2.75rem; padding-inline: .7rem; }
.record-actions { display: flex; flex-wrap: wrap; gap: .42rem; justify-content: end; }
.record-sponsor { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.record-sponsor img { width: clamp(2.75rem, 8vw, 5.25rem); height: 2.75rem; flex: none; object-fit: contain; border: 1px solid var(--line); border-radius: .3rem; }
.record-status { background: #f2eaf0; color: #654c60; border-radius: .3rem; padding: .23rem .48rem; font-weight: 800; font-size: .76rem; }
.record-status.is-live { color: #12634e; background: #e8f7f1; }
.record-empty { color: var(--muted); padding: .95rem .4rem; border-top: 1px solid var(--line); }
.admin-message, .admin-error { padding: .65rem .75rem; border-left: 3px solid #944269; border-radius: .3rem; background: #f9edf4; color: #4e2541; font-size: .88rem; margin-block: .65rem; }
.admin-error { border-color: #ad1745; color: #90123c !important; }

.editor { width: min(60rem, calc(100% - 1rem)); max-height: calc(100dvh - 1rem); padding: 0; border: 1px solid #b787a7; border-radius: .7rem; background: white; color: var(--ink); }
.editor::backdrop { background: #190814ba; backdrop-filter: blur(3px); }
body:has(.editor[open]) { overflow: hidden; }
.editor-head, .editor-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem clamp(.8rem, 2.5vw, 1.5rem); background: white; }
.editor-head { border-bottom: 1px solid var(--line); }
.editor-head h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
.editor-close { width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--line); border-radius: .35rem; background: white; color: var(--ink); font-size: 1.4rem; }
.editor-close:hover { background: var(--pink-light); }
.editor-fields { padding: clamp(.8rem, 2.5vw, 1.5rem); }
.editor-error { margin-inline: clamp(.8rem, 2.5vw, 1.5rem); }
.editor-actions { position: sticky; bottom: 0; z-index: 1; justify-content: end; flex-wrap: wrap; border-top: 1px solid var(--line); background: #fffafd; }
.editor-actions .button { min-height: 2.75rem; }
.editor button:disabled, .auth-content button:disabled, .admin-list-panel button:disabled { cursor: wait; opacity: .64; }
.delete-record, .clear-image { min-height: 2.75rem; border: 0; background: none; color: #8d0d3d; font-size: .86rem; font-weight: 800; text-underline-offset: .2em; text-decoration: underline; padding: .3rem 0; }
.delete-record { margin-right: auto; }
.form-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr); gap: clamp(.7rem, 2vw, 1.4rem); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .7rem; }
.span-two { grid-column: 1 / -1; }
.admin-field { display: grid; gap: .26rem; color: var(--ink); font-size: .86rem; font-weight: 800; min-width: 0; }
.admin-field :is(input, textarea, select) { width: 100%; min-width: 0; min-height: 2.75rem; margin: 0; padding: .5rem .63rem; background: #fff; color: var(--ink); font: 600 1rem/1.3 var(--text); border: 1px solid #d9c7d4; border-radius: .35rem; }
.admin-field input[type=file] { font-size: .8rem; padding-inline: .35rem; }
.admin-field textarea { resize: vertical; }
.check-field { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-weight: 800; font-size: .87rem; color: var(--ink); }
.check-field input { flex: none; width: 1.1rem; height: 1.1rem; accent-color: var(--pink); }
.editor-preview { background: #faf2f8; border-radius: .55rem; border: 1px solid #ecd9e6; padding: .7rem; }
.preview-caption { color: #654c60; font-size: .82rem; font-weight: 800; margin-bottom: .48rem; }
.preview-image { position: relative; overflow: hidden; aspect-ratio: 16/10; display: grid; place-items: center; background: linear-gradient(130deg, #361831, #782953); color: #fde5f6; font-size: .83rem; font-weight: 800; }
.preview-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.preview-image .seed-photo { position: absolute; width: 145%; max-width: none; height: auto; top: -7%; left: -20%; }
.preview-image .seed-photo.group, .preview-image .seed-photo.serve { width: 355%; top: 0; transform: translateY(-83%); }
.preview-image .seed-photo.group { left: -245%; }
.preview-image .seed-photo.serve { left: -5%; }
.player-preview { max-width: 13rem; aspect-ratio: 4/5; border-radius: .35rem; margin-inline: auto; }
.sponsor-preview { aspect-ratio: 4 / 1.7; border: 1px solid var(--line); border-radius: .35rem; background: #fff; color: var(--muted); }
.sponsor-preview img { object-fit: contain; object-position: center; padding: .35rem; }
.news-preview { background: white; border: 1px solid #ecd9e6; border-radius: .35rem; overflow: hidden; }
.news-preview > div:last-child { padding: .65rem; }
.news-preview h3 { font-size: 1.03rem; overflow-wrap: anywhere; }
.news-preview p { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.news-preview #preview-category { color: var(--pink-dark); font-weight: 800; margin-bottom: .2rem; }
.news-preview #preview-summary { margin-top: .3rem; }
.photo-field-control { margin-top: .6rem; }

@media (max-width: 670px) {
  .auth-panel, .dashboard-layout, .form-columns { grid-template-columns: minmax(0, 1fr); }
  .auth-side { min-height: 8.8rem; }
  .dashboard-nav { display: flex; flex-wrap: wrap; }
  .dashboard-hero { align-items: start; flex-direction: column; }
  .admin-row { grid-template-columns: minmax(0, 1fr) auto; }
  .record-status { grid-row: 2; justify-self: start; }
  .record-actions { grid-column: 2; grid-row: 1 / 3; }
}
@media (max-width: 370px) {
  .admin-header nav { gap: .3rem; }
  .admin-header nav :is(a, button) { padding-inline: .45rem; }
  .dashboard-nav button { padding-inline: .42rem; }
  .admin-row:has(.record-actions a) .record-actions { grid-column: 1 / -1; grid-row: 3; justify-content: start; }
  .editor-actions .button { padding-inline: .55rem; }
}
