:root {
    --logicwebhook_bg: #0b1220;
    --logicwebhook_bg_soft: #111a2e;
    --logicwebhook_card: #18243d;
    --logicwebhook_border: #2a3c5f;
    --logicwebhook_text: #e8eefc;
    --logicwebhook_text_soft: #a9b7d8;
    --logicwebhook_primary: #4f8cff;
    --logicwebhook_primary_hover: #3c7bf5;
    --logicwebhook_success: #38c172;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top, #13203b 0%, var(--logicwebhook_bg) 50%);
    color: var(--logicwebhook_text);
}

.logicwebhook_page {
    width: min(1120px, 96%);
    margin: 28px auto;
    display: grid;
    gap: 16px;
}

.logicwebhook_header {
    padding: 16px 20px;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 14px;
    background: linear-gradient(140deg, #1b2a48, #13203a);
}

.logicwebhook_header_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logicwebhook_title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.logicwebhook_description {
    margin: 8px 0 0;
    color: var(--logicwebhook_text_soft);
}

.logicwebhook_block {
    padding: 16px 20px;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 14px;
    background: var(--logicwebhook_card);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.logicwebhook_protected {
    display: grid;
    gap: 10px;
}

.logicwebhook_login_block {
    max-width: 420px;
    margin: 0 auto;
}

.logicwebhook_login_success {
    border-color: rgba(56, 193, 114, 0.45);
}

.logicwebhook_subtitle {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 600;
}

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

.logicwebhook_inline_grid {
    grid-template-columns: 2fr 1fr 1fr 2fr auto;
}

.logicwebhook_row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 14px;
}

.logicwebhook_row_stack {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 12px;
}

.logicwebhook_label {
    display: block;
    font-size: 13px;
    color: var(--logicwebhook_text_soft);
}

.logicwebhook_toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 9px;
    background: var(--logicwebhook_bg_soft);
    font-size: 13px;
}

.logicwebhook_input {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 9px;
    background: var(--logicwebhook_bg_soft);
    color: var(--logicwebhook_text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.logicwebhook_input:focus {
    border-color: var(--logicwebhook_primary);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

textarea.logicwebhook_input {
    min-height: 74px;
    resize: vertical;
}

.logicwebhook_actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.logicwebhook_button {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 9px;
    background: var(--logicwebhook_bg_soft);
    color: var(--logicwebhook_text);
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.logicwebhook_button:hover {
    border-color: #5b76a7;
    background: #1a2948;
}

.logicwebhook_button:active {
    transform: translateY(1px);
}

.logicwebhook_button_primary {
    background: var(--logicwebhook_primary);
    border-color: var(--logicwebhook_primary);
    color: #ffffff;
}

.logicwebhook_button_primary:hover {
    background: var(--logicwebhook_primary_hover);
    border-color: var(--logicwebhook_primary_hover);
}

.logicwebhook_status {
    margin: 12px 0 0;
    min-height: 20px;
    color: var(--logicwebhook_text_soft);
    font-size: 14px;
}

.logicwebhook_login_success .logicwebhook_status {
    color: var(--logicwebhook_success);
}

.logicwebhook_list {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.logicwebhook_list_item {
    display: grid;
    grid-template-columns: 2fr auto auto auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 9px;
    background: var(--logicwebhook_bg_soft);
    padding: 10px 12px;
    font-size: 13px;
}

.logicwebhook_status_pre {
    margin-top: 12px;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--logicwebhook_border);
    border-radius: 10px;
    background: #0b162b;
    color: #c8d6f5;
    font-size: 12px;
}

.logicwebhook_hidden {
    display: none;
}

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

    .logicwebhook_list_item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .logicwebhook_header_row {
        flex-direction: column;
        align-items: flex-start;
    }

    .logicwebhook_grid {
        grid-template-columns: 1fr;
    }

    .logicwebhook_page {
        width: 94%;
    }
}
