/* Tennis Turnier — Frontend styles */
.tt-overview, .tt-form-wrap, .tt-bracket-wrap, .tt-results-wrap {
    font-family: inherit;
    color: inherit;
    margin: 1.5em 0;
}
.tt-overview .tt-h2 { font-size: 1.6em; margin: 0 0 .5em; }
.tt-overview .tt-h3 { font-size: 1.2em; margin: 1.4em 0 .6em; }
.tt-meta { list-style: none; padding: 0; margin: 0 0 1em; }
.tt-meta li { padding: .25em 0; }

.tt-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.tt-cat-card {
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    padding: 14px;
    background: #fafafa;
}
.tt-cat-card h4 { margin: 0 0 6px; font-size: 1.05em; }
.tt-cat-help { font-size: .88em; color: #555; margin: 0 0 6px; }
.tt-cat-count { font-size: .9em; color: #333; margin: 0; font-weight: 600; }

/* Form */
.tt-form { display: block; }
.tt-fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 14px 0;
    background: #fff;
}
.tt-fieldset legend { font-weight: 600; padding: 0 6px; }
.tt-field { margin: 8px 0; display: flex; flex-direction: column; }
.tt-field label { font-weight: 600; font-size: .92em; margin-bottom: 4px; }
.tt-field .req { color: #c00; }
.tt-field input, .tt-field select, .tt-field textarea {
    padding: 9px 10px;
    border: 1px solid #c8c8c8;
    border-radius: 6px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}
.tt-field input:focus, .tt-field select:focus, .tt-field textarea:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,.15);
}
.tt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px 14px;
}
.tt-submit { margin-top: 16px; }
.tt-btn {
    display: inline-block;
    padding: 11px 22px;
    border: 0;
    border-radius: 6px;
    background: #2e7d32;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
}
.tt-btn:hover { background: #256528; }
.tt-fineprint { font-size: .85em; color: #666; margin-top: 8px; }

/* Notices */
.tt-notice { padding: 12px 14px; border-radius: 6px; margin: 12px 0; }
.tt-notice-success { background: #e8f5e9; border-left: 4px solid #2e7d32; }
.tt-notice-error   { background: #fdecea; border-left: 4px solid #c62828; }
.tt-notice-warning { background: #fff8e1; border-left: 4px solid #f9a825; }
.tt-notice ul { margin: 6px 0 0 18px; }

/* Bracket */
.tt-cat-switch { margin: 10px 0 18px; }
.tt-cat-switch select { padding: 6px 8px; border-radius: 5px; border: 1px solid #c8c8c8; }

.tt-bracket {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 10px 4px 20px;
}
.tt-bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-width: 220px;
}
.tt-round-title {
    text-align: center;
    margin: 0 0 8px;
    font-size: .95em;
    color: #555;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.tt-bracket-matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 14px;
    height: 100%;
}
.tt-match {
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    position: relative;
}
.tt-team {
    padding: 8px 10px;
    font-size: .92em;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}
.tt-team:last-child { border-bottom: 0; }
.tt-team.tt-winner { background: #f1f8e9; font-weight: 700; }
.tt-score {
    font-size: .82em;
    text-align: right;
    padding: 4px 10px;
    background: #fafafa;
    color: #444;
    border-top: 1px dashed #eee;
}

/* Results table */
.tt-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.tt-results-table th, .tt-results-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #e5e5e5;
    font-size: .94em;
}
.tt-results-table thead th {
    background: #2e7d32;
    color: #fff;
    border-bottom: 0;
}
.tt-results-table tbody tr:nth-child(even) { background: #fafafa; }

@media (max-width: 600px) {
    .tt-grid { grid-template-columns: 1fr; }
    .tt-bracket-round { min-width: 180px; }
}

/* Admin status pills (also used in registration list) */
.tt-status { padding: 2px 8px; border-radius: 999px; font-size: .85em; }
.tt-status-pending   { background: #fff8e1; color: #8a6d3b; }
.tt-status-confirmed { background: #e8f5e9; color: #2e7d32; }
.tt-status-rejected  { background: #fdecea; color: #b71c1c; }
