/*
 * BJJ Video Analyzer - Modern Page Styling
 * Consistent styling for informational pages (Help, Privacy, System Status, etc.)
 * Uses the brand color system defined in colors.css
 */

/* ============================================
   Hero Sections
   ============================================ */
.page-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-hero .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #212529;
}

.page-hero .page-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.page-hero .page-meta {
    font-size: 0.875rem;
    color: #adb5bd;
    margin-top: 0.5rem;
}

/* ============================================
   Base Card (shared foundation for all card types)
   ============================================ */
.base-card {
    background: var(--surface-color, white);
    border: 1px solid var(--border-color-light, #e9ecef);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* ============================================
   Modern Card Styling
   ============================================ */
.modern-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.modern-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Dark gradient header - primary style */
.modern-card .card-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.modern-card .card-header h2,
.modern-card .card-header h3,
.modern-card .card-header h4,
.modern-card .card-header h5,
.modern-card .card-header h6 {
    margin-bottom: 0;
    font-weight: 600;
    color: white;
}

.modern-card .card-header i {
    opacity: 0.9;
}

.modern-card .card-body {
    padding: 1.5rem;
}

/* ============================================
   Status Cards (for System Status page)
   ============================================ */
.status-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
    height: 100%;
}

.status-card .card-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border-bottom: none;
    padding: 0.875rem 1.25rem;
}

.status-card .card-header h5,
.status-card .card-header h6 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.status-card .card-body {
    padding: 1.25rem;
}

/* Status indicator styling */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.status-indicator.status-ok { color: #198754; }
.status-indicator.status-warning { color: #fd7e14; }
.status-indicator.status-error { color: #dc3545; }
.status-indicator.status-muted { color: #6c757d; }

/* ============================================
   Modern Alerts (within cards)
   ============================================ */
.modern-card .alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem 1.25rem;
}

.modern-card .alert-info {
    background: rgba(13, 202, 240, 0.1);
    color: #055160;
}

.modern-card .alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

.modern-card .alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #664d03;
}

.modern-card .alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #842029;
}

/* ============================================
   Form Containers
   ============================================ */
.form-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.form-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.form-card .card-header h5,
.form-card .card-header h6 {
    margin-bottom: 0;
    font-weight: 600;
    color: #212529;
}

.form-card .card-body {
    padding: 1.5rem;
}

/* Danger zone styling */
.danger-zone {
    background: white;
    border: 1px solid #f5c6cb;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 2rem;
}

.danger-zone .card-header {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    color: white;
    border-bottom: none;
    padding: 0.875rem 1.25rem;
}

.danger-zone .card-header h6 {
    margin-bottom: 0;
    font-weight: 600;
}

.danger-zone .card-body {
    padding: 1.25rem;
}

/* ============================================
   Info Display (Video preview, etc.)
   ============================================ */
.info-panel {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-panel h6 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .page-hero .page-title {
        font-size: 2rem;
    }

    .modern-card .card-body {
        padding: 1.25rem;
    }
}

/* ============================================
   Build Information Card (System Status)
   ============================================ */
.build-info-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.build-info-card .card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.build-info-card .card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.build-info-card .card-body {
    padding: 1.25rem;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.modern-breadcrumb {
    background: rgba(108, 117, 125, 0.05);
    border-bottom: 1px solid rgba(108, 117, 125, 0.1);
    padding: 1rem 0;
}

.modern-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: none;
    padding: 0;
}

.modern-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.modern-breadcrumb .breadcrumb-item a:hover {
    color: #0d6efd;
}

.modern-breadcrumb .breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.modern-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
    font-weight: 600;
}

/* ============================================
   Auth Cards (Login, Password Reset, etc.)
   ============================================ */
.auth-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-card .card-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    text-align: center;
}

.auth-card .card-header h1 {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-card .card-body {
    padding: 2rem;
}

.auth-card .form-label {
    font-weight: 500;
    color: #374151;
}

.auth-card .form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
}

.auth-card .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.auth-card .btn-primary {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* Below Card (secondary card below main form) */
.below-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-top: 1.5rem;
    padding: 1.5rem;
}

/* ============================================
   Sidebar Navigation
   Standardized navigation styles for all sidebar layouts
   (Settings, Staff Tools, etc.)
   ============================================ */
.sidebar-layout {
    min-height: calc(100vh - 200px);
}

.sidebar-nav {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.sidebar-nav .nav-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-nav .nav-body {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav .nav,
.sidebar-nav .nav-body .nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav .nav-link {
    color: #6c757d;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-link .nav-text {
    flex: 1;
}

.sidebar-nav .nav-link:hover {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Mobile Navigation */
.mobile-nav {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav .nav-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.mobile-nav .dropdown-toggle {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.mobile-nav .dropdown-menu {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-nav .dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.mobile-nav .dropdown-item:hover {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.mobile-nav .dropdown-item.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
}

.mobile-nav .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.mobile-nav .nav-link:last-child {
    border-bottom: none;
}

.mobile-nav .nav-link.active {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* ============================================
   Hero Sections (Dark Gradient)
   ============================================ */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-section .hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-section .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* ============================================
   Sticky Table of Contents
   ============================================ */
.sticky-toc {
    position: sticky;
    top: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    max-height: calc(100vh - 4rem);
}

.toc-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.toc-body {
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding: 1rem;
}

.toc-body::-webkit-scrollbar {
    width: 4px;
}

.toc-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.toc-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.25rem;
}

.toc-list a {
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.toc-list a:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    border-left-color: #0d6efd;
}

.toc-list a.active {
    background-color: #e3f2fd;
    color: #0d6efd;
    border-left-color: #0d6efd;
    font-weight: 500;
}

/* Server-generated TOC content styling */
.toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-content li {
    margin-bottom: 0.25rem;
}

.toc-content a {
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.toc-content a:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    border-left-color: #0d6efd;
}

.toc-content a.active {
    background-color: #e3f2fd;
    color: #0d6efd;
    border-left-color: #0d6efd;
    font-weight: 500;
}

/* Nested TOC levels */
.toc-content ul ul {
    padding-left: 1rem;
}

.toc-content ul ul a {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

/* Main Content Card */
.main-content-card {
    background: white;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.main-content-card .card-body {
    padding: 2rem;
}

/* ============================================
   Stat Cards (Invitations, etc.)
   ============================================ */
.stat-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card .card-body {
    padding: 2rem;
    text-align: center;
}

.stat-card .stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-card .stat-number.infinity {
    color: #6610f2;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Stat icon color variants */
.text-envelope { color: #6c757d; }
.text-paper-plane { color: #ffc107; }
.text-user-check { color: #198754; }

/* Staff badge styling */
.staff-badge {
    background: linear-gradient(135deg, #6610f2 0%, #520dc2 100%);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Search Button (404 page, etc.)
   ============================================ */
.search-trigger-btn {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
}

/* ============================================
   Hero/TOC Responsive Adjustments
   ============================================ */
@media (max-width: 991px) {
    .content-layout .col-lg-9 {
        width: 100%;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-section .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .stat-card .stat-icon {
        font-size: 2.5rem;
    }

    .stat-card .stat-number {
        font-size: 2rem;
    }
}
