/* Custom CSS for BeFree */

/* Logo Styling */
.logo-img {
    object-fit: contain;
    border-radius: 4px;
}

.navbar-brand img {
    transition: transform 0.2s ease;
}

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

/* Root Variables - BeFree.fit Color Scheme */
:root {
    /* BeFree.fit Brand Colors - Matching main website */
    --primary-color: #AC99CC;        /* Blue Bell - Soft Blue */
    --secondary-color: #FEFBE0;      /* Light Yellow */
    --accent-color: #F0A59A;         /* Light Salmon Pink */
    --light-pink: #F0A59A;          /* Light Salmon Pink */
    --light-pink-alt: #F0A59A;       /* Light Salmon Pink Alt */
    
    /* Semantic Colors */
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #F0A59A;           /* Light Salmon Pink for info */
    
    /* Neutral Colors */
    --light-color: #f8f9fa;
    --dark-color: #4a6b7a;           /* Softer Dark Blue for text */
    --muted-color: #6c757d;
    
    /* UI Elements */
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(74, 107, 122, 0.15);
    --box-shadow-lg: 0 1rem 3rem rgba(74, 107, 122, 0.25);
    --gradient-primary: linear-gradient(135deg, #AC99CC 0%, #F0A59A 100%);
    --gradient-secondary: linear-gradient(135deg, #FEFBE0 0%, #F0A59A 100%);
    
    /* Background Patterns - Matching befree.fit brand */
    --bg-pattern-primary: radial-gradient(circle at 20% 80%, rgba(172, 153, 204, 0.06) 0%, transparent 50%);
    --bg-pattern-secondary: radial-gradient(circle at 80% 20%, rgba(254, 251, 224, 0.08) 0%, transparent 50%);
    --bg-pattern-accent: radial-gradient(circle at 40% 40%, rgba(240, 165, 154, 0.04) 0%, transparent 50%);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f1f3f4 100%);
    background-image: 
        var(--bg-pattern-primary),
        var(--bg-pattern-secondary),
        var(--bg-pattern-accent);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure scrolling is always enabled */
html {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Fix for modal-open class preventing scrolling */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* Login Page Styles */
.login-page {
    background: var(--gradient-primary);
    min-height: 100vh;
}

.login-page .login-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    max-width: 400px;
    width: 100%;
}

/* Signup Page Styles */
.signup-page {
    background: var(--gradient-primary);
    min-height: 100vh;
}

.signup-page .signup-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    max-width: 500px;
    width: 100%;
}

/* Home Page Styles */
.home-page {
    background: linear-gradient(135deg, #FEFBE0 0%, #f8f9fa 30%, #F0A59A 70%, #AC99CC 100%);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(172, 153, 204, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(240, 165, 154, 0.03) 0%, transparent 50%);
    min-height: 100vh;
}

.home-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.home-page .card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}

/* Account Page Styles */
.account-page {
    background: linear-gradient(135deg, #FEFBE0 0%, #f8f9fa 25%, #AC99CC 75%, #F0A59A 100%);
    background-image: 
        radial-gradient(circle at 30% 20%, rgba(172, 153, 204, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(240, 165, 154, 0.02) 0%, transparent 50%);
    min-height: 100vh;
}

.account-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

/* History Page Styles */
.history-page {
    background: linear-gradient(135deg, #FEFBE0 0%, #f8f9fa 20%, #F0A59A 60%, #AC99CC 100%);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(240, 165, 154, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(172, 153, 204, 0.02) 0%, transparent 50%);
    min-height: 100vh;
}

.history-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Navigation Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: white !important;
    font-weight: 600;
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(88, 152, 168, 0.25);
}

.input-group-text {
    background-color: var(--light-color);
    border: 1px solid #ced4da;
    color: var(--primary-color);
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9B8BB8 0%, #E0958A 100%);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-lg);
}

/* Make submit buttons lighter/more active when form is valid */
button[type="submit"].btn-primary.form-valid,
form:valid button[type="submit"].btn-primary {
    background: linear-gradient(135deg, #C4B5DD 0%, #F5B8AE 100%);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(172, 153, 204, 0.4);
    transform: translateY(-1px);
}

button[type="submit"].btn-primary.form-valid:hover,
form:valid button[type="submit"].btn-primary:hover {
    background: linear-gradient(135deg, #B8A6D1 0%, #F0A59A 100%);
    box-shadow: 0 6px 16px rgba(172, 153, 204, 0.5);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Password toggle button styling - ensure icon is visible */
button.btn-outline-secondary[id*="togglePassword"],
button.btn-outline-secondary[id*="toggleConfirmPassword"],
button.btn-outline-secondary[id*="toggleCurrentPassword"],
button.btn-outline-secondary[id*="toggleNewPassword"],
button.btn-outline-secondary[id*="toggleConfirmNewPassword"] {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
}

button.btn-outline-secondary[id*="togglePassword"] i,
button.btn-outline-secondary[id*="toggleConfirmPassword"] i,
button.btn-outline-secondary[id*="toggleCurrentPassword"] i,
button.btn-outline-secondary[id*="toggleNewPassword"] i,
button.btn-outline-secondary[id*="toggleConfirmNewPassword"] i {
    font-size: 1rem;
    color: #6c757d;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

button.btn-outline-secondary[id*="togglePassword"]:hover i,
button.btn-outline-secondary[id*="toggleConfirmPassword"]:hover i,
button.btn-outline-secondary[id*="toggleCurrentPassword"]:hover i,
button.btn-outline-secondary[id*="toggleNewPassword"]:hover i,
button.btn-outline-secondary[id*="toggleConfirmNewPassword"]:hover i {
    color: #495057;
}

button.btn-outline-secondary[id*="togglePassword"]:focus,
button.btn-outline-secondary[id*="toggleConfirmPassword"]:focus,
button.btn-outline-secondary[id*="toggleCurrentPassword"]:focus,
button.btn-outline-secondary[id*="toggleNewPassword"]:focus,
button.btn-outline-secondary[id*="toggleConfirmNewPassword"]:focus {
    box-shadow: none;
    border-color: #ced4da;
    z-index: 3;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Hero Section Styles */
.hero-content {
    padding: 2rem;
}

.hero-content i {
    opacity: 0.9;
}

/* Search Interface Styles */
#productInput {
    font-size: 1.1rem;
    padding: 1rem;
}

#productInput::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Results Section Styles */
#resultsSection {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* History Item Styles */
.history-item {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background-color: #f8f9fa;
}

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

/* Product Card Styles */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

/* Statistics Cards */
.stats-card {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container,
    .signup-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group .btn {
        padding: 0.375rem 0.75rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* BeFree.fit Specific Styles */
.bg-befree-primary {
    background: var(--gradient-primary) !important;
}

.bg-befree-secondary {
    background: var(--gradient-secondary) !important;
}

.text-befree-primary {
    color: var(--primary-color) !important;
}

.text-befree-secondary {
    color: var(--secondary-color) !important;
}

.border-befree {
    border-color: var(--primary-color) !important;
}

/* BeFree.fit Card Headers */
.card-header.bg-primary {
    background: var(--gradient-primary) !important;
    border-bottom: none;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
    color: #212529 !important;
    border-bottom: none;
}

.card-header.bg-info {
    background: linear-gradient(135deg, var(--accent-color) 0%, #F0A59A 100%) !important;
    border-bottom: none;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%) !important;
    border-bottom: none;
}

/* BeFree.fit Hero Section */
.hero-content {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content i {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shadow-soft {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.border-soft {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #343a40;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: #212529;
        color: var(--dark-color);
    }
    
    .card {
        background-color: #343a40;
        color: var(--dark-color);
    }
    
    .navbar-dark {
        background-color: #212529 !important;
    }
}

/* Health Profile Styles */
/* Ensure Health Profile title is black */
.card-header.bg-gradient h5.text-black,
.card-header.bg-gradient h5.text-black i {
    color: #000000 !important;
}

/* Force black text for Health Profile Status badge when it's "Not Set" or has text-black class */
#healthProfileStatus.text-black,
.text-white #healthProfileStatus.text-black,
h5.text-white #healthProfileStatus.text-black,
.card-header.text-white #healthProfileStatus.text-black,
.bg-gradient #healthProfileStatus.text-black,
#healthProfileStatus.bg-warning,
.text-white #healthProfileStatus.bg-warning,
h5.text-white #healthProfileStatus.bg-warning,
.card-header.text-white #healthProfileStatus.bg-warning,
.bg-gradient #healthProfileStatus.bg-warning {
    color: #000000 !important;
}
.health-profile-card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.health-tab-content {
    min-height: 500px;
}

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

.condition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.allergy-item, .medication-item, .supplement-item, .injury-item {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.allergy-item:hover, .medication-item:hover, .supplement-item:hover, .injury-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.health-profile-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

/* Health status badges */
.health-status-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Form enhancements */
.form-control:focus, .form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.health-section-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 15px 20px;
    margin-bottom: 0;
}

/* Account page specific styles */
.account-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Print Styles */
@media print {
    .navbar,
    .breadcrumb,
    .btn,
    .modal {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Navigation text colors */
.navbar-nav .nav-link {
    color: #FF6B6B !important; /* Coral Red */
}

.navbar-nav .nav-link:hover {
    color: #FF8E8E !important; /* Lighter Coral Red */
}

.navbar-nav .nav-link.active {
    color: #4ECDC4 !important; /* Teal */
}

/* My Account dropdown text color */
.dropdown-item {
    color: #2C3E50 !important; /* Dark Blue-Gray */
}

.dropdown-item:hover {
    color: #34495E !important; /* Slightly Lighter Blue-Gray */
    background-color: #ECF0F1 !important; /* Light Gray */
}

.dropdown-item.active {
    color: #E74C3C !important; /* Red */
    background-color: #FADBD8 !important; /* Light Red Background */
}

/* Account page header text color */
.account-page .display-5 {
    color: white !important;
}

.account-page .lead {
    color: white !important;
}

/* Mobile Webapp Styles */
.webapp-mobile {
    padding-top: 0;
    padding-bottom: 20px;
    overflow-x: hidden;
}

.webapp-mobile body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 56px;
    display: flex !important;
    align-items: center;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-app-header > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.mobile-app-header .btn-link {
    color: #fff !important;
    text-decoration: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.mobile-app-header .btn-link:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.mobile-app-header .dropdown {
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
}

.mobile-app-header .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    margin-top: 0.5rem;
}

.mobile-content-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 20px;
    width: 100%;
}

/* Account page title - responsive */
.account-page .account-page-title {
    font-size: 1.75rem;
}

/* Mobile Webapp Optimizations */
.webapp-mobile .card {
    border-radius: 12px;
    margin-bottom: 1rem;
}

.webapp-mobile .card-header {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
}

.webapp-mobile .card-header h5 {
    font-size: 1rem;
    font-weight: 600;
}

.webapp-mobile .card-body {
    padding: 1rem !important;
}

.webapp-mobile .form-control,
.webapp-mobile .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
    min-height: 44px; /* Touch target size */
}

.webapp-mobile .btn {
    min-height: 44px; /* Touch target size */
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

.webapp-mobile .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.webapp-mobile .input-group-text {
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments for health profile and account page */
@media (max-width: 768px) {
    /* Account Page Mobile Styles */
    .account-page .container {
        padding-left: 0;
        padding-right: 0;
    }
    
    .account-page .card {
        margin-bottom: 1rem;
    }
    
    .account-page .card-body {
        padding: 1rem !important;
    }
    
    .account-page .card-header {
        padding: 0.75rem 1rem;
    }
    
    .account-page .card-header h5 {
        font-size: 0.95rem;
    }
    
    /* Health Profile Mobile Styles */
    .health-tab-content {
        padding: 15px;
    }
    
    .condition-card {
        margin-bottom: 15px;
    }
    
    .health-profile-actions .btn,
    .health-profile-actions-mobile .btn {
        margin-bottom: 10px;
        width: 100%;
    }
    
    /* Accordion Styles */
    #healthProfileAccordion {
        --bs-accordion-border-width: 0;
        --bs-accordion-border-radius: 0;
    }
    
    #healthProfileAccordion .accordion-item {
        border: 1px solid #e9ecef;
        border-radius: 8px;
        margin-bottom: 0.75rem;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    #healthProfileAccordion .accordion-button {
        background-color: #f8f9fa;
        border: none;
        padding: 1rem 1.25rem;
        font-weight: 600;
        font-size: 1rem;
        color: var(--dark-color);
        min-height: 56px;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
    }
    
    #healthProfileAccordion .accordion-button:hover {
        background-color: #e9ecef;
    }
    
    #healthProfileAccordion .accordion-button:not(.collapsed) {
        background-color: var(--primary-color);
        color: #fff;
        box-shadow: none;
    }
    
    #healthProfileAccordion .accordion-button:focus {
        box-shadow: none;
        border-color: transparent;
    }
    
    #healthProfileAccordion .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        width: 1.25rem;
        height: 1.25rem;
        transition: transform 0.3s ease;
    }
    
    #healthProfileAccordion .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(180deg);
    }
    
    #healthProfileAccordion .accordion-body {
        padding: 1rem;
    }
    
    @media (min-width: 768px) {
        #healthProfileAccordion .accordion-body .row > .col-12 {
            flex: 0 0 auto;
            width: 50%;
        }
    }
    
    /* Form Inputs Mobile */
    .account-page .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .account-page .form-control,
    .account-page .form-select {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .account-page .input-group-text {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Buttons Mobile */
    .account-page .btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .account-page .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    /* Cards and Sections */
    .account-page .card {
        border-radius: 0.5rem;
    }
    
    .account-page .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .account-page .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Spacing adjustments */
    .account-page .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .account-page .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .account-page .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    /* Badge adjustments */
    .account-page .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Breadcrumb mobile */
    .account-page .breadcrumb {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }
    
    /* Page header mobile */
    .account-page .account-page-title {
        font-size: 1.5rem !important;
    }
    
    .account-page .lead {
        font-size: 0.9rem;
    }
    
    /* Statistics mobile */
    .webapp-mobile .border.rounded {
        padding: 0.75rem !important;
    }
    
    .webapp-mobile .border.rounded h5 {
        font-size: 1.25rem;
    }
    
    .webapp-mobile .border.rounded h6 {
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .account-page .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .account-page .card-body {
        padding: 0.75rem !important;
    }
    
    .account-page .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .account-page .nav-link i {
        display: none;
    }
    
    .account-page .account-page-title {
        font-size: 1.5rem !important;
    }
    
    .account-page .btn-lg {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}

/* Terms and Conditions Modal Styling */
#termsModal .modal-body,
#privacyModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.5rem;
}

#termsModal .modal-body iframe,
#privacyModal .modal-body iframe {
    min-height: 500px;
}

#termsModal .modal-body .alert,
#privacyModal .modal-body .alert {
    margin-bottom: 0;
}

#termsModal .modal-body h4,
#termsModal .modal-body h5,
#termsModal .modal-body h6 {
    color: var(--primary-color);
    font-weight: 600;
}

#termsModal .modal-body p {
    line-height: 1.7;
    color: var(--dark-color);
}

#termsModal .modal-body ul,
#termsModal .modal-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#termsModal .modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#termsModal .modal-body strong {
    color: var(--dark-color);
    font-weight: 600;
}

#termsModal .terms-text {
    white-space: pre-wrap;
    line-height: 1.8;
}

#termsModal .alert {
    border-radius: var(--border-radius);
}
