/* Professional TN News Mashup CMS Styling */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057 !important;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: translateX(5px);
    color: #e74c3c !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    transform: translateX(0);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover i {
    transform: scale(1.1);
}

/* Sidebar Header */
.sidebar-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #c0392b, #f39c12, #e74c3c);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.sidebar-logo {
    max-width: 120px;
    max-height: 50px;
    filter: brightness(1.05) contrast(1.05) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.sidebar-logo:hover {
    transform: scale(1.05);
}

/* Main Content Header */
.main-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-content {
    padding: 0 2rem;
}

.search-container {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    transition: color 0.3s ease;
}

.search-input:focus + .search-icon {
    color: #3498db;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn, .profile-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: none;
    background: transparent;
}

.notification-btn {
    background-color: #f8f9fa;
    color: #6c757d;
}



.profile-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}


/* Content Area */
.main-content {
    background-color: #f8f9fa;
    min-height: calc(100vh - 70px);
}

/* Cards Enhancement */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}


.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

/* Buttons Enhancement */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}


.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}


/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: transform 0.3s ease;
}


.stats-card.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.stats-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card .card-title {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Navigation Pills */
.nav-pills .nav-link {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}



/* Form Controls */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* Table Enhancements */
.table {
    margin-bottom: 0;
}



.table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
}

/* Badge Enhancements */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile Sidebar */
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1050;
        transition: left 0.3s ease;
        width: 280px;
        height: 100vh;
        overflow-y: auto;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* Mobile Header */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .header-content {
        padding: 0 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .search-container {
        order: 1;
        flex: 1;
        min-width: 200px;
        max-width: none;
    }

    .header-actions {
        order: 2;
        gap: 0.5rem;
    }

    .notification-btn, .profile-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    /* Mobile Content */
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Mobile Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .card-body {
        padding: 1rem;
    }

    /* Mobile Statistics Grid */
    .stats-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .stats-card h2 {
        font-size: 1.5rem;
    }

    /* Mobile Navigation Links */
    .sidebar .nav-link {
        padding: 15px 20px;
        margin: 2px 8px;
        font-size: 1rem;
    }

    .sidebar .nav-link i {
        font-size: 1.2rem;
        margin-right: 15px;
        width: 25px;
    }

    /* Mobile Logo */
    .sidebar-logo {
        max-width: 100px;
        max-height: 40px;
    }

    /* Mobile Tables */
    .table-responsive {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }

    /* Mobile Forms */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem;
    }

    /* Mobile Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        min-height: 44px; /* Touch-friendly */
        border-radius: 6px;
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-height: 36px;
    }

    /* Mobile Spacing */
    .container-fluid {
        padding: 0;
    }

    .p-4 {
        padding: 1rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mb-5 {
        margin-bottom: 1.5rem !important;
    }

    /* Mobile Grid */
    .col-md-3 {
        margin-bottom: 1rem;
    }

    .row {
        margin: 0 -0.5rem;
    }

    .row > * {
        padding: 0 0.5rem;
    }

    /* Mobile Typography */
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* Mobile Video Cards */
    .card .position-relative {
        height: 160px !important;
    }

    .card .card-body {
        padding: 0.75rem;
    }

    .card .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    /* Mobile Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Mobile Modal Adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 8px;
    }

    /* Mobile Search */
    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem;
        padding-right: 2.5rem;
    }

    /* Mobile Header Height */
    .main-header {
        height: auto;
        min-height: 60px;
    }

    .header-content {
        min-height: 60px;
        align-items: center;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    /* Very Small Sidebar */
    .sidebar {
        width: 260px;
        left: -260px;
    }

    /* Compact Header */
    .header-content {
        padding: 0 0.75rem;
    }

    .search-container {
        min-width: 150px;
    }

    .notification-btn, .profile-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    /* Compact Content */
    .main-content {
        padding: 0.75rem;
    }

    .p-4 {
        padding: 0.75rem !important;
    }

    /* Compact Cards */
    .card-body {
        padding: 0.75rem;
    }

    .stats-card {
        padding: 0.75rem;
    }

    .stats-card h2 {
        font-size: 1.25rem;
    }

    /* Compact Tables */
    .table th,
    .table td {
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    /* Compact Navigation */
    .sidebar .nav-link {
        padding: 12px 15px;
        margin: 2px 5px;
        font-size: 0.9rem;
    }

    .sidebar .nav-link i {
        font-size: 1.1rem;
        margin-right: 12px;
        width: 20px;
    }

    /* Compact Logo */
    .sidebar-logo {
        max-width: 80px;
        max-height: 32px;
    }

    /* Compact Typography */
    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    /* Compact Buttons */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-height: 32px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}





/* Profile Dropdown Styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    color: #495057;
    transition: all 0.3s ease;
    font-weight: 500;
}



.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
}

.dropdown-header {
    padding: 1rem 1.25rem 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top-color: #e9ecef;
}

/* Profile Dropdown Hover Functionality */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}



/* Profile button enhancement */
.profile-btn {
    position: relative;
    overflow: hidden;
}

.profile-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}


