/* ==========================================================================
   Layout — page wrapper, content area, page header
   ========================================================================== */
.wrapper {
    background: var(--t-bg);
}

.content-wrapper {
    background: var(--t-bg);
}

/* Page header bar (title + breadcrumb) rendered by every view's .content-header */
.content-header {
    padding: 1.25rem 0 0.5rem;
}
.content-header .list-header-title {
    color: var(--t-text) !important;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0;
}
.content-header .page-subtitle {
    color: var(--t-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
}
.breadcrumb-item a {
    color: var(--t-muted);
    font-weight: 500;
    text-decoration: none;
}
.breadcrumb-item a:hover {
    color: var(--t-primary);
}
.breadcrumb-item.active {
    color: var(--t-text);
    font-weight: 600;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--t-muted);
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* Loading overlay */
#LoadingImage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999;
    background: rgba(15, 23, 42, 0.35) !important;
    backdrop-filter: blur(2px);
}
#LoadingImage img {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -16px;
    margin-top: -16px;
}
:root[data-theme="dark"] #LoadingImage {
    background: rgba(15, 23, 42, 0.6) !important;
}

/* Page fade-in — deliberately NOT applied to section.content: an element
   with animation-name set (even after the animation finishes) establishes a
   new CSS stacking context, and every modal in this app is nested inside
   section.content rather than being a direct child of <body>. Bootstrap
   always appends .modal-backdrop directly to <body>, so once section.content
   has its own stacking context, the modal's z-index:1050 only applies within
   that local context and the backdrop (z-index:1040 at the body level) paints
   over the whole section — modal included — making it invisible/unclickable.
   .content-header never contains a modal, so it keeps the fade-in safely. */
.content-wrapper > .content-header {
    animation: t-fade-in 260ms ease both;
}

@keyframes t-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.main-footer {
    background: var(--t-navbar-bg);
    border-top: 1px solid var(--t-border);
    color: var(--t-muted);
    font-size: 0.8rem;
    padding: 0.9rem 1.5rem;
}
.main-footer a { color: var(--t-primary); font-weight: 600; }
