/* Integrated Retail Knowledge Hub — custom KB portal (plugin: helloworld) */

.hub-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
}

/* ---------- Sidebar ---------- */

.hub-sidebar {
    width: 240px;
    flex: 0 0 240px;
    position: sticky;
    top: 16px;
}

.hub-sidebar-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6c757d;
    padding: 0 12px 8px;
}

.hub-sidebar-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
}

.hub-sidebar-cat i {
    color: var(--hub-accent, #0ea5a4);
    font-size: 16px;
}

.hub-sidebar-cat:hover {
    background: #f3f4f6;
    text-decoration: none;
    color: #344054;
}

.hub-sidebar-cat.active {
    background: color-mix(in srgb, var(--hub-accent, #0ea5a4) 12%, transparent);
    color: var(--hub-accent, #0ea5a4);
}

.hub-sidebar-children {
    list-style: none;
    margin: 0 0 6px;
    padding: 0 0 0 34px;
}

.hub-sidebar-children a {
    display: block;
    padding: 6px 8px;
    font-size: 13px;
    color: #667085;
    text-decoration: none;
    border-radius: 6px;
}

.hub-sidebar-children a:hover,
.hub-sidebar-children a.active {
    background: #f3f4f6;
    color: #101828;
    text-decoration: none;
}

/* ---------- Main content ---------- */

.hub-main {
    flex: 1;
    min-width: 0;
}

.hub-page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #101828;
}

.hub-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 16px;
    color: #101828;
}

/* ---------- Section heading + action button row ---------- */

.hub-section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hub-section-heading-row .hub-page-title,
.hub-section-heading-row .hub-section-title {
    margin: 0;
}

.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.hub-btn:hover {
    border-color: #0ea5a4;
    color: #0ea5a4;
    text-decoration: none;
}

.hub-btn-primary {
    background: #0ea5a4;
    border-color: #0ea5a4;
    color: #fff;
}

.hub-btn-primary:hover {
    background: #0c8988;
    border-color: #0c8988;
    color: #fff;
}

/* ---------- Article edit form ---------- */

.hub-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    max-width: 900px;
}

.hub-form-group {
    margin-bottom: 20px;
}

.hub-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}

.hub-form-group input[type=text],
.hub-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #101828;
    box-sizing: border-box;
}

.hub-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.hub-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.hub-empty {
    padding: 48px;
    text-align: center;
    color: #667085;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

/* ---------- Hero ---------- */

.hub-hero {
    background: linear-gradient(135deg, #0ea5a415, #0ea5a405);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 8px;
}

.hub-hero h1 {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #101828;
}

.hub-hero p {
    color: #667085;
    font-size: 15px;
    margin: 0 0 24px;
}

.hub-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.hub-search-form i {
    color: #98a2b3;
}

.hub-search-form input[type=text] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    background: transparent;
}

.hub-search-form button {
    border: none;
    border-radius: 999px;
    background: #0ea5a4;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 20px;
    cursor: pointer;
}

.hub-search-form button:hover {
    background: #0c8988;
}

.hub-search-form-inline {
    max-width: 100%;
    margin: 0 0 20px;
}

.hub-popular-tags {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.hub-popular-label {
    font-size: 12px;
    font-weight: 700;
    color: #667085;
    margin-right: 4px;
}

.hub-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 12px;
    color: #344054;
    text-decoration: none;
}

.hub-tag:hover {
    border-color: #0ea5a4;
    color: #0ea5a4;
    text-decoration: none;
}

/* ---------- Feature cards (top-level categories, homepage) ---------- */

.hub-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.hub-feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid var(--hub-accent, #0ea5a4);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--hub-accent, #0ea5a4) 15%, transparent);
    color: var(--hub-accent, #0ea5a4);
    font-size: 20px;
}

.hub-feature-title {
    font-weight: 700;
    font-size: 15px;
    color: #101828;
}

.hub-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.hub-feature-list li {
    padding: 4px 0;
}

.hub-feature-list a {
    font-size: 13px;
    color: #475467;
    text-decoration: none;
}

.hub-feature-list a:hover {
    color: var(--hub-accent, #0ea5a4);
    text-decoration: underline;
}

.hub-feature-empty {
    font-size: 13px;
    color: #98a2b3;
    flex: 1;
}

.hub-feature-viewall {
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-accent, #0ea5a4);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-feature-viewall:hover {
    text-decoration: underline;
    color: var(--hub-accent, #0ea5a4);
}

/* ---------- Article result cards (search / category browse) ---------- */

.hub-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.hub-article-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease;
}

.hub-article-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.hub-article-card-title {
    font-weight: 700;
    font-size: 15px;
    color: #101828;
}

.hub-article-card-snippet {
    font-size: 13px;
    color: #667085;
    line-height: 1.5;
}

/* ---------- Footer reassurance strip ---------- */

.hub-footer-strip {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.hub-footer-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hub-footer-item i {
    font-size: 20px;
    color: #0ea5a4;
    margin-top: 2px;
}

.hub-footer-item strong {
    display: block;
    font-size: 14px;
    color: #101828;
}

.hub-footer-item span {
    font-size: 12px;
    color: #667085;
}

/* ---------- Article detail page ---------- */

.hub-breadcrumb {
    font-size: 13px;
    color: #667085;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hub-breadcrumb a {
    color: #667085;
    text-decoration: none;
}

.hub-breadcrumb a:hover {
    color: #0ea5a4;
    text-decoration: underline;
}

.hub-article {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
}

.hub-article-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #98a2b3;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f2;
}

.hub-article-body {
    font-size: 14px;
    line-height: 1.7;
    color: #344054;
}

.hub-article-body img {
    max-width: 100%;
}

.hub-attachments {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eef0f2;
}

.hub-attachments h3 {
    font-size: 14px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 10px;
}

.hub-attachments ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.hub-attachments li {
    padding: 6px 0;
}

/* ---------- Compact panel embedded on the GLPI login page ---------- */

.hub-login-panel {
    width: 260px;
    text-align: left;
}

.hub-login-panel h5 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 12px;
}

.hub-login-search {
    max-width: 100%;
    margin: 0 0 14px;
    padding: 4px 6px 4px 14px;
}

.hub-login-search button {
    padding: 8px 12px;
}

.hub-login-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.hub-login-list li {
    border-bottom: 1px solid #eef0f2;
}

.hub-login-list li:last-child {
    border-bottom: none;
}

.hub-login-list a {
    display: block;
    padding: 8px 4px;
    font-size: 13px;
    color: #344054;
    text-decoration: none;
}

.hub-login-list a:hover {
    color: #0ea5a4;
    text-decoration: underline;
}

.hub-login-empty {
    font-size: 13px;
    color: #98a2b3;
    margin: 0 0 14px;
}

.hub-login-viewall {
    font-size: 13px;
    font-weight: 600;
    color: #0ea5a4;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-login-viewall:hover {
    text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .hub-wrapper {
        flex-direction: column;
    }

    .hub-sidebar {
        width: 100%;
        flex: none;
        position: static;
    }
}
