/* ==========================================================================
   Admin Interface
   ========================================================================== */

.admin-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    min-width: 150px;
    text-align: center;
}

.admin-card h3 {
    margin: 0 0 10px 0;
    border-bottom: none;
    color: #666;
    font-size: 1em;
}

.admin-card-stat {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    width: 250px;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

#player-count {
    color: #666;
    font-size: 14px;
}

/* Create forms */
.create-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.create-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.create-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.create-match-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.create-match-form .form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.create-match-form .form-row label {
    width: 120px;
    font-weight: bold;
    color: #555;
}

.create-match-form .create-input {
    flex: 1;
    max-width: 300px;
}

.help-text {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

/* Admin controls */
.admin-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.admin-controls .tb-btn {
    padding: 4px 8px;
    font-size: 12px;
}

.list-card.has-admin-controls {
    padding-right: 100px;
}

.editable-field {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.editable-field .edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    box-sizing: border-box;
}

.editable-field .edit-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

/* Click-to-edit name styling (used on players, teams, competitions) */
.editable-name {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.editable-name .display-value {
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1em;
}

.editable-name .display-value:hover {
    background-color: #f0f0f0;
}

.editable-name .edit-input {
    font-size: 1.1em;
    font-weight: 500;
    padding: 5px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    flex-grow: 1;
}

.editable-name .edit-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}
