/* Hide Default Odoo Dashboard */
.o_portal_wrap .o_portal_sidebar,
.o_portal_wrap .breadcrumb,
.o_portal_wrap .o_portal_navbar,
.o_portal_default_dashboard {
    display: none !important;
}

/* Portal Dashboard Styles */
.portal-section {
display: none ;
    margin-bottom: 30px;
    scroll-margin-top: 20px; /* Offset for smooth scrolling */
}

.portal-section.active {
    display: block;
}
.portal-menu .nav-link.active {
    background-color: #FF5A68;
    color: white;
    font-weight: 500;
}
.portal-section:target {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: rgba(255, 90, 104, 0.1); }
    100% { background-color: transparent; }
}

.portal-dashboard-container {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Reset Portal Layout */
.o_portal_wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #FF5A68;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #e54a57;
}

.mobile-menu-toggle i {
    font-size: 1.2rem;
}

/* Sidebar Styles */
.portal-sidebar {
    position: relative;
    transition: all 0.3s ease;
    max-height: 321px;
}

.portal-menu-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.portal-menu-card .card-header {
    background: #FF5A68;
    color: white;
    border: none;
    padding: 15px;
}

.portal-menu-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.portal-menu-card .card-body {
    padding: 0;
}

.portal-menu {
    padding: 10px 0;
}

.portal-menu .nav-link {
    color: #495057;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 0;
    margin-bottom: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.portal-menu .nav-link:hover {
    background-color: #f8f9fa;
    color: #FF5A68;
}

.portal-menu .nav-link.active {
    background-color: #FF5A68;
    color: white;
    font-weight: 500;
}

.portal-menu .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Main Content */
.portal-main-content {
    padding-left: 20px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    background: #FF5A68;
    color: white;
    border: none;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h4, .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.card-header .btn {
    padding: 5px 12px;
    font-size: 0.9rem;
}

.card-header .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
    background: transparent;
}

.card-header .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

.card-body {
    padding: 20px;
}

/* Profile Section Styles */
.profile-read-view .form-control-plaintext {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 0;
    min-height: auto;
    border-bottom: 2px solid #e9ecef !important;
    font-size: 1rem;
}

.profile-read-view .form-label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.profile-read-view .portal-avatar-container {
    position: relative;
}

.profile-read-view .portal-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #FF5A68;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Profile Edit View */
.profile-edit-view {
    transition: opacity 0.3s ease;
}

.profile-edit-view .portal-avatar-container {
    position: relative;
}

.profile-edit-view .portal-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #FF5A68;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-edit-view .form-control {
    border: 2px solid #e9ecef;
    border-radius: 5px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.profile-edit-view .form-control:focus {
    border-color: #FF5A68;
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 104, 0.25);
}

.profile-edit-view .form-select {
    border: 2px solid #e9ecef;
    border-radius: 5px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.profile-edit-view .form-select:focus {
    border-color: #FF5A68;
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 104, 0.25);
}

/* Form validation styles */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Button animations */
.btn {
    transition: all 0.3s ease;
    border-radius: 5px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #FF5A68;
    border: none;
    box-shadow: 0 4px 8px rgba(255, 90, 104, 0.3);
}

.btn-primary:hover {
    background: #e54a57;
    box-shadow: 0 6px 12px rgba(255, 90, 104, 0.4);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.4);
}

.btn-outline-primary {
    border: 2px solid #FF5A68;
    color: #FF5A68;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #FF5A68;
    color: white;
    border-color: #FF5A68;
}

/* Avatar upload section */
.profile-edit-view .portal-avatar-container input[type="file"] {
    margin-top: 1rem;
}

.profile-edit-view .portal-avatar-container small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.alert-danger {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
}

.alert-danger ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn .fa-spinner {
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table styles */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Social share buttons */
.social-share-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.btn-facebook {
    background-color: #3b5998;
    color: white;
}

.btn-twitter {
    background-color: #1da1f2;
    color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.btn-linkedin {
    background-color: #0077b5;
    color: white;
}

/* Reward levels */
.reward-level {
    padding: 10px 0;
    color: #6c757d;
    transition: all 0.3s ease;
}

.reward-level.active {
    color: #FF5A68;
    font-weight: bold;
}

/* News items */
.news-item {
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.news-title {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.news-content {
    color: #555;
    line-height: 1.6;
}

.news-image {
    max-width: 100%;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Referral section */
.portal-referral-card {
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.portal-rewards-card {
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.reward-progress {
    margin-bottom: 20px;
}

.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    background: #FF5A68;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .portal-main-content {
        padding-left: 15px;
    }
}

@media (max-width: 768px) {
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }

    /* Sidebar adjustments */
    .portal-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }

    .portal-sidebar.active {
        left: 0;
    }

    /* Main content adjustments */
    .portal-main-content {
        padding-left: 0;
        margin-top: 60px; /* Space for mobile menu toggle */
    }

    /* Profile section adjustments */
    .profile-read-view .col-md-3,
    .profile-edit-view .col-md-3 {
        margin-bottom: 2rem;
    }

    .profile-read-view .portal-avatar,
    .profile-edit-view .portal-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-edit-view .text-end {
        text-align: center !important;
    }

    .profile-edit-view .text-end .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Card adjustments */
    .card-body {
        padding: 15px;
    }

    .card-header {
        padding: 12px 15px;
    }

    .card-header h4, .card-header h5 {
        font-size: 1.1rem;
    }

    /* Table adjustments */
    .table-responsive {
        border: none;
    }

    /* Form adjustments */
    .form-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    /* Further adjustments for very small screens */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header .btn {
        margin-top: 10px;
        width: 10%;
    }

    .social-share-buttons .btn {
        width: 100%;
        margin-right: 0;
    }
}

        /* Additional styles for the modern dashboard */
        .icon-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .table td, .table th {
            vertical-align: middle;
        }

        .badge {
            font-weight: 500;
            padding: 0.35em 0.65em;
        }

        .card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }

        .table-active {
            background-color: rgba(255, 90, 104, 0.1);
        }

        .btn-group .btn-outline-light {
            border-color: rgba(255,255,255,0.3);
        }

        .btn-group .btn-outline-light:hover {
            background-color: rgba(255,255,255,0.2);
        }

        .btn-group .btn-outline-light.active {
            background-color: rgba(255,255,255,0.3);
        }
