.sl-letters {
    max-width: 1000px;
    margin: 0 auto;
    font-family: inherit;
}

.sl-letters-header {
    margin-bottom: 18px;
}

.sl-letters-header h2 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.2;
}

.sl-letters-header p {
    margin: 0;
    color: #536070;
}

.sl-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px;
    background: #f7f8fb;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
}

.sl-filter-form label {
    font-weight: 700;
    color: #172033;
}

.sl-filter-form select {
    min-width: 220px;
    padding: 9px 12px;
    border: 1px solid #ccd5e0;
    border-radius: 10px;
    background: #fff;
}

.sl-clear-filter {
    font-weight: 700;
    text-decoration: none;
}

.sl-archive-list {
    display: grid;
    gap: 14px;
}

.sl-year-archive {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e7f0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sl-year-archive summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 800;
    color: #111827;
}

.sl-year-archive summary::-webkit-details-marker {
    display: none;
}

.sl-year-archive summary:before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    flex: 0 0 26px;
    border-radius: 999px;
    background: #eef2f7;
    color: #111827;
    font-weight: 900;
}

.sl-year-archive[open] summary:before {
    content: '-';
}

.sl-year-archive summary span {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.sl-year-archive summary em {
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f5ee;
    color: #166534;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sl-year-archive summary strong {
    color: #536070;
    font-size: 14px;
}

.sl-year-content {
    padding: 0 20px 20px;
}

.sl-letters-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid #e7ecf3;
    border-radius: 12px;
}

.sl-letters-table th,
.sl-letters-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid #e7ecf3;
    vertical-align: middle;
}

.sl-letters-table tr:last-child td {
    border-bottom: 0;
}

.sl-letters-table th {
    background: #f7f8fb;
    color: #172033;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sl-letters-table a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--sl-button-bg, #111827);
    color: var(--sl-button-text, #fff);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.sl-letters-table a:hover,
.sl-letters-table a:focus {
    background: var(--sl-button-hover-bg, #374151);
    color: var(--sl-button-hover-text, #fff);
}

.sl-empty-message {
    padding: 18px;
    background: #f7f8fb;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
}

@media (max-width: 720px) {
    .sl-letters-header h2 {
        font-size: 24px;
    }

    .sl-filter-form {
        align-items: stretch;
    }

    .sl-filter-form label,
    .sl-filter-form select,
    .sl-clear-filter {
        width: 100%;
    }

    .sl-year-archive summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .sl-year-archive summary span {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .sl-year-content {
        overflow-x: auto;
    }

    .sl-letters-table {
        min-width: 760px;
    }
}


.sl-admin-card .sl-colour-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    max-width: 780px;
}

.sl-admin-card .sl-colour-settings label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f7f8fb;
    border: 1px solid #e2e7ef;
    border-radius: 10px;
    font-weight: 600;
}

.sl-admin-card .sl-colour-settings input[type="color"] {
    width: 46px;
    height: 34px;
    padding: 2px;
    border: 1px solid #ccd5e0;
    border-radius: 8px;
    background: #fff;
}
