/* Стили quests_mission */

.qm-banner-wrap {
    margin-bottom: 14px;
}

.qm-banner-slider {
    display: grid;
}

.qm-banner-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.65s ease;
}

.qm-banner-slide.is-active {
    opacity: 1;
}

.qm-banner-image {
    display: block;
    width: 100%;
    max-height: 300px;
    height: auto;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
}

.qm-main-block {
    overflow: hidden;
}

.qm-main-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
}

.qm-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ff7a1a, #ff5a00);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(255, 90, 31, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.qm-link-btn:hover,
.qm-link-btn:focus {
    color: #ffffff;
    text-decoration: none;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 90, 31, 0.22);
}

.qm-link-btn-secondary {
    background: linear-gradient(135deg, #2e6cb5, #1f4f83);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.qm-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qm-main-content {
    padding: 14px;
}

.qm-stats-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.qm-stats-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qm-stat-card {
    background: #122742;
    border: 1px solid #1f3b5b;
    border-radius: 6px;
    padding: 14px 16px;
    text-align: center;
}

.qm-stat-card__label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #9fb5d1;
}

.qm-stat-card__value {
    display: block;
    color: #e8effa;
    font-size: 24px;
    line-height: 1;
}

.qm-surface {
    border-radius: 10px;
}

.qm-side-text {
    color: #c4cad3;
    line-height: 1.6;
}

.qm-side-block {
    margin-top: 15px;
}

.quest-admin-link {
    text-align: right;
}

.btn-admin {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    background: #1f4f83;
    border: 1px solid #5d8fc4;
    color: #f1f6ff;
    text-decoration: none;
    font-size: 13px;
}

.quest-toolbar-actions {
    margin-left: auto;
}

.quests-table-wrapper {
    background: rgba(22, 26, 33, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.quests-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: transparent;
    color: #e6edf8;
}

.quests-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.quests-table th {
    padding: 14px 12px;
    text-align: center;
    font-weight: 600;
    color: #e8effa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quests-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #e2eaf7;
    text-align: center;
}

.quests-table .quest-col-name {
    text-align: left;
    font-weight: 600;
}

.quests-table .quest-col-desc {
    text-align: left;
    color: #b8c9df;
}

.quest-player-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.quest-player-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.staff-group-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quest-player-link-badge {
    text-decoration: none;
}

.quest-player-link-badge:hover {
    color: #ffffff;
    text-decoration: none;
    filter: brightness(1.08);
}

.quest-rank-badge {
    display: inline-block;
    min-width: 30px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 106, 0, 0.18);
    border: 1px solid rgba(255, 106, 0, 0.45);
    color: #ffb381;
    font-weight: 700;
}

.quest-rank-badge--gold,
.quest-rank-badge--silver,
.quest-rank-badge--bronze {
    background: none;
    border-color: transparent;
    padding: 0 2px;
    min-width: auto;
    line-height: 1;
    font-size: 1.35em;
}

.quests-table tr.quest-top-history-trigger {
    cursor: pointer;
}

.quests-table tr.quest-top-history-trigger:hover td {
    background: rgba(255, 106, 0, 0.08);
}

.quest-player-id {
    color: #9fb5d1;
    font-size: 12px;
}

.quest-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.quest-status-active {
    background: rgba(59, 130, 246, 0.16);
    color: #9bc8ff;
}

.quest-status-done {
    background: rgba(34, 197, 94, 0.16);
    color: #75ec9b;
}

.quest-status-expired {
    background: rgba(239, 68, 68, 0.16);
    color: #ff8f8f;
}

.info-message,
.error-message {
    margin-bottom: 12px;
    border-radius: 6px;
    padding: 12px;
}

.info-message {
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.45);
    color: #8fc1ff;
}

.error-message {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #ff9a9a;
}

.qm-assign-note {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(110, 231, 183, 0.35);
    background: rgba(16, 70, 58, 0.3);
    color: #c4f8e1;
}

.qm-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.qm-tab-btn {
    border: 1px solid rgba(123, 165, 220, 0.45);
    background: rgba(13, 33, 57, 0.7);
    color: #d8e9ff;
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 12px;
}

.qm-tab-btn.is-active {
    background: rgba(255, 106, 0, 0.18);
    border-color: rgba(255, 106, 0, 0.55);
    color: #ffd0a8;
}

.qm-tab-panel {
    display: none;
}

.qm-tab-panel.is-active {
    display: block;
}

.qm-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
}

.qm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 20, 0.72);
}

.qm-modal-dialog {
    position: relative;
    width: min(560px, calc(100% - 20px));
    margin: 70px auto 0;
    background: #0f1b2f;
    border: 1px solid #24436a;
    border-radius: 10px;
    overflow: hidden;
}

.qm-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #24436a;
    color: #eef5ff;
}

.qm-modal-close {
    border: 0;
    background: transparent;
    color: #d6e7ff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.qm-modal-body {
    padding: 12px 14px;
}

.qm-modal-inline-error {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.55);
    background: rgba(239, 68, 68, 0.16);
    color: #ffb0b0;
    font-size: 13px;
}

.qm-modal-body .qm-field {
    margin-bottom: 10px;
}

.qm-modal-body .qm-label {
    display: block;
    margin-bottom: 6px;
    color: #d9e8fb;
    font-weight: 600;
    font-size: 13px;
}

.qm-modal-body .qm-input,
.qm-modal-body .qm-select {
    width: 100%;
    height: 40px;
    border: 1px solid #31557f;
    border-radius: 8px;
    background: linear-gradient(180deg, #13263f 0%, #0f2137 100%);
    color: #ecf4ff;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qm-modal-body .qm-select {
    color-scheme: dark;
}

.qm-modal-body .qm-select option {
    background: #0f2137;
    color: #e8f2ff;
}

.qm-modal-body .qm-input::placeholder {
    color: #94aecf;
}

.qm-modal-body .qm-input:focus,
.qm-modal-body .qm-select:focus {
    border-color: #6ca6f0;
    box-shadow: 0 0 0 3px rgba(108, 166, 240, 0.16);
}

.qm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #24436a;
}

.qm-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #0f2137;
    border: 1px solid #2e4c72;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 4050;
}

.qm-suggestion-item {
    padding: 8px 10px;
    border-bottom: 1px solid #17324f;
    cursor: pointer;
    color: #d7e6fb;
    font-size: 13px;
}

.qm-suggestion-item:last-child {
    border-bottom: 0;
}

.qm-suggestion-item:hover {
    background: rgba(59, 130, 246, 0.16);
}

@media (max-width: 768px) {
    .qm-hero {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .qm-main-content {
        padding: 14px;
    }
}

.qm-admin {
    color: #e5eefb;
}

.qm-admin h2 {
    margin-bottom: 14px;
}

.qm-card {
    background: #0c1626;
    border: 1px solid #1b2f4a;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}

.qm-grid-2,
.qm-grid-3 {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

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

.qm-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qm-card label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #c7d7ec;
}

.qm-card input,
.qm-card select,
.qm-card textarea {
    background: #0f2137;
    border: 1px solid #2e4c72;
    color: #e6eefb;
    border-radius: 6px;
    padding: 8px;
}

.qm-check {
    display: block;
    margin-bottom: 8px;
}

.qm-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.qm-btn {
    background: #16345b;
    border: 1px solid #355885;
    color: #eef5ff;
    border-radius: 6px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 12px;
}

.qm-btn-primary {
    background: #1f4f83;
    border-color: #5d8fc4;
}

.qm-btn-secondary {
    background: #16345b;
    border-color: #355885;
}

.qm-btn-danger {
    background: #6a2232;
    border-color: #9c2d45;
}

.qm-pagination {
    flex-wrap: wrap;
    margin-top: 10px;
}

.qm-pagination .qm-btn {
    text-decoration: none;
    display: inline-block;
}

.qm-table-wrap {
    overflow-x: auto;
}

.qm-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.qm-table th,
.qm-table td {
    border-bottom: 1px solid #17324f;
    padding: 10px;
    text-align: left;
}

.qm-message {
    display: none;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
}

.qm-message.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.qm-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.qm-message.info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

@media (max-width: 900px) {
    .qm-grid-2,
    .qm-grid-3 {
        grid-template-columns: 1fr;
    }
}
