﻿.hh-container {
    max-width: 1400px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

.hh-header {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.hh-header__title {
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.hh-header__description {
    color: #4b5563;
    max-width: 860px;
    line-height: 1.6;
}

.hh-header__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hh-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.hh-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
}

.hh-secondary-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.hh-secondary-link:hover {
    color: #1d4ed8;
}

.hh-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    padding: 1.75rem;
    margin-bottom: 2rem;
    animation: hh-fade-up 0.45s ease;
}

.hh-card + .hh-card {
    margin-top: 1.5rem;
}

.hh-card--center {
    text-align: center;
}

.hh-card--center .hh-header__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hh-card--center .hh-header__description {
    margin: 0 auto;
    max-width: 520px;
}


.hh-card h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
}

.hh-card h2 + p {
    margin-top: 0.75rem;
}

.hh-card p.hh-header__description {
    margin-bottom: 1.25rem;
}

.hh-table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
    margin-top: 1.25rem;
}

.hh-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.hh-table thead {
    background: #f9fafb;
}

.hh-table th,
.hh-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    color: #1f2937;
}

.hh-table th {
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #9ca3af;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.hh-table tbody tr {
    transition: background 0.15s ease;
}

.hh-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

.hh-table tbody td + td {
    border-left: 1px solid rgba(15, 23, 42, 0.04);
}

.hh-table__actions {
    display: inline-flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hh-table__actions a {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.hh-table__actions a:hover {
    color: #1d4ed8;
}

.hh-table__action {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.hh-table__action--disabled {
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.hh-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #9ca3af;
}

.hh-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    justify-items: stretch;
    gap: 1.25rem;
    animation: hh-fade-up 0.45s ease;
}

.hh-form p {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}
.hh-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    width: 100%;
}

.hh-form__field--error input,
.hh-form__field--error textarea,
.hh-form__field--error select {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.hh-form__help {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0;
}

.hh-form__error {
    font-size: 0.85rem;
    color: #dc2626;
    margin: 0;
}

.hh-form__non-field-errors {
    display: grid;
    gap: 0.5rem;
}

.hh-form__template-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #9ca3af;
}

.hh-form__template-group {
    display: block;
    margin-top: 0.75rem;
}

.hh-form__template-select {
    display: block;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    color: #1f2937;
    font: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.hh-form__template-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.hh-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #1f2937;
}
.hh-form__label {
    display: block !important;
    width: 100%;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.hh-form__label.hh-form__template-label {
    color: #9ca3af;
    font-weight: 500;
}

.hh-form__control {
    display: block;
    width: 100% !important;
}

/* Универсальные стили для всех элементов ввода в форме */
.hh-form *[type="text"],
.hh-form *[type="number"],
.hh-form *[type="email"],
.hh-form *[type="tel"],
.hh-form *[type="url"],
.hh-form select,
.hh-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Дополнительные стили для принудительной установки ширины */
.hh-form input,
.hh-form textarea,
.hh-form select {
    min-width: 0 !important;
    flex: 1 1 100% !important;
}

.hh-form__control > input,
.hh-form__control > textarea,
.hh-form__control > select {
    display: block;
    width: 100% !important;
    max-width: none;
    box-sizing: border-box;
}

/* Стили для чекбоксов */
.hh-form__field--checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 0.75rem;
}

.hh-form__field--checkbox .hh-form__label {
    margin-bottom: 0 !important;
    width: auto !important;
    order: 1;
}

.hh-form__field--checkbox .hh-form__control {
    width: auto !important;
    order: 2;
}

.hh-form__field--checkbox input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

.hh-form input,
.hh-form textarea,
.hh-form select,
.hh-form input[type="text"],
.hh-form input[type="number"],
.hh-form input[type="email"],
.hh-form input[type="tel"],
.hh-form input[type="url"],
.hh-form select,
.hh-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    padding: 0.75rem 0.95rem;
    font-size: 1rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.hh-form input:focus,
.hh-form textarea:focus,
.hh-form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.hh-form__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.hh-form--center {
    align-items: center;
}

.hh-form--center .hh-form__actions {
    justify-content: center;
}


.hh-danger-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

.hh-danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(239, 68, 68, 0.25);
}

.hh-ghost-btn {
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #1f2937;
    background: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.hh-ghost-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.hh-result-message {
    font-size: 1.15rem;
    color: #1f2937;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.hh-result-success {
    color: #15803d;
}

.hh-result-error {
    color: #b91c1c;
}

.hh-back-home {
    display: inline-flex;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.hh-back-home:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

@keyframes hh-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hh-container {
        padding: 0 1rem;
    }

    .hh-header__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hh-table th,
    .hh-table td {
        padding: 0.85rem;
    }

    .hh-table__actions {
        justify-content: flex-start;
    }
}



.hh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.hh-pagination__link,
.hh-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.hh-pagination__link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.3);
}

.hh-pagination__link--active {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

.hh-log-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hh-log-message--success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.hh-log-message--warning {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.hh-log-message--error {
    background: rgba(248, 113, 113, 0.15);
    color: #b91c1c;
}

.hh-log-message--info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.hh-log-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.hh-log-meta__label {
    font-weight: 600;
    color: #4b5563;
}

.hh-log-meta__value {
    color: #1f2937;
    font-weight: 600;
    margin-left: 0;
}

.hh-log-meta li {
    display: flex;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hh-pagination__link,
    .hh-pagination__ellipsis {
        min-width: 2.25rem;
        height: 2.25rem;
    }
}



.hh-scenario__query {
    display: block;
    font-size: 1rem;
    color: #111827;
}

.hh-scenario__name {
    color: #4b5563;
    font-size: 0.9rem;
}


.hh-card form.hh-form {
    width: 100%;
}

.hh-card form.hh-form > * {
    width: 100%;
}

.hh-card form.hh-form input,
.hh-card form.hh-form select,
.hh-card form.hh-form textarea {
    display: block;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}



.messages {
    list-style: none;
    margin: 0;
    padding: 0;
}

.message {
    font-weight: 700;
    color: #1f2937;
}

.message.success {
    color: #16a34a;
}

/* Уведомления */
.hh-notifications {
    margin-bottom: 2rem;
}

.hh-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hh-notification--warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.hh-notification__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.hh-notification__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.hh-notification__message {
    font-weight: 500;
    line-height: 1.5;
}

.hh-notification__actions {
    flex-shrink: 0;
    margin-left: 1rem;
}

.hh-notification__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.hh-notification__close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
}

/* Статусы откликов */
.hh-status {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    white-space: nowrap !important;
}

.hh-status--success {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.hh-status--info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.hh-status--warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.hh-status--error {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}