:root {
    --hub-primary: #4f46e5;
    --hub-bg: #f6f7fb;
}

body { background: var(--hub-bg); }

/* ---- Auth ---- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-wrap { width: 100%; max-width: 400px; padding: 1.5rem; }
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 10px 40px rgba(17, 24, 39, .08);
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.5rem;
}
.auth-logo {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hub-primary);
    color: #fff;
    border-radius: 10px;
    font-size: 1.15rem;
}
.auth-brand-name { font-size: 1.15rem; color: #111827; }
.auth-title { font-size: 1.4rem; font-weight: 600; margin-bottom: .25rem; }
.auth-sub { color: #6b7280; font-size: .9rem; margin-bottom: 1.5rem; }
.auth-foot { text-align: center; color: #9ca3af; font-size: .8rem; margin-top: 1.25rem; }

.btn-primary {
    --bs-btn-bg: var(--hub-primary);
    --bs-btn-border-color: var(--hub-primary);
    --bs-btn-hover-bg: #4338ca;
    --bs-btn-hover-border-color: #4338ca;
}

/* ---- Portal shell ---- */
.portal-shell { display: flex; min-height: 100vh; }

.portal-sidebar {
    width: 248px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #eceef2;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f2f6;
    font-size: 1.1rem;
    color: #111827;
}
.sidebar-nav { padding: .75rem .6rem; overflow-y: auto; }
.sidebar-section {
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .04em;
    color: #9ca3af;
    padding: .9rem .75rem .35rem;
    font-weight: 600;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: #374151;
    font-size: .92rem;
}
.sidebar-nav .nav-link:hover { background: #f3f4f6; color: #111827; }
.sidebar-nav .nav-link.active { background: #eef2ff; color: var(--hub-primary); font-weight: 500; }
.sidebar-nav .nav-link i { font-size: 1rem; width: 1.1rem; text-align: center; }

.portal-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.portal-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .65rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #eceef2;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-title { font-size: 1.05rem; font-weight: 600; color: #111827; }
.company-switch { border: 1px solid #e5e7eb; }
.portal-content { padding: 1.5rem; }

/* ---- Tables ---- */
.hub-table thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #9ca3af;
    font-weight: 600;
    border-bottom: 1px solid #eef0f4;
}
.hub-table td { border-color: #f3f4f6; font-size: .92rem; }
.hub-table tbody tr:hover { background: #fafbfc; }
.hub-thumb {
    width: 38px; height: 38px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
    display: inline-flex; align-items: center; justify-content: center;
    color: #c0c4cc;
}
.hub-thumb-empty { font-size: 1.1rem; }

/* ---- Value chips (attribute values) ---- */
.hub-chip {
    display: inline-block;
    padding: .12rem .5rem;
    margin: .1rem .2rem .1rem 0;
    font-size: .78rem;
    line-height: 1.4;
    color: #374151;
    background: #f3f4f6;
    border-radius: 999px;
    white-space: nowrap;
}
.hub-chip-more { color: #9ca3af; background: transparent; padding-left: .15rem; }
.hub-type-badge {
    font-size: .72rem;
    font-weight: 600;
    padding: .18rem .5rem;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
}

/* ---- Detail page ---- */
.hub-tabs { border-bottom: 1px solid #e5e7eb; }
.hub-tabs .nav-link {
    border: none;
    color: #6b7280;
    font-size: .92rem;
    padding: .6rem .9rem;
    border-bottom: 2px solid transparent;
}
.hub-tabs .nav-link:hover { color: #111827; }
.hub-tabs .nav-link.active {
    color: var(--hub-primary);
    background: transparent;
    border-bottom-color: var(--hub-primary);
    font-weight: 500;
}
.hub-lang-tabs .nav-link {
    padding: .2rem .7rem;
    font-size: .8rem;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 6px;
}
.hub-lang-tabs .nav-link.active { background: var(--hub-primary); color: #fff; }

.hub-dl { display: grid; grid-template-columns: 40% 60%; row-gap: .55rem; }
.hub-dl dt { color: #9ca3af; font-weight: 500; font-size: .85rem; }
.hub-dl dd { margin: 0; font-size: .9rem; }

.hub-media-cell {
    aspect-ratio: 1;
    border: 1px solid #eef0f4;
    border-radius: 10px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #fafbfc;
}
.hub-media-cell img { width: 100%; height: 100%; object-fit: contain; }
.hub-media-empty { color: #c0c4cc; font-size: 1.6rem; }
