:root {
    --kb-bg: #f3f8ff;
    --kb-card: #ffffff;
    --kb-border: #d8e6f3;
    --kb-title: #123b63;
    --kb-text: #3f5d78;
    --kb-muted: #6a84a0;
    --kb-primary: #0b6cb6;
    --kb-primary-strong: #0a5ea0;
    --kb-primary-soft: #eaf4ff;
    --kb-success-soft: #ecf9f0;
    --kb-success-text: #1e7444;
    --kb-shadow: 0 10px 32px rgba(8, 57, 105, 0.08);
}

.kb-page {
    background: linear-gradient(180deg, var(--kb-bg) 0%, #f9fcff 45%, #ffffff 100%);
    min-height: calc(100vh - 84px);
    padding-bottom: 42px;
}

.kb-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 18px;
}

.kb-hero {
    background: linear-gradient(140deg, #0b5ea7 0%, #0e8fc1 55%, #1db8da 100%);
    color: #fff;
    padding: 52px 0 44px;
    margin-bottom: 22px;
}

.kb-hero h1 {
    margin: 0 0 12px;
    font-size: 2rem;
}

.kb-hero p {
    margin: 0;
    max-width: 760px;
    opacity: 0.94;
}

.kb-topbar {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kb-chip {
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.kb-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.kb-field {
    display: grid;
    gap: 6px;
}

.kb-field label {
    font-size: 0.86rem;
    color: var(--kb-muted);
    font-weight: 600;
}

.kb-input,
.kb-select,
.kb-textarea {
    width: 100%;
    border: 1px solid #c7d9eb;
    border-radius: 10px;
    padding: 10px 11px;
    font: inherit;
    color: #204464;
    background: #fff;
}

.kb-textarea {
    min-height: 180px;
    resize: vertical;
}

.kb-input:focus,
.kb-select:focus,
.kb-textarea:focus {
    outline: none;
    border-color: #6faede;
    box-shadow: 0 0 0 3px rgba(27, 126, 202, 0.12);
}

.kb-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kb-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.kb-btn.primary {
    background: linear-gradient(135deg, var(--kb-primary), #1684c9);
    color: #fff;
}

.kb-btn.primary:hover {
    background: linear-gradient(135deg, var(--kb-primary-strong), #1278ba);
}

.kb-btn.secondary {
    background: #edf5ff;
    border: 1px solid #d4e6f7;
    color: #1d5f95;
}

.kb-panel {
    background: var(--kb-card);
    border: 1px solid var(--kb-border);
    border-radius: 16px;
    box-shadow: var(--kb-shadow);
    padding: 14px;
    margin-bottom: 14px;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.kb-card {
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(10, 66, 120, 0.06);
    padding: 13px;
    display: grid;
    gap: 8px;
}

.kb-card h3 {
    margin: 0;
    color: #0f2f4d;
    font-size: 1.02rem;
}

.kb-card p {
    margin: 0;
    color: var(--kb-text);
    font-size: 0.9rem;
    line-height: 1.45;
}

.kb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kb-badge {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--kb-primary-soft);
    color: #1c598f;
}

.kb-empty {
    border: 1px dashed #bfd7eb;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    background: #f8fcff;
    color: #45647f;
}

.kb-empty h3 {
    margin: 0 0 8px;
    color: #123b63;
}

.kb-form {
    background: #fff;
    border: 1px solid var(--kb-border);
    border-radius: 16px;
    box-shadow: var(--kb-shadow);
    padding: 16px;
}

.kb-form-grid {
    display: grid;
    gap: 10px;
}

.kb-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kb-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef6ff;
    border: 1px solid #d6e6f7;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.83rem;
    color: #245e92;
}

.kb-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.kb-section-heading h2 {
    margin: 0;
    color: var(--kb-title);
}

.kb-section-heading p {
    margin: 5px 0 0;
    color: var(--kb-muted);
    max-width: 760px;
}

.kb-quick-panel {
    margin-top: -34px;
    position: relative;
    z-index: 2;
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(29, 184, 218, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 249, 255, 0.97) 100%);
}

.kb-quick-panel .kb-section-heading {
    justify-content: center;
    text-align: center;
    margin-bottom: 16px;
}

.kb-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.kb-quick-action {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1 1 460px;
    min-height: 148px;
    padding: 20px 22px;
    border-radius: 24px;
    border: 1px solid #d7e7f4;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
    box-shadow: 0 16px 34px rgba(10, 66, 120, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
}

.kb-quick-action::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, #0b6cb6, #21b0cf);
}

.kb-quick-action::after {
    content: "";
    position: absolute;
    inset: auto -28px -28px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(21, 155, 199, 0.08);
}

.kb-quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(10, 66, 120, 0.12);
}

.kb-quick-icon {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(145deg, #dff3ff, #f8fcff);
    border: 1px solid #cfe7f8;
    box-shadow: 0 12px 24px rgba(11, 108, 182, 0.12);
}

.kb-quick-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.kb-quick-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.kb-quick-icon::before,
.kb-quick-icon::after {
    content: "";
    position: absolute;
}

.kb-quick-icon-video::before {
    top: 21px;
    left: 31px;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 20px solid #0b6cb6;
}

.kb-quick-icon-video::after {
    width: 44px;
    height: 44px;
    inset: 15px;
    border-radius: 14px;
    border: 1px solid #c7e2f6;
}

.kb-quick-icon-article::before {
    width: 30px;
    height: 38px;
    top: 18px;
    left: 23px;
    border-radius: 10px;
    background: #0b6cb6;
}

.kb-quick-icon-article::after {
    width: 16px;
    height: 2px;
    top: 29px;
    left: 30px;
    background: #ffffff;
    box-shadow: 0 7px 0 #ffffff, 0 14px 0 #ffffff;
}

.kb-quick-action h3 {
    margin: 0;
    color: #103250;
    font-size: 1.28rem;
}

.kb-quick-action p {
    margin: 0;
    color: var(--kb-text);
    line-height: 1.45;
    max-width: none;
    white-space: nowrap;
}

.kb-quick-action-video {
    background: linear-gradient(180deg, #ffffff 0%, #f3fbff 100%);
}

.kb-quick-action-article {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.kb-quick-action .kb-actions {
    margin-top: 0;
    flex-shrink: 0;
}

.kb-quick-action .kb-btn {
    min-width: 118px;
}

.kb-latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.kb-latest-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid #d6e6f5;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    box-shadow: 0 12px 28px rgba(10, 66, 120, 0.08);
    display: grid;
    gap: 10px;
}

.kb-latest-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #0b6cb6, #25b0ca);
}

.kb-latest-card-video::before {
    background: linear-gradient(180deg, #0b889f, #17c1cb);
}

.kb-latest-card h3 {
    margin: 0;
    color: #12304d;
}

.kb-latest-card p {
    margin: 0;
    color: var(--kb-text);
}

.reviews-sector,
.review-card,
.review-form-card {
    border-radius: 16px;
    border: 1px solid #dce8f5;
    background: #fff;
    box-shadow: 0 10px 32px rgba(8, 57, 105, 0.08);
}

.reviews-sector {
    padding: 12px;
    margin-top: 14px;
    border-radius: 14px;
}

.reviews-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviews-head h2 {
    margin: 0;
    color: #173e63;
    font-size: 1rem;
}

.reviews-head .summary {
    color: #567896;
    font-size: 0.84rem;
}

.reviews-list {
    display: grid;
    gap: 8px;
}

.review-card {
    padding: 10px 12px;
    border-radius: 14px;
}

.review-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: #627c96;
}

.review-author {
    font-weight: 700;
    color: #284969;
}

.review-text {
    margin: 0;
    color: #3b5773;
    line-height: 1.4;
    white-space: pre-line;
    font-size: 0.9rem;
}

.stars-read {
    color: #d08a18;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.review-form-card {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
}

.review-form-card p {
    margin: 0;
}

.review-form-grid {
    display: grid;
    gap: 8px;
}

.section-title {
    margin: 0 0 10px;
    font-size: 1.08rem;
    color: #173e63;
}

.review-form-card textarea {
    width: 100%;
    border: 1px solid #cbdcee;
    border-radius: 10px;
    padding: 10px;
    font: inherit;
    min-height: 88px;
    font-size: 0.92rem;
}

.review-submit {
    border: none;
    border-radius: 10px;
    height: 38px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #0c69b3 0%, #1184c7 100%);
    cursor: pointer;
}

.rating-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.rating-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-picker label {
    cursor: pointer;
    font-size: 1.45rem;
    line-height: 1;
    color: #c9d5e2;
    transition: color 0.15s ease, transform 0.15s ease;
}

.rating-picker label:hover,
.rating-picker label:hover ~ label {
    color: #f0b23e;
    transform: translateY(-1px);
}

.rating-picker input:checked ~ label {
    color: #e4a022;
}

.rating-caption {
    color: #5f7a96;
    font-size: 0.8rem;
}

.kb-recommend-card {
    min-height: 100%;
}

.kb-tag-selector > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kb-tag-selector > div > div {
    display: flex;
}

.kb-tag-selector label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #d5e5f4;
    background: #f7fbff;
    color: var(--kb-text);
}

.kb-tag-selector input {
    accent-color: var(--kb-primary);
}

.kb-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

@media (max-width: 760px) {
    .kb-hero h1 {
        font-size: 1.6rem;
    }

    .kb-quick-panel {
        margin-top: 14px;
    }

    .kb-quick-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .kb-quick-action {
        flex-direction: column;
        align-items: flex-start;
        min-height: 0;
    }

    .kb-quick-action p {
        white-space: normal;
    }

    .kb-toolbar {
        grid-template-columns: 1fr;
    }

    .kb-section-heading,
    .reviews-head,
    .review-top {
        flex-direction: column;
        align-items: flex-start;
    }
}
