* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #cbcbcb;
    color: #303030;
    min-height: 100vh;
}

.site-header {
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header-logo img {
    height: 50px;
    width: auto;
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-title h1 em {
    color: #b0001f;
    font-style: normal;
}

.header-spacer {
    width: 160px;
}

.main-nav {
    background: #303030;
    display: flex;
    justify-content: center;
    border-bottom: 4px solid #b0001f;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.main-nav ul li a {
    display: block;
    padding: 13px 28px;
    color: #cbcbcb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: background 0.25s, color 0.25s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: #b0001f;
    color: #ffffff;
}

.dropdown {
    position: relative;
}

.dropdown .dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    background: #303030;
    list-style: none;
    min-width: 180px;
    border: 1px solid #555;
    z-index: 100;
    margin: 0;
    padding: 0;
    flex-direction: column;
}

.dropdown:hover .dropdown-menu {
    display: block !important;
}

.dropdown-menu li {
    display: block !important;
    width: 100%;
}

.dropdown-menu li a {
    display: block !important;
    padding: 10px 20px;
    color: #cbcbcb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.25s, color 0.25s;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    background: #b0001f;
    color: #ffffff;
}

.dropdown .dropdown-toggle::after {
    content: '▼';
    margin-right: 6px;
    font-size: 0.7rem;
    vertical-align: middle;
}

.main-content {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 24px 48px;
}

.content-wrapper {
    padding: 20px;
    max-width: 1100px;
    margin: 32px auto;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #b0001f;
    text-align: center;
    margin-bottom: 6px;
}

.section-subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.card {
    background: #ffffff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 18px 20px;
    transition: border-color 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 5px;
    height: 100%;
    background: #b0001f;
}

.card:hover {
    border-color: #b0001f;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-name {
    font-weight: 600;
    color: #303030;
    font-size: 0.97rem;
    line-height: 1.5;
}

.info-box {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.info-box-success {
    background: #f0fff4;
    color: #276749;
}

.info-box-error {
    background: #fff5f5;
    color: #b0001f;
}

.alert-box {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.alert-success {
    background: #f0fff4;
    color: #276749;
}

.alert-error {
    background: #fff5f5;
    color: #b0001f;
}

.alert-notice {
    background: #fff5f5;
    color: #b0001f;
    font-size: 0.9rem;
    font-weight: 600;
}

.mt-3 {
    margin-top: 12px;
}

.mt-24 {
    margin-top: 24px;
}

.box-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.box-inline-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.no-padding {
    overflow: hidden;
    padding: 0;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 6px 12px;
    border: 2px solid #cbcbcb;
    background: #fff;
    color: #303030;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.page-btn.active {
    background: #b0001f;
    color: #fff;
    border-color: #b0001f;
}

.page-btn:hover:not(.active) {
    background: #f5f5f5;
}

.table-container {
    overflow-x: auto;
}

.text-muted {
    color: #888;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.25s, color 0.25s;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #b0001f;
    color: #ffffff;
    border: 2px solid #b0001f;
}

.btn-primary:hover {
    background: #8a0018;
    border-color: #8a0018;
    color: #ffffff;
}

.btn-secondary {
    background: transparent;
    color: #303030;
    border: 2px solid #303030;
}

.btn-secondary:hover {
    background: #303030;
    color: #ffffff;
}

.btn-sm {
    padding: 4px 14px;
    font-size: 0.85rem;
}

.display-inline {
    display: inline;
}

.content-box {
    margin-bottom: 20px;
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 16px 20px;
}

.section-box {
    margin-bottom: 20px;
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 16px 20px;
}

.current-season-box {
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.form-box {
    margin-bottom: 20px;
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 20px;
}

.form-box h3 {
    color: #303030;
    margin-bottom: 12px;
}

.field-label {
    font-weight: 600;
    color: #303030;
}

.field-value {
    color: #b0001f;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    overflow: hidden;
}

.data-table thead {
    background: #303030;
    color: #ffffff;
}

.data-table th {
    padding: 14px 18px;
    text-align: right;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid #b0001f;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table-inline {
    width: 100%;
    border-collapse: collapse;
}

.data-table-inline thead tr {
    background: #f8f8f8;
    border-bottom: 2px solid #cbcbcb;
}

.data-table-inline th {
    padding: 12px;
    text-align: center;
    color: #303030;
    font-weight: 600;
}

.data-table-inline tbody tr {
    border-bottom: 1px solid #eee;
}

.data-table-inline td {
    padding: 12px;
    text-align: center;
}

.rank-badge {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #b0001f;
}

.actions-cell {
    text-align: center;
    width: 80px;
}

.action-link {
    display: inline-block;
    padding: 6px 14px;
    background: #303030;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.action-link:hover {
    background: #b0001f;
    color: #ffffff;
}

.delete-link {
    color: #b0001f;
}

.back-link {
    color: #0066cc;
}

.club-chip {
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.pool-chip {
    background: #f0f0f0;
    border: 1px solid #cbcbcb;
}

.group-chip {
    background: #fff0f0;
    border: 1px solid #ffcccc;
}

.auto-promoted {
    background: #fff0f0;
    border: 1px solid #ffcccc;
}

.group-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    height: calc(100vh - 320px);
    min-height: 500px;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(var(--groups), 1fr);
    gap: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 320px);
}

.group-column {
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.group-column h4 {
    color: #b0001f;
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.group-column-title {
    color: #b0001f;
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.group-count-badge {
    background: #e9e9e9;
    color: #666;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 4px;
}

.group-count-badge.filled {
    background: #f0fff4;
    color: #276749;
}

.group-slots {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
    padding: 4px;
    min-height: 200px;
}

.group-column .group-slots {
    flex-direction: column;
    align-items: stretch;
}

.club-sidebar {
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.club-sidebar h3 {
    color: #303030;
    margin-bottom: 10px;
    font-size: 1rem;
}

.club-sidebar input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.group-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.group-modal-inner {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    min-width: 300px;
    max-width: 90%;
}

.group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.site-footer {
    background: #000000;
    color: #a0a0a0;
    text-align: center;
    padding: 14px;
    font-size: 0.85rem;
    margin-top: auto;
}

.site-footer a {
    color: #b0001f;
    text-decoration: none;
}

.empty-state {
    color: #888;
    text-align: center;
    padding: 24px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-box input {
    width: 100%;
    padding: 10px 36px 10px 14px;
    font-size: 0.95rem;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    background: #ffffff;
    color: #303030;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #b0001f;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: #888;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.clear-btn:hover {
    color: #b0001f;
}

.sort-controls {
    display: flex;
    gap: 6px;
}

.sort-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border: 2px solid #303030;
    background: #ffffff;
    color: #303030;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.sort-btn:hover {
    background: #f5f5f5;
}

.sort-btn.active {
    background: #b0001f;
    color: #ffffff;
    border-color: #b0001f;
}

.status-controls {
    display: flex;
    gap: 6px;
    margin-left: 12px;
}

.status-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    border: 2px solid #303030;
    background: #ffffff;
    color: #303030;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.status-btn:hover {
    background: #f5f5f5;
}

.status-btn.active {
    background: #b0001f;
    color: #ffffff;
    border-color: #b0001f;
}

.card.is-deleted {
    border-color: #b0001f;
    background: #fff5f5;
    opacity: 0.75;
}

.card.is-deleted .card-name {
    color: #b0001f;
    text-decoration: line-through;
}

tr.is-deleted {
    background: #fff5f5;
    opacity: 0.75;
}

tr.is-deleted td {
    color: #b0001f;
}

tr.is-deleted .player-name {
    text-decoration: line-through;
}

.table-container {
    overflow-x: auto;
}

.d-none {
    display: none !important;
}

.select-flexible {
    flex: 1;
    min-width: 220px;
}

.btn-plain {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: inherit;
    font-size: inherit;
}

.btn-plain:hover {
    background: none !important;
}

.btn-plain-info {
    color: #0066cc;
    text-decoration: underline;
}

.btn-plain-danger {
    color: #b0001f;
}

.form-section {
    max-width: 500px;
    margin: 0 auto;
}

.form-panel {
    background: #fff;
    padding: 24px;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #303030;
}

.form-control-custom {
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    background: #fff;
    color: #303030;
}

.form-hint {
    color: #666;
    display: block;
    margin-top: 4px;
}

.inline-actions {
    display: flex;
    gap: 10px;
}

.flex-1 {
    flex: 1;
}

.text-center {
    text-align: center;
}

.mr-auto {
    margin-right: auto;
}

.alert-danger-static {
    background: #ffdddd;
    border: 1px solid #b0001f;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 4px;
    color: #b0001f;
}

.card-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.btn-sm-static {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: #b0001f;
    color: #fff;
    border: 2px solid #b0001f;
}

.btn-danger-sm:hover {
    background: #8a0018;
    border-color: #8a0018;
}

.filter-field {
    flex: 1;
    min-width: 160px;
}

.filter-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #303030;
}

.filter-input {
    width: 100%;
    padding: 8px;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #fff;
    color: #303030;
}

.player-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 4px;
    overflow: hidden;
}

.player-table thead tr {
    background: #303030;
    color: #fff;
}

.player-table th {
    padding: 12px 10px;
    text-align: right;
    border-bottom: 2px solid #b0001f;
}

.player-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.player-table tbody tr:last-child td {
    border-bottom: none;
}

.player-code {
    font-family: monospace;
    font-weight: 600;
}

.player-name-cell {
    font-weight: 500;
}

.player-sex-male {
    color: #1e40af;
    font-weight: 600;
}

.player-sex-female {
    color: #9d174d;
    font-weight: 600;
}

.empty-results {
    padding: 30px;
    text-align: center;
    color: #666;
}

.results-summary {
    margin-bottom: 12px;
    font-weight: 600;
    text-align: center;
}

.pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-info {
    padding: 0 16px;
    font-weight: 600;
}

.section-block {
    margin-bottom: 20px;
}

.tournament-detail-label {
    font-weight: 600;
    color: #303030;
}

.tournament-detail-value {
    font-size: 1.1rem;
    color: #000;
    margin-top: 4px;
}

.section-heading {
    color: #303030;
    margin-bottom: 12px;
}

.section-heading-lg {
    color: #303030;
    margin-bottom: 12px;
    margin-top: 24px;
}

.table-section {
    margin-bottom: 20px;
}

.back-link-section {
    margin-bottom: 20px;
}

.text-muted-static {
    color: #888;
    margin-bottom: 20px;
}

.filter-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-columns-stack {
    flex-direction: column;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto 24px;
}

.filter-controls-center {
    justify-content: center;
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.btn-danger-static {
    background: #b0001f;
}
