/* Shared presentation for the management workspace. Loaded after module styles. */
:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel2: #eaf3f8;
  --line: #d5e0e9;
  --ink: #17354d;
  --muted: #526a7d;
  --lime: #087ca3;
  --danger: #b52f3c;
}
body { font-size: 15px; line-height: 1.5; }
.sidebar { background: #0b2942; width: 280px; overflow-y: auto; padding: 24px 20px; }
.sidebar .panel-brand img, .platform-sidebar .panel-brand img { width: 180px; max-width: 100%; height: auto; }
.sidebar .organization-identity { margin-top: 24px; color: #fff; border-color: #ffffff26; }
.sidebar .organization-identity small, .sidebar-user small { color: #a5d6e6; }
.sidebar .organization-identity strong { font-size: 15px; overflow-wrap: anywhere; }
.sidebar .grouped-nav summary, .sidebar .grouped-nav details a, .sidebar .grouped-nav > a { font-size: 14px; }
.sidebar .grouped-nav a.active { background: #155572; box-shadow: inset 3px 0 #42d5e6; }
.sidebar-user { color: #fff; gap: 12px; padding-top: 20px; }
.sidebar-user button { color: #e4f2f8; min-height: 44px; padding: 8px 12px; border-color: #ffffff45; border-radius: 8px; }
.panel-main { margin-left: 280px; padding: 36px clamp(24px, 3vw, 52px); min-width: 0; }
.panel-header, .block-title { gap: 20px; flex-wrap: wrap; }
.panel-header { margin-bottom: 24px; }
.panel-header h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.12; }
.panel-header > div > p:last-child { font-size: 15px; max-width: 70ch; }
.overline { color: #087491; font-size: 12px; letter-spacing: .1em; }
.header-actions, .entity-shortcuts, .entity-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel-block, .entity-table, .entity-form-card, .stat-grid article,
.team-tournament-group, .match-tournament-group, .match-filters {
  border-color: var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: 0 3px 14px #17354d06;
}
.stat-grid { gap: 16px; }
.stat-grid span, .stat-grid small, .panel-list span, .panel-list small,
.entity-table article small, .match-list-teams small, .match-list-teams span { font-size: 13px; color: var(--muted); }
.panel-list strong, .entity-table article strong, .match-list-teams strong { font-size: 15px; }
.panel-list article, .entity-table article { gap: 16px; padding: 18px 20px; }
.entity-record, .match-list-teams, .panel-header > div { min-width: 0; overflow-wrap: anywhere; }
.grouped-match-list article { grid-template-columns: 76px minmax(200px, 1fr) auto; }
.match-list-date span { font-size: 13px; }
.match-list-date strong { font-size: 23px; }
.public-button, .block-title > a, .form-actions button, .match-filters button {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 44px; border-radius: 8px; padding: 10px 16px;
  background: #096b9f; color: #fff; border: 1px solid #096b9f;
  font-size: 14px; font-weight: 700; text-transform: none; text-decoration: none;
}
.entity-actions a, .excel-button, .entity-shortcuts a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; border-radius: 8px; padding: 9px 12px;
  background: #fff; color: #12638e; border: 1px solid #c3d5e2;
  font-size: 13px; text-transform: none; text-decoration: none;
}
.entity-actions .fixture-link { background: #edf6fa; }
.entity-actions .danger-link { color: var(--danger); border-color: #e4b9bf; }
.action-menu { position: relative; }
.entity-actions .action-menu summary { cursor: pointer; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: white; }
.action-menu[open] { padding-bottom: 4px; }
.action-menu[open] summary { margin-bottom: 6px; }
.action-menu a { width: 100%; }
.form-row label, .match-filters label, .create-user label { font-size: 14px; color: var(--ink); text-transform: none; }
.form-row input, .form-row select, .form-row textarea,
.match-filters input, .match-filters select, .create-user input, .create-user select {
  font-size: 16px; min-height: 44px; border-radius: 8px; background: #fff; color: var(--ink); border-color: #b7cad8;
}
.form-error, .field-error { font-size: 14px; }
.form-error { color: #922631; background: #fff1f2; border-color: #e9bcc2; border-radius: 8px; }
.panel-message { color: #175676; background: #eaf5fb; border: 1px solid #bedcea; border-radius: 8px; font-size: 14px; }
.form-brand { gap: 18px; flex-wrap: wrap; }
.form-brand img { width: 140px; height: auto; }
body :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #087ca3; outline-offset: 3px; }
.sidebar :is(a, button, summary):focus-visible { outline-color: #62dded; }
.workspace-menu-toggle { display: none; }
@media (max-width: 1150px) {
  .grouped-match-list article { grid-template-columns: 76px minmax(0, 1fr); }
  .grouped-match-list .entity-actions { grid-column: 2; }
  .panel-columns { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; padding: 18px; overflow: visible; }
  .panel-main { margin-left: 0; padding: 24px 18px; }
  .sidebar .organization-identity { margin: 14px 0; }
  .workspace-menu-toggle { display: block; width: 100%; min-height: 44px; border: 1px solid #ffffff45; border-radius: 8px; background: #15435f; color: #fff; font: inherit; text-align: left; padding: 10px 14px; }
  .sidebar .grouped-nav[hidden] { display: none; }
  .sidebar-user { margin-top: 16px; }
  .entity-table article { grid-template-columns: 1fr; }
  .entity-head { display: none; }
  .panel-header .public-button, .block-title > a { display: inline-flex; }
  .header-actions { width: 100%; }
  .header-actions > a { flex: 1 1 auto; }
}
@media (max-width: 550px) {
  .grouped-match-list article { grid-template-columns: 1fr; padding: 18px; gap: 12px; }
  .grouped-match-list .entity-actions { grid-column: 1; }
  .match-list-date { display: flex; gap: 10px; align-items: baseline; border: 0; }
  .entity-actions { width: 100%; flex-direction: row; align-items: stretch; justify-content: flex-start; }
  .entity-actions > a, .entity-actions > .action-menu { flex: 1 1 130px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid article { padding: 16px; }
  .form-page { width: auto; margin: 20px 12px; padding: 0; }
}

.match-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
@media (max-width: 1150px) { .match-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) { .match-filters { grid-template-columns: 1fr; } }
