* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f5f7;
    color: #20252b;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

a {
    color: #1557a0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 32px;
    background: #17212b;
    color: white;
}

.topbar h1 {
    margin: 0 0 7px;
    font-size: 26px;
}

.topbar p {
    margin: 0;
    color: #cbd4dd;
}

.container {
    width: min(1400px, calc(100% - 32px));
    margin: 28px auto;
}

.container.narrow {
    width: min(760px, calc(100% - 32px));
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 220px));
    gap: 16px;
    margin-bottom: 22px;
}

.summary-card {
    padding: 18px;
    background: white;
    border: 1px solid #dce1e6;
    border-radius: 10px;
}

.summary-card span {
    display: block;
    color: #66717c;
    font-size: 14px;
}

.summary-card strong {
    display: block;
    margin-top: 6px;
    font-size: 28px;
}

.panel {
    background: white;
    border: 1px solid #dce1e6;
    border-radius: 10px;
    overflow: hidden;
}

.form-panel {
    padding: 26px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid #e5e9ed;
    text-align: left;
    vertical-align: top;
}

th {
    background: #edf1f4;
    font-size: 14px;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: 0;
}

.feed-url {
    min-width: 260px;
    max-width: 480px;
    word-break: break-word;
}

.secondary-link,
.notes {
    margin-top: 6px;
    font-size: 13px;
}

.notes {
    color: #65717c;
}

.category,
.status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.category {
    background: #e6edf7;
    color: #254f81;
}

.status.active {
    background: #dff3e5;
    color: #176c36;
}

.status.paused {
    background: #f3e7cf;
    color: #895d13;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.actions form {
    margin: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #aeb8c2;
    border-radius: 7px;
    background: #ffffff;
    color: #26313a;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    filter: brightness(0.97);
}

.button.primary {
    border-color: #1462aa;
    background: #1462aa;
    color: white;
}

.button.small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.button.warning {
    border-color: #d7a33e;
    background: #fff4d8;
    color: #75500b;
}

.button.success {
    border-color: #4f9b68;
    background: #e2f6e8;
    color: #176c36;
}

.button.danger {
    border-color: #c76464;
    background: #fae5e5;
    color: #8e2323;
}

.message,
.error-message {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 7px;
}

.message {
    border: 1px solid #8ac09b;
    background: #e5f5ea;
    color: #175e30;
}

.error-message {
    border: 1px solid #d98c8c;
    background: #fdeaea;
    color: #8a2525;
}

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

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #bfc8d0;
    border-radius: 7px;
    background: white;
    color: #20252b;
    font: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #8dbce8;
    border-color: #2874b8;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #6d7780;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
}

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

.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state h2 {
    margin-top: 0;
}

.empty-state p {
    margin-bottom: 24px;
    color: #66717c;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .summary-card {
        padding: 14px;
    }

    .summary-card strong {
        font-size: 23px;
    }

    th,
    td {
        padding: 11px;
    }
}

@media (max-width: 500px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .container,
    .container.narrow {
        width: min(100% - 20px, 1400px);
        margin-top: 16px;
    }

    .form-panel {
        padding: 18px;
    }
}

.feed-test-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.feed-test-progress {
    color: #5f6973;
    font-size: 14px;
}

.feed-test-result {
    margin-top: 14px;
    padding: 15px;
    border-radius: 8px;
}

.feed-test-result.success {
    border: 1px solid #80bd93;
    background: #e8f6ec;
    color: #165c2d;
}

.feed-test-result.error {
    border: 1px solid #d98c8c;
    background: #fdeaea;
    color: #842323;
}

.feed-test-result p {
    margin-bottom: 0;
}

.feed-test-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
    margin: 14px 0 0;
}

.feed-test-details dt {
    font-weight: bold;
}

.feed-test-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.feed-test-warning {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid currentColor;
    font-size: 13px;
}

@media (max-width: 600px) {
    .feed-test-details {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .feed-test-details dd {
        margin-bottom: 8px;
    }
}
