/* App shell: sticky footer via flex (prevents giant spacer) */
.app-shell {
    min-height: 100dvh; /* use 100svh if you prefer �small viewport� on iOS */
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1 0 auto;
}

/* Admin header with gradient */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

/* Brand logo */
.brand-logo {
    border-radius: 10px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

/* Text utilities for navbar */
.text-white-75 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.text-white-75:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Right rail sticks underneath header */
.right-rail {
    position: sticky;
    top: 1.25rem;
    display: grid;
    gap: 1rem;
}

/* Page header gradient */
.page-header-gradient {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.page-header-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Enhanced page titles */
.page-title {
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    color: #6c757d;
    font-weight: 500;
}

/* Page header layout */
.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.page-header-main {
    flex: 1;
    min-width: 0; /* Allows text to wrap properly */
}

.page-header-actions {
    flex-shrink: 0;
    align-self: flex-start; /* Prevents buttons from stretching vertically */
}

/* Mobile responsive page header */
@media (max-width: 767.98px) {
    .page-header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-header-actions {
        align-self: stretch;
        margin-top: 1rem;
    }
    
    .page-header-actions .btn {
        width: 100%;
    }
}

/* Mobile navigation improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        margin-top: 0.5rem;
    }
}

/* Card polish */
.card {
    border-radius: .75rem;
    border: 1px solid #e3e6f0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

    .card.lift:hover {
        transform: translateY(-2px);
        transition: transform .12s ease-in-out;
        box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.15);
    }

/* Enhanced dropdown styling */
.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.15s ease-in-out;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(2px);
}

/* Minimal footer links */
.app-footer .nav .nav-link {
    color: inherit;
}

    .app-footer .nav .nav-link:hover {
        text-decoration: underline;
    }

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(102, 126, 234, 0.3);
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

/* Tighten container padding on very small screens */
@media (max-width: 375px) {
    .container-xxl {
        padding-left: .75rem;
        padding-right: .75rem;
    }
}
