:root{
  --navy:#0b2b62;--navy2:#123e7a;--blue:#1d5790;--gold:#f3b62f;--gold2:#ffda75;--cream:#f7efe1;--surface:#fff;--ink:#0c2553;--muted:#657087;--line:#e7d8bd;--soft:#fbf7f0;--green:#0d9469;--red:#b43d3d;--shadow:0 18px 46px rgba(22,43,82,.10);--radius:20px
}
*{box-sizing:border-box}html{background:var(--cream)}body{margin:0;font-family:Segoe UI,Arial,sans-serif;color:var(--ink);background:linear-gradient(180deg,#fbf6ed 0,#f6ead8 100%);min-height:100vh}.app-header{height:72px;background:var(--navy);color:#fff;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 24px;gap:18px;box-shadow:0 8px 24px rgba(11,43,98,.16);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--gold),var(--gold2));color:var(--navy);display:grid;place-items:center;font-size:25px;font-weight:900}.brand strong{display:block;letter-spacing:.02em;font-size:16px;white-space:nowrap}.brand span{display:block;font-size:12px;opacity:.78;margin-top:2px}.app-lang-switch{display:flex;align-items:center;gap:3px}.header-center{text-align:center;min-width:260px}.header-center strong{display:block;font-size:17px}.header-center span{display:block;font-size:12px;opacity:.72;margin-top:3px}.header-actions{display:flex;justify-content:flex-end;align-items:center;gap:7px}.lang-btn{border:0;background:transparent;color:#fff;opacity:.62;font-weight:900;cursor:pointer;padding:6px}.lang-btn.active{opacity:1;text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:4px}.engine-banner{background:#fff3cd;border-bottom:1px solid #ead69b;color:#644d12;display:flex;justify-content:center;gap:12px;padding:8px 20px;font-size:12px}.workflow{width:min(1180px,calc(100% - 30px));margin:12px auto 0;display:grid;grid-template-columns:repeat(5,1fr);background:#fff;border:1px solid var(--line);border-radius:17px;overflow:hidden;box-shadow:var(--shadow)}.step{border:0;border-right:1px solid #eee4d4;background:#fff;color:#52607a;padding:13px 8px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:800;cursor:pointer}.step:last-child{border-right:0}.step span{width:26px;height:26px;border-radius:9px;background:#edf2fa;color:var(--navy);display:grid;place-items:center}.step.active{background:#f7fbff;color:var(--navy);box-shadow:inset 0 -4px var(--gold)}.step.active span{background:var(--navy);color:#fff}.shell{width:min(1240px,calc(100% - 30px));margin:24px auto 48px}.view{display:none}.view.active{display:block}.page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin:0 0 18px}.page-head h1{font-size:34px;margin:2px 0 4px}.page-head p{margin:0;color:var(--muted)}.eyebrow{text-transform:uppercase;font-size:11px;letter-spacing:.12em;font-weight:900;color:#9a6a0f}.page-actions,.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:1fr 1fr}.grid.player-layout{grid-template-columns:360px minmax(0,1fr)}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.card h2{margin:0 0 14px;font-size:21px}.card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:14px}.card-head h2{margin-bottom:4px}.card-head p{margin:0;color:var(--muted);font-size:13px}.top-gap{margin-top:16px}.form-grid{display:grid;gap:13px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid .wide{grid-column:1/-1}label{display:grid;gap:6px;font-size:12px;color:#5a667a;font-weight:800}input,select{width:100%;min-height:43px;border:1px solid #ddcba8;border-radius:12px;background:#fffdf8;color:var(--ink);padding:9px 11px;font:inherit}input:focus,select:focus{outline:3px solid rgba(243,182,47,.22);border-color:#d49a19}.check{grid-template-columns:auto 1fr;align-items:center}.check input{width:18px;height:18px;min-height:0}.info-note{margin-top:14px;background:#f4f7fb;border:1px solid #dce6f3;border-radius:12px;padding:11px;font-size:12px;color:#5d6b80}.chips{display:flex;gap:8px;flex-wrap:wrap}.chips span{padding:8px 11px;border-radius:999px;background:#f8f2e7;border:1px solid #ead7b5;font-size:12px;font-weight:800}.primary,.ghost,.members-btn{border:0;border-radius:12px;min-height:42px;padding:9px 15px;font-weight:900;cursor:pointer}.primary{background:linear-gradient(90deg,var(--gold),var(--gold2));color:#17130a}.primary:hover{filter:brightness(.98);transform:translateY(-1px)}.primary.big{min-height:48px;padding:10px 22px}.ghost{background:#fff;border:1px solid #d8c6a6;color:var(--navy)}.ghost:hover{background:#faf5ec}.ghost.small{min-height:34px;padding:6px 10px;font-size:12px}.app-header .ghost{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.28);color:#fff}.search-row{display:grid;grid-template-columns:1fr auto;gap:8px}.search-status{font-size:12px;color:var(--muted);padding:9px 2px}.search-results{display:grid;gap:8px;max-height:560px;overflow:auto}.fide-result{border:1px solid #e7dbc7;border-radius:14px;padding:10px;background:#fffdf9;display:grid;grid-template-columns:1fr auto;gap:8px}.fide-result strong{display:block;font-size:15px;line-height:1.3}.fide-result small{display:block;color:var(--muted);margin-top:4px;line-height:1.35}.fide-result button{align-self:center}.count-badge{display:inline-grid;place-items:center;min-width:30px;height:26px;padding:0 8px;border-radius:9px;background:var(--navy);color:#fff;font-size:13px}.table-wrap{overflow:auto;border:1px solid #eadfcf;border-radius:14px}.data-table{width:100%;border-collapse:collapse;min-width:780px;font-size:13px}.data-table th{background:var(--navy);color:#fff;text-align:center;padding:10px 9px;white-space:nowrap}.data-table td{padding:10px 9px;border-bottom:1px solid #eee6da;text-align:center;vertical-align:middle}.data-table tbody tr:nth-child(even){background:#fdfaf5}.data-table td.name-cell{text-align:left;min-width:200px}.data-table .sub{display:block;font-size:11px;color:var(--muted);font-weight:400;margin-top:3px}.data-table .active-pill,.data-table .withdrawn-pill{padding:4px 7px;border-radius:999px;font-size:10px;font-weight:900}.active-pill{background:#e6f7ef;color:#087553}.withdrawn-pill{background:#fbe8e8;color:#9c3434}.table-action{border:0;background:transparent;color:#0c4c92;font-weight:900;cursor:pointer;padding:4px}.table-action.danger{color:#a73737}.empty-state{text-align:center;color:var(--muted);padding:34px 10px;display:grid;gap:6px;place-items:center}.empty-state div{width:46px;height:46px;border-radius:15px;background:#eef3fb;display:grid;place-items:center;font-size:24px;color:var(--navy)}.empty-state b{color:var(--ink)}.empty-state[hidden]{display:none}.round-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 12px}.round-tab{border:1px solid #d9c9ad;background:#fff;border-radius:10px;padding:7px 11px;font-weight:900;color:var(--navy);cursor:pointer}.round-tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}.result-select{min-width:110px;min-height:34px;padding:5px 8px;border-radius:9px}.result-complete{color:var(--green);font-weight:900}.result-pending{color:#a96b00;font-weight:900}.standings-table tbody tr:first-child{background:#fff4d2}.standings-table tbody tr:nth-child(2){background:#f7f7f7}.standings-table tbody tr:nth-child(3){background:#fff6eb}.muted{color:var(--muted);font-size:13px}.modal-backdrop{position:fixed;inset:0;background:rgba(3,16,38,.58);display:grid;place-items:center;z-index:50;padding:20px}.modal-backdrop[hidden]{display:none}.modal{width:min(620px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:20px;box-shadow:0 28px 70px rgba(0,0,0,.25)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal-head h2{margin:0}.icon-btn{border:0;background:#f2f4f8;width:36px;height:36px;border-radius:11px;font-size:24px;cursor:pointer}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.toast{position:fixed;right:20px;bottom:20px;z-index:80;background:var(--navy);color:#fff;padding:12px 16px;border-radius:13px;box-shadow:var(--shadow);font-weight:800;font-size:13px}.toast.error{background:#9b3030}.app-footer{background:var(--navy);color:#fff;display:flex;justify-content:space-between;gap:20px;align-items:center;padding:18px 24px;font-size:12px}.footer-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.footer-actions a,.link-btn{border:0;background:none;color:#fff;text-decoration:underline;text-underline-offset:3px;font:inherit;cursor:pointer}.file-label input{display:none}@media(max-width:900px){.app-header{grid-template-columns:1fr auto}.header-center{display:none}.workflow{grid-template-columns:repeat(5,minmax(105px,1fr));overflow:auto}.grid.two,.grid.player-layout{grid-template-columns:1fr}.fide-search-card{order:1}.roster-card{order:2}}@media(max-width:650px){.app-header{height:auto;padding:10px 12px}.brand span{display:none}.engine-banner{display:block;text-align:center}.engine-banner span{display:block;margin-top:3px}.workflow{width:100%;margin-top:0;border-radius:0;border-left:0;border-right:0}.step{min-width:100px;display:grid;gap:4px}.shell{width:min(100% - 16px,1240px);margin-top:16px}.page-head{display:grid;align-items:start}.page-head h1{font-size:29px}.form-grid.two{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.card{padding:15px;border-radius:16px}.app-footer{display:grid;text-align:center;justify-content:center}.footer-actions{justify-content:center}.header-actions .ghost{display:none}}
@media print{.app-header,.engine-banner,.workflow,.page-actions,.app-footer,.round-tabs,.table-action{display:none!important}.shell{width:100%;margin:0}.view{display:none!important}.view.print-view{display:block!important}.card{box-shadow:none;border:0}.data-table th{background:#eee!important;color:#000!important}}

/* v0.2 - clickable FIDE/player profiles */
.fide-link{color:#0c4c92;font-weight:900;text-decoration:none;border-bottom:1px dotted rgba(12,76,146,.45)}
.fide-link:hover{text-decoration:underline;text-underline-offset:3px}
.player-name-link{appearance:none;border:0;background:transparent;color:var(--ink);font:inherit;font-weight:900;padding:0;margin:0;cursor:pointer;text-align:left}
.player-name-link:hover{color:#0c4c92;text-decoration:underline;text-underline-offset:3px}
.player-name-link:focus-visible,.fide-link:focus-visible{outline:3px solid rgba(243,182,47,.35);outline-offset:3px;border-radius:4px}
.player-profile-modal{width:min(860px,100%)}
.profile-subline{font-size:13px;color:var(--muted);margin-top:5px}
.profile-rating-lists{display:flex;gap:8px;flex-wrap:wrap;margin:-2px 0 16px}
.profile-rating-lists span{background:#f4f7fb;border:1px solid #dce6f3;border-radius:999px;padding:7px 10px;font-size:12px;color:#5b6880}
.profile-rating-lists b{color:var(--ink)}
.profile-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:0 0 13px}
.profile-stats>div{border:1px solid #e8dcc8;background:#fffaf2;border-radius:14px;padding:11px;min-width:0}
.profile-stats span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#68758a;font-weight:900}
.profile-stats b{display:block;font-size:21px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-stats small{display:block;color:var(--muted);margin-top:2px;font-size:10px}
.rating-up{color:#087553!important;font-weight:900}.rating-down{color:#ad3d3d!important;font-weight:900}.rating-even{color:var(--ink)!important;font-weight:900}
.profile-rating-note{background:#f5f7fb;border:1px solid #dce6f3;color:#56657b;border-radius:12px;padding:10px 12px;font-size:12px;line-height:1.45;margin-bottom:16px}
.profile-history-title{font-size:17px;margin:0 0 9px}
.profile-history-table{min-width:650px}
.profile-history-table td.name-cell{min-width:180px}
@media(max-width:760px){.profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.player-profile-modal{padding:15px}.profile-rating-lists{gap:6px}}

/* v0.4 - visual polish */
:root{
  --navy:#0a2c63;
  --navy-deep:#071f49;
  --navy-soft:#eef4fb;
  --gold:#f2b52f;
  --gold2:#ffd978;
  --cream:#f6efe4;
  --line:#e8dcc9;
  --shadow:0 14px 38px rgba(15,42,82,.09);
  --shadow-soft:0 6px 20px rgba(15,42,82,.07);
}
body{background:linear-gradient(180deg,#fbf7f0 0,#f7efe3 48%,#f3e7d5 100%);}
.app-header{background:linear-gradient(90deg,var(--navy-deep),var(--navy) 36%,#0d3470);box-shadow:0 5px 18px rgba(7,31,73,.18);}
.brand-mark{box-shadow:0 7px 18px rgba(242,181,47,.22);border:1px solid rgba(255,255,255,.22)}
.header-center strong{font-size:18px;letter-spacing:-.01em}.header-center span{font-size:12.5px}
.engine-banner{background:linear-gradient(90deg,#fff8df,#fff3c9,#fff8df);border-bottom-color:#ead7a0;padding:7px 20px;align-items:center;color:#715315}
.engine-banner strong{background:#fff;border:1px solid #ead8a8;border-radius:999px;padding:4px 9px;box-shadow:0 2px 8px rgba(113,83,21,.05);white-space:nowrap}
.workflow{margin-top:18px;border-color:#eadfcf;border-radius:18px;box-shadow:var(--shadow-soft)}
.step{min-height:52px;transition:background .18s ease,color .18s ease,box-shadow .18s ease}.step:hover{background:#f8fbff;color:var(--navy)}
.step span{border-radius:10px}.step.active{background:linear-gradient(180deg,#fbfdff,#f2f7fc);box-shadow:inset 0 -4px var(--gold)}
.shell{width:min(1280px,calc(100% - 36px));margin-top:28px}
.page-head{padding:0 2px;margin-bottom:20px}.page-head h1{font-size:36px;letter-spacing:-.025em;line-height:1.05}.page-head p{font-size:15px;line-height:1.45}.eyebrow{font-size:10px;letter-spacing:.16em;color:#9c6904}
.card{border-color:#e7dac6;border-radius:22px;box-shadow:var(--shadow);padding:22px}.card h2{letter-spacing:-.015em}
.card-head{margin-bottom:16px}.card-head p{line-height:1.45}
input,select{border-color:#dbc8a4;background:#fffdfa;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}input:hover,select:hover{border-color:#cdb587;background:#fff}
.primary,.ghost{transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease}.primary{box-shadow:0 5px 12px rgba(211,151,18,.15)}.primary:hover{box-shadow:0 8px 18px rgba(211,151,18,.20)}.ghost:hover{transform:translateY(-1px);border-color:#c9b28a;box-shadow:0 4px 10px rgba(15,42,82,.06)}
.info-note{background:linear-gradient(180deg,#f7faff,#f1f6fc);border-color:#dbe5f0}.chips span{background:#fffaf0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.table-wrap{border-color:#e8dcc9;border-radius:16px;background:#fff;box-shadow:0 2px 8px rgba(15,42,82,.025)}
.data-table{font-size:13px;font-variant-numeric:tabular-nums}.data-table thead{position:sticky;top:0;z-index:2}.data-table th{background:linear-gradient(180deg,#0c3473,#092a61);padding:12px 10px;font-size:12px;letter-spacing:.015em;border-right:1px solid rgba(255,255,255,.06)}.data-table th:first-child{border-top-left-radius:13px}.data-table th:last-child{border-top-right-radius:13px;border-right:0}.data-table td{padding:12px 10px;border-bottom-color:#eee5d8}.data-table tbody tr{transition:background .14s ease,box-shadow .14s ease}.data-table tbody tr:nth-child(even){background:#fcfaf6}.data-table tbody tr:hover{background:#f3f7fc}.data-table td.name-cell{min-width:205px}.data-table .sub{margin-top:4px;color:#77849a}
.player-name-link{font-size:15px;line-height:1.3}.fide-link{font-weight:800;color:#14508d;border-bottom-color:rgba(20,80,141,.28)}
.active-pill,.withdrawn-pill{display:inline-block;min-width:58px;text-align:center}
.round-tabs{gap:8px;margin-bottom:14px}.round-tab{border-radius:11px;padding:8px 12px;transition:all .14s ease}.round-tab:hover{border-color:#bda273;background:#fffaf1}.round-tab.active{box-shadow:0 5px 12px rgba(11,43,98,.14)}
.result-select{background:#fff;border-color:#d9c9ad;font-weight:700}
.standings-wrap{overflow:auto}
.standings-table{min-width:980px}.standings-table th:nth-child(2),.standings-table td:nth-child(2){text-align:left}.standings-table th:nth-child(3),.standings-table td:nth-child(3){min-width:92px}.standings-table tbody tr:first-child,.standings-table tbody tr:nth-child(2),.standings-table tbody tr:nth-child(3){background:transparent}.standings-table tbody tr.podium-1{background:linear-gradient(90deg,#fff4cd 0,#fffaf0 40%,#fff 100%)}.standings-table tbody tr.podium-2{background:linear-gradient(90deg,#f1f4f8 0,#fafbfc 40%,#fff 100%)}.standings-table tbody tr.podium-3{background:linear-gradient(90deg,#fff0df 0,#fff8f0 40%,#fff 100%)}
.rank-cell{width:58px}.rank-badge{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#eef3f9;color:var(--navy);font-weight:900;border:1px solid #dde7f2}.podium-1 .rank-badge{background:linear-gradient(135deg,#f2b52f,#ffdc7f);border-color:#e4ab2d;color:#3c2a00}.podium-2 .rank-badge{background:linear-gradient(135deg,#dfe5ec,#f8fafc);border-color:#cfd7e1;color:#324257}.podium-3 .rank-badge{background:linear-gradient(135deg,#e8b27d,#f4d2ac);border-color:#d49b63;color:#55300d}
.points-cell span{display:inline-grid;place-items:center;min-width:44px;height:30px;padding:0 10px;border-radius:10px;background:#edf4fb;border:1px solid #dce8f3;color:var(--navy);font-weight:900;font-size:14px}.podium-1 .points-cell span{background:#fff1b8;border-color:#ead078}.numeric{text-align:center}.fide-cell{white-space:nowrap}
.modal{border:1px solid rgba(255,255,255,.6);box-shadow:0 30px 80px rgba(4,20,47,.32)}.player-profile-modal{width:min(900px,100%)}.profile-stats>div{background:linear-gradient(180deg,#fffaf2,#fff);box-shadow:0 4px 12px rgba(15,42,82,.04)}
.app-footer{background:linear-gradient(90deg,var(--navy-deep),var(--navy));padding:20px 24px}.footer-actions{gap:18px}.footer-actions a,.link-btn{opacity:.88}.footer-actions a:hover,.link-btn:hover{opacity:1}
@media(max-width:650px){.shell{width:min(100% - 16px,1280px)}.engine-banner strong{display:inline-block}.engine-banner span{line-height:1.45}.page-head h1{font-size:30px}.data-table th,.data-table td{padding:10px 8px}.card{padding:16px}.rank-badge{width:28px;height:28px}}
@media print{.rank-badge,.points-cell span{background:none!important;border:0!important;width:auto;height:auto;min-width:0;padding:0}.standings-table tbody tr{background:#fff!important}}

@media(max-width:650px){.player-name-link{font-size:14.5px}.fide-result strong{font-size:14.5px}}


/* v0.6 - clearer standings numbering and prominent tournament file actions */
.header-file-action{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 10px;border:1px solid rgba(255,255,255,.30);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;font:inherit;font-size:12px;font-weight:850;cursor:pointer;white-space:nowrap;transition:background .14s ease,border-color .14s ease,transform .14s ease}
.header-file-action:hover{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.48);transform:translateY(-1px)}
.header-file-action:focus-visible{outline:3px solid rgba(255,218,117,.45);outline-offset:2px}
.standings-table{min-width:1040px}
.standings-table th:nth-child(2),.standings-table td:nth-child(2){width:70px;text-align:center}
.standings-table th:nth-child(3),.standings-table td:nth-child(3){text-align:left}
.standings-table th:nth-child(4),.standings-table td:nth-child(4){min-width:92px}
.startno-cell{width:58px;white-space:nowrap}.startno-badge{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:24px;padding:0 6px;border-radius:8px;background:#f6f8fb;border:1px solid #e5eaf0;color:#7a8798;font-weight:500;font-size:11px}
.podium-1 .startno-badge,.podium-2 .startno-badge,.podium-3 .startno-badge{background:#f6f8fb;border-color:#e5eaf0;color:#7a8798}
.app-footer{justify-content:center;text-align:center;min-height:58px}
@media(max-width:900px){.header-file-action{font-size:11px;padding:6px 8px}.header-actions{gap:5px}}
@media(max-width:650px){.header-actions{flex-wrap:wrap;row-gap:4px}.header-file-action{min-height:30px;padding:5px 7px;font-size:10px}.header-actions .ghost{display:none}.lang-btn{padding:4px}.app-footer{padding:15px 12px}}
@media print{.header-file-action{display:none!important}.startno-badge{background:none!important;border:0!important;min-width:0;height:auto;padding:0}}


/* European date fields and Monday-first calendar */
.date-input-wrap{position:relative;display:flex;align-items:center;min-width:0}
.date-display-input{width:100%;padding-right:46px;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.date-picker-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:var(--navy);cursor:pointer;transition:background .14s ease,color .14s ease}
.date-picker-btn:hover{background:#eef4fb;color:#124d8a}.date-picker-btn:focus-visible{outline:3px solid rgba(243,182,47,.38);outline-offset:1px}
.date-picker-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.date-picker-popover{position:fixed;z-index:80;width:310px;padding:12px;background:#fff;border:1px solid #dfd1ba;border-radius:16px;box-shadow:0 22px 58px rgba(8,35,79,.22);color:var(--ink)}
.date-picker-popover[hidden]{display:none!important}
.date-picker-head{display:grid;grid-template-columns:38px 1fr 38px;align-items:center;gap:6px;margin-bottom:8px}.date-picker-head strong{text-align:center;font-size:15px;letter-spacing:-.01em}
.date-nav-btn{width:36px;height:36px;border:1px solid #e4d8c7;border-radius:10px;background:#fff;color:var(--navy);font-size:24px;line-height:1;cursor:pointer}.date-nav-btn:hover{background:#f4f7fb;border-color:#cfdbe9}.date-nav-btn:focus-visible,.date-day:focus-visible,.date-foot-btn:focus-visible{outline:3px solid rgba(243,182,47,.34);outline-offset:1px}
.date-weekdays,.date-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.date-weekdays{margin-bottom:4px}.date-weekdays span{text-align:center;padding:5px 0;color:#718096;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.035em}
.date-day{position:relative;height:36px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;font-size:12px;font-weight:750;cursor:pointer;font-variant-numeric:tabular-nums}.date-day:hover{background:#eef4fb}.date-day.other-month{color:#a7b0bd;font-weight:600}.date-day.today::after{content:"";position:absolute;left:50%;bottom:4px;width:4px;height:4px;border-radius:50%;background:var(--gold);transform:translateX(-50%)}.date-day.selected{background:linear-gradient(135deg,var(--navy),#154d8c);color:#fff;box-shadow:0 4px 10px rgba(11,43,98,.18)}.date-day.selected.today::after{background:#fff}
.date-picker-foot{display:flex;justify-content:space-between;gap:8px;margin-top:9px;padding-top:9px;border-top:1px solid #eee5d9}.date-foot-btn{border:1px solid #dfd1ba;border-radius:9px;background:#fff;color:var(--navy);font:inherit;font-size:11px;font-weight:850;padding:7px 10px;cursor:pointer}.date-foot-btn:hover{background:#f7f9fc}.date-foot-btn.subtle{color:#69778b;font-weight:750}
@media(max-width:420px){.date-picker-popover{width:min(310px,calc(100vw - 20px))}}
@media print{.date-picker-btn,.date-picker-popover{display:none!important}}

/* v0.9 standings hierarchy */
.standings-table{min-width:1120px}
.standings-table thead th{vertical-align:middle;padding-top:11px;padding-bottom:11px}
.standings-table th:nth-child(2),.standings-table td:nth-child(2){width:58px;text-align:center}
.standings-table th:nth-child(3),.standings-table td:nth-child(3){width:62px;text-align:center}
.standings-table th:nth-child(4),.standings-table td:nth-child(4){text-align:left;min-width:230px}
.standings-table th:nth-child(5),.standings-table td:nth-child(5){min-width:96px}
.standings-table.no-title-column th:nth-child(3),.standings-table.no-title-column td:nth-child(3){text-align:left;min-width:230px;width:auto}
.standings-table.no-title-column th:nth-child(4),.standings-table.no-title-column td:nth-child(4){text-align:center;min-width:96px}
.title-cell{font-weight:700;color:#334b70;white-space:nowrap}
.tiebreak-cell{font-weight:400;color:#17345f}
.points-head{font-weight:900!important}
@media(max-width:650px){.standings-table{min-width:1080px}}


/* v0.11 - compact player identity header */
.profile-identity-row{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;min-width:0}
.profile-identity-row h2{margin:0;white-space:nowrap}
.profile-identity-row .profile-subline{margin:0;font-size:13px;line-height:1.35}
@media(max-width:560px){.profile-identity-row{gap:6px 10px}.profile-identity-row h2{white-space:normal}}


/* v0.12 - compact standings column geometry */
.standings-wrap{padding:0 8px}
.standings-table{
  width:max-content;
  min-width:0;
  max-width:none;
  margin:0 auto;
  table-layout:auto;
}
.standings-table th,.standings-table td{white-space:nowrap}
.standings-table .rank-head,.standings-table .rank-cell{width:54px;text-align:center}
.standings-table .startno-head,.standings-table .startno-cell{width:58px;text-align:center}
.standings-table .title-head,.standings-table .standings-title-cell{width:58px;text-align:center}
.standings-table .name-head,.standings-table td.name-cell{
  text-align:left!important;
  min-width:205px!important;
  width:205px!important;
  padding-left:12px;
  padding-right:12px;
}
.standings-table .fide-head,.standings-table .fide-cell{min-width:94px;width:94px;text-align:center}
.standings-table .fed-head{min-width:58px;width:58px;text-align:center}
.standings-table .rating-head{min-width:62px;width:62px;text-align:center}
.standings-table .points-head,.standings-table .points-cell{min-width:70px;width:70px;text-align:center}
.standings-table .tiebreak-cell{min-width:58px;width:58px;text-align:center}
/* neutralize earlier nth-child geometry so optional title does not shift columns */
.standings-table th:nth-child(n),.standings-table td:nth-child(n){max-width:none}
.standings-table.no-title-column .name-head,.standings-table.no-title-column td.name-cell{
  text-align:left!important;
  min-width:205px!important;
  width:205px!important;
}
@media(max-width:650px){
  .standings-wrap{padding:0}
  .standings-table{width:max-content;min-width:0;margin:0}
  .standings-table .name-head,.standings-table td.name-cell{min-width:190px!important;width:190px!important}
}


/* v0.13 - polished pairing and results tables */
.pairing-table-wrap,.result-table-wrap{border-radius:16px;overflow:auto}
.pairing-table,.result-table{min-width:900px;table-layout:auto}
.pairing-table th.player-head,.result-table th.player-head{text-align:left;padding-left:16px}
.pairing-table .board-head,.result-table .board-head{width:62px}
.pairing-table .rating-head{width:72px}
.pairing-table .score-head{width:72px}
.pairing-table .note-head{min-width:110px}
.board-cell{width:62px;text-align:center!important}
.board-badge{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#f1f5fa;border:1px solid #dde7f2;color:var(--navy);font-weight:900;font-size:12px;font-variant-numeric:tabular-nums}
.pairing-player-cell,.result-player-cell{min-width:225px!important;padding-left:16px!important}
.pairing-player-cell .player-name-link,.result-player-cell .player-name-link{font-size:15.5px;line-height:1.25}
.pairing-player-cell .sub,.result-player-cell .sub{font-size:10.5px;margin-top:4px;color:#8591a3;letter-spacing:.025em}
.pair-rating{width:72px;color:#53647d;font-variant-numeric:tabular-nums}
.pair-points{width:72px}.pair-points span{display:inline-grid;place-items:center;min-width:36px;height:27px;padding:0 8px;border-radius:9px;background:#f3f7fb;border:1px solid #e0e9f2;color:var(--navy);font-weight:800}
.pair-note-cell{color:#6c788b;text-align:left!important;min-width:110px;font-size:12px}
.bye-badge{display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:28px;padding:0 10px;border-radius:9px;background:#fff6d8;border:1px solid #ead486;color:#76560b;font-weight:900;font-size:11px;letter-spacing:.04em}
.pairing-row td,.result-row td{height:58px}
.pairing-row:hover,.result-row:hover{background:#f4f8fc!important}
#pairingRoundMeta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.round-meta-pill,.progress-pill{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:4px 9px;border-radius:999px;background:#f3f6fa;border:1px solid #e0e7f0;color:#617087;font-size:11px;font-weight:800}
.progress-pill.complete{background:#e9f7f1;border-color:#d0ecdf;color:#087553}
.result-table{min-width:820px}
.result-table .result-head{width:180px}.result-table .status-head{width:78px}
.result-entry-cell{width:180px}
.result-select{min-width:130px;max-width:150px;height:38px;min-height:38px;padding:6px 34px 6px 12px;border-radius:11px;background:#fff;border:1px solid #dccbaa;color:var(--navy);font-weight:900;text-align:center;text-align-last:center;box-shadow:0 2px 7px rgba(15,42,82,.025)}
.result-select:hover{border-color:#c5ae81;background:#fffdfa}.result-select:focus{border-color:#d39a20;box-shadow:0 0 0 3px rgba(243,182,47,.16);outline:0}
.status-badge{display:inline-grid;place-items:center;width:29px;height:29px;border-radius:50%;font-weight:900;font-size:15px}
.status-badge.complete{background:#e8f7f0;border:1px solid #cfeadd;color:#0a8b63}.status-badge.pending{background:#fff7e4;border:1px solid #ead9ad;color:#b27a12;font-size:20px;line-height:1}
.result-row.completed .result-select{border-color:#cfdfd7}.result-row.pending{background:#fffdf9}
@media(max-width:650px){.pairing-table,.result-table{min-width:820px}.pairing-player-cell,.result-player-cell{min-width:190px!important}.pairing-player-cell .player-name-link,.result-player-cell .player-name-link{font-size:14.5px}.result-select{min-width:116px}}
@media print{.board-badge,.pair-points span,.bye-badge,.status-badge,.round-meta-pill,.progress-pill{background:none!important;border:0!important;width:auto;height:auto;min-width:0;padding:0}.pairing-row td,.result-row td{height:auto}}


/* v0.14 - full-width standings surface with reserved right-side breathing room */
.standings-wrap{padding:0}
.standings-table{
  width:max-content;
  min-width:max(100%,1080px);
  margin:0;
  table-layout:auto;
}
.standings-table .rank-head,.standings-table .rank-cell{width:54px}
.standings-table .startno-head,.standings-table .startno-cell{width:58px}
.standings-table .title-head,.standings-table .standings-title-cell{width:58px}
.standings-table .name-head,.standings-table td.name-cell{
  width:auto!important;
  min-width:205px!important;
  text-align:left!important;
}
.standings-table .fide-head,.standings-table .fide-cell{width:94px;min-width:94px}
.standings-table .fed-head{width:58px}
.standings-table .rating-head{width:62px}
.standings-table .points-head,.standings-table .points-cell{width:70px}
.standings-table .tiebreak-head,.standings-table .tiebreak-cell{width:58px;min-width:58px}
.standings-table .standings-fill-head,.standings-table .standings-fill-cell{
  width:auto;
  min-width:72px;
  padding-left:0!important;
  padding-right:0!important;
}
.standings-table .standings-fill-head{border-right:0}
.standings-table.no-title-column .name-head,.standings-table.no-title-column td.name-cell{
  width:auto!important;
  min-width:205px!important;
}
@media(max-width:650px){
  .standings-table{width:max-content;min-width:max(100%,1030px);margin:0}
  .standings-table .name-head,.standings-table td.name-cell,
  .standings-table.no-title-column .name-head,.standings-table.no-title-column td.name-cell{
    width:auto!important;min-width:190px!important
  }
  .standings-table .standings-fill-head,.standings-table .standings-fill-cell{min-width:48px}
}
@media print{
  .standings-table{width:100%;min-width:0;table-layout:auto}
  .standings-fill-head,.standings-fill-cell{display:none!important}
}

/* v0.15 - symmetric Chess-Results-inspired pairing/result layout */
.pairing-table,.result-table{min-width:1040px;table-layout:auto}
.pairing-table .board-head,.result-table .board-head{width:58px}
.pairing-table .startno-head,.result-table .startno-head{width:58px}
.pairing-table .title-head,.result-table .title-head{width:58px}
.pairing-table .rating-head,.result-table .rating-head{width:72px}
.pairing-table .score-head,.result-table .score-head{width:70px}
.pairing-table .middle-head{width:48px}
.result-table .result-head{width:150px}
.pairing-table th.player-head,.result-table th.player-head{text-align:left;padding-left:14px;min-width:190px}
.pairing-table th.black-head,.result-table th.black-head{text-align:left}
.pair-startno{width:58px;color:#7a8798;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.pair-title-cell{width:58px;color:#526078;font-weight:700;white-space:nowrap}
.pairing-player-cell,.result-player-cell{min-width:190px!important;padding-left:14px!important}
.pairing-player-cell .player-name-link,.result-player-cell .player-name-link{font-size:15.5px}
.pair-middle-cell{width:48px;text-align:center!important;padding-left:4px!important;padding-right:4px!important}
.pair-separator{display:inline-block;color:#8b96a7;font-size:18px;font-weight:500;line-height:1}
.pairing-table .pair-rating,.result-table .pair-rating{width:72px;text-align:center;color:#52627a}
.pairing-table .pair-points,.result-table .pair-points{width:70px;text-align:center}
.pairing-table .pair-points span,.result-table .pair-points span{background:none;border:0;min-width:0;height:auto;padding:0;border-radius:0;font-weight:700;color:var(--navy)}
.result-entry-cell{width:150px;text-align:center!important}
.result-select{width:124px;min-width:124px;max-width:124px}
.pairing-row td,.result-row td{height:54px}
.pairing-row .black-player-cell,.result-row .black-player-cell{text-align:left!important}
.pairing-table .note-head{min-width:110px}
@media(max-width:650px){.pairing-table,.result-table{min-width:980px}.pairing-player-cell,.result-player-cell{min-width:170px!important}.result-select{width:116px;min-width:116px;max-width:116px}}

/* v0.16 - starting list: player name column aligned left */
.players-table th:nth-child(2),
.players-table td.name-cell{
  text-align:left!important;
}
.players-table th:nth-child(2){
  padding-left:16px;
}
.players-table td.name-cell{
  padding-left:16px;
}

/* v0.19 - long tournament tables scroll inside their cards */
.roster-card .table-wrap,
.pairing-table-wrap,
.result-table-wrap,
.standings-wrap{
  max-height:620px;
  overflow:auto;
  border-radius:16px;
  background:#fff;
  padding-bottom:14px;
  clip-path:inset(0 round 16px);
  scrollbar-gutter:stable;
}
.roster-card .players-table th{
  position:sticky;
  top:0;
  z-index:3;
}
.roster-card-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:14px;
  margin-bottom:12px;
}
.roster-title-line{
  min-width:0;
}
.roster-card-head h2{
  margin:0;
}
.roster-card-head #ratingModeLabel{
  justify-self:center;
  margin:0!important;
  color:var(--muted);
  font-size:13px;
  line-height:1.1;
  white-space:nowrap;
}
.roster-card-head #renumberBtn{
  justify-self:end;
}
.round-card-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:14px;
  margin-bottom:12px;
}
.round-card-head h2{
  margin:0;
  line-height:1.1;
  justify-self:start;
}
.round-card-head p{
  display:flex;
  align-items:center;
  gap:8px;
  justify-self:center;
  margin:0!important;
  line-height:1.1;
}
.round-card-head .inline-actions{
  justify-self:end;
}
.round-actions-spacer{
  min-width:1px;
  min-height:1px;
}
.pairing-table,
.result-table{
  border-collapse:separate;
  border-spacing:0;
}
.players-table td,
.standings-table td{
  padding-top:9px;
  padding-bottom:9px;
}
.players-table .sub{
  margin-top:2px;
}
.standings-table .rank-badge,
.standings-table .points-cell span{
  height:28px;
}
.pairing-table td,
.result-table td{
  padding-top:8px;
  padding-bottom:8px;
}
.pairing-row td,
.result-row td{
  height:48px;
}
.pairing-table tbody tr:last-child td,
.result-table tbody tr:last-child td{
  border-bottom:0;
}
.pairing-table tbody tr:last-child td:first-child,
.result-table tbody tr:last-child td:first-child{
  border-bottom-left-radius:14px;
}
.pairing-table tbody tr:last-child td:last-child,
.result-table tbody tr:last-child td:last-child{
  border-bottom-right-radius:14px;
}
.result-select{
  height:34px;
  min-height:34px;
}
.pairing-table-wrap,
.result-table-wrap{
  max-height:540px;
}

/* v0.21 - let long tournament lists grow with the page */
.roster-card .table-wrap,
.pairing-table-wrap,
.result-table-wrap,
.standings-wrap{
  max-height:none;
  overflow-x:auto;
  overflow-y:visible;
}
@media(max-width:900px){
  .roster-card .table-wrap,
  .standings-wrap{
    max-height:none;
  }
  .pairing-table-wrap,
  .result-table-wrap{
    max-height:none;
  }
}
@media(max-width:650px){
  .roster-card .table-wrap,
  .standings-wrap{
    max-height:none;
  }
  .pairing-table-wrap,
  .result-table-wrap{
    max-height:none;
  }
  .roster-card-head{
    grid-template-columns:1fr;
    align-items:start;
  }
  .roster-card-head #ratingModeLabel,
  .roster-card-head #renumberBtn{
    justify-self:start;
  }
  .round-card-head{
    grid-template-columns:1fr;
    align-items:start;
  }
  .round-card-head p,
  .round-card-head .inline-actions{
    justify-self:start;
  }
  .round-actions-spacer{
    display:none;
  }
}

/* Site wrapper mode */
html.embedded-app .app-footer{display:none!important}
html.embedded-app .app-lang-switch{display:none!important}

/* Site v0.4 - compact tournament summary in one line */
.header-center{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
}
.header-center strong,
.header-center span{
  display:inline;
  margin:0;
}
.header-center span::before{
  content:"·";
  margin-right:8px;
  opacity:.72;
}
@media(max-width:900px){
  .header-center{display:none}
}


/* ===== BC UNIFIED UNIFIED BC APP SHELL =====
   External BC toolbar replaces only the old Tournament Manager header. */
.app-header{display:none!important}


/* ===== BC INTEGRATED TEST v2.2 - TOURNAMENT MANAGER TOP CLEANUP =====
   Razvojni žuti banner je uklonjen iz HTML-a.
   Workflow 1-5 je sada bliže gornjoj ivici tela programa. */

/* v0.20 - print pairing/results on one clean A4 page */
@page{
  size:A4 portrait;
  margin:8mm;
}
@media print{
  html,
  body{
    width:auto!important;
    min-height:0!important;
    background:#fff!important;
  }
  .shell{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  .view.print-view{
    width:100%!important;
    padding:0!important;
  }
  .view.print-view .page-head{
    margin:0 0 8px!important;
  }
  .view.print-view .page-head h1{
    font-size:22px!important;
    line-height:1.05!important;
    margin:1px 0 2px!important;
  }
  .view.print-view .page-head p{
    font-size:10px!important;
    line-height:1.25!important;
  }
  .view.print-view .eyebrow{
    font-size:8px!important;
    letter-spacing:.12em!important;
  }
  .view.print-view .primary,
  .view.print-view .inline-actions,
  .view.print-view .round-tabs,
  .view.print-view .empty-state{
    display:none!important;
  }
  .view.print-view .card{
    padding:8px!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .view.print-view .round-card-head{
    display:grid!important;
    grid-template-columns:1fr auto 1fr!important;
    align-items:center!important;
    gap:8px!important;
    margin:0 0 7px!important;
  }
  .view.print-view .round-card-head h2{
    font-size:15px!important;
    line-height:1.1!important;
  }
  .view.print-view .round-card-head p{
    justify-self:center!important;
    font-size:9px!important;
    line-height:1.1!important;
  }
  .view.print-view .table-wrap,
  .view.print-view .pairing-table-wrap,
  .view.print-view .result-table-wrap{
    max-height:none!important;
    overflow:visible!important;
    padding:0!important;
    border-radius:10px!important;
    clip-path:none!important;
    box-shadow:none!important;
  }
  .view.print-view .data-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
    border-spacing:0!important;
    font-size:8px!important;
  }
  .view.print-view .data-table thead{
    position:static!important;
  }
  .view.print-view .data-table th{
    padding:4px 3px!important;
    font-size:7.5px!important;
    line-height:1.1!important;
    background:#0b2b62!important;
    color:#fff!important;
  }
  .view.print-view .data-table td{
    padding:4px 3px!important;
    line-height:1.12!important;
    height:auto!important;
    border-bottom:1px solid #e8dcc9!important;
  }
  .view.print-view .pairing-row td,
  .view.print-view .result-row td{
    height:auto!important;
  }
  .view.print-view .board-head,
  .view.print-view .board-cell{width:6%!important}
  .view.print-view .startno-head,
  .view.print-view .pair-startno{width:6%!important}
  .view.print-view .title-head,
  .view.print-view .pair-title-cell{width:6%!important}
  .view.print-view .rating-head,
  .view.print-view .pair-rating{width:7%!important}
  .view.print-view .score-head,
  .view.print-view .pair-points{width:6%!important}
  .view.print-view .middle-head,
  .view.print-view .pair-middle-cell{width:4%!important}
  .view.print-view .result-head,
  .view.print-view .result-entry-cell{width:11%!important}
  .view.print-view .pairing-table th.player-head,
  .view.print-view .result-table th.player-head,
  .view.print-view .pairing-player-cell,
  .view.print-view .result-player-cell{
    min-width:0!important;
    width:auto!important;
    padding-left:5px!important;
  }
  .view.print-view .player-name-link{
    font-size:8.5px!important;
    line-height:1.12!important;
  }
  .view.print-view .board-badge,
  .view.print-view .pair-points span,
  .view.print-view .bye-badge,
  .view.print-view .round-meta-pill,
  .view.print-view .progress-pill{
    background:none!important;
    border:0!important;
    min-width:0!important;
    height:auto!important;
    padding:0!important;
    color:inherit!important;
  }
  .view.print-view .result-select{
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
    height:18px!important;
    min-height:18px!important;
    padding:1px 12px 1px 4px!important;
    font-size:8px!important;
    border-radius:5px!important;
  }
  .view.print-view .note-head,
  .view.print-view .pair-note-cell{
    width:9%!important;
    font-size:7.5px!important;
  }
}
