:root {
    --blue: #0f62fe;
    --blue-dark: #064ad8;
    --blue-soft: #eef5ff;
    --ink: #07142f;
    --text: #1b2b4b;
    --muted: #607097;
    --line: #dfe7f3;
    --bg: #f7faff;
    --panel: #ffffff;
    --green: #0c9f4a;
    --green-bg: #e9f8ef;
    --red: #e11d48;
    --red-bg: #fff1f2;
    --orange: #f59e0b;
    --purple: #7c3aed;
    --shadow: 0 18px 42px rgba(31, 42, 68, .08);
    --shadow-soft: 0 10px 26px rgba(31, 42, 68, .06);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 80% 4%, rgba(15, 98, 254, .06), transparent 30%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a { color: var(--blue); text-decoration: none; font-weight: 650; }
a:hover { color: var(--blue-dark); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 292px;
    background: rgba(255, 255, 255, .92);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 34px 24px 28px;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width .22s ease, padding .22s ease;
    z-index: 5;
    backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 14px; min-height: 58px; position: relative; }
.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: transparent;
    flex: 0 0 52px;
}
.brand-mark .icon { width: 52px; height: 52px; stroke-width: 2.5; }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 22px; font-weight: 780; letter-spacing: 0; }
.brand-text span { color: var(--muted); font-size: 15px; margin-top: 4px; }
.sidebar-toggle {
    position: absolute;
    right: -48px;
    top: -10px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-soft);
    display: grid;
    place-items: center;
    gap: 0;
    z-index: 8;
}
.sidebar-toggle-icon {
    width: 20px;
    height: 20px;
    color: #7080a6;
    transition: transform 200ms ease;
}
.sidebar-nav { display: grid; gap: 12px; margin-top: 76px; }
.sidebar-nav a, .logout-link, .user-chip {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 58px;
    padding: 13px 16px;
    border-radius: 10px;
    color: #526384;
    font-size: 16px;
    font-weight: 680;
}
.sidebar-nav a.active {
    background: linear-gradient(135deg, #eef5ff, #f7fbff);
    color: var(--blue);
    box-shadow: inset 0 0 0 1px #d9e7ff;
}
.sidebar-nav a:hover, .logout-link:hover {
    background: #f3f7ff;
    color: var(--blue);
}
.icon { width: 22px; height: 22px; flex: 0 0 22px; }
.sidebar-nav .icon, .logout-link .icon { stroke-width: 2.2; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 16px; padding-top: 28px; }
.sidebar-bottom::before {
    content: "";
    height: 1px;
    background: var(--line);
    display: block;
    margin: 0 8px 10px;
}
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eaf2ff;
    display: grid;
    place-items: center;
    color: var(--blue);
    font-weight: 700;
}
.avatar .icon { width: 24px; height: 24px; }
.powered {
    color: var(--muted);
    font-size: 15px;
    display: grid;
    gap: 3px;
    padding: 12px 16px 0;
}
.powered span { display: inline-flex; align-items: center; gap: 10px; }
.powered strong { color: var(--blue); font-size: 16px; }
.powered small { color: var(--muted); margin-top: 6px; }
.powered .icon, .admin-footer .icon { width: 22px; height: 22px; color: #6d7fa5; }

.sidebar.collapsed { width: 84px; padding: 22px 14px; }
.sidebar.collapsed .brand { justify-content: center; }
.sidebar.collapsed .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
.sidebar.collapsed .brand-mark .icon { width: 42px; height: 42px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-nav span,
.sidebar.collapsed .logout-link span,
.sidebar.collapsed .user-chip span:not(.avatar),
.sidebar.collapsed .powered { display: none; }
.sidebar.collapsed .sidebar-nav { margin-top: 58px; gap: 10px; }
.sidebar.collapsed .sidebar-nav a,
.sidebar.collapsed .logout-link,
.sidebar.collapsed .user-chip {
    justify-content: center;
    padding: 12px;
    min-height: 48px;
}
.sidebar.collapsed .sidebar-toggle {
    position: static;
    order: -1;
    margin: 0 auto 12px;
    width: 42px;
    height: 42px;
}
.sidebar.collapsed .sidebar-toggle-icon { transform: rotate(180deg); }
.sidebar.collapsed [data-tooltip] { position: relative; }
.sidebar.collapsed [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    background: #12213d;
    color: #fff;
    border-radius: 7px;
    padding: 8px 11px;
    white-space: nowrap;
    font-size: 13px;
    z-index: 20;
    box-shadow: var(--shadow-soft);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 48px 56px 0;
    display: flex;
    flex-direction: column;
}
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 36px;
}
.topbar h1 { margin: 0; font-size: 38px; line-height: 1.05; font-weight: 800; color: var(--ink); }
.topbar p { margin: 10px 0 0; color: #4f6087; font-size: 17px; }
.alert { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }

.btn {
    border-radius: 8px;
    min-height: 46px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 750;
}
.btn-lg { min-height: 58px; font-size: 18px; }
.btn-primary {
    background: linear-gradient(135deg, #0f62fe, #064fe4);
    border-color: #0f62fe;
    box-shadow: 0 14px 26px rgba(15, 98, 254, .22);
}
.btn-primary:hover { background: linear-gradient(135deg, #0758ec, #064ad8); border-color: #064ad8; }
.btn-outline-primary, .btn-outline-secondary {
    border-color: #cfdaf0;
    color: #51638a;
    background: #fff;
    box-shadow: none;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: -84px;
    margin-bottom: 42px;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 10px;
    padding: 12px 18px;
    border: 1px solid #c9ead5;
    background: #f1fbf5;
    color: #11803b;
    font-weight: 760;
}
.status-pill .icon {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 50%;
    background: #22ad5c;
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 22px;
}
.stat-card, .panel, .empty-state, .hero-card {
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.stat-card {
    padding: 30px;
    min-height: 142px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.stat-icon, .panel-icon, .event-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.stat-icon .icon, .panel-icon .icon { width: 36px; height: 36px; stroke-width: 2; }
.tone-blue { background: #eaf2ff; color: var(--blue); }
.tone-green { background: #e8f7ee; color: #20a55a; }
.tone-purple { background: #f1eaff; color: var(--purple); }
.tone-orange { background: #fff5df; color: var(--orange); }
.tone-red { background: #fff0f2; color: var(--red); }
.stat-card span { color: var(--ink); font-size: 15px; font-weight: 760; }
.stat-card strong { display: block; margin-top: 6px; font-size: 32px; line-height: 1.08; font-weight: 800; overflow-wrap: anywhere; }
.stat-card small { color: var(--muted); font-size: 15px; margin-top: 8px; display: block; }

.panel { padding: 28px; }
.panel + .panel { margin-top: 22px; }
.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.panel-title { display: flex; align-items: center; gap: 22px; }
.panel-heading h2 { margin: 0; font-size: 22px; font-weight: 800; }
.panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 16px; }
.content-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: stretch; }
.settings-grid { display: grid; gap: 22px; }
.diagnostics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.detail-list { display: grid; grid-template-columns: minmax(170px, .55fr) minmax(0, 1fr); gap: 0; margin: 0; }
.detail-list dt, .detail-list dd {
    margin: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.detail-list dt { color: #51638a; font-weight: 650; }
.detail-list dd {
    color: var(--ink);
    font-weight: 720;
    text-align: right;
    overflow-wrap: anywhere;
}
.detail-list dt:last-of-type, .detail-list dd:last-of-type { border-bottom: 0; }
.detail-list.compact { grid-template-columns: minmax(140px, .7fr) minmax(0, .55fr); }
.diag-value { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; }
.diag-value .icon { width: 18px; height: 18px; color: var(--green); }
.activity-list { display: grid; gap: 0; }
.activity-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 13px 0;
}
.activity-list strong { font-weight: 740; }
.activity-list span { color: var(--muted); font-size: 14px; }

.refresh-panel {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: center;
    gap: 40px;
    margin-bottom: 22px;
}
.refresh-panel::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    height: 96px;
    background: var(--line);
}
.refresh-copy { display: flex; align-items: center; gap: 26px; }
.refresh-action { display: grid; justify-items: center; gap: 14px; grid-column: 3; }
.refresh-action .btn { min-width: min(420px, 100%); }
.source-line, .url-field {
    display: flex;
    align-items: center;
    border: 1px solid #ccd8eb;
    border-radius: 8px;
    background: #fff;
    min-height: 52px;
    overflow: hidden;
}
.source-line code, .url-field span {
    flex: 1;
    padding: 13px 16px;
    color: var(--ink);
    background: transparent;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar, .filter-bar {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.filter-bar {
    padding: 22px 22px 0;
    justify-content: flex-start;
    margin-bottom: 0;
}
.filter-bar .form-control, .filter-bar .form-select { width: 230px; }
.search-box, .search-wide { min-width: min(440px, 100%); }
.form-control, .form-select {
    min-height: 46px;
    border-radius: 8px;
    border-color: #cfdaf0;
    color: var(--ink);
}
.form-control:focus, .form-select:focus {
    border-color: #8eb5ff;
    box-shadow: 0 0 0 .2rem rgba(15, 98, 254, .12);
}
.form-label { color: var(--ink); font-weight: 740; margin-bottom: 18px; }
.form-text { color: var(--muted); }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #7888ac;
    pointer-events: none;
}
.input-icon-wrap .form-control { padding-left: 50px; }

.table-panel { padding: 0; overflow: hidden; }
.table-responsive { padding: 0 22px; }
.table { margin-bottom: 0; color: var(--ink); }
.table thead th {
    color: #26395f;
    font-size: 14px;
    font-weight: 800;
    border-bottom-color: var(--line);
    padding: 20px 18px;
    white-space: nowrap;
}
.table tbody td {
    padding: 20px 18px;
    border-bottom-color: var(--line);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.badge {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 760;
}
.text-bg-success { background: var(--green-bg) !important; color: #078536 !important; border: 1px solid #c8eed7; }
.text-bg-danger { background: var(--red-bg) !important; color: #d10f35 !important; border: 1px solid #ffd2d9; }
.text-bg-warning { background: #fff7e7 !important; color: #ad6a00 !important; border: 1px solid #ffe5b4; }
.text-bg-secondary { background: #edf2fa !important; color: #526384 !important; border: 1px solid #dae4f3; }
.status-dot::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 8px;
}
.url-truncate { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.actions { white-space: nowrap; }
.icon-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #cfdaf0;
    border-radius: 8px;
    background: #fff;
    color: #526384;
    display: inline-grid;
    place-items: center;
    margin-right: 8px;
}
.icon-btn:hover { color: var(--blue); border-color: #b8ceff; background: #f4f8ff; }
.icon-btn .icon { width: 21px; height: 21px; }
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 26px 22px;
    border-top: 1px solid var(--line);
    color: #526384;
}
.pagination { gap: 8px; }
.page-link {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px !important;
    border-color: #cfdaf0;
    color: #26395f;
    font-weight: 740;
}
.page-item.active .page-link {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 10px 18px rgba(15, 98, 254, .18);
}
.empty-state { padding: 22px 26px; color: var(--muted); margin-bottom: 22px; }

.maintenance-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.maintenance-card {
    min-height: 120px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: left;
    color: var(--ink);
}
.maintenance-card strong { display: block; font-size: 18px; }
.maintenance-card span { color: var(--muted); font-weight: 500; }
.admin-footer {
    display: flex;
    justify-content: center;
    gap: 120px;
    align-items: center;
    color: var(--muted);
    font-size: 15px;
    margin: auto -56px 0;
    padding: 24px 56px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .65);
}
.admin-footer span { display: inline-flex; align-items: center; gap: 8px; }
.admin-footer strong { color: var(--blue); }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px;
    background:
        linear-gradient(90deg, rgba(15, 98, 254, .08) 0 1px, transparent 1px) 0 50% / 90px 1px,
        radial-gradient(circle at 8% 50%, rgba(15, 98, 254, .16) 0 2px, transparent 3px),
        radial-gradient(circle at 92% 42%, rgba(15, 98, 254, .12) 0 3px, transparent 4px),
        linear-gradient(180deg, #fbfdff, #f0f6ff);
}
.login-card {
    width: min(680px, 100%);
    background: rgba(255, 255, 255, .96);
    border: 1px solid #cfd9e8;
    border-radius: 22px;
    padding: 62px 72px 48px;
    box-shadow: 0 28px 70px rgba(20, 42, 80, .16);
}
.login-card .brand-mark { margin: 0 auto 22px; }
.login-card .brand-mark, .login-card .brand-mark .icon { width: 84px; height: 84px; }
.login-card h1 { text-align: center; margin: 0; font-size: 42px; font-weight: 800; }
.login-card p { text-align: center; color: var(--muted); margin: 10px 0 34px; font-size: 22px; }
.login-card form { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 0; }
.login-card .form-control { min-height: 58px; font-size: 18px; }
.login-footer { margin-top: 28px; text-align: center; color: var(--muted); font-size: 17px; }
.remember-row { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 16px; }

.event-cell { display: flex; align-items: center; gap: 14px; font-weight: 740; }
.event-icon { width: 38px; height: 38px; }
.event-icon .icon { width: 18px; height: 18px; }
.message-secondary { display: block; color: var(--muted); margin-top: 4px; }

@media (max-width: 1180px) {
    .stats-grid, .diagnostics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: 1fr; }
    .page-actions { margin-top: 0; justify-content: flex-start; }
}

@media (max-width: 860px) {
    .app-shell { display: block; }
    .sidebar {
        position: sticky;
        height: auto;
        width: 100%;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .sidebar-toggle { right: 16px; top: 8px; }
    .sidebar-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        margin-top: 16px;
        gap: 8px;
    }
    .sidebar-nav a { justify-content: center; min-height: 48px; padding: 10px; }
    .sidebar-nav a span { display: none; }
    .sidebar-bottom { display: none; }
    .main-content { padding: 28px 18px 0; }
    .topbar { margin-bottom: 24px; }
    .topbar h1 { font-size: 30px; }
    .stats-grid, .diagnostics-grid, .maintenance-actions { grid-template-columns: 1fr; }
    .refresh-panel { grid-template-columns: 1fr; gap: 22px; }
    .refresh-panel::before { display: none; }
    .refresh-action { grid-column: auto; }
    .admin-footer { margin: auto -18px 0; padding: 20px 18px; gap: 18px; flex-wrap: wrap; }
    .login-card { padding: 42px 28px 34px; }
}

@media (max-width: 620px) {
    .stat-card { padding: 22px; align-items: flex-start; }
    .stat-icon, .panel-icon { width: 56px; height: 56px; }
    .stat-icon .icon, .panel-icon .icon { width: 28px; height: 28px; }
    .detail-list, .detail-list.compact { grid-template-columns: 1fr; }
    .detail-list dd { text-align: left; padding-top: 0; }
    .filter-bar .form-control, .filter-bar .form-select, .search-box, .search-wide { width: 100%; }
    .toolbar { align-items: stretch; }
    .toolbar > * { width: 100%; }
    .toolbar form { justify-content: stretch; }
    .toolbar .btn { flex: 1; }
    .table-footer { flex-direction: column; align-items: flex-start; }
}

/* Production scale fix: tuned for normal 100% browser zoom. */
body {
    font-size: 14px;
    overflow-wrap: normal;
    word-break: normal;
}

.sidebar {
    width: 260px;
    padding: 24px 18px 22px;
}

.brand {
    gap: 10px;
    min-height: 48px;
}

.brand-mark,
.brand-mark .icon {
    width: 42px;
    height: 42px;
}

.brand-mark {
    flex-basis: 42px;
}

.brand-text strong {
    font-size: 18px;
}

.brand-text span {
    font-size: 13px;
}

.sidebar-toggle {
    right: -38px;
    top: -4px;
    width: 36px;
    height: 36px;
}

.sidebar-toggle-icon {
    width: 18px;
    height: 18px;
    color: #7080a6;
    transition: transform 200ms ease;
    transform-origin: 50% 50%;
}

.sidebar-nav {
    gap: 8px;
    margin-top: 50px;
}

.sidebar-nav a,
.logout-link,
.user-chip {
    min-height: 46px;
    padding: 10px 12px;
    gap: 12px;
    font-size: 14px;
}

.icon {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
}

.avatar {
    width: 36px;
    height: 36px;
}

.avatar .icon {
    width: 20px;
    height: 20px;
}

.powered {
    font-size: 13px;
    padding: 8px 12px 0;
}

.powered strong {
    font-size: 14px;
}

.sidebar.collapsed {
    width: 76px;
    padding: 18px 10px;
}

.sidebar.collapsed .brand-mark,
.sidebar.collapsed .brand-mark .icon {
    width: 34px;
    height: 34px;
}

.sidebar.collapsed .sidebar-nav a,
.sidebar.collapsed .logout-link,
.sidebar.collapsed .user-chip {
    min-height: 44px;
    padding: 10px;
}

.sidebar.collapsed .sidebar-toggle {
    width: 36px;
    height: 36px;
}

.sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.main-content {
    padding: 32px 34px 0;
}

.main-content > :not(.admin-footer) {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.topbar {
    margin-bottom: 24px;
}

.topbar h1 {
    font-size: 30px;
}

.topbar p {
    margin-top: 6px;
    font-size: 15px;
}

.page-actions {
    margin-top: -62px;
    margin-bottom: 28px;
}

.btn {
    min-height: 40px;
    padding: 8px 14px;
    gap: 8px;
    font-size: 14px;
}

.btn-lg {
    min-height: 46px;
    font-size: 15px;
}

.status-pill {
    padding: 9px 13px;
    font-size: 13px;
}

.status-pill .icon {
    width: 24px;
    height: 24px;
}

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

.stat-card {
    min-width: 0;
    min-height: 112px;
    padding: 20px;
    gap: 16px;
}

.stat-card > div:last-child {
    min-width: 0;
}

.stat-icon,
.panel-icon {
    width: 52px;
    height: 52px;
}

.stat-icon .icon,
.panel-icon .icon {
    width: 27px;
    height: 27px;
}

.stat-card span {
    font-size: 13px;
}

.stat-card strong {
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
}

.stat-card small {
    font-size: 13px;
    margin-top: 5px;
}

.panel {
    padding: 20px;
}

.panel + .panel {
    margin-top: 18px;
}

.panel-heading {
    margin-bottom: 16px;
}

.panel-title {
    gap: 14px;
    min-width: 0;
}

.panel-heading h2 {
    font-size: 18px;
}

.panel-heading p {
    font-size: 14px;
}

.content-grid,
.settings-grid,
.diagnostics-grid {
    gap: 18px;
}

.diagnostics-grid {
    grid-template-columns: repeat(3, minmax(300px, 1fr));
}

.detail-list {
    grid-template-columns: minmax(130px, .7fr) minmax(0, 1fr);
}

.detail-list.compact {
    grid-template-columns: minmax(125px, .8fr) minmax(0, 1.1fr);
}

.detail-list dt,
.detail-list dd {
    padding: 9px 0;
    min-width: 0;
    font-size: 13px;
}

.detail-list dd {
    overflow-wrap: normal;
    word-break: normal;
}

.diag-value {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.diag-value .icon {
    display: none;
}

.refresh-panel {
    gap: 24px;
    margin-bottom: 18px;
}

.refresh-panel::before {
    height: 72px;
}

.refresh-copy {
    gap: 16px;
    min-width: 0;
}

.refresh-action {
    gap: 10px;
}

.refresh-action .btn {
    min-width: min(340px, 100%);
}

.source-line,
.url-field {
    min-height: 42px;
    min-width: 0;
}

.source-line code,
.url-field span {
    min-width: 0;
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar,
.filter-bar {
    gap: 10px;
    margin-bottom: 18px;
}

.filter-bar {
    padding: 16px 16px 0;
}

.filter-bar .form-control,
.filter-bar .form-select {
    width: 190px;
}

.search-box,
.search-wide {
    min-width: min(340px, 100%);
}

.form-control,
.form-select {
    min-height: 40px;
    font-size: 14px;
}

.form-label {
    margin-bottom: 12px;
}

.input-icon-wrap .form-control {
    padding-left: 42px;
}

.input-icon-wrap .icon {
    left: 13px;
}

.table-panel {
    overflow: hidden;
}

.table-responsive {
    padding: 0 14px;
}

.table {
    table-layout: fixed;
    font-size: 13px;
}

.table thead th {
    padding: 13px 10px;
    font-size: 12px;
}

.table tbody td {
    padding: 12px 10px;
}

.table td,
.table th {
    min-width: 0;
}

.table code {
    font-size: 12px;
}

.feeds-table th:nth-child(1), .feeds-table td:nth-child(1) { width: 92px; }
.feeds-table th:nth-child(2), .feeds-table td:nth-child(2) { width: 118px; }
.feeds-table th:nth-child(3), .feeds-table td:nth-child(3) { width: 170px; }
.feeds-table th:nth-child(4), .feeds-table td:nth-child(4) { width: 88px; }
.feeds-table th:nth-child(5), .feeds-table td:nth-child(5) { width: auto; }
.feeds-table th:nth-child(6), .feeds-table td:nth-child(6) { width: 138px; }
.feeds-table th:nth-child(7), .feeds-table td:nth-child(7) { width: 92px; }

.activity-table th:nth-child(1), .activity-table td:nth-child(1) { width: 145px; }
.activity-table th:nth-child(2), .activity-table td:nth-child(2) { width: 210px; }
.activity-table th:nth-child(3), .activity-table td:nth-child(3) { width: auto; }
.activity-table th:nth-child(4), .activity-table td:nth-child(4) { width: 96px; }
.activity-table th:nth-child(5), .activity-table td:nth-child(5) { width: 96px; }
.activity-table th:nth-child(6), .activity-table td:nth-child(6) { width: 64px; }

.feeds-table td,
.activity-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-field .icon-btn {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-right: 3px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    margin-right: 4px;
}

.icon-btn .icon {
    width: 17px;
    height: 17px;
}

.badge {
    padding: 4px 9px;
    font-size: 12px;
}

.event-cell {
    gap: 10px;
    min-width: 0;
}

.event-icon {
    width: 30px;
    height: 30px;
}

.event-icon .icon {
    width: 15px;
    height: 15px;
}

.message-secondary {
    display: none;
}

.table-footer {
    padding: 13px 18px 16px;
    font-size: 13px;
}

.page-link {
    min-width: 36px;
    min-height: 36px;
    font-size: 13px;
}

.maintenance-actions {
    gap: 14px;
}

.maintenance-card {
    min-height: 96px;
    padding: 14px;
    gap: 12px;
}

.maintenance-card strong {
    font-size: 15px;
}

.maintenance-card span {
    font-size: 13px;
}

.admin-footer {
    gap: 64px;
    font-size: 13px;
    margin: auto -34px 0;
    padding: 18px 34px;
}

.login-body {
    padding: 24px;
}

.login-card {
    width: min(480px, 100%);
    border-radius: 16px;
    padding: 34px 42px 28px;
}

.login-card .brand-mark,
.login-card .brand-mark .icon {
    width: 58px;
    height: 58px;
}

.login-card .brand-mark {
    margin-bottom: 14px;
}

.login-card h1 {
    font-size: 30px;
}

.login-card p {
    margin: 6px 0 22px;
    font-size: 16px;
}

.login-card form {
    padding: 22px 0;
}

.login-card .form-control {
    min-height: 44px;
    font-size: 14px;
}

.remember-row {
    font-size: 14px;
}

.login-footer {
    margin-top: 18px;
    font-size: 13px;
}

@media (max-width: 1280px) {
    .diagnostics-grid {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
}

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

@media (max-width: 860px) {
    .sidebar {
        width: 100%;
        padding: 14px;
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .main-content {
        padding: 24px 16px 0;
    }

    .main-content > :not(.admin-footer) {
        max-width: none;
    }

    .page-actions {
        margin-top: 0;
        margin-bottom: 18px;
    }

    .diagnostics-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-footer {
        margin: auto -16px 0;
        padding: 16px;
        gap: 16px;
    }
}

@media (max-width: 620px) {
    .login-card {
        padding: 28px 22px 24px;
    }

    .stat-card {
        padding: 16px;
    }

    .detail-list,
    .detail-list.compact {
        grid-template-columns: 1fr;
    }

    .detail-list dd {
        text-align: left;
    }
}
