/**
 * Tool Spire — layout shell (replaces Tabler/Bootstrap layout CSS on public pages)
 */

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    flex: 1 0 auto;
    width: 100%;
}

.container-xl {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

/* Navbar */
.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-expand-md .navbar-collapse {
    display: flex;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
}

.navbar-expand-md .navbar-collapse:not(.show) {
    display: flex;
}

@media (max-width: 767.98px) {
    .navbar-expand-md .navbar-collapse:not(.show) {
        display: none;
    }
    .navbar-expand-md .navbar-collapse.show {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-brand-image {
    height: 2rem;
    width: auto;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    border-radius: 6px;
}

.nav-link-icon {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.nav-link-icon svg {
    width: 100%;
    height: 100%;
}

.navbar-toggler {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") center/contain no-repeat;
}

@media (max-width: 767.98px) {
    .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    min-width: 10rem;
    margin-top: 0.25rem;
    padding: 0.35rem 0;
    background: #fff;
    border: 1px solid var(--ts-border, #e2e6ed);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.dropdown-menu.show,
.dropdown-menu.dropdown-menu-end.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.45rem 1rem;
    color: var(--ts-text, #303030);
    text-decoration: none;
    background: transparent;
    border: 0;
    text-align: left;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-divider {
    height: 0;
    margin: 0.35rem 0;
    border-top: 1px solid var(--ts-border, #e2e6ed);
}

/* Avatar & badge */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.avatar-sm {
    width: 1.75rem;
    height: 1.75rem;
}

.badge {
    display: inline-block;
    padding: 0.2em 0.5em;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
}

.bg-green-lt {
    background: #dcfce7;
    color: #166534;
}

/* Footer */
.footer {
    padding: 1rem 0;
    margin-top: auto;
}

.footer-transparent {
    background: transparent;
}

.d-print-none {
    display: block;
}

@media print {
    .d-print-none {
        display: none !important;
    }
}

.d-none {
    display: none !important;
}

.d-md-flex {
    display: none !important;
}

@media (min-width: 768px) {
    .d-md-flex {
        display: flex !important;
    }
    .d-none.d-md-flex {
        display: flex !important;
    }
    .d-md-none {
        display: none !important;
    }
    .d-none.d-md-inline-block {
        display: inline-block !important;
    }
    .d-xl-block {
        display: block !important;
    }
}

.d-flex {
    display: flex !important;
}

.flex-row {
    flex-direction: row !important;
}

.align-items-center {
    align-items: center !important;
}

.text-start {
    text-align: left !important;
}

.text-end {
    text-align: right !important;
}

.text-secondary {
    color: var(--ts-text-muted, #6b7280) !important;
}

.small {
    font-size: 0.875em;
}

.me-3 {
    margin-right: 1rem !important;
}

.pe-0 {
    padding-right: 0 !important;
}

.pe-md-3 {
    padding-right: 0 !important;
}

@media (min-width: 768px) {
    .pe-md-3 {
        padding-right: 1rem !important;
    }
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.order-md-last {
    order: 0;
}

@media (min-width: 768px) {
    .order-md-last {
        order: 10;
    }
}

.lh-1 {
    line-height: 1 !important;
}

.p-0 {
    padding: 0 !important;
}

.ps-2 {
    padding-left: 0.5rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}
