/* PAF Youth Centre Log Book - Professional Styles */

/* ===== CRITICAL COLOR OVERRIDES ===== */
.card-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    background-color: #7c3aed !important;
    color: white !important;
    border: none !important;
}

.table thead th {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    background-color: #7c3aed !important;
    color: white !important;
    border: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    background-color: #7c3aed !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
    background-color: #6d28d9 !important;
    color: white !important;
}

.navbar {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    background-color: #7c3aed !important;
}

.modal-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    background-color: #7c3aed !important;
    color: white !important;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
    overflow-x: hidden;
}

.container-fluid {
    padding: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

/* Navbar Brand */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Background Color for Purple */
.bg-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: white !important;
}

.bg-purple .navbar-brand,
.bg-purple .nav-link,
.bg-purple .form-control {
    color: white !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.2);
}

.card-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600;
    padding: 1.25rem;
}

.card-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    padding: 0.6rem 1.5rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:active,
.btn-primary:focus {
    background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%) !important;
    color: white !important;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    color: #7c3aed !important;
    border: 2px solid #7c3aed !important;
}

.btn-outline-primary:hover {
    background: #7c3aed !important;
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.2);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.3);
}

.dashboard-card.admin {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.dashboard-card.supervisor {
    background: linear-gradient(135deg, #0891b2 0%, #0369a1 100%);
}

.dashboard-card.student {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.dashboard-card .card-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-card .card-text {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.form-check-input:checked {
    background-color: #7c3aed;
    border-color: #7c3aed;
}

.form-check-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Table Styles */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f3f4f6;
    color: #2c3e50;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table .badge {
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Status Badges */
.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.badge-approved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-rejected {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.badge-pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-draft {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: white;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #78350f;
}

.alert-info {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    color: #164e63;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.2);
    padding: 1rem 0;
}

.navbar.navbar-dark {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

.navbar.bg-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
}

.navbar-brand:hover {
    color: #a78bfa !important;
}

.navbar-nav .nav-link {
    font-weight: 600;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
}

/* List Group */
.list-group-item {
    border: 1px solid #e5e7eb;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #f9fafb;
    border-color: #7c3aed;
}

.list-group-item.list-group-item-light {
    background-color: #f3f0ff;
}

.list-group-item.border-start {
    border-left: 4px solid #7c3aed !important;
    padding-left: 1.5rem;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 4px;
    border: 2px solid #e5e7eb;
    color: #7c3aed;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination .page-link:hover {
    background: #7c3aed;
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: #7c3aed;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: white !important;
    border-radius: 15px 15px 0 0;
    border: none !important;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem;
}

/* Notification Styles */
.notification-item {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.notification-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15);
}

.notification-item.unread {
    border-left-color: #7c3aed;
    background-color: #f3f0ff;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 8px;
    background: #e5e7eb;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

/* Statistics Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.2);
}

.stats-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #7c3aed;
    opacity: 0.8;
}

.stats-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #7c3aed;
    margin-bottom: 0.5rem;
}

.stats-card .label {
    font-size: 1.05rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item.active {
    color: #7c3aed;
    font-weight: 600;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-item:hover {
    background-color: #f3f0ff;
    color: #7c3aed;
}

.dropdown-divider {
    border-color: #e5e7eb;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .navbar {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .dashboard-card .card-title {
        font-size: 2rem;
    }

    .stats-card {
        padding: 1.5rem;
    }

    .stats-card .icon {
        font-size: 2.5rem;
    }

    .stats-card .number {
        font-size: 2rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* CRITICAL: Force Purple Navbar Override */
.navbar {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    background-color: #7c3aed !important;
}

.navbar,
.navbar.navbar-dark,
.navbar.navbar-light,
nav.navbar {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

/* Focus states for keyboard navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Responsive utility classes */
.mobile-only {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-hidden {
        display: none !important;
    }

    /* Better button group stacking on mobile */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        border-radius: 0.25rem !important;
        margin-bottom: 0.25rem;
    }

    /* Action column improvements */
    td .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }

    td .btn:last-child {
        margin-bottom: 0;
    }

    /* Stack form buttons vertically */
    .form-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Improve dropdown menus on mobile */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 0.5rem;
    }
}


/* Responsive table wrapper */
.table-responsive-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive image */
img {
    max-width: 100%;
    height: auto;
}

/* Flexible video embeds */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== ENHANCED RESPONSIVE DESIGN ===== */

/* Mobile First - Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }

    .container-fluid {
        padding: 0.5rem;
    }

    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.1rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header h5, .card-header h4, .card-header h3 {
        font-size: 1rem;
    }

    /* Dashboard stat cards */
    .card.text-center {
        margin-bottom: 1rem;
    }

    .card.text-center .card-title {
        font-size: 1.5rem;
    }

    .card.text-center .fa-2x {
        font-size: 1.5em;
    }

    /* Tables - make scrollable */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.75rem;
        min-width: 600px;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }

    /* Buttons */
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Forms */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    /* Charts */
    canvas {
        max-width: 100%;
        height: auto !important;
    }

    /* Quick Actions Grid */
    .col-md-3 {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Hide long text, show ellipsis */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }

    /* Stack columns */
    .row > [class*='col-'] {
        margin-bottom: 1rem;
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Badge sizing */
    .badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
    }

    /* Alert */
    .alert {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* Page titles */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Navbar collapse improvements */
    .navbar-collapse {
        background: rgba(124, 58, 237, 0.95);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container-fluid {
        padding: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .btn-lg {
        font-size: 1rem;
    }

    /* Adjust grid for tablets */
    .col-sm-6 {
        width: 50%;
        float: left;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container-fluid {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .table {
        font-size: 0.9rem;
    }

    /* Grid adjustments */
    .col-md-4,
    .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1600px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }

    .table {
        font-size: 10pt;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .navbar {
        padding: 0.25rem 1rem;
    }

    .container-fluid {
        padding: 0.5rem;
    }

    .card {
        margin-bottom: 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== PROFILE PICTURE STYLES ===== */

/* Profile picture in navbar */
.navbar .nav-link img.rounded-circle,
.navbar .nav-link .rounded-circle {
    transition: transform 0.3s ease;
}

.navbar .nav-link:hover img.rounded-circle {
    transform: scale(1.1);
}

/* Dropdown menu header with profile */
.dropdown-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(109, 40, 217, 0.1) 100%);
    border-bottom: 2px solid #7c3aed;
}

.dropdown-menu {
    min-width: 250px;
}

/* Profile picture container */
#profilePreview {
    border: 3px solid #7c3aed;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#profilePreview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

/* Profile picture upload input styling */
input[type="file"]#profile_picture {
    border: 2px dashed #7c3aed;
    padding: 10px;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.05);
    transition: all 0.3s ease;
}

input[type="file"]#profile_picture:hover {
    border-color: #6d28d9;
    background: rgba(124, 58, 237, 0.1);
}

input[type="file"]#profile_picture:focus {
    outline: none;
    border-color: #5b21b6;
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
}

/* Profile page responsive adjustments */
@media (max-width: 767.98px) {
    #profilePreview {
        max-width: 120px !important;
        width: 120px;
        height: 120px;
    }
    
    #profilePreview i {
        font-size: 3rem !important;
    }
    
    /* Hide profile picture text on mobile, show only image */
    .navbar .nav-link span {
        display: none;
    }
    
    .navbar .nav-link img.rounded-circle,
    .navbar .nav-link .rounded-circle {
        margin-right: 0 !important;
    }
}

/* ===== NOTIFICATION BADGES ===== */

/* Notification badge on buttons */
.btn .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Red dot notification indicator */
.notification-dot {
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
    border: 2px solid white;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
