.tarombo-nav {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    border-bottom: 3px solid #dc2626;
    border-radius: 0 0 8px 8px;
    max-width: none;
    width: 100%;
    margin: 0 0 1rem 0;
    padding: 1.2rem 1.4rem;
}

.tarombo-nav .top-nav-title a,
.tarombo-nav .top-nav-links a {
    color: #f8fafc;
}

.tarombo-nav .top-nav-title span {
    color: #f97373;
}

.tarombo-nav .top-nav-links a:hover {
    color: #e0ecff;
}

.hero {
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
    color: #0f172a;
    border: 1px solid #cfe3ff;
    padding: 1.4rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.hero h1 {
    margin-bottom: 0.35rem;
    font-size: 2rem;
    color: #1d4ed8;
    font-weight: 700;
}

.hero p {
    color: #1e3a5f;
    margin-bottom: 0;
}

.home-grid .card-block {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.home-grid .card-block h2,
.home-grid .card-block h3,
.home-grid .card-block h4 {
    color: #0f172a;
    font-weight: 600;
}

.news-item {
    border-bottom: 1px solid #e6f0ff;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-item h4 {
    margin-bottom: 0.3rem;
}

.home-grid a {
    color: #1d4ed8;
}

.home-grid a:hover {
    color: #1e40af;
}

.users.form.content label {
    color: #334155;
}

.users.form.content input {
    background: #ffffff;
    border-color: #bfdbfe;
}

.users.form.content button {
    background: #2563eb;
    border-color: #1d4ed8;
}

.users.form.content button:hover {
    background: #1d4ed8;
    border-color: #1e40af;
}

.stats-block ul {
    margin: 0;
}

.stats-block li {
    margin-bottom: 0.35rem;
    color: #334155;
}

.stats-block .stats-total {
    margin: 0 0 0.65rem;
    color: #0f172a;
}

.stats-bar-chart {
    margin-bottom: 0.75rem;
}

.stats-bar-row {
    margin-bottom: 0.55rem;
}

.stats-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    color: #334155;
    font-size: 1.25rem;
}

.stats-bar-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.home-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    --ethnic-red: #7f1d1d;
    --ethnic-black: #111827;
    --ethnic-gold: #d4a017;
    --ethnic-cream: #f7f1e6;
}

/* Pointer ringkas ke pohon tarombo publik (halaman home) */
.home-tarombo-minimal {
    border-radius: 12px;
    border: 1px solid rgba(127, 29, 29, 0.2);
    background: linear-gradient(135deg, #fffefb 0%, #f7f1e6 100%);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    margin-bottom: 0.25rem;
}

.home-tarombo-minimal-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    padding: 1.25rem 1.4rem;
}

.home-tarombo-minimal-text {
    flex: 1 1 220px;
    min-width: 0;
}

.home-tarombo-minimal-title {
    margin: 0 0 0.35rem;
    font-size: 1.9rem;
    color: var(--ethnic-red, #7f1d1d);
    font-weight: 600;
}

.home-tarombo-minimal-desc {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.45;
    color: #475569;
}

.home-tarombo-minimal-root {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.12rem;
    color: #64748b;
}

.home-tarombo-minimal-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.home-tarombo-minimal-actions li {
    margin: 0;
}

.home-tarombo-minimal-btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--ethnic-red, #7f1d1d);
    border: 1px solid rgba(127, 29, 29, 0.9);
    white-space: nowrap;
}

.home-tarombo-minimal-btn:hover {
    background: #991b1b;
    border-color: #991b1b;
    color: #fff;
}

.home-modern a.home-tarombo-minimal-btn,
.home-modern a.home-tarombo-minimal-btn:hover,
.home-modern a.home-tarombo-minimal-btn:focus {
    color: #fff;
}

.home-tarombo-minimal-btn--ghost {
    background: transparent;
    color: var(--ethnic-red, #7f1d1d);
    border-color: rgba(127, 29, 29, 0.45);
}

.home-tarombo-minimal-btn--ghost:hover {
    background: rgba(127, 29, 29, 0.08);
    color: #7f1d1d;
}

.pomparans.view .guest-view-notice {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: #475569;
    max-width: 42rem;
}

.guest-tree-notice {
    margin: 0.4rem 0 0.8rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(180, 83, 9, 0.35);
    background: rgba(254, 243, 199, 0.55);
    color: #7c2d12;
}

.guest-tree-notice strong {
    display: block;
    margin-bottom: 0.2rem;
}

.guest-tree-notice p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.45;
}

.pomparan-tree-list {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 0.65rem 0.75rem;
}

.pomparan-tree-row {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed #e2e8f0;
}

.pomparan-tree-row:last-child {
    border-bottom: none;
}

.pomparan-tree-row .tree-level {
    display: inline-block;
    width: 2rem;
    color: #64748b;
    font-weight: 600;
}

.pomparan-tree-row .tree-spouse {
    color: #64748b;
    margin-left: 0.2rem;
}

.search-result-meta {
    margin: 0.75rem 0;
    color: #475569;
    font-weight: 600;
}

.pomparan-search-list {
    display: grid;
    gap: 0.65rem;
}

.pomparan-search-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 0.75rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.pomparan-search-main h4 {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
}

.pomparan-search-main p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.pomparan-search-action .button {
    margin-bottom: 0;
    white-space: nowrap;
}

.home-hero-modern {
    border-radius: 14px;
    padding: 2.2rem 1.8rem;
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.2);
}

.hero-modern-content {
    max-width: 720px;
}

.hero-modern-content h1 {
    margin: 0 0 0.5rem;
    color: #fff;
    font-size: 3rem;
}

.hero-modern-content p {
    margin: 0;
    color: #f7e8d0;
}

.home-header-banner {
    margin: 0 1.2rem 1rem;
    border-radius: 14px;
    padding: 2rem 1.8rem;
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.2);
}

.home-header-banner-inner {
    max-width: 100%;
}

.home-header-banner h1 {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: 3rem;
}

.home-header-banner p {
    margin: 0;
    color: #f7e8d0;
}

.site-header-unified {
    margin: 0 1.2rem 1rem;
    border-radius: 14px;
    padding: 1rem 1.4rem 1.4rem;
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.2);
}

.site-header-inner {
    max-width: 100%;
}

.site-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.site-header-menu {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.site-header-menu a {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(17, 24, 39, 0.35);
}

.site-header-menu a:hover {
    background: rgba(212, 160, 23, 0.22);
    border-color: rgba(212, 160, 23, 0.7);
}

.site-header-copy {
    margin-top: 0.85rem;
}

.site-header-copy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-header-copy-row p {
    flex: 1;
}

.site-header-copy h1 {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: 3rem;
}

.site-header-copy p {
    margin: 0;
    color: #f7e8d0;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 0.65rem !important;
    padding: 0.2rem 0.55rem;
    background: rgba(212, 160, 23, 0.18);
    border: 1px solid rgba(212, 160, 23, 0.65);
    border-radius: 999px;
    font-size: 1.1rem;
    color: #f8fafc !important;
}

.hero-modern-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-hero-primary {
    background: var(--ethnic-gold);
    color: var(--ethnic-black);
    font-weight: 600;
    border-color: #e8bf4f;
}

.btn-hero-secondary {
    background: rgba(17, 24, 39, 0.35);
    border-color: rgba(212, 160, 23, 0.6);
    color: #ffffff;
}

.home-grid-modern .home-section-card {
    background: linear-gradient(165deg, #fffdfa, var(--ethnic-cream));
    border: 1px solid #ead9bc;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.08);
}

.section-header-modern {
    margin-bottom: 0.8rem;
}

.section-header-modern.with-image {
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    margin: -0.1rem -0.1rem 0.75rem;
}

.section-header-modern h2,
.section-header-modern h3 {
    margin: 0;
    color: var(--ethnic-black);
}

.section-header-modern.with-image h3 {
    color: #fff;
}

.news-card-modern {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.8rem;
    border-bottom: 1px solid #ead9bc;
    padding: 0.8rem 0;
}

.news-card-modern:first-of-type {
    padding-top: 0.15rem;
}

.news-card-modern:last-child {
    border-bottom: none;
    padding-bottom: 0.2rem;
}

.news-thumb {
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    min-height: 88px;
}

.news-card-body h4 {
    margin: 0 0 0.25rem;
}

.news-card-body p {
    margin-bottom: 0.25rem;
    color: #4b5563;
}

.link-list-modern {
    margin: 0;
}

.link-list-modern li {
    margin-bottom: 0.45rem;
}

.home-modern a {
    color: var(--ethnic-red);
}

.home-modern a:hover {
    color: #5b1414;
}

.login-card-modern,
.welcome-card-modern,
.modern-stats {
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.09);
    border: 1px solid #ead9bc;
    background: linear-gradient(165deg, #fffdfa, var(--ethnic-cream));
}

.home-modern .users.form.content button {
    background: var(--ethnic-red);
    border-color: #5b1414;
}

.home-modern .users.form.content button:hover {
    background: #5b1414;
    border-color: #3d0f0f;
}

@media (max-width: 900px) {
    .home-header-banner {
        margin-left: 0.8rem;
        margin-right: 0.8rem;
        padding: 1.4rem 1rem;
    }

    .home-header-banner h1 {
        font-size: 2.3rem;
    }

    .site-header-unified {
        margin-left: 0.8rem;
        margin-right: 0.8rem;
        padding: 0.9rem 1rem 1.1rem;
    }

    .site-header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .site-header-copy-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header-menu {
        justify-content: flex-start;
    }

    .site-header-copy h1 {
        font-size: 2.2rem;
    }

    .hero-modern-content h1 {
        font-size: 2.4rem;
    }

    .news-card-modern {
        grid-template-columns: 1fr;
    }

    .news-thumb {
        min-height: 130px;
    }
}

.app-shell {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.main > .container.app-shell {
    max-width: 100%;
    width: 100%;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

.left-sidebar {
    width: 280px;
    position: sticky;
    top: 1rem;
}

.content-shell {
    flex: 1;
    min-width: 0;
}

.side-menu h3 {
    margin-bottom: 0.9rem;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: #0f172a;
}

.side-menu ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.side-menu .menu-item {
    margin-bottom: 0.28rem;
}

.side-menu .menu-item > .menu-level {
    margin-top: 0.3rem;
    margin-left: 0.55rem;
    padding-left: 0.65rem;
    border-left: 2px solid #e2e8f0;
}

.side-menu .menu-link,
.side-menu .menu-label {
    display: block;
    padding: 0.5rem 0.62rem;
    border-radius: 0.52rem;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.35;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.side-menu .menu-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.7);
}

.side-menu .menu-label {
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
}

.side-menu .menu-item.has-children > .menu-label {
    border: 1px solid #e2e8f0;
}

.side-menu .menu-item.is-active > .menu-link {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.side-menu .menu-level-0 > .menu-item > .menu-link,
.side-menu .menu-level-0 > .menu-item > .menu-label {
    font-size: 1.2rem;
}

.side-menu .menu-level-1 > .menu-item > .menu-link,
.side-menu .menu-level-1 > .menu-item > .menu-label {
    font-size: 1.2rem;
}

.side-menu .menu-level-2 > .menu-item > .menu-link,
.side-menu .menu-level-2 > .menu-item > .menu-label,
.side-menu .menu-level-3 > .menu-item > .menu-link,
.side-menu .menu-level-3 > .menu-item > .menu-label {
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .tarombo-nav {
        padding: 0.9rem 1rem;
    }

    .tarombo-nav .top-nav-title a {
        font-size: 2rem;
    }

    .tarombo-nav .top-nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 0.8rem;
        justify-content: flex-start;
    }

    .main > .container.app-shell {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .app-shell {
        flex-direction: column;
    }

    .left-sidebar {
        width: 100%;
        position: static;
    }
}

.admin-dashboard .admin-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.admin-dashboard .admin-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 44%);
    gap: 0.9rem;
    align-items: start;
    margin-bottom: 0.7rem;
}

.admin-dashboard .admin-head h2 {
    margin: 0.1rem 0 0;
}

.admin-dashboard .admin-head .admin-quick-links {
    justify-content: flex-end;
    margin-bottom: 0;
}

.admin-dashboard .admin-quick-links a {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1.3rem;
}

.admin-dashboard .admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.admin-dashboard .metric-card {
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 0.8rem;
}

.admin-dashboard .metric-card small {
    display: block;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.admin-dashboard .metric-card strong {
    display: block;
    font-size: 2rem;
    color: #0f172a;
    line-height: 1.1;
}

.admin-dashboard .metric-card span {
    color: #334155;
    font-size: 1.25rem;
}

.admin-dashboard .section-note {
    color: #64748b;
    font-size: 1.2rem;
    margin-top: -0.1rem;
    margin-bottom: 0.65rem;
}

.admin-dashboard .metric-note {
    margin: 0.45rem 0 0;
    color: #64748b;
    font-size: 1.15rem;
    line-height: 1.35;
}

.admin-dashboard .progress {
    height: 10px;
    border-radius: 8px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.admin-dashboard .progress > div {
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}

.actions .admin-right-stats {
    margin-top: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid #dbeafe;
}

.actions .admin-right-stats h3 {
    margin: 0 0 0.4rem;
}

.actions .admin-right-stats p {
    margin: 0.35rem 0;
    color: #334155;
}

.actions .admin-right-stats .section-note {
    color: #64748b;
    font-size: 1.15rem;
    line-height: 1.35;
    margin-bottom: 0.55rem;
}

.actions .admin-right-stats .progress {
    height: 10px;
    border-radius: 8px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.45rem;
}

.actions .admin-right-stats .progress > div {
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}

@media (max-width: 1100px) {
    .admin-dashboard .admin-head {
        grid-template-columns: 1fr;
    }

    .admin-dashboard .admin-head .admin-quick-links {
        justify-content: flex-start;
    }

    .admin-dashboard .admin-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .admin-dashboard .admin-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Legacy-like compact Pomparans pages */
.pomparans.view,
.pomparans.index,
.pomparans.form {
    font-size: 1.2rem;
    line-height: 1.35;
}

.pomparans.index {
    font-size: 1.3rem;
}

.pomparans.view {
    font-size: clamp(1.3rem, 1.2vw, 1.45rem);
}

.pomparans h2 {
    font-size: 2.1rem;
    margin-bottom: 0.6rem;
}

.pomparans h3 {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
}

.pomparans table {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.pomparans.index table {
    font-size: 1.3rem;
}

.pomparans.view table {
    font-size: clamp(1.25rem, 1.1vw, 1.4rem);
}

.pomparans th,
.pomparans td {
    padding: 0.35rem 0.45rem;
    vertical-align: top;
}

.pomparans .leftcontent,
.pomparans .rightcontent {
    width: 50%;
    float: left;
}

.pomparans.view .rightcontent {
    width: 62%;
    float: left;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
    padding: 0.8rem;
    margin-bottom: 0.9rem;
}

.pomparans.view .leftcontent {
    width: 36%;
    float: right;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
    padding: 0.6rem;
    margin-bottom: 0.9rem;
}

.pomparans .pomparan-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.pomparans .pomparan-detail-table th,
.pomparans .pomparan-detail-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 0.6rem;
}

.pomparans .pomparan-detail-table th {
    width: 32%;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .pomparans.view {
        font-size: 1.25rem;
    }

    .pomparans.view table {
        font-size: 1.2rem;
    }
}

.pomparans .related {
    clear: both;
    margin-top: 1.2rem;
}

table.silsilah tr.silsilah td.silsilah {
    padding: 0.15rem 0.25rem;
}

.pomparans .actions ul li a,
.pomparans .actions a {
    font-size: 1.2rem;
    font-weight: 400;
}

.pomparans .paging {
    margin: 0.8rem 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.pomparans .paging a,
.pomparans .paging span {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    line-height: 1.2;
}

.pomparans .paging .current {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    font-weight: 600;
}

.pomparans .paging a:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

@media (max-width: 900px) {
    .pomparans .leftcontent,
    .pomparans .rightcontent {
        width: 100%;
        float: none;
    }
}

/* Page-level action menu: right sidebar on desktop */
.content-shell:has(> .actions) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 1rem;
    align-items: start;
}

.content-shell:has(> .actions) > .message {
    grid-column: 1 / -1;
}

.content-shell:has(> .actions) > :not(.actions):not(.message) {
    grid-column: 1;
    min-width: 0;
}

.content-shell:has(> .actions) > .actions {
    grid-column: 2;
    margin-top: 0;
    position: sticky;
    top: 1rem;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0.85rem;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

.content-shell:has(> .actions) > .actions h3 {
    margin: 0 0 0.6rem;
    font-size: 1.5rem;
}

.content-shell:has(> .actions) > .actions ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.content-shell:has(> .actions) > .actions li {
    margin: 0 0 0.45rem;
}

.content-shell:has(> .actions) > .actions li:last-child {
    margin-bottom: 0;
}

.content-shell:has(> .actions) > .actions a {
    display: block;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
}

.content-shell:has(> .actions) > .actions a:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.content-shell:has(> .actions) > .actions li form {
    margin: 0;
}

.content-shell:has(> .actions) > .actions li button[type="submit"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font: inherit;
    font-size: 1.25rem;
    color: #334155;
    text-align: left;
}

.content-shell:has(> .actions) > .actions li button[type="submit"]:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Legacy bake pages with side-nav: move actions to right */
.content-shell .row:has(> aside .side-nav) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 1rem;
    align-items: start;
}

.content-shell .row:has(> aside .side-nav) > aside.column {
    grid-column: 2;
    width: auto;
    margin: 0;
}

.content-shell .row:has(> aside .side-nav) > aside.column .side-nav {
    margin-top: 0;
    position: sticky;
    top: 1rem;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0.85rem;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

.content-shell .row:has(> aside .side-nav) > aside.column .side-nav .heading {
    margin: 0 0 0.6rem;
    font-size: 1.5rem;
}

.content-shell .row:has(> aside .side-nav) > aside.column .side-nav-item {
    display: block;
    margin: 0 0 0.45rem;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
}

.content-shell .row:has(> aside .side-nav) > aside.column .side-nav-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.content-shell .row:has(> aside .side-nav) > .column-responsive,
.content-shell .row:has(> aside .side-nav) > .column.column-80 {
    grid-column: 1;
    width: auto;
    max-width: 100%;
}

.view.content .detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.view.content .detail-table th,
.view.content .detail-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.view.content .detail-table th {
    width: 28%;
    max-width: 12rem;
    font-weight: 600;
    color: #334155;
    font-size: 1.2rem;
}

.view.content .detail-table td {
    color: #0f172a;
    font-size: 1.2rem;
}

.view.content .related {
    margin-top: 1.25rem;
}

.view.content .related h4 {
    margin-bottom: 0.5rem;
}

.view.content .related .section-note {
    font-size: 1.15rem;
    color: #64748b;
    margin: 0 0 0.5rem;
    max-width: 52rem;
}

.content-shell > .page-hierarchy {
    margin: 0 0 0.8rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #475569;
    font-size: 1.15rem;
}

.content-shell > .page-hierarchy a {
    text-decoration: none;
}

.view.content .muted {
    color: #64748b;
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .content-shell:has(> .actions) {
        display: block;
    }

    .content-shell:has(> .actions) > .actions {
        position: static;
        margin-top: 1rem;
    }

    .content-shell .row:has(> aside .side-nav) {
        display: block;
    }

    .content-shell .row:has(> aside .side-nav) > aside.column .side-nav {
        position: static;
        margin-top: 1rem;
    }
}

.app-footer {
    margin-top: 1.2rem;
    margin-left: 1.2rem;
    margin-right: 1.2rem;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(115deg, #111827, #7f1d1d);
    border-top: 2px solid #d4a017;
    color: #f8e7c1;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.18);
}

.app-footer-inner {
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-footer-brand strong {
    display: block;
    color: #fff7df;
    font-size: 1.45rem;
    line-height: 1.2;
}

.app-footer-brand span {
    font-size: 1.15rem;
    color: #f3d998;
}

.app-footer-links {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.app-footer-links a {
    color: #fff7df;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 160, 23, 0.55);
    background: rgba(17, 24, 39, 0.3);
}

.app-footer-links a:hover {
    background: rgba(212, 160, 23, 0.2);
    border-color: rgba(212, 160, 23, 0.8);
    color: #ffffff;
}

.app-footer-meta {
    font-size: 1.1rem;
    color: #f3d998;
}

@media (max-width: 900px) {
    .app-footer {
        margin-left: 0.8rem;
        margin-right: 0.8rem;
    }

    .app-footer-inner {
        padding: 0.85rem 0.8rem;
    }
}

.stats-dashboard h2 {
    margin-bottom: 0.9rem;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.stats-summary-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}

.stats-summary-card small {
    display: block;
    color: #64748b;
    margin-bottom: 0.15rem;
    font-size: 1.2rem;
}

.stats-summary-card strong {
    font-size: 2rem;
    line-height: 1.1;
    color: #0f172a;
}

.stats-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.stats-chart-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0.8rem;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}

.stats-chart-card h3 {
    margin: 0 0 0.65rem;
}

.css-pie-chart {
    width: 210px;
    height: 210px;
    margin: 0.2rem auto 0.8rem;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
}

.pie-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.8rem;
    font-size: 1.2rem;
}

.pie-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pie-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.growth-svg {
    width: 100%;
    height: auto;
    min-height: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fcfdff;
}

.growth-labels {
    margin-top: 0.55rem;
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 1.1rem;
    color: #64748b;
}

@media (max-width: 1100px) {
    .stats-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .stats-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .stats-summary-grid {
        grid-template-columns: 1fr;
    }

    .pie-legend {
        grid-template-columns: 1fr;
    }
}

/* Index / list tables: fill content area, avoid horizontal scroll bar */
.list-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.list-table-wrap table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 0;
}

.list-table-wrap thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #cbd5e1;
    padding: 0.5rem 0.65rem;
    font-size: 1.2rem;
    vertical-align: bottom;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

.list-table-wrap tbody td {
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid #e8eef5;
    vertical-align: middle;
    font-size: 1.15rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.list-table-wrap tbody tr:hover td {
    background: #f8fafc;
}

.list-table-wrap th.actions,
.list-table-wrap td.actions {
    width: 10rem;
    min-width: 9rem;
    white-space: normal;
    overflow: visible;
    text-align: right;
    vertical-align: middle;
}

.list-table-wrap td.actions a {
    display: inline;
    margin-left: 0.35rem;
}

.list-table-wrap td.actions a:first-child {
    margin-left: 0;
}

.list-table-wrap .col-id {
    width: 3.5rem;
}

.list-table-wrap .col-narrow {
    width: 4.5rem;
}

.list-table-wrap .col-date {
    width: 9.5rem;
}

.list-table-wrap .col-flag {
    width: 3.25rem;
    text-align: center;
}

.content.index .paginator,
.pomparans.index .paginator {
    text-align: left;
    margin-top: 0.5rem;
}

.content.index .paginator .pagination,
.pomparans.index .paginator .pagination {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.list-filters .input {
    margin-bottom: 0;
    min-width: 10rem;
}

.list-filters .submit {
    margin-bottom: 0;
}

.readonly-user-meta {
    margin: 0 0 0.65rem;
    padding: 0.5rem 0.65rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.2rem;
    color: #334155;
}

.readonly-user-meta-note {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.05rem;
    color: #64748b;
    font-weight: 400;
}

/* Users index — legacy-style status + row actions */
.users.index .user-status-cell {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

.users.index .user-status-cell .status-ok {
    color: #16a34a;
}

.users.index .user-status-cell .status-bad {
    color: #dc2626;
}

.users.index .user-status-cell .status-sep {
    color: #64748b;
    font-weight: 600;
    margin: 0 0.15rem;
}

.users.index .users-index-actions {
    width: 14rem;
    min-width: 12rem;
    white-space: normal;
    text-align: left;
}

.users.index .users-index-actions .users-inline-action {
    margin-right: 0.35rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.users.index .users-index-actions form {
    display: inline;
    margin: 0;
}

.users.index .users-index-actions button[type="submit"] {
    display: inline;
    margin: 0 0.35rem 0.25rem 0;
    padding: 0;
    background: none;
    border: none;
    color: #2f85ae;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.users.index .users-index-actions button[type="submit"]:hover {
    color: #2a6496;
}

.pomparans.index .list-table-wrap td img {
    max-height: 1.1rem;
    width: auto;
    vertical-align: middle;
}

/* Tree view (vtree) */
#wrapper {
    color: #000;
    position: relative;
    font-size: 10px;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.branch {
    position: relative;
    margin-left: 210px;
}

.branch:before {
    content: "";
    width: 25px;
    border-top: 1px solid #000;
    position: absolute;
    left: -50px;
    top: 50%;
    margin-top: 1px;
}

.entry {
    position: relative;
    min-height: 40px;
}

.entry.single {
    min-height: 22px;
}

.entry:before {
    content: "";
    height: 100%;
    border-left: 1px solid #000;
    position: absolute;
    left: -25px;
}

.entry:after {
    content: "";
    width: 25px;
    border-top: 1px solid #000;
    position: absolute;
    left: -25px;
    top: 50%;
    margin-top: 1px;
}

.entry:first-child:before {
    width: 10px;
    height: 50%;
    top: 50%;
    margin-top: 2px;
    border-radius: 10px 0 0 0;
}

.entry:first-child:after {
    height: 10px;
    border-radius: 10px 0 0 0;
}

.entry:last-child:before {
    width: 10px;
    height: 50%;
    border-radius: 0 0 0 10px;
}

.entry:last-child:after {
    height: 10px;
    border-top: none;
    border-bottom: 1px solid #000;
    border-radius: 0 0 0 10px;
    margin-top: -9px;
}

.entry.sole:before {
    display: none;
}

.entry.sole:after {
    width: 25px;
    height: 0;
    margin-top: 1px;
    border-radius: 0;
}

.label {
    display: block;
    min-width: 160px;
    padding: 4px;
    line-height: 10px;
    text-align: left;
    border: 0.5px solid #000;
    border-radius: 1px;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -10px;
    font-family: Palatino, "Times New Roman", serif;
    font-size: 12px;
    background: #fff;
}
