/* ============================================================
   IMDH theme – camada custom sobre Bootstrap 5.3
   Acervo Memória e Direitos Humanos / UFSC
   ============================================================ */

:root {
    --imdh-brand: #962A60;
    --imdh-brand-rgb: 150, 42, 96;
    --imdh-brand-dark: #6E1F47;
    --imdh-brand-light: #C75A92;

    --imdh-accent-blue: #1D4F8A;
    --imdh-accent-orange: #D85C1D;
    --imdh-accent-green: #2A8C3A;

    --imdh-ink: #1A1A1A;
    --imdh-muted: #5C5C5C;
    --imdh-line: #E5E1D8;
    --imdh-paper: #F7F5F1;
    --imdh-paper-2: #EFEBE2;

    --imdh-font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
    --imdh-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Bootstrap overrides via custom properties */
    --bs-body-font-family: var(--imdh-font-sans);
    --bs-body-color: var(--imdh-ink);
    --bs-body-bg: #fff;
    --bs-link-color: var(--imdh-brand);
    --bs-link-hover-color: var(--imdh-brand-dark);
    --bs-primary: var(--imdh-brand);
    --bs-primary-rgb: var(--imdh-brand-rgb);
    --bs-border-color: var(--imdh-line);
}

/* ------- Typography ------- */
body {
    font-family: var(--imdh-font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--imdh-ink);
    background: #fff;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--imdh-font-serif);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--imdh-ink);
}

h1, .h1 { font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.95rem); line-height: 1.25; }
h2, .h2 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem); line-height: 1.3; }
h3, .h3 { font-size: 1.1rem; line-height: 1.35; }

a {
    color: var(--imdh-brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover { color: var(--imdh-brand-dark); }

/* ------- Topbar ------- */
.imdh-topbar {
    background: var(--imdh-ink);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.4rem 0;
}
.imdh-topbar a { color: #fff; text-decoration: none; }
.imdh-topbar a:hover { color: var(--imdh-brand-light); text-decoration: underline; }
.imdh-topbar .imdh-topbar-link + .imdh-topbar-link { margin-left: 1rem; }

/* Locale switcher (plugin LocaleSwitcher) embutido no topbar */
.imdh-topbar-locale .locale-switcher {
    display: inline-flex;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}
.imdh-topbar-locale .locale-switcher li { line-height: 1; }
.imdh-topbar-locale .flag-icon {
    width: 22px;
    height: 16px;
    display: inline-block;
    border-radius: 2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.imdh-topbar-locale a:hover .flag-icon { transform: scale(1.1); }
.imdh-topbar-locale .active.flag-icon {
    box-shadow: 0 0 0 2px var(--imdh-brand-light);
}

/* ------- Navbar ------- */
.navbar-imdh {
    background: #fff;
    border-bottom: 1px solid var(--imdh-line);
    padding: 0.75rem 0;
}
.navbar-imdh .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
}
.navbar-imdh .navbar-brand img {
    height: 80px;
    width: auto;
}
@media (max-width: 575.98px) {
    .navbar-imdh .navbar-brand img { height: 56px; }
}
.navbar-imdh .navbar-brand .brand-text {
    line-height: 1.1;
}
.navbar-imdh .navbar-brand .brand-name {
    display: block;
    font-family: var(--imdh-font-serif);
    font-weight: 700;
    color: var(--imdh-ink);
    font-size: 1.05rem;
}
.navbar-imdh .navbar-brand .brand-sub {
    display: block;
    color: var(--imdh-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Omeka's public_nav_main() renders bare <li><a>; aplicamos
   o estilo de nav-link diretamente nesses elementos também. */
.navbar-imdh .navbar-nav {
    gap: 0.25rem;
    align-items: center;
}
.navbar-imdh .navbar-nav > li {
    list-style: none;
}
.navbar-imdh .navbar-nav > li > a,
.navbar-imdh .nav-link {
    display: block;
    color: var(--imdh-ink);
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}
.navbar-imdh .navbar-nav > li > a:hover,
.navbar-imdh .navbar-nav > li > a:focus,
.navbar-imdh .nav-link:hover,
.navbar-imdh .nav-link:focus {
    background: var(--imdh-paper);
    color: var(--imdh-brand);
    text-decoration: none;
}
.navbar-imdh .navbar-nav > li.active > a,
.navbar-imdh .nav-link.active {
    color: var(--imdh-brand);
    background: var(--imdh-paper);
}
@media (max-width: 991.98px) {
    .navbar-imdh .navbar-nav > li > a,
    .navbar-imdh .nav-link {
        padding: 0.55rem 0.75rem;
    }
}

.navbar-imdh form[role="search"] .form-control {
    border-color: var(--imdh-line);
    background: var(--imdh-paper);
}
.navbar-imdh form[role="search"] .btn {
    background: var(--imdh-brand);
    color: #fff;
    border: none;
}

/* ------- Hero ------- */
.imdh-hero {
    position: relative;
    background: var(--imdh-paper);
    border-bottom: 1px solid var(--imdh-line);
    padding: 2.25rem 0 2rem;
    overflow: hidden;
}
.imdh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 30%, rgba(var(--imdh-brand-rgb), 0.08), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(29, 79, 138, 0.06), transparent 45%);
    pointer-events: none;
}
.imdh-hero > .container { position: relative; }
.imdh-hero h1 {
    font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
    margin-bottom: 0.25rem;
}
.imdh-hero .hero-subtitle {
    font-family: var(--imdh-font-serif);
    font-style: italic;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    color: var(--imdh-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}
.imdh-hero .lead {
    font-size: 1.15rem;
    color: var(--imdh-muted);
    max-width: 60ch;
}
.imdh-hero .hero-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.imdh-hero .hero-actions .btn {
    padding: 0.65rem 1.4rem;
    font-weight: 500;
}
.imdh-hero img.hero-logo {
    max-width: 240px;
    height: auto;
}

/* ------- Buttons ------- */
.btn-imdh-primary,
.btn-primary {
    background: var(--imdh-brand);
    border-color: var(--imdh-brand);
    color: #fff;
}
.btn-imdh-primary:hover,
.btn-primary:hover {
    background: var(--imdh-brand-dark);
    border-color: var(--imdh-brand-dark);
    color: #fff;
}
.btn-outline-imdh {
    background: transparent;
    border: 1px solid var(--imdh-ink);
    color: var(--imdh-ink);
}
.btn-outline-imdh:hover {
    background: var(--imdh-ink);
    color: #fff;
}

/* ------- Cards ------- */
.imdh-card {
    background: #fff;
    border: 1px solid var(--imdh-line);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.imdh-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    border-color: #ccc;
    transform: translateY(-2px);
}
.imdh-card.is-private {
    background: #FAF9F5;
    border-color: #B8B0A0;
}
.imdh-card.is-private:hover { border-color: #8A8273; }
.imdh-card .card-title .collection-lock {
    color: var(--imdh-accent-orange);
    margin-right: 0.3rem;
    font-size: 0.85em;
}
.imdh-card .card-thumb {
    position: relative;
    width: 100%;
    padding-top: 66%;
    background: var(--imdh-paper);
    overflow: hidden;
}
.imdh-card .card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.imdh-card .card-thumb .no-thumb {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--imdh-muted);
    font-size: 2.5rem;
}
.imdh-card .card-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.imdh-card .card-title {
    font-family: var(--imdh-font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}
.imdh-card .card-title a {
    color: var(--imdh-ink);
    text-decoration: none;
}
.imdh-card .card-title a:hover { color: var(--imdh-brand); }
.imdh-card .card-meta {
    color: var(--imdh-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.imdh-card .card-snippet {
    color: var(--imdh-ink);
    font-size: 0.9rem;
    flex: 1;
}

/* ------- Marquee (loop infinito de imagens da home) ------- */
.imdh-marquee {
    position: relative;
    overflow: hidden;
    margin: 1.25rem 0 0;
    /* Fade nas bordas para entrada/saída suave */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.imdh-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: imdh-marquee 45s linear infinite;
}
.imdh-marquee:hover .imdh-marquee-track { animation-play-state: paused; }
.imdh-marquee-item {
    flex: 0 0 auto;
    height: 260px;
    position: relative;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--imdh-paper);
}
.imdh-marquee-item img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: cover;
}
.imdh-marquee-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem 0.75rem 0.5rem;
    color: #fff;
    font-family: var(--imdh-font-serif);
    font-size: 0.85rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.imdh-marquee-item:hover figcaption { opacity: 1; }

@keyframes imdh-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (max-width: 767.98px) {
    .imdh-marquee-item { height: 180px; }
    .imdh-marquee-track { animation-duration: 35s; }
}

@media (prefers-reduced-motion: reduce) {
    .imdh-marquee-track { animation: none; }
}

/* ------- Section heads ------- */
.section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.25rem;
}
.section-head h2 {
    margin: 0;
}
.section-head .section-head-rule {
    flex: 1;
    height: 1px;
    background: var(--imdh-line);
}
.section-head .section-head-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--imdh-brand);
    white-space: nowrap;
}

/* CTA "Ver todos os itens da coleção" — botão grande, centralizado */
.collection-see-all {
    display: flex;
    justify-content: center;
    margin: 2rem 0 0.5rem;
}
.collection-see-all .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(var(--imdh-brand-rgb), 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    transition: transform 0.12s ease, box-shadow 0.18s ease;
}
.collection-see-all .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--imdh-brand-rgb), 0.32);
}

/* ------- Item / Collection show ------- */
.imdh-breadcrumb {
    font-size: 0.85rem;
    color: var(--imdh-muted);
    margin: 1rem 0 1.5rem;
    padding: 0.3rem 0.55rem;
    background: var(--imdh-paper);
    border: 1px solid var(--imdh-line);
    border-radius: 999px;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.05rem;
    max-width: 100%;
    line-height: 1.2;
}
.imdh-breadcrumb a {
    color: var(--imdh-muted);
    text-decoration: none;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.imdh-breadcrumb a:hover {
    color: var(--imdh-brand);
    background: rgba(var(--imdh-brand-rgb), 0.10);
}
.imdh-breadcrumb a:focus-visible {
    outline: none;
    background: rgba(var(--imdh-brand-rgb), 0.10);
    box-shadow: 0 0 0 2px rgba(var(--imdh-brand-rgb), 0.35);
}
.imdh-breadcrumb .sep {
    color: transparent;
    width: 0.9em;
    height: 0.9em;
    margin: 0 0.05rem;
    position: relative;
    flex: 0 0 auto;
    user-select: none;
}
.imdh-breadcrumb .sep::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid var(--imdh-muted);
    border-right: 1.5px solid var(--imdh-muted);
    transform: rotate(45deg);
    opacity: 0.55;
}
.imdh-breadcrumb .current {
    color: var(--imdh-ink);
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    background: #fff;
    border-radius: 999px;
    border: 1px solid var(--imdh-line);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------- Item show: hero, chips, sidebar de metadados ------- */
.item-hero { padding-bottom: 1rem; border-bottom: 1px solid var(--imdh-line); }
.item-title { margin: 0.25rem 0 0.4rem; }
.item-title .collection-lock { color: var(--imdh-accent-orange); margin-right: 0.4rem; font-size: 0.7em; }
.item-subtitle {
    color: var(--imdh-muted);
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    align-items: center;
}
.item-subtitle-part { display: inline-flex; align-items: center; gap: 0.35rem; }
.item-subtitle i { color: var(--imdh-brand); }

.item-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.item-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--imdh-paper);
    border: 1px solid var(--imdh-line);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--imdh-ink);
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.item-chip i { color: var(--imdh-brand); }
.item-chip-link:hover {
    background: rgba(var(--imdh-brand-rgb), 0.10);
    color: var(--imdh-brand-dark);
    border-color: rgba(var(--imdh-brand-rgb), 0.35);
    text-decoration: none;
}

.item-section-head {
    font-family: var(--imdh-font-serif);
    font-weight: 600;
    margin: 0 0 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(var(--imdh-brand-rgb), 0.35);
    display: inline-block;
}
.item-description {
    max-width: 70ch;
    line-height: 1.7;
    color: var(--imdh-ink);
}
.item-description p:last-child { margin-bottom: 0; }

/* Sidebar sticky em desktop */
@media (min-width: 992px) {
    .item-sidebar { position: sticky; top: 1rem; align-self: flex-start; }
}

.item-meta-card {
    border: 1px solid var(--imdh-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.item-meta-card .card-body { padding: 1rem 1.15rem; }
.item-meta-head {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--imdh-muted);
    margin: 0 0 0.6rem;
    font-family: var(--imdh-font-sans);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.item-meta-head i { color: var(--imdh-brand); }
.item-meta-list { margin: 0; }
.item-meta-list dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--imdh-muted);
    font-weight: 500;
    margin-top: 0.5rem;
}
.item-meta-list dt:first-child { margin-top: 0; }
.item-meta-list dd {
    margin: 0.15rem 0 0;
    color: var(--imdh-ink);
    word-wrap: break-word;
}
.item-meta-list dd a { color: var(--imdh-brand); text-decoration: none; }
.item-meta-list dd a:hover { text-decoration: underline; }
.item-citation {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--imdh-muted);
    background: var(--imdh-paper);
    padding: 0.6rem 0.75rem;
    border-left: 3px solid var(--imdh-brand);
    border-radius: 4px;
}

/* Cards de arquivos no /items/show: thumb maior (quadrado) e sem corte */
.imdh-card.imdh-file-card .card-thumb {
    padding-top: 100%;
}
.imdh-card.imdh-file-card .card-thumb img {
    object-fit: contain;
    padding: 0.35rem;
}
.imdh-card.imdh-file-card .card-thumb .no-thumb { font-size: 3.5rem; }

/* /files/show */
.file-preview {
    background: #fff;
    border: 1px solid var(--imdh-line);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}
.file-preview img,
.file-preview video,
.file-preview audio {
    max-width: 100%;
    height: auto;
}
.file-download-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.file-download-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--imdh-line);
}
.file-download-list li:last-child { border-bottom: 0; }
.file-download-list i { color: var(--imdh-brand); }
.file-download-list a {
    color: var(--imdh-ink);
    text-decoration: none;
    flex: 1;
}
.file-download-list a:hover {
    color: var(--imdh-brand);
    text-decoration: underline;
}

.metadata-table {
    margin-top: 1rem;
    border-top: 1px solid var(--imdh-line);
}
.metadata-table .metadata-row {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--imdh-line);
}
.metadata-table .metadata-label {
    color: var(--imdh-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}
.metadata-table .metadata-value {
    color: var(--imdh-ink);
}
.metadata-table .metadata-value p:last-child { margin-bottom: 0; }
@media (max-width: 575.98px) {
    .metadata-table .metadata-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.item-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}
.item-files-grid .file-tile {
    aspect-ratio: 1;
    background: var(--imdh-paper);
    border: 1px solid var(--imdh-line);
    border-radius: 6px;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.item-files-grid .file-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ------- Search form (in navbar / page) ------- */
.imdh-searchbar {
    display: flex;
    gap: 0;
    border: 1px solid var(--imdh-line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    max-width: 360px;
    width: 100%;
}
.imdh-searchbar input[type="text"] {
    flex: 1;
    border: 0;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    background: transparent;
    outline: none;
}
.imdh-searchbar button {
    border: 0;
    padding: 0.35rem 0.9rem;
    background: var(--imdh-brand);
    color: #fff;
    cursor: pointer;
    font-size: 0.875rem;
}
.imdh-searchbar button:hover { background: var(--imdh-brand-dark); }

/* Advanced toggle + panel */
.imdh-advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    background: none;
    border: 0;
    color: var(--imdh-brand);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.imdh-advanced-panel {
    margin-top: 0.75rem;
    background: var(--imdh-paper);
    border: 1px solid var(--imdh-line);
    border-radius: 8px;
    padding: 1rem;
    display: none;
}
.imdh-advanced-panel.open { display: block; }

/* Contexto navbar: form de busca com painel flutuante */
.imdh-navbar-search {
    position: relative;
}
.imdh-navbar-search form {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.imdh-navbar-search .imdh-searchbar { margin: 0; }
.imdh-navbar-search .imdh-advanced-toggle {
    margin-top: 0.25rem;
    font-size: 0.78rem;
}
.imdh-navbar-search .imdh-advanced-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 320px;
    max-width: 90vw;
    margin-top: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    background: #fff;
    border: 1px solid var(--imdh-line);
    z-index: 1050;
}
.imdh-navbar-search .imdh-advanced-panel legend {
    margin-bottom: 0.4rem;
    padding: 0;
    border: 0;
}
.imdh-navbar-search .imdh-advanced-panel label {
    font-size: 0.88rem;
    margin-left: 0.3rem;
}
.imdh-navbar-search .imdh-advanced-panel input[type="radio"],
.imdh-navbar-search .imdh-advanced-panel input[type="checkbox"] {
    accent-color: var(--imdh-brand);
}
.imdh-navbar-search .imdh-advanced-panel a {
    color: var(--imdh-brand);
    text-decoration: none;
}
.imdh-navbar-search .imdh-advanced-panel a:hover { text-decoration: underline; }

@media (max-width: 991.98px) {
    /* Mobile: empilha sob a navbar; painel ocupa largura cheia */
    .imdh-navbar-search { width: 100%; margin-top: 0.5rem; }
    .imdh-navbar-search form { align-items: stretch; }
    .imdh-navbar-search .imdh-searchbar { max-width: none; }
    .imdh-navbar-search .imdh-advanced-panel { right: auto; left: 0; width: 100%; }
}

/* ------- Search results ------- */
.search-result-card {
    display: flex;
    gap: 0.9rem;
    padding: 0.9rem;
    background: #fff;
    border: 1px solid var(--imdh-line);
    border-radius: 10px;
    color: var(--imdh-ink);
    text-decoration: none;
    height: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.search-result-card:hover {
    text-decoration: none;
    color: var(--imdh-ink);
    border-color: #c4c4c4;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}
.search-result-thumb {
    flex: 0 0 96px;
    width: 96px;
    align-self: stretch;        /* estica para preencher a altura do card */
    min-height: 96px;
    border-radius: 8px;
    background: var(--imdh-paper);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--imdh-muted);
    font-size: 1.75rem;
}
.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-result-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
}
.search-result-type {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--imdh-muted);
    font-weight: 500;
}
.search-result-card.type-item       .search-result-type { color: var(--imdh-brand); }
.search-result-card.type-collection .search-result-type { color: var(--imdh-accent-orange); }
.search-result-card.type-file       .search-result-type { color: var(--imdh-accent-blue); }
.search-result-card.type-exhibit    .search-result-type { color: var(--imdh-accent-green); }
.search-result-title {
    font-family: var(--imdh-font-serif);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--imdh-ink);
}
.search-result-card:hover .search-result-title { color: var(--imdh-brand); }
.search-result-snippet {
    font-size: 0.85rem;
    color: var(--imdh-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ------- Pagination ------- */
.imdh-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
    color: var(--imdh-muted);
    font-size: 0.95rem;
}
.imdh-pagination a,
.imdh-pagination input[type="number"] {
    color: var(--imdh-ink);
    text-decoration: none;
    border: 1px solid var(--imdh-line);
    background: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
}
.imdh-pagination a:hover {
    background: var(--imdh-paper);
    border-color: #b8b8b8;
}
.imdh-pagination .current {
    background: var(--imdh-brand);
    color: #fff;
    border-color: var(--imdh-brand);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}
.imdh-pagination input[type="number"] {
    width: 4.5rem;
    text-align: center;
}

/* ------- Register (GuestUser) ------- */
.imdh-register {
    max-width: 720px;
    margin: 2rem auto 3rem;
}
.imdh-register-card {
    background: #fff;
    border: 1px solid var(--imdh-line);
    border-radius: 12px;
    padding: 2rem 2rem 2.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.imdh-register-header { margin-bottom: 1.25rem; }
.imdh-register-header h1 { margin: 0 0 0.25rem; }
.imdh-register-header p   { margin: 0; }

.imdh-terms-panel {
    background: var(--imdh-paper);
    border: 1px solid var(--imdh-line);
    border-left: 3px solid var(--imdh-brand);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin: 0 0 1.5rem;
    font-size: 0.92rem;
    line-height: 1.55;
}
.imdh-terms-panel h2 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
}
.imdh-terms-panel p { margin: 0 0 0.5rem; }
.imdh-terms-panel p:last-child { margin-bottom: 0; }
.imdh-terms-panel ul { padding-left: 1.25rem; margin: 0 0 0.5rem; }
.imdh-terms-panel input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--imdh-brand);
    vertical-align: middle;
    margin-right: 0.4rem;
    cursor: pointer;
}
.imdh-terms-panel label[for="autorizado"] {
    display: inline;
    font-size: 0.88rem;
    color: var(--imdh-ink);
    cursor: pointer;
}

/* Zend Form .field rendered by Omeka_Form_User */
.imdh-register form { margin: 0; }
.imdh-register .field {
    margin-bottom: 1.1rem;
    display: block;
}
.imdh-register .field > div {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    float: none;
    display: block;
}
.imdh-register .field label {
    display: block;
    font-weight: 500;
    color: var(--imdh-ink);
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
}
.imdh-register .field label.required::after,
.imdh-register .field label.required .required-label { display: none; } /* esconde texto duplicado */
.imdh-register .field label.required {
    position: relative;
}
.imdh-register .field label.required::before {
    content: "•";
    color: var(--imdh-brand);
    margin-right: 0.35em;
    font-weight: 700;
}
.imdh-register .field .explanation {
    color: var(--imdh-muted);
    font-size: 0.82rem;
    margin: 0.3rem 0 0;
}
.imdh-register .field input[type="text"],
.imdh-register .field input[type="email"],
.imdh-register .field input[type="password"] {
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--imdh-line);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.imdh-register .field input:focus {
    outline: none;
    border-color: var(--imdh-brand);
    box-shadow: 0 0 0 3px rgba(var(--imdh-brand-rgb), 0.18);
}
.imdh-register input[type="submit"],
.imdh-register button[type="submit"],
.imdh-register #submit {
    display: inline-block;
    background: var(--imdh-brand);
    color: #fff;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.15s ease, transform 0.05s ease;
}
.imdh-register input[type="submit"]:hover,
.imdh-register button[type="submit"]:hover,
.imdh-register #submit:hover { background: var(--imdh-brand-dark); }
.imdh-register input[type="submit"]:active,
.imdh-register button[type="submit"]:active,
.imdh-register #submit:active { transform: translateY(1px); }

@media (max-width: 575.98px) {
    .imdh-register-card { padding: 1.5rem 1.25rem 1.75rem; }
}

/* Mensagens de erro inline (Zend Form) — override do guest-user.css
   removendo a borda/caixa que se confundia com os campos do form. */
.imdh-register ul.error,
.imdh-update-account ul.error {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
}
.imdh-register ul.error li,
.imdh-update-account ul.error li {
    border: 0;
    background: transparent;
    margin: 0;
    padding: 0;
    color: var(--imdh-accent-orange);
    font-size: 0.85rem;
    line-height: 1.4;
}
.imdh-register .field input.errorInput,
.imdh-update-account .field input.errorInput,
.imdh-register .field input[aria-invalid="true"],
.imdh-update-account .field input[aria-invalid="true"] {
    border-color: var(--imdh-accent-orange);
    box-shadow: 0 0 0 3px rgba(216, 92, 29, 0.15);
}

/* ------- Login & forms ------- */
.imdh-auth-card {
    max-width: 460px;
    margin: 2.5rem auto;
    background: #fff;
    border: 1px solid var(--imdh-line);
    border-radius: 14px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}
.imdh-auth-card .auth-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}
.imdh-auth-card .auth-logo img {
    max-height: 64px;
    width: auto;
}
.imdh-auth-card h1 {
    margin: 0 0 0.25rem;
    text-align: center;
    font-size: 1.6rem;
}
.imdh-auth-card .auth-sub {
    color: var(--imdh-muted);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

/* Zend Form .field — alinhado com o estilo do .imdh-register */
.imdh-auth-card form { margin: 0; }
.imdh-auth-card fieldset { border: 0; padding: 0; margin: 0; }
.imdh-auth-card .field { margin-bottom: 0.95rem; }
.imdh-auth-card .field > div {
    width: 100%;
    margin: 0;
    padding: 0;
    float: none;
    display: block;
}
.imdh-auth-card .field label {
    display: block;
    font-weight: 500;
    margin: 0 0 0.3rem;
    font-size: 0.9rem;
    color: var(--imdh-ink);
}
.imdh-auth-card .field label.required::before {
    content: "•";
    color: var(--imdh-brand);
    margin-right: 0.3em;
    font-weight: 700;
}
.imdh-auth-card .field input[type="text"],
.imdh-auth-card .field input[type="password"],
.imdh-auth-card .field input[type="email"] {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--imdh-line);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.imdh-auth-card .field input:focus {
    outline: none;
    border-color: var(--imdh-brand);
    box-shadow: 0 0 0 3px rgba(var(--imdh-brand-rgb), 0.18);
}
/* "Lembrar de mim?" — inline label + checkbox */
.imdh-auth-card .field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--imdh-brand);
    vertical-align: middle;
    margin: 0 0.4rem 0 0;
    cursor: pointer;
}
.imdh-auth-card #remember-label {
    display: inline-block !important;
    width: auto !important;
    margin-right: 0.4rem !important;
}
.imdh-auth-card #remember-label label { display: inline; cursor: pointer; }
.imdh-auth-card .field:has(#remember) > div { display: inline-flex; align-items: center; gap: 0.4rem; }

.imdh-auth-card input[type="submit"],
.imdh-auth-card #submit {
    display: block;
    width: 100%;
    background: var(--imdh-brand);
    color: #fff;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: background 0.15s ease, transform 0.05s ease;
}
.imdh-auth-card input[type="submit"]:hover,
.imdh-auth-card #submit:hover { background: var(--imdh-brand-dark); }
.imdh-auth-card input[type="submit"]:active,
.imdh-auth-card #submit:active { transform: translateY(1px); }

.imdh-auth-card .auth-divider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.25rem 0;
    color: var(--imdh-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.imdh-auth-card .auth-divider::before,
.imdh-auth-card .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--imdh-line);
}

.imdh-auth-card .auth-footer {
    margin-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.88rem;
}
.imdh-auth-card .auth-footer a {
    color: var(--imdh-muted);
    text-decoration: none;
}
.imdh-auth-card .auth-footer a:hover {
    color: var(--imdh-brand);
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .imdh-auth-card { padding: 1.5rem 1.25rem; }
}

/* ------- Flash messages ------- */
.flash-message {
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin: 1rem 0;
    border: 1px solid var(--imdh-line);
    background: var(--imdh-paper);
}
.flash-message.success { background: #EAF7EE; border-color: #B4DDBD; color: #1F5C2C; }
.flash-message.error,
.flash-message.alert,
.flash-message.danger { background: #FBEBF1; border-color: #E3B6CA; color: #6E1F47; }

/* ------- Collection tree (override do plugin) ------- */
.imdh-collection-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.collection-card {
    background: #fff;
    border: 2px solid #C9C2B3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.collection-card:hover {
    border-color: var(--imdh-brand-light);
    box-shadow: 0 6px 22px rgba(0,0,0,0.09);
}
.collection-card.is-private {
    border-color: #B8B0A0;
    background: #FAF9F5;
}
.collection-card.is-private:hover {
    border-color: #8A8273;
}
.collection-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--imdh-paper);
    border-bottom: 2px solid #C9C2B3;
    border-left: 6px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease;
}
/* Pública: tom branded distinto, mantendo elegância. */
.collection-card-header.is-public {
    background: linear-gradient(90deg, rgba(var(--imdh-brand-rgb), 0.22) 0%, rgba(var(--imdh-brand-rgb), 0.08) 100%);
    border-left-color: var(--imdh-brand);
    border-bottom-color: rgba(var(--imdh-brand-rgb), 0.35);
}
/* Privada: tom neutro warm-grey, claramente diferente do público. */
.collection-card-header.is-private {
    background: linear-gradient(90deg, #DCD7C7 0%, #ECE8DC 100%);
    border-left-color: #8A8273;
    border-bottom-color: #B8B0A0;
}
.collection-lock {
    color: var(--imdh-muted);
    margin-right: 0.4rem;
    font-size: 0.85em;
    vertical-align: baseline;
}
.collection-card-header.is-private .collection-lock {
    color: var(--imdh-accent-orange);
}
.collection-card .collection-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--imdh-line);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--imdh-muted);
    font-size: 1.6rem;
}
.collection-card .collection-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.collection-card .collection-heading {
    flex: 1;
    min-width: 0;
}
.collection-card .collection-title {
    margin: 0 0 0.35rem;
    font-family: var(--imdh-font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}
.collection-card h1.collection-title {
    font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.65rem);
}
.collection-card .collection-title a {
    color: var(--imdh-ink);
    text-decoration: none;
}
.collection-card .collection-title a:hover { color: var(--imdh-brand); }
.collection-card .collection-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.collection-card .collection-meta .badge {
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--imdh-muted);
}
.collection-card .collection-meta .badge i { margin-right: 0.25rem; }
.collection-card .collection-toggle {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid var(--imdh-line);
    background: #fff;
    border-radius: 50%;
    color: var(--imdh-ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.collection-card .collection-toggle:hover {
    background: var(--imdh-brand);
    color: #fff;
    border-color: var(--imdh-brand);
}
.collection-card .collection-toggle i {
    transition: transform 0.25s ease;
}
/* Quando o body está colapsado, gira o chevron */
.collection-card .collection-toggle[aria-expanded="false"] i {
    transform: rotate(180deg);
}
.collection-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    background: #fff;
}
.collection-card .collection-description {
    color: var(--imdh-muted);
    margin: 0;
    line-height: 1.55;
}

.subcollection-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem;
    border: 2px solid #C9C2B3;
    border-left: 5px solid #C9C2B3;
    border-radius: 8px;
    background: #fff;
    color: var(--imdh-ink);
    text-decoration: none;
    height: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.subcollection-card.is-public {
    border-color: rgba(var(--imdh-brand-rgb), 0.35);
    border-left-color: var(--imdh-brand);
    background: linear-gradient(90deg, rgba(var(--imdh-brand-rgb), 0.10) 0%, #fff 40%);
}
.subcollection-card.is-private {
    border-color: #B8B0A0;
    border-left-color: #8A8273;
    background: linear-gradient(90deg, #DCD7C7 0%, #FAF9F5 40%);
}
.subcollection-card.is-private .subcollection-title { color: var(--imdh-muted); }
.subcollection-card.is-private:hover .subcollection-title { color: var(--imdh-brand); }
.subcollection-card:hover {
    border-color: #c4c4c4;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--imdh-ink);
    transform: translateY(-2px);
}
.subcollection-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    background: var(--imdh-paper);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--imdh-muted);
    font-size: 1.5rem;
}
.subcollection-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.subcollection-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.subcollection-title {
    font-family: var(--imdh-font-serif);
    font-weight: 600;
    color: var(--imdh-ink);
    line-height: 1.3;
}
.subcollection-card:hover .subcollection-title { color: var(--imdh-brand); }
.subcollection-snippet {
    font-size: 0.85rem;
    color: var(--imdh-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.subcollection-count {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--imdh-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.85rem;
}
.subcollection-count-item { white-space: nowrap; }
.subcollection-count i { margin-right: 0.25rem; }

/* ------- Apoio institucional (faixa após home) ------- */
.imdh-partners {
    margin-top: 4rem;
    padding: 2.5rem 0;
    background: var(--imdh-paper);
    border-top: 1px solid var(--imdh-line);
    border-bottom: 1px solid var(--imdh-line);
}
.imdh-partners-title {
    text-align: center;
    font-family: var(--imdh-font-serif);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--imdh-muted);
    margin: 0 0 1.5rem;
    font-weight: 500;
}
.imdh-partners-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}
.imdh-partner {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--imdh-ink);
    transition: opacity 0.2s ease;
    opacity: 0.85;
}
.imdh-partner:hover { opacity: 1; }
.imdh-partner img {
    max-height: 64px;
    width: auto;
    filter: grayscale(15%);
    transition: filter 0.2s ease;
}
.imdh-partner:hover img { filter: grayscale(0%); }
.imdh-partner-text {
    flex-direction: column;
    text-align: center;
}
.imdh-partner-text-mark {
    font-family: var(--imdh-font-serif);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.05em;
    line-height: 1;
}
.imdh-partner-text-sub {
    font-size: 0.85rem;
    color: var(--imdh-muted);
    margin-top: 0.25rem;
}

/* ------- Footer ------- */
.imdh-footer {
    margin-top: 4rem;
    background: var(--imdh-ink);
    color: #ddd;
    padding: 3rem 0 1.5rem;
}
.imdh-footer h4 {
    color: #fff;
    font-family: var(--imdh-font-serif);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.imdh-footer a { color: #ddd; text-decoration: none; }
.imdh-footer a:hover { color: var(--imdh-brand-light); text-decoration: underline; }
.imdh-footer .footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: #aaa;
}
.imdh-footer .footer-ufsc {
    display: inline-flex;
    align-items: center;
    color: #eee;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border: 1px solid #333;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.imdh-footer .footer-ufsc:hover {
    background: rgba(255,255,255,0.08);
    border-color: #555;
    text-decoration: none;
    color: #fff;
}
.imdh-footer .footer-ufsc img {
    height: 28px;
    width: auto;
    display: block;
}
.imdh-footer .footer-ufsc-text {
    flex-direction: column;
    line-height: 1.1;
    padding: 0.4rem 0.75rem;
}
.imdh-footer .footer-ufsc-text strong {
    font-family: var(--imdh-font-serif);
    letter-spacing: 0.04em;
}
.imdh-footer .footer-ufsc-text .small {
    color: #aaa;
    font-size: 0.7rem;
    margin-top: 0.1rem;
}

/* ------- Skip link ------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--imdh-ink);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
}
.skip-link:focus { left: 0; }

/* ------- Utility ------- */
.imdh-muted { color: var(--imdh-muted); }
.imdh-paper { background: var(--imdh-paper); }
.imdh-divider {
    height: 1px;
    background: var(--imdh-line);
    border: 0;
    margin: 2rem 0;
}

/* ------- Account dashboard (override de guest-user/user/me) ------- */
.imdh-account-card {
    border-radius: 10px;
    background: #fff;
}
.imdh-account-card .imdh-eyebrow {
    font-family: var(--imdh-font-sans);
    letter-spacing: 0.08em;
    font-weight: 600;
}
.imdh-account-card h1 {
    margin-bottom: 0.5rem;
}
.imdh-role-badge {
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    color: #fff;
    background: var(--imdh-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.imdh-role-badge.role-super       { background: var(--imdh-ink); }
.imdh-role-badge.role-admin       { background: var(--imdh-brand); }
.imdh-role-badge.role-contributor { background: var(--imdh-brand-light); }
.imdh-role-badge.role-researcher  { background: var(--imdh-accent-blue); }
.imdh-role-badge.role-guest       { background: var(--imdh-muted); }
.imdh-status-badge {
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
}
.imdh-status-badge.status-active {
    color: var(--imdh-accent-green);
    background: rgba(42, 140, 58, 0.1);
    border-color: rgba(42, 140, 58, 0.2);
}
.imdh-status-badge.status-inactive {
    color: var(--imdh-accent-orange);
    background: rgba(216, 92, 29, 0.1);
    border-color: rgba(216, 92, 29, 0.2);
}
.imdh-account-meta dt {
    font-weight: 500;
    color: var(--imdh-muted);
    margin-bottom: 0.15rem;
}
.imdh-account-meta dt i {
    margin-right: 0.25rem;
    color: var(--imdh-brand);
}
.imdh-account-meta dd {
    margin-bottom: 0.4rem;
    color: var(--imdh-ink);
}
.imdh-account-meta a {
    color: var(--imdh-brand);
    text-decoration: none;
}
.imdh-account-meta a:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
    .imdh-account-card h1 { font-size: 1.5rem; }
    .imdh-account-meta dt { margin-top: 0.25rem; }
}

/* ------- Responsive helpers ------- */
@media (max-width: 767.98px) {
    .imdh-hero { padding: 1.25rem 0 1rem; }
    .imdh-hero img.hero-logo { max-width: 160px; }
}
