/*
 * Researcher and unit pages (BIB-80/81), after the Demo_* mockups.
 * Used inside AdminLTE (backend) and by the public layout.
 */
.bm {
    --bm-text: #2f3336;
    --bm-muted: #8a9196;
    --bm-accent: #4f8db0;
    --bm-dark: #2f3437;
    --bm-card: #efefef;
    --bm-card-edge: #8fa3b0;
    --bm-table-head: #d5dde5;
    --bm-table-row: #e2e8ee;
    --bm-band: #e3eef7;
    --bm-tile: #c8ccd3;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--bm-text);
}
.bm--department { --bm-band: #f1f1ea; --bm-tile: #bdbaa3; }
.bm--faculty { --bm-band: #dceeec; --bm-tile: #8fc2bd; }
.bm--university { --bm-band: #e5e8ee; --bm-tile: #aeb4be; }
.bm--group { --bm-band: #eeecf4; --bm-tile: #b4aecb; }

/* Header band */
.bm-band {
    background: var(--bm-band);
    padding: 1.5rem 1rem 2rem;
    margin: 0 -7.5px;
}
.bm-band__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    max-width: 1140px;
    margin: 0 auto;
}
.bm-band__center { text-align: center; }
.bm-band__image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    background: #fff;
}
.bm-band__image--logo { object-fit: contain; padding: 8px; }
.bm-band__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--bm-muted);
}
.bm-band__label {
    margin-top: .6rem;
    font-size: .8rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--bm-accent);
}
.bm-band__name { font-size: 1.6rem; font-weight: 400; margin: .1rem 0; }
.bm-band__line { margin: .1rem 0; font-size: .95rem; }
.bm-band__line--rank { font-weight: 600; font-size: .8rem; text-transform: uppercase; }
.bm-band__line--parent { color: var(--bm-accent); }
.bm-band__line--small { font-size: .8rem; }
.bm-band__icons {
    display: inline-flex;
    gap: .6rem;
    border-top: 1px solid #b9c2c8;
    border-bottom: 1px solid #b9c2c8;
    padding: .45rem .8rem;
    margin: .6rem 0;
}
.bm-band__icons img { width: 26px; height: 26px; object-fit: contain; }
.bm-button {
    display: inline-block;
    background: var(--bm-dark);
    color: #fff !important;
    padding: .3rem .7rem;
    font-size: .85rem;
    border: 0;
    text-decoration: none !important;
}
.bm-button:hover { background: #000; }

/* KPIs */
.bm-kpis { display: flex; flex-direction: column; gap: .7rem; }
.bm-kpis--right { align-items: flex-end; }
.bm-kpi {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 9rem;
}
.bm-kpi img { width: 38px; height: 38px; object-fit: contain; opacity: .9; }
.bm-kpi__value { font-size: 1.6rem; font-weight: 300; line-height: 1; }
.bm-kpi__value small { font-size: .9rem; }
.bm-kpi__label { font-size: .75rem; color: var(--bm-muted); }
.bm-kpi--tile {
    background: var(--bm-tile);
    color: #fff;
    padding: .55rem .8rem;
    width: 9.5rem;
    display: block;
}
.bm-kpi--tile .bm-kpi__label { color: #fff; opacity: .9; }

/* Tabs */
.bm-tabs {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin: 1.6rem 0 2rem;
}
.bm-tabs a {
    color: #b0b4b7;
    font-size: 1.25rem;
    font-weight: 300;
    text-decoration: none;
    padding-bottom: .3rem;
}
.bm-tabs a.active { color: var(--bm-text); border-bottom: 2px solid var(--bm-text); }
.bm-tab { display: none; }
.bm-tab.active { display: block; }

/* Sections */
.bm-content { max-width: 1140px; margin: 0 auto; padding: 0 1rem 2rem; }
.bm-section { padding: 1.5rem 0 2rem; border-bottom: 1px solid #b9bfc4; }
.bm-section:last-child { border-bottom: 0; }
.bm-section__title { color: var(--bm-accent); font-size: 1.1rem; font-weight: 400; margin-bottom: 1.2rem; }
.bm-center { text-align: center; margin-top: 1.2rem; }
.bm-about { text-align: justify; white-space: pre-line; }
.bm-facts dt { font-weight: 400; font-size: .8rem; text-transform: uppercase; color: var(--bm-muted); }
.bm-facts dd { margin-bottom: .6rem; }

/* H-index table */
.bm-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.bm-table th { background: var(--bm-table-head); padding: .8rem 1rem; font-weight: 600; }
.bm-table td { background: var(--bm-table-row); padding: .7rem 1rem; border-top: 2px solid #fff; }

/* Publication cards */
.bm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1.6rem 2.4rem; }
.bm-card {
    background: var(--bm-card);
    border-left: 3px solid var(--bm-card-edge);
    padding: 1rem 1.2rem 1rem 3.4rem;
    position: relative;
    font-size: .8rem;
}
.bm-card::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 1.1rem;
    width: 1.6rem;
    height: 2rem;
    background: url("../images/bibliometris/book_icon.png") center / contain no-repeat;
}
.bm-card__title { font-size: 1rem; margin: 0 0 .3rem; color: var(--bm-text); }
.bm-card__title a { color: inherit; }
.bm-card__authors { color: var(--bm-muted); }
.bm-card__year { color: var(--bm-muted); font-style: italic; font-size: .72rem; }
.bm-badge { display: inline-block; color: #fff; padding: .05rem .35rem; margin: .5rem 0 .2rem; font-size: .75rem; }
.bm-badge--type { background: #7f9fd3; }
.bm-badge--source { background: #f2a200; }
.bm-card__links { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; }
.bm-card__links img { width: 20px; height: 20px; }
.bm-card__abstract-toggle { margin-left: auto; color: #555; text-decoration: underline; cursor: pointer; font-size: .75rem; }
.bm-card__abstract { display: none; margin-top: .6rem; text-align: justify; }
.bm-card.open .bm-card__abstract { display: block; }

/* Members */
.bm-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.bm-member { display: flex; gap: .7rem; align-items: center; background: var(--bm-card); padding: .6rem .8rem; color: var(--bm-text) !important; }
.bm-member img, .bm-member .bm-member__initials {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none;
    background: #d4d9dd; display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.bm-member small { display: block; color: var(--bm-muted); }

.bm-pager { display: flex; justify-content: center; gap: .4rem; margin-top: 1.5rem; flex-wrap: wrap; }
.bm-pager button { border: 1px solid #c7ccd0; background: #fff; padding: .2rem .6rem; }
.bm-pager button.active { background: var(--bm-dark); color: #fff; }
.bm-empty { color: var(--bm-muted); font-style: italic; }

@media (max-width: 767px) {
    .bm-band__grid { grid-template-columns: 1fr; }
    .bm-band__left, .bm-band__right { order: 2; }
    .bm-kpis, .bm-kpis--right { flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: center; }
    .bm-tabs { gap: 1.2rem; }
    .bm-tabs a { font-size: 1rem; }
    .bm-cards { grid-template-columns: 1fr; }
}

/* Public site (BIB-81) */
.bm-site { margin: 0; background: #fff; font-family: Roboto, "Helvetica Neue", Arial, sans-serif; color: #2f3336; }
.bm-site .bm-band { margin: 0; }
.bm-nav { background: #557080; color: #fff; }
.bm-nav__inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 2rem; padding: 1rem 1.5rem; }
.bm-nav__logo { display: flex; align-items: center; gap: .6rem; color: #fff !important; text-decoration: none !important; }
.bm-nav__logo img { height: 52px; }
.bm-nav__logo span { font-size: 1.4rem; line-height: 1; }
.bm-nav__logo small { display: block; font-size: .65rem; opacity: .85; margin-top: .2rem; }
.bm-nav__links { display: flex; gap: 1.4rem; margin: 0 auto; }
.bm-nav__links a { color: #e7eef2; text-decoration: none; font-size: .95rem; }
.bm-nav__links a.active, .bm-nav__links a:hover { color: #fff; font-weight: 500; }
.bm-nav__login { display: flex; flex-direction: column; align-items: center; color: #fff !important; font-size: .65rem; text-decoration: none !important; }
.bm-nav__login img { height: 26px; }
.bm-lang { display: flex; align-items: center; gap: .35rem; margin-right: 1.2rem; color: rgba(255,255,255,.6); font-size: .8rem; }
.bm-lang a { color: rgba(255,255,255,.75) !important; text-decoration: none !important; letter-spacing: .05em; }
.bm-lang a.active, .bm-lang a:hover { color: #fff !important; font-weight: 500; }
.bm-lang-auth a { margin: 0 .15rem; }
.bm-lang-auth a.active { font-weight: 700; text-decoration: underline; }
.bm-nav__toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; margin-left: auto; }
.bm-crumbs { display: flex; justify-content: space-between; align-items: center; max-width: 1240px; margin: 0 auto; padding: .5rem 1.5rem; font-size: .75rem; }
.bm-crumbs a { color: #2f3336; text-decoration: underline; }
.bm-share { display: flex; flex-direction: column; align-items: center; background: none; border: 0; font-size: .65rem; color: #2f3336; }
.bm-share img { height: 24px; }
.bm-footer { background: #3a3f42; color: #cfd4d7; font-size: .75rem; margin-top: 2rem; }
.bm-footer div { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; padding: 1.6rem 1.5rem; }
.bm-page { padding-top: 1rem; }
.bm-page__title { font-size: 1.6rem; font-weight: 300; margin-bottom: 1.2rem; }
.bm-unit-head { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; color: var(--bm-accent); }
.bm-unit-head img { height: 36px; }
.bm-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.bm-filters .form-control { width: auto; flex: 1 1 14rem; }
.bm-filters .bm-filters__year { flex: 0 1 8rem; }
.bm-pager a.bm-button { margin: 0 .3rem; }

@media (max-width: 991px) {
    .bm-nav__inner { flex-wrap: wrap; gap: .8rem; }
    .bm-nav__toggle { display: block; }
    .bm-nav__links, .bm-nav__login { display: none; }
    .bm-nav-open .bm-lang { display: flex; margin: .4rem 0; }
    .bm-nav-open .bm-nav__links { display: flex; flex-direction: column; width: 100%; gap: .6rem; }
    .bm-nav-open .bm-nav__login { display: flex; }
}
