:root{--ink:#18332f;--muted:#657a76;--teal:#286e61;--teal2:#dceee8;--paper:#f5f8f6;--line:#d7e2dd;--white:#fff;--shadow:0 8px 24px rgba(23,55,48,.06)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.45 Inter,Segoe UI,Arial,sans-serif}
button{font:inherit;cursor:pointer;border:0;border-radius:9px;padding:10px 14px;font-weight:700;background:var(--teal);color:#fff}
header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}
.head{max-width:1440px;margin:auto;padding:14px 22px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{font-weight:900;letter-spacing:.04em;font-size:21px}.brand span{color:var(--teal)}.club{font-size:12px;color:var(--muted);margin-top:2px}
.headright{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px}
nav{max-width:1440px;margin:auto;padding:0 22px 12px;display:flex;gap:7px;overflow:auto}
nav a{color:var(--muted);text-decoration:none;white-space:nowrap;padding:9px 12px;border-radius:8px;font-weight:650}
nav a.active,nav a:hover{background:var(--teal2);color:var(--teal)}
main{max-width:1440px;margin:26px auto;padding:0 22px 60px}
.pagehead{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px}
.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:var(--teal)}
h1{font-size:29px;line-height:1.15;margin:5px 0 6px}h2{font-size:18px;margin:0 0 12px}
.sub{color:var(--muted);margin:0}.grid{display:grid;gap:16px}.stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:20px}
.stat,.panel,.match{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.stat{padding:17px}.stat strong{display:block;font-size:28px;margin:3px 0}.stat small{color:var(--muted)}
.two{grid-template-columns:1.2fr .8fr}.panel{padding:18px;margin-bottom:17px}
.tag{display:inline-flex;align-items:center;border-radius:99px;padding:4px 9px;font-size:11px;font-weight:800;background:#edf2ef;color:var(--muted)}
.tag.live{background:#e0f4e9;color:#187247}.tag.info{background:#e8eef8;color:#456a9a}
.booking{padding:12px 14px;display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:9px;border:1px solid var(--line);border-radius:10px}
.booking small{display:block;color:var(--muted);margin-top:3px}
.match{padding:18px;margin-bottom:13px}.matchtop{display:flex;justify-content:space-between;align-items:center;gap:12px}
.matchtitle{font-weight:800;font-size:17px}.matchmeta{color:var(--muted);font-size:12px;margin-top:3px}
.scoreline{display:flex;align-items:center;gap:13px;margin:14px 0}.score{font-size:31px;font-weight:850}.rinkgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.rink{background:#f7faf8;border:1px solid var(--line);border-radius:10px;padding:10px}.rink b{display:block;font-size:12px;color:var(--teal);margin-bottom:5px}.rscore{font-weight:800;font-size:18px}.players{font-size:12px;color:var(--muted);margin-top:5px}
.empty{padding:30px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:12px}
.notice{padding:12px 14px;background:#fff9e9;border:1px solid #efdfb7;border-radius:10px;color:#745d28;font-size:13px;margin-top:12px}
.error{padding:14px;background:#fff0ef;border:1px solid #efc8c4;border-radius:10px;color:#91433d}
@media(max-width:900px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.two{grid-template-columns:1fr}.rinkgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.pagehead{display:block}}
@media(max-width:560px){main{padding:0 13px 40px;margin-top:18px}.head{padding:12px 14px}.headright{display:none}.brand{font-size:18px}nav{padding:0 10px 10px}.stats{gap:9px}.stat{padding:12px}.stat strong{font-size:23px}.rinkgrid{grid-template-columns:1fr 1fr}.score{font-size:26px}}

/* Club homepage */
.home-welcome{padding:22px 0 24px;margin-bottom:4px}
.home-welcome h1{font-size:34px;margin:6px 0 8px}
.home-welcome p{color:var(--muted);margin:0;font-size:16px;max-width:720px}
.home-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.85fr);gap:18px;align-items:start}
.home-primary,.home-sidebar{min-width:0}
.home-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}
.home-section-head h2{margin:4px 0 0}
.home-news-placeholder{display:flex;align-items:center;gap:17px;padding:25px;background:#f7faf8;border:1px dashed var(--line);border-radius:12px;min-height:145px}
.home-news-mark{width:64px;height:64px;flex:0 0 64px;border-radius:16px;background:var(--teal2);color:var(--teal);display:grid;place-items:center;font-size:30px;font-weight:900}
.home-news-placeholder strong{font-size:16px}
.home-news-placeholder p{margin:5px 0 0;max-width:650px;line-height:1.55}
.home-live-list{display:grid;gap:9px}
.home-live-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid var(--line);border-radius:11px;background:#fbfdfc}
.home-live-main,.home-live-score{display:flex;flex-direction:column;gap:4px}
.home-live-main strong{font-size:15px}
.home-live-main small,.home-live-score small{color:var(--muted);font-size:12px}
.home-live-main .tag{width:max-content;margin-bottom:2px}
.home-live-score{text-align:right;white-space:nowrap}
.home-live-score strong{font-size:23px;letter-spacing:.02em}
.home-action{margin-top:14px}
.home-empty{padding:18px;border:1px dashed var(--line);border-radius:10px;color:var(--muted);background:#fafcfb;font-size:13px;line-height:1.55}
.home-empty.compact{margin:13px 0}
.home-text-link{display:inline-block;color:var(--teal);font-weight:750;text-decoration:none;font-size:13px;margin-top:2px}
.home-text-link:hover{text-decoration:underline}
.home-info-list{display:grid;gap:0}
.home-info-list>div{padding:12px 0;border-bottom:1px solid var(--line)}
.home-info-list>div:last-child{border-bottom:0}
.home-info-list strong,.home-info-list small{display:block}
.home-info-list strong{font-size:14px}
.home-info-list small{color:var(--muted);font-size:12px;margin-top:3px}
.home-info-note{font-size:11px;line-height:1.5;color:var(--muted);margin:10px 0 0}
.diary-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.button-secondary{background:#edf4f0;color:var(--teal);border:1px solid var(--line)}
.diary-week{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));gap:10px;overflow-x:auto}.diary-day{min-width:130px;background:#fafcfb;border:1px solid var(--line);border-radius:11px;padding:10px}.diary-day h3{margin:0 0 10px;font-size:13px}.diary-session{border-top:1px solid var(--line);padding:9px 0}.diary-session-head{display:flex;justify-content:space-between;gap:5px;font-size:11px}.diary-session-head small{color:var(--muted)}.diary-slots{display:grid;gap:5px;margin-top:7px}.diary-slot{width:100%;padding:7px 5px;font-size:11px;text-align:left;border:1px solid var(--line)}.diary-slot.available{background:white;color:var(--teal)}.diary-slot.occupied{background:#f4f1e9;color:#795d1b}.diary-slot:disabled{cursor:not-allowed;opacity:.8}.diary-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;align-items:center}.diary-form input:not([type=checkbox]),.session-edit input{min-width:0;width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;font:inherit}.diary-form label{display:flex;gap:8px;align-items:center}.session-edit{display:grid;grid-template-columns:1.3fr 1fr 1fr auto;gap:8px;margin:8px 0}.diary-form hr{grid-column:1/-1}
.competition-list{display:grid;gap:12px}.competition-list h2{margin:0}.competition-card{padding:16px;background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.competition-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.competition-card-head strong,.competition-card-head small{display:block}.competition-card-head small{color:var(--muted);margin-top:4px}.competition-card details,.settings-details{margin-top:13px;border-top:1px solid var(--line);padding-top:11px}.competition-card summary,.settings-details summary{cursor:pointer;color:var(--teal);font-weight:700}.entry-form{display:grid;gap:9px;margin-top:12px}.entry-form select[multiple],.booking-editor-form select[multiple]{min-height:116px}.entry-form small{color:var(--muted)}.my-entries{margin-top:12px;padding:11px;background:#f6faf8;border-radius:9px}.my-entries>div{margin-top:6px}.my-entries small{color:var(--muted)}
.booking-dialog{width:min(540px,calc(100% - 24px));max-height:90vh;border:1px solid var(--line);border-radius:16px;padding:0;box-shadow:0 22px 70px rgba(23,55,48,.24);color:var(--ink)}.booking-dialog::backdrop{background:rgba(15,36,32,.48)}.booking-editor-form{position:relative;padding:25px;display:grid;gap:11px}.booking-editor-form h2{margin:0}.booking-editor-form label{display:grid;gap:5px;font-size:13px;font-weight:700}.booking-editor-form input,.booking-editor-form select{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;font:inherit}.booking-editor-form section{display:grid;gap:10px}.booking-editor-form small{color:var(--muted)}.dialog-close{position:absolute;right:12px;top:12px;padding:5px 10px;background:transparent;color:var(--muted);font-size:22px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:8px}.form-error{color:#a43c36;font-size:13px;min-height:18px}
@media(max-width:900px){.home-layout{grid-template-columns:1fr}.home-welcome h1{font-size:29px}}
@media(max-width:560px){.home-welcome{padding:14px 0 19px}.home-welcome h1{font-size:26px}.home-news-placeholder{padding:17px;align-items:flex-start}.home-news-mark{width:48px;height:48px;flex-basis:48px;font-size:23px}.home-live-row{align-items:flex-start}.home-live-score strong{font-size:19px}}
@media(max-width:700px){.diary-toolbar{flex-wrap:wrap}.diary-week{grid-template-columns:repeat(7,150px)}.session-edit{grid-template-columns:1fr 1fr}.diary-toolbar strong{order:-1;width:100%;text-align:center}}

/* Draw & Bracket Viewer */
.draw-wrap{margin-top:16px;border-top:1px solid var(--line);padding-top:16px}
.draw-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.draw-bracket{display:flex;gap:20px;overflow-x:auto;padding:10px 4px 20px;align-items:flex-start}
.bracket-round{flex:0 0 280px;display:flex;flex-direction:column;gap:14px}
.bracket-round-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--teal);border-bottom:2px solid var(--teal2);padding-bottom:6px;margin-bottom:2px}
.bracket-fixture{background:#fff;border:1px solid var(--line);border-radius:11px;padding:12px;box-shadow:var(--shadow);display:grid;gap:6px;transition:border-color .2s}
.bracket-fixture.scheduled{border-left:4px solid #187247;background:#fafdfb}
.bracket-fixture.completed{border-left:4px solid var(--teal)}
.fixture-header{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);font-weight:700}
.fixture-players{display:grid;gap:5px}
.fixture-player-row{display:flex;justify-content:space-between;align-items:center;padding:7px 9px;border-radius:7px;background:#f8faf9;font-size:13px;border:1px solid transparent}
.fixture-player-row.winner{background:#e0f4e9;color:#187247;font-weight:750;border-color:#bce5ce}
.fixture-player-row.bye{color:var(--muted);font-style:italic}
.fixture-score{font-weight:850;font-size:13px;min-width:22px;text-align:right}
.fixture-badge-scheduled{display:inline-flex;align-items:center;gap:5px;background:#eef8f3;color:#187247;padding:4px 8px;border-radius:6px;font-size:11px;font-weight:700;margin-top:4px}
.fixture-badge-pending{display:inline-flex;align-items:center;gap:5px;background:#f6f8f7;color:var(--muted);padding:4px 8px;border-radius:6px;font-size:11px;font-weight:600;margin-top:4px}
.fixture-actions{display:flex;gap:7px;margin-top:6px;flex-wrap:wrap}
.fixture-actions button{padding:6px 10px;font-size:11px;border-radius:7px}
.fixture-actions .btn-book{background:#187247}
.fixture-actions .btn-result{background:var(--teal)}
.comp-tabs{display:flex;gap:8px;margin-bottom:14px;border-bottom:1px solid var(--line);padding-bottom:8px}
.comp-tab{background:transparent;color:var(--muted);padding:6px 12px;font-size:13px;border-radius:6px}
.comp-tab.active{background:var(--teal2);color:var(--teal);font-weight:750}

/* Result Modal */
.result-dialog{width:min(440px,calc(100% - 24px));border:1px solid var(--line);border-radius:16px;padding:0;box-shadow:0 22px 70px rgba(23,55,48,.24)}
.result-dialog::backdrop{background:rgba(15,36,32,.48)}
.result-form{position:relative;padding:24px;display:grid;gap:12px}
.result-scores{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}
.result-scores label{display:grid;gap:5px;font-size:12px;font-weight:700}
.result-scores input{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;font-size:18px;font-weight:800;text-align:center}

/* Rink Diary Enhancements */
.diary-week{display:grid;grid-template-columns:repeat(7,minmax(200px,1fr));gap:12px;overflow-x:auto;padding-bottom:12px}
.diary-day{min-width:200px;background:#ffffff;border:1px solid var(--line);border-radius:12px;padding:12px;box-shadow:var(--shadow)}
.diary-day.today{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal)}
.diary-day-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.diary-day-header h3{margin:0;font-size:13px;font-weight:800}
.diary-session{border-top:1px solid var(--line);padding:10px 0}
.diary-session-head{display:flex;justify-content:space-between;gap:5px;font-size:11px;margin-bottom:8px}
.diary-session-head strong{color:var(--teal)}
.diary-slots{display:grid;gap:7px}

.diary-slot{width:100%;border-radius:9px;padding:9px 10px;text-align:left;border:1px solid var(--line);display:flex;flex-direction:column;gap:3px;font-family:inherit;box-sizing:border-box}
.diary-slot.available{background:#ffffff;border:1px dashed #b7cec5;color:var(--teal);cursor:pointer}
.diary-slot.available:hover{background:#f0f7f4;border-color:var(--teal)}
.diary-slot.occupied{background:#fcfdfc;border:1px solid #d4e5de;border-left:4px solid var(--teal);color:var(--ink);box-shadow:0 2px 6px rgba(23,55,48,.04)}
.diary-slot.occupied.my-booking{border-left-color:#187247;background:#f6faf8}

.slot-top{display:flex;justify-content:space-between;align-items:center;font-size:11px}
.slot-rink-label{font-weight:800;color:var(--muted);font-size:11px}
.slot-tag{font-size:10px;font-weight:750;padding:2px 6px;border-radius:99px;background:var(--teal2);color:var(--teal);max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.slot-tag.comp{background:#e0f4e9;color:#187247}
.slot-tag.county{background:#fef3dc;color:#875a10}
.slot-tag.national{background:#e7f0fa;color:#205596}
.slot-tag.rollup{background:#eceeef;color:#4f5d68}

.slot-title{font-weight:750;font-size:12px;line-height:1.25;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.slot-players{font-size:11px;color:var(--muted);line-height:1.25}
.slot-edit-link{font-size:11px;font-weight:700;color:var(--teal);text-align:right;margin-top:4px;cursor:pointer}
.slot-edit-link:hover{text-decoration:underline}

/* Choice Buttons in Booking Modal */
.choice-btn{background:#f5f8f6;color:var(--muted);border:2px solid var(--line);border-radius:10px;padding:10px 12px;font-size:12px;font-weight:750;cursor:pointer;transition:all .15s ease;text-align:center}
.choice-btn.active{background:#e0f4e9;color:#187247;border-color:#187247}

/* Master Tabular Rink Diary Grid */
.diary-master-container{background:#ffffff;border:1px solid #275a50;border-radius:6px;overflow:hidden;box-shadow:var(--shadow);margin-bottom:24px}
.diary-master-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;background:#ffffff;border-bottom:1px solid var(--line);flex-wrap:wrap}
.diary-nav-pill{background:#ffffff;color:#275a50;border:1.5px solid #275a50;border-radius:6px;padding:6px 14px;font-size:12px;font-weight:750;cursor:pointer;transition:all .15s ease}
.diary-nav-pill:hover{background:#edf5f2}
.diary-nav-pill.primary{background:#275a50;color:#ffffff}
.diary-nav-pill.primary:hover{background:#1d463e}
.diary-table-scroll{overflow-x:auto;width:100%}
.diary-master-table{width:100%;min-width:1050px;border-collapse:collapse;table-layout:fixed;font-size:11px}
.diary-master-table thead th{background:#275a50;color:#ffffff;padding:8px 6px;text-align:center;border:1px solid #1d463e}
.th-session-col{width:115px}
.th-rink-col{width:36px}
.th-day-col{width:calc((100% - 151px) / 7)}
.th-day-name{font-size:13px;font-weight:800;letter-spacing:.02em}
.th-day-date{font-size:11px;font-weight:500;opacity:.92;margin-top:2px}
.diary-master-table tbody td{border:1px solid #94b5ad;padding:4px 6px;vertical-align:middle}
.grid-session-header{text-align:center;font-size:12px;font-weight:850;color:#18332f;letter-spacing:.03em;border-right:2px solid #275a50 !important}
.session-title-vertical{line-height:1.35;max-width:100px;margin:auto}
.grid-rink-num{text-align:center;font-size:12px;font-weight:800;color:#18332f;border-right:2px solid #275a50 !important}
.grid-row-cream td{background:#fdfcf6}
.grid-row-blue td{background:#edf3fa}
.diary-table-cell{height:30px;transition:background .15s ease}
.diary-table-cell.empty-cell{cursor:pointer;text-align:center}
.diary-table-cell.empty-cell:hover{background:#ddf0e6 !important}
.cell-add-icon{color:#275a50;font-size:14px;font-weight:900;opacity:0}
.diary-table-cell.empty-cell:hover .cell-add-icon{opacity:1}
.diary-table-cell.booked{cursor:pointer;background:#fcfaf2}
.diary-table-cell.booked:hover{filter:brightness(0.96)}
.cell-line-wrap{display:flex;justify-content:space-between;align-items:center;gap:4px;width:100%}
.cell-text-main{font-size:10.5px;line-height:1.2;color:#18332f;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.diary-table-cell.comp-cell .cell-text-main{color:#8b2626;font-weight:700}
.diary-table-cell.own-cell{outline:2px solid #187247;outline-offset:-2px}
.cell-badge-own{font-size:9px;font-weight:800;background:#187247;color:#fff;border-radius:4px;padding:1px 4px;margin-left:4px;flex-shrink:0}
.diary-footer-note{background:#275a50;color:#ffffff;padding:8px 14px;font-size:11px;display:flex;justify-content:space-between;align-items:center}

/* Navigation Admin Link */
.nav a.admin-link {
  color: #187247;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav a.admin-link:hover, .nav a.admin-link.active {
  background: #e0f4e9;
  color: #125736;
}
.admin-badge {
  background: #187247;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Admin Console Tabs */
.admin-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.admin-tab-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 13px;
  font-weight: 750;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.admin-tab-btn:hover {
  background: var(--teal2);
  color: var(--teal);
}
.admin-tab-btn.active {
  background: var(--teal);
  color: #ffffff;
}

/* Year Selector Bar */
.annual-head-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.year-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
}
.year-selector label {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  margin: 0;
}
.current-year-badge {
  font-size: 16px;
  font-weight: 850;
  color: var(--teal);
  padding: 0 6px;
}
.btn-year-step {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease;
}
.btn-year-step:hover {
  background: var(--teal2);
  color: var(--teal);
}

/* Annual Repeating Templates Cards */
.annual-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.annual-tpl-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.annual-tpl-card:hover {
  border-color: #94b5ad;
  box-shadow: 0 4px 14px rgba(23,55,48,.08);
}
.tpl-info strong {
  font-size: 15px;
  color: var(--ink);
}
.tpl-trophy {
  font-size: 12.5px;
  color: #7a5410;
  background: #fdf8eb;
  padding: 4px 8px;
  border-radius: 6px;
  margin: 6px 0 4px;
  display: inline-block;
}
.tpl-desc {
  font-size: 11.5px;
  color: var(--muted);
}
.tpl-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.btn-launch-comp {
  background: var(--teal);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.btn-launch-comp:hover {
  background: #187247;
}

/* Member Directory Table & Cards */
.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.member-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}
.member-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.member-row:hover td {
  background: #f8fbfa;
}
.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0f4e9;
  color: #187247;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(24,114,71,.2);
}
.contact-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.contact-link:hover {
  text-decoration: underline;
  color: #187247;
}

/* News Section & Article Styling */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.home-news-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.home-news-item:last-child {
  border-bottom: none;
}
.home-news-item h3 {
  font-size: 16px;
  font-weight: 750;
  margin: 4px 0 6px;
  color: var(--ink);
}
.home-news-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* Bracket Winner & Player Scoring */
.bracket-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.bracket-player.winner {
  background: #e0f4e9;
  color: #187247;
  font-weight: 800;
}
.bracket-player.my-name {
  outline: 1.5px solid #187247;
}
.player-score {
  font-weight: 800;
  font-size: 13px;
}

/* Expanding Session Rink Diary View */
.session-row-cream td {
  background: #fdfcf6;
}
.session-row-blue td {
  background: #edf3fa;
}
.session-day-cell {
  height: 95px;
  min-width: 130px;
  vertical-align: top !important;
  transition: background 0.15s ease;
}
.empty-session-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 80px;
  gap: 5px;
}
.session-bookings-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}
.btn-book-slot {
  background: #ffffff;
  color: #187247;
  border: 1.5px solid #187247;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn-book-slot:hover {
  background: #187247;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(24, 114, 71, 0.24);
}
.btn-book-slot:active {
  transform: translateY(0);
}
.slot-avail-text {
  font-size: 10.5px;
  color: #637772;
  margin-top: 3px;
  text-align: center;
}

/* Individual Booking Card in Session Cell */
.diary-booking-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.diary-booking-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.booking-card-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  line-height: 1.2;
}

/* Draw Priority Badges & Card Themes */
.draw-p-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: #275a50;
  font-size: 10px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* Priority Card Colors */
.card-national {
  background: #edf5fd;
  border: 1px solid #d0e4fa;
  color: #18569c;
}
.card-national .draw-p-badge {
  background: #18569c;
  color: #ffffff;
}

.card-county {
  background: #fef8e7;
  border: 1px solid #f6e6b8;
  color: #875a10;
}
.card-county .draw-p-badge {
  background: #875a10;
  color: #ffffff;
}

.card-club {
  background: #fef0ee;
  border: 1px solid #f8d7d2;
  color: #8b2626;
}
.card-club .draw-p-badge {
  background: #8b2626;
  color: #ffffff;
}

.card-rollup {
  background: #f4f6f5;
  border: 1px solid #dce4e0;
  color: #2c463f;
}
.card-rollup .draw-p-badge {
  background: #2c463f;
  color: #ffffff;
}

.diary-booking-card.my-booking {
  outline: 2px solid #187247;
  outline-offset: -1px;
}

/* Footer Legend */
.diary-footer-legend {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot-member {
  background: #e57373;
}
.dot-admin {
  background: #90a4ae;
}
.dot-avail {
  background: #81c784;
}

/* Rink Draw Priority Key Panel */
.rink-priority-key-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}
.priority-key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.priority-key-card {
  background: #ffffff;
  border: 1px solid #d4e5de;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.priority-key-card:hover {
  border-color: #275a50;
  box-shadow: 0 2px 8px rgba(39, 90, 80, 0.08);
}
.priority-num-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e0f4e9;
  color: #187247;
  font-weight: 850;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.priority-card-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}
.priority-card-sub {
  font-size: 11px;
  color: var(--muted);
}
.booking-editor-form section[hidden], section[hidden], [hidden] { display: none !important; }

/* Header Club-First Branding */
.club-title {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #173730;
  line-height: 1.1;
  text-transform: uppercase;
}
.platform-sub {
  font-size: 10px;
  letter-spacing: 1.3px;
  font-weight: 750;
  color: #6a857e;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.brand-matchly {
  font-weight: 900;
  color: var(--teal);
  letter-spacing: 0.5px;
}
.brand-matchly span {
  color: #d49500;
}

/* Top bar sign-in button */
#loginModalBtn {
  background: #ffffff;
  color: #173730;
  border: 1.5px solid #275a50;
  font-weight: 750;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
#loginModalBtn:hover {
  background: #e0f4e9;
  border-color: #187247;
}

/* Admin Form Styling */
.admin-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  background: #f9fbfa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 20px;
}
.admin-form label {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
}
.admin-form input:not([type=checkbox]), .admin-form select {
  width: 100% !important;
  padding: 9px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  font: inherit !important;
  box-sizing: border-box !important;
}

/* Representative Match Cards */
.rep-match-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #1a4473;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.rep-match-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.rep-match-title {
  margin: 4px 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.rep-match-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.rep-match-points-pill {
  background: #fff8e6;
  border: 1px solid #ffd591;
  color: #874d00;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 750;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rep-squad-container {
  margin-top: 14px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}
.rep-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.rep-rink-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rep-rink-card.home-rink {
  border-top: 3px solid #187247;
}
.rep-rink-card.away-rink {
  border-top: 3px solid #18569c;
}
.rep-rink-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 12.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}
.rep-rink-lineup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.rep-rink-lineup .pos-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rep-rink-lineup .pos-lbl {
  color: var(--muted);
  font-weight: 700;
  width: 45px;
}
.rep-rink-lineup .pos-val {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  flex: 1;
}
.rep-squad-reserves {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}


/* ==========================================
   TOURNAMENT BRACKET ARROW FORMATION
   ========================================== */
.draw-bracket-tree {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  padding: 24px 12px 36px;
  align-items: stretch;
  min-height: 520px;
}
.bracket-tree-round {
  flex: 0 0 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.bracket-round-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--teal);
  border-bottom: 2px solid var(--teal2);
  padding-bottom: 8px;
  margin-bottom: 18px;
  text-align: center;
}
.bracket-matches-column {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  position: relative;
  gap: 24px;
}
.bracket-matches-column.final-round-col {
  justify-content: center;
}
.bracket-match-pair {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  position: relative;
  gap: 20px;
  min-height: 190px;
}
.bracket-match-pair.single-match {
  justify-content: center;
  flex: 0 1 auto;
}
.bracket-match-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.bracket-fixture {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
  z-index: 2;
}
.bracket-fixture:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(24,114,71,0.12);
}
.bracket-fixture.scheduled {
  border-left: 4px solid #187247;
  background: #fafdfb;
}
.bracket-fixture.completed {
  border-left: 4px solid var(--teal);
}
.bracket-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8faf9;
  font-size: 13px;
  margin-top: 3px;
}
.bracket-player.winner {
  background: #e0f4e9;
  color: #187247;
  font-weight: 800;
  border-left: 3px solid #187247;
}
.bracket-player.my-name {
  border: 1.5px solid var(--teal2);
  background: #f0fdf7;
}
.player-score {
  font-weight: 850;
  font-size: 13px;
  min-width: 20px;
  text-align: right;
}

/* Bracket Connectors & Arrow Fork Formation */
.connector-line-left {
  position: absolute;
  left: -20px;
  width: 20px;
  height: 2px;
  background: #187247;
  z-index: 1;
}
.connector-line-right {
  position: absolute;
  right: -20px;
  width: 20px;
  height: 2px;
  background: #8cb8a3;
  z-index: 1;
}
.bracket-pair-connector {
  position: absolute;
  right: -40px;
  top: 25%;
  bottom: 25%;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
}
.bracket-pair-connector .connector-fork {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  border-right: 2px solid #8cb8a3;
  border-top: 2px solid #8cb8a3;
  border-bottom: 2px solid #8cb8a3;
  border-radius: 0 6px 6px 0;
}
.bracket-pair-connector .connector-arrow {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: #187247;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  background: #f9fbfa;
  padding: 0 1px;
}

/* My Area Styles */
.myarea-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}


/* ==========================================
   EXPANDED RINK DIARY CARDS & SCORER CONSOLE
   ========================================== */
.diary-booking-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding: 8px 10px !important;
  min-height: 58px !important;
  border-radius: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  white-space: normal !important;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.diary-booking-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.diary-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.draw-p-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #187247;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}
.card-national .draw-p-badge { background: #b91c1c; }
.card-county .draw-p-badge { background: #1d4ed8; }
.card-rollup .draw-p-badge { background: #d97706; }

.booking-type-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  opacity: 0.85;
}
.booking-card-main-title {
  font-weight: 800;
  font-size: 11.5px;
  color: var(--ink);
  line-height: 1.25;
}
.booking-card-players-row {
  font-size: 11px;
  font-weight: 600;
  color: #175239;
  line-height: 1.2;
}

/* Scorer Screen Styles */
.scorer-screen {
  font-family: inherit;
}
.btn-rink-pill {
  transition: background .15s, color .15s, border-color .15s;
}
.btn-rink-pill.active {
  background: #187247 !important;
  color: #ffffff !important;
  border-color: #187247 !important;
}
.btn-score-adjust {
  transition: transform .1s, background .15s;
}
.btn-score-adjust:active {
  transform: scale(0.95);
}

@media(max-width:560px){
  .club-title { font-size: 18px !important; }
  .platform-sub { font-size: 9px !important; }
}
