main > .container {
    max-width: none;
    padding: 60px 12px 20px;
}

@media(min-width: 768px) {
    main > .container {
        padding: 70px 24px 20px;
    }
}

@media(min-width: 1200px) {
    main > .container {
        padding: 70px 40px 20px;
    }
}

@media(max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-box span {
        font-size: 22px;
    }
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.proxy-title {
    align-items: flex-start;
    border-bottom: 1px solid #dde3ea;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.proxy-title h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 6px;
}

.proxy-title p {
    color: #52606d;
    margin: 0;
}

.proxy-actions {
    background: #f1f5f9;
    border: 1px solid #d8e0e8;
    border-radius: 6px;
    padding: 10px 12px;
}

.stats-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.stat-box {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 6px;
    padding: 14px;
}

.stat-box span {
    color: #1f2937;
    display: block;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-box label {
    color: #667085;
    display: block;
    font-size: 13px;
    margin: 6px 0 0;
}

.stat-china {
    border-color: #bfd4f5;
}

.stat-china span {
    color: #2563eb;
}

.filter-panel {
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 14px;
}

.filter-form {
    align-items: flex-end;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
}

.filter-form.compact {
    grid-template-columns: 1fr 1fr auto;
}

.filter-field label {
    color: #344054;
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.filter-submit {
    display: flex;
    gap: 8px;
}

.proxy-table {
    background: #fff;
}

.proxy-table th,
.proxy-table td {
    vertical-align: middle;
}

.muted-line {
    color: #667085;
    font-size: 12px;
    margin-top: 3px;
}

.source-cell {
    color: #52606d;
    font-size: 12px;
    max-width: 260px;
}

.admin-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    margin-bottom: 18px;
}

.admin-panel {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 16px;
}

.admin-panel h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.job-progress {
    margin-bottom: 12px;
}

.job-log {
    background: #0f172a;
    border-radius: 6px;
    color: #dbeafe;
    font-size: 13px;
    max-height: 280px;
    min-height: 160px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.settings-form label {
    color: #344054;
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0 5px;
}

.job-message-cell {
    max-width: 420px;
    white-space: pre-wrap;
}

.pagination {
    gap: 8px;
}

.pagination > li > a,
.pagination > li > span {
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    min-width: auto;
    padding: 10px 16px;
    text-align: center;
    transition: background .15s;
}

.pagination > li > a {
    background: #d6ecfb;
    border: 1px solid #74b9ff;
    color: #0984e3;
}

.pagination > li > span {
    background: #f5f6fa;
    border: 1px solid #dfe6e9;
    color: #b2bec3;
}

.pagination > li > a:hover {
    background: #0984e3;
    border-color: #0984e3;
    color: #fff;
    text-decoration: none;
}

.pagination > .disabled > span {
    cursor: default;
}

@media(max-width: 991px) {
    .filter-form,
    .filter-form.compact,
    .admin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .proxy-title {
        display: block;
    }

    .proxy-actions {
        margin-top: 12px;
    }

    .proxy-table-wrap {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    .proxy-table {
        min-width: 750px;
    }
}

@media(max-width: 575px) {
    .stats-grid,
    .filter-form,
    .filter-form.compact,
    .admin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-submit {
        flex-wrap: wrap;
    }

    .proxy-table-wrap {
        -webkit-overflow-scrolling: touch;
        margin: 0 -8px;
        overflow-x: auto;
        padding: 0 8px;
    }

    .proxy-table {
        min-width: 700px;
    }
}
