.no-outage-card {
    border-color: #cfe9d7;
    background: #fbfffc;
}

.no-outage-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 72px;
    margin: 8px 0 10px;
    color: #237a43;
}

.no-outage-message span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #def5e6;
    font-weight: 900;
}

.no-outage-badge {
    background: #e5f8eb;
    color: #247941;
}

.time-row-unknown {
    direction: rtl;
    min-height: 35px;
}

.favorite-times {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    max-width: 310px;
    margin-top: 6px;
    padding: 5px 8px;
    border-radius: 9px;
    background: #fff7e5;
    color: #7c5b00;
    line-height: 1.7;
    white-space: normal;
}

.favorite-meta {
    white-space: normal;
}

.status-processing {
    background: #fff5d5;
    color: #7f6200;
}

/* Flash messages stay in document flow so they never cover page controls. */
.flash-stack {
    position: relative;
    inset: auto;
    z-index: auto;
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.flash-stack:empty {
    display: none;
}

.flash-stack .alert {
    width: min(600px, 100%);
    max-width: none;
    min-height: 52px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: opacity .2s ease, transform .2s ease, max-height .25s ease, margin .25s ease, padding .25s ease;
    overflow: hidden;
}

.flash-stack .alert.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0;
    min-height: 0;
    margin: 0;
    padding-block: 0;
}

.alert-close {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .65);
    color: currentColor;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.alert-close:hover {
    background: rgba(255, 255, 255, .95);
}

@media (max-width: 650px) {
    .flash-stack {
        width: min(100% - 22px, 1180px);
        margin-top: 10px;
    }

    .flash-stack .alert {
        min-height: 48px;
        padding: 10px 12px;
        font-size: 12px;
    }
}

.admin-user-row:hover td {
    background: #f7faff;
}

.admin-user-link {
    display: block;
    color: #155eef;
    font-weight: 800;
}

.user-detail-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.user-detail-head > div {
    flex: 1;
}

.user-detail-head h2,
.user-detail-head span {
    margin: 0;
}

.user-detail-head > div > span {
    color: #718097;
    font-size: 13px;
}

.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.user-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #edf0f5;
    border-radius: 13px;
    background: #edf0f5;
}

.user-facts > div {
    min-width: 0;
    padding: 11px 13px;
    background: #fbfcfe;
}

.user-facts > .wide {
    grid-column: 1 / -1;
}

.user-facts dt {
    color: #7b879a;
    font-size: 10px;
    font-weight: 800;
}

.user-facts dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 800;
}

.user-agent-value {
    white-space: normal;
    font-family: monospace;
    font-weight: 400 !important;
}

.user-status-action {
    margin-top: 16px;
}

.channel-status-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.channel-status-list > div {
    display: grid;
    gap: 7px;
    padding: 13px;
    border: 1px solid #e4eaf2;
    border-radius: 12px;
}

.channel-status-list code {
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-status-list small {
    color: #8792a5;
}

.message-grid,
.log-grid {
    margin-top: 0;
}

.direct-message-card textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 12px;
    border: 1px solid #dce3ed;
    border-radius: 11px;
    background: #fbfcfe;
    font: inherit;
}

.direct-message-card .stack-form {
    margin-top: 14px;
}

.empty-inline {
    margin: 14px 0 0;
    padding: 13px;
    border: 1px dashed #d9e1ec;
    border-radius: 11px;
    background: #f9fbfe;
    color: #748198;
    font-size: 12px;
}

.password-reset-card {
    border-color: #f1c9cf;
}

.password-reset-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto auto;
    align-items: end;
    gap: 14px;
}

@media (max-width: 900px) {
    .user-detail-grid,
    .password-reset-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .user-detail-head {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .user-detail-head > div {
        min-width: calc(100% - 95px);
    }

    .user-detail-head > .btn {
        order: 3;
        width: 100%;
    }

    .user-facts,
    .channel-status-list {
        grid-template-columns: 1fr;
    }

    .user-facts > .wide {
        grid-column: auto;
    }

    .direct-message-card .btn,
    .password-reset-form .btn,
    .user-status-action .btn {
        width: 100%;
    }
}

.telegram-compose .panel-head {
    align-items: center;
    margin-bottom: 20px;
}

.telegram-compose .panel-head h2 {
    margin-bottom: 2px;
}

.telegram-compose-form {
    display: grid;
    gap: 16px;
}

.telegram-scope-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.scope-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 13px;
    background: #fbfcfe;
    cursor: pointer;
}

.scope-card:has(input:checked) {
    border-color: #6f9bf4;
    background: #f2f6ff;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, .08);
}

.scope-card input {
    accent-color: #155eef;
}

.scope-card b,
.scope-card small {
    display: block;
}

.scope-card small {
    color: #7b8799;
    font-size: 11px;
}

.telegram-message-field textarea {
    width: 100%;
    resize: vertical;
    min-height: 130px;
    padding: 12px 14px;
    border: 1px solid #dce3ed;
    border-radius: 11px;
    background: #fbfcfe;
    color: #1b2a42;
    outline: none;
    font: inherit;
    line-height: 1.9;
}

.telegram-message-field textarea:focus {
    border-color: #5c8ff2;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, .1);
}

.telegram-message-field small {
    text-align: left;
}

.telegram-send-confirm {
    width: max-content;
    max-width: 100%;
    white-space: normal;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff8e4;
    color: #765900;
}

.telegram-compose-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.telegram-compose-actions .btn:disabled {
    opacity: .65;
    cursor: wait;
}

.broadcast-schedule-field {
    padding: 14px;
    border: 1px solid #e1e7f0;
    border-radius: 13px;
    background: #fbfcfe;
}

.broadcast-audience-field {
    padding: 14px;
    border: 1px solid #d8e4f5;
    border-radius: 13px;
    background: #f7faff;
}

.broadcast-audience-field b {
    color: #155eef;
}

.broadcast-schedule-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-bottom: 8px;
}

.broadcast-schedule-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.admin-message-image {
    padding: 14px;
    border: 1px dashed #cfd9e8;
    border-radius: 13px;
    background: #fbfcfe;
}

.admin-message-image input[type="file"] {
    height: auto;
    padding: 9px;
    cursor: pointer;
}

.compact-empty {
    padding: 28px 20px;
}

.compact-empty > span {
    font-size: 32px;
}

.is-hidden {
    display: none !important;
}

.bale-connect-box {
    background: #f0fbf6;
    border-color: #bee8d2;
}

.bale-connect-box strong {
    color: #157347;
}

.btn-bale {
    background: #18a566;
    color: #fff;
    white-space: nowrap;
}

.btn-bale:hover {
    background: #128553;
}

.bale-section {
    overflow: hidden;
}

.bale-admin-settings .panel-head {
    align-items: center;
    margin-bottom: 15px;
}

.bale-compose {
    border-color: #bee8d2;
}

.bale-compose .result-count {
    background: #e8f8ef;
    color: #157347;
}

.bale-compose .scope-card:has(input:checked) {
    border-color: #55b98a;
    background: #f0fbf6;
    box-shadow: 0 0 0 3px rgba(24, 165, 102, .09);
}

.bale-compose .scope-card input {
    accent-color: #18a566;
}

@media (max-width: 650px) {
    .telegram-compose .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .telegram-scope-options {
        grid-template-columns: 1fr;
    }

    .telegram-compose-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .telegram-compose-actions .btn {
        width: 100%;
    }

    .btn-bale {
        width: 100%;
    }

    .bale-admin-settings .panel-head {
        align-items: stretch;
        flex-direction: column;
    }
}
