:root {
    --admin-bg: #f3f6fb;
    --admin-surface: #ffffff;
    --admin-surface-soft: #f8fafc;
    --admin-border: #dce4ef;
    --admin-border-strong: #cbd5e1;
    --admin-text: #162033;
    --admin-muted: #64748b;
    --admin-primary: #2563eb;
    --admin-primary-dark: #1d4ed8;
    --admin-primary-soft: #e8f0ff;
    --admin-success: #059669;
    --admin-success-soft: #dcfce7;
    --admin-warning: #d97706;
    --admin-warning-soft: #fef3c7;
    --admin-danger: #dc2626;
    --admin-danger-soft: #fee2e2;
    --admin-slate: #475569;
    --admin-sidebar: #101a2f;
    --admin-sidebar-soft: #17233d;
    --admin-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --admin-radius-lg: 20px;
    --admin-radius-md: 14px;
    --admin-radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--admin-bg);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--admin-text);
    background:
        radial-gradient(
            circle at 90% 0%,
            rgba(37, 99, 235, 0.08),
            transparent 30rem
        ),
        var(--admin-bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

[hidden] {
    display: none !important;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 18px;
    overflow-y: auto;
    color: #e2e8f0;
    background:
        linear-gradient(
            180deg,
            rgba(37, 99, 235, 0.14),
            transparent 26%
        ),
        var(--admin-sidebar);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 8px 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.17);
}

.admin-brand-mark {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border-radius: 13px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.admin-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.admin-brand-copy strong {
    color: #ffffff;
    font-size: 18px;
    letter-spacing: 0.01em;
}

.admin-brand-copy small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
}

.admin-navigation {
    display: grid;
    gap: 7px;
    margin-top: 24px;
}

.admin-nav-link {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 10px 12px;
    color: #b8c5d9;
    border-radius: 12px;
    text-decoration: none;
    transition:
        color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.admin-nav-link i {
    width: 20px;
    text-align: center;
}

.admin-nav-link:hover,
.admin-nav-link:focus-visible {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.12);
    outline: none;
}

.admin-nav-link.active {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.94),
        rgba(14, 165, 233, 0.82)
    );
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.2);
}

.admin-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 18px 8px 0;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.17);
}

.admin-sidebar-footer > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.admin-sidebar-footer strong {
    color: #dbe5f2;
    font-size: 12px;
}

.admin-sidebar-footer small {
    margin-top: 2px;
    font-size: 11px;
}

.security-indicator {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
}

.admin-main {
    min-width: 0;
    padding: 30px clamp(20px, 3vw, 44px) 52px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.admin-eyebrow,
.section-kicker {
    margin: 0 0 6px;
    color: var(--admin-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-topbar h1 {
    margin: 0;
    color: var(--admin-text);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.08;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-session-badge {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: #1e40af;
    background: var(--admin-primary-soft);
    border: 1px solid #c7d7fe;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 750;
}

.icon-text-button,
.primary-button,
.secondary-button,
.table-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 750;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease,
        border-color 150ms ease;
}

.icon-text-button,
.secondary-button {
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
}

.icon-text-button:hover,
.secondary-button:hover {
    border-color: #b7c4d7;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.07);
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--admin-primary),
        #0ea5e9
    );
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(37, 99, 235, 0.28);
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-text-button:disabled,
.table-action-button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    transform: none;
    box-shadow: none;
}

.access-state {
    display: grid;
    min-height: 390px;
    place-items: center;
    align-content: center;
    padding: 40px 24px;
    text-align: center;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow);
}

.state-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    place-items: center;
    color: var(--admin-primary);
    background: var(--admin-primary-soft);
    border-radius: 18px;
    font-size: 24px;
}

.state-icon.denied {
    color: var(--admin-danger);
    background: var(--admin-danger-soft);
}

.state-icon.error {
    color: var(--admin-warning);
    background: var(--admin-warning-soft);
}

.access-state h2 {
    margin: 0;
    font-size: 22px;
}

.access-state p {
    max-width: 520px;
    margin: 9px 0 0;
    color: var(--admin-muted);
    line-height: 1.6;
}

.access-state .secondary-button {
    margin-top: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.summary-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 19px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.summary-icon {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    font-size: 18px;
}

.summary-icon.blue {
    color: #1d4ed8;
    background: #dbeafe;
}

.summary-icon.green {
    color: #047857;
    background: var(--admin-success-soft);
}

.summary-icon.amber {
    color: #b45309;
    background: var(--admin-warning-soft);
}

.summary-icon.slate {
    color: #475569;
    background: #e2e8f0;
}

.summary-card > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.summary-card span:not(.summary-icon) {
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
}

.summary-card strong {
    margin-top: 5px;
    color: var(--admin-text);
    font-size: 26px;
    line-height: 1;
}

.channels-panel {
    overflow: hidden;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border-bottom: 1px solid var(--admin-border);
}

.panel-heading h2 {
    margin: 0;
    font-size: 22px;
}

.panel-heading p:last-child {
    max-width: 690px;
    margin: 7px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.55;
}

.channel-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 26px;
    background: var(--admin-surface-soft);
    border-bottom: 1px solid var(--admin-border);
}

.search-control {
    position: relative;
    display: flex;
    min-width: 220px;
    flex: 1 1 360px;
    align-items: center;
}

.search-control i {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.search-control input {
    width: 100%;
    min-height: 42px;
    padding: 9px 14px 9px 40px;
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    outline: none;
}

.filter-control {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding-left: 12px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 11px;
}

.filter-control span {
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 750;
}

.filter-control select {
    min-height: 40px;
    padding: 0 32px 0 0;
    color: var(--admin-text);
    background: transparent;
    border: 0;
    outline: none;
    cursor: pointer;
}

.search-control input:focus,
.filter-control:focus-within {
    border-color: #93b4f8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.table-status {
    margin: 18px 26px 0;
    padding: 11px 13px;
    color: #1e40af;
    background: var(--admin-primary-soft);
    border: 1px solid #c7d7fe;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
}

.table-status.error {
    color: #991b1b;
    background: var(--admin-danger-soft);
    border-color: #fecaca;
}

.channel-table-wrap {
    overflow-x: auto;
}

.channel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.channel-table th,
.channel-table td {
    padding: 15px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--admin-border);
}

.channel-table th:first-child,
.channel-table td:first-child {
    padding-left: 26px;
}

.channel-table th:last-child,
.channel-table td:last-child {
    padding-right: 26px;
}

.channel-table th {
    color: var(--admin-muted);
    background: #fbfcfe;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.channel-table tbody tr {
    transition: background 140ms ease;
}

.channel-table tbody tr:hover {
    background: #f8fbff;
}

.channel-table tbody tr:last-child td {
    border-bottom: 0;
}

.channel-identity {
    display: flex;
    min-width: 190px;
    align-items: center;
    gap: 11px;
}

.platform-mark {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    background: #64748b;
    border-radius: 12px;
    font-size: 16px;
}

.platform-mark.telegram {
    background: #229ed9;
}

.platform-mark.instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.platform-mark.whatsapp {
    background: #25d366;
}

.platform-mark.youtube {
    background: #ff0000;
}

.platform-mark.facebook {
    background: #1877f2;
}

.platform-mark.discord {
    background: #5865f2;
}

.platform-mark.x {
    background: #111827;
}

.channel-identity-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.channel-identity-copy strong {
    max-width: 230px;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-identity-copy small {
    max-width: 230px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 27px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.platform-pill {
    color: #334155;
    background: #eef2f7;
}

.status-pill::before {
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
    content: "";
}

.status-pill.active {
    color: #047857;
    background: var(--admin-success-soft);
}

.status-pill.inactive {
    color: #a16207;
    background: var(--admin-warning-soft);
}

.channel-link {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    color: var(--admin-primary);
    font-weight: 650;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-link:hover,
.channel-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.order-badge {
    display: inline-grid;
    min-width: 34px;
    min-height: 28px;
    place-items: center;
    padding: 4px 8px;
    color: #334155;
    background: #eef2f7;
    border-radius: 8px;
    font-weight: 800;
}

.updated-copy {
    display: flex;
    min-width: 110px;
    flex-direction: column;
    color: #334155;
    white-space: nowrap;
}

.updated-copy small {
    margin-top: 3px;
    color: var(--admin-muted);
}

.actions-column {
    white-space: nowrap;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.table-action-button {
    min-width: 36px;
    min-height: 36px;
    padding: 7px 9px;
    color: #1e40af;
    background: var(--admin-primary-soft);
    border: 1px solid #d4e0ff;
}

.table-action-button:hover {
    border-color: #9eb9f8;
}

.table-action-button.delete {
    color: #b91c1c;
    background: var(--admin-danger-soft);
    border-color: #fecaca;
}

.empty-state {
    display: grid;
    min-height: 280px;
    place-items: center;
    align-content: center;
    padding: 42px 24px;
    text-align: center;
}

.empty-state > span {
    display: grid;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    place-items: center;
    color: var(--admin-primary);
    background: var(--admin-primary-soft);
    border-radius: 17px;
    font-size: 22px;
}

.empty-state h3 {
    margin: 0;
    font-size: 19px;
}

.empty-state p {
    max-width: 420px;
    margin: 8px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.55;
}

.modal-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(4px);
}

.channel-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 44px);
    overflow: auto;
    background: var(--admin-surface);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(2, 8, 23, 0.3);
}

.modal-header {
    display: flex;
    position: sticky;
    z-index: 2;
    top: 0;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--admin-border);
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.modal-close-button {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #475569;
    background: #f1f5f9;
    border-radius: 11px;
    cursor: pointer;
}

.modal-close-button:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.modal-body {
    padding: 24px;
}

.form-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.form-message.error {
    color: #991b1b;
    background: var(--admin-danger-soft);
    border: 1px solid #fecaca;
}

.form-section {
    min-width: 0;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--admin-border);
    border-radius: 15px;
}

.form-section legend {
    padding: 0 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid + .form-field,
.form-field + .form-grid {
    margin-top: 16px;
}

.form-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.form-field.full-width {
    width: 100%;
}

.form-field > span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.form-field > span b {
    color: var(--admin-danger);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    color: var(--admin-text);
    background: #ffffff;
    border: 1px solid var(--admin-border-strong);
    border-radius: 10px;
    outline: none;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.form-field input,
.form-field select {
    min-height: 44px;
    padding: 9px 12px;
}

.form-field textarea {
    min-height: 92px;
    padding: 11px 12px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #7da4f4;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-field small {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.45;
}

.modal-footer {
    display: flex;
    position: sticky;
    z-index: 2;
    bottom: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--admin-border);
    backdrop-filter: blur(10px);
}

.modal-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 380px;
    margin: 0;
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.45;
}

.modal-note i {
    margin-top: 2px;
    color: var(--admin-primary);
}

.modal-footer-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.toast {
    position: fixed;
    z-index: 1100;
    right: 24px;
    bottom: 24px;
    display: flex;
    max-width: min(390px, calc(100vw - 32px));
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    color: #ecfdf5;
    background: #065f46;
    border: 1px solid rgba(167, 243, 208, 0.28);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(2, 8, 23, 0.25);
    font-size: 13px;
    font-weight: 700;
}

.toast.error {
    color: #fff1f2;
    background: #991b1b;
    border-color: rgba(254, 202, 202, 0.3);
}

@media (max-width: 1180px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        position: relative;
        display: block;
        height: auto;
        padding: 16px;
        overflow: visible;
    }

    .admin-brand {
        padding: 0 4px 14px;
    }

    .admin-brand-mark {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .admin-navigation {
        display: flex;
        gap: 7px;
        margin-top: 14px;
        padding-bottom: 3px;
        overflow-x: auto;
    }

    .admin-nav-link {
        display: inline-flex;
        flex: 0 0 auto;
        min-height: 42px;
    }

    .admin-sidebar-footer {
        display: none;
    }

    .admin-main {
        padding-top: 24px;
    }
}

@media (max-width: 760px) {
    .admin-main {
        padding-right: 14px;
        padding-left: 14px;
    }

    .admin-topbar {
        align-items: flex-start;
    }

    .admin-session-badge {
        display: none;
    }

    .icon-text-button {
        padding-right: 11px;
        padding-left: 11px;
    }

    .summary-grid {
        gap: 10px;
    }

    .summary-card {
        padding: 14px;
    }

    .summary-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .summary-card span:not(.summary-icon) {
        font-size: 10px;
    }

    .summary-card strong {
        font-size: 22px;
    }

    .panel-heading {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }

    .panel-heading .primary-button {
        align-self: flex-start;
    }

    .channel-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
        padding: 14px 20px;
    }

    .search-control {
        flex-basis: 100%;
    }

    .filter-control {
        flex: 1 1 auto;
    }

    .table-status {
        margin-right: 20px;
        margin-left: 20px;
    }

    .channel-table-wrap {
        padding: 12px 14px 18px;
        overflow: visible;
    }

    .channel-table,
    .channel-table thead,
    .channel-table tbody,
    .channel-table tr,
    .channel-table td {
        display: block;
        width: 100%;
    }

    .channel-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .channel-table tbody {
        display: grid;
        gap: 12px;
    }

    .channel-table tbody tr {
        padding: 13px 14px;
        background: #ffffff;
        border: 1px solid var(--admin-border);
        border-radius: 13px;
        box-shadow: 0 7px 20px rgba(15, 23, 42, 0.045);
    }

    .channel-table tbody tr:hover {
        background: #ffffff;
    }

    .channel-table td,
    .channel-table th:first-child,
    .channel-table td:first-child,
    .channel-table th:last-child,
    .channel-table td:last-child {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 9px 0;
        border-bottom: 1px dashed #e2e8f0;
    }

    .channel-table td:first-child {
        display: block;
        padding-top: 2px;
        padding-bottom: 13px;
    }

    .channel-table td::before {
        color: var(--admin-muted);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .channel-table td:first-child::before,
    .channel-table td.actions-column::before {
        display: none;
    }

    .channel-table td.actions-column {
        display: block;
        padding-top: 13px;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .table-actions {
        justify-content: stretch;
    }

    .table-action-button {
        flex: 1;
    }

    .channel-link,
    .channel-identity-copy strong,
    .channel-identity-copy small {
        max-width: 100%;
    }

    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .channel-modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 20px 20px 0 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-right: 18px;
        padding-left: 18px;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-note {
        max-width: none;
    }

    .modal-footer-actions button {
        flex: 1;
    }

    .toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        max-width: none;
    }
}

@media (max-width: 440px) {
    .admin-brand-copy small {
        display: none;
    }

    .admin-nav-link {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 12px;
    }

    .admin-topbar h1 {
        font-size: 28px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .channel-toolbar .secondary-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
