:root {
    --primary-color: #10b981;
    --secondary-color: #f0fdf4;
    --text-color: #334155;
    --border-color: #d1fae5;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding-top: 42px;
    font-size: 14px;
}
@media (max-width: 576px) {
  .search-wrapper { display: none !important; }
}

/* .navbar {
    background-color: white;
    box-shadow: var(--shadow);
    border: none;
    min-height: 42px;
}
.navbar-brand {
    color: var(--text-color) !important;
    font-weight: 600;
    font-size: 16px;
}
 */
.sidebar {
    width: 175px;
    background-color: white;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 42px);
    position: fixed;
    left: 0;
    top: 42px;
    padding-top: 1.4rem;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar .nav-link {
    color: var(--text-color);
    padding: 0.525rem 1.05rem;
    margin: 0.175rem 0.7rem;
    border-radius: 0.35rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.525rem;
    font-size: 14px;
}

.sidebar .nav-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.main-content {
    margin-left: 175px;
    padding: 1.4rem;
    min-height: calc(100vh - 42px);
    width: calc(100% - 175px);
}

.content-section {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card {
    background: white;
    border-radius: 0.525rem;
    padding: 1.05rem;
    box-shadow: var(--shadow);
    display: flex; /* Use flexbox for layout */
    justify-content: space-between; /* Space out content and icon */
    align-items: center; /* Vertically align items */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden; /* Hide overflowing circular background */
    position: relative; /* For absolute positioning of icon container */
}

.stat-card:hover {
    transform: translateY(-4px); /* Lift more on hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* More pronounced shadow on hover */
}

.stat-info {
    flex-grow: 1; /* Allows stat info to take available space */
    position: relative; /* Ensure text is above background circle */
    z-index: 2;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.225rem;
    font-weight: 600;
    color: var(--text-color); /* Ensure text color */
}

.stat-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.7rem;
}

.stat-icon-container {
    position: absolute; /* Position relative to .stat-card */
    top: -30px; /* Adjust to move up and right */
    right: -30px;
    width: 100px; /* Size of the circular background */
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; /* Icon size */
    z-index: 1; /* Behind the text content */
    opacity: 0.7; /* Slightly transparent */
}

.stat-icon-container i {
    position: relative;
    z-index: 3; /* Ensure icon is above its own background */
    font-size: 1.4rem; /* Icon size relative to container */
}

/* Color variations for stat cards */
.stat-card-green .stat-icon-container {
    background-color: #e7f6fd; /* Light green background */
}
.stat-card-green .stat-icon-container i {
    color: #22c5c5; /* Green icon color */
}

.stat-card-blue .stat-icon-container {
    background-color: #d1fae5; /* Light green background */
}
.stat-card-blue .stat-icon-container i {
    color: #10b948; /* Jade green icon color */
}

.stat-card-orange .stat-icon-container {
    background-color: #fff0e6; /* Light orange background */
}
.stat-card-orange .stat-icon-container i {
    color: #f97316; /* Orange icon color */
}

.stat-card-red .stat-icon-container {
    background-color: #fee2e2; /* Light red background */
}
.stat-card-red .stat-icon-container i {
    color: #ef4444; /* Red icon color */
}

.member-card-header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-input {
    position: absolute;
    left: -9999px;
}

.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.525rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.member-card, .provider-card {
    background: white;
    border-radius: 0.525rem;
    padding: 1.05rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.member-card:hover, .provider-card:hover {
    transform: translateY(-1.4px);
    box-shadow: var(--shadow-lg);
}

/* Flex item for scheme cards, ensuring min-width and responsiveness */
.scheme-card-item {
    flex: 1 1 300px; /* Allows the card to grow, shrinks down to 300px basis */
    max-width: 350px; /* Optional: caps the max width of a single card for aesthetic reasons */
    /* mb-4 from JS handles vertical spacing */
}

/* Containers for scheme cards */
#dashboard-schemes-container,
#schemes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* Spacing between cards (horizontal and vertical) */
    justify-content: flex-start; /* Aligns cards to the start, can use 'center' if preferred */
    padding: 0 0.5rem; /* Small padding to prevent cards from touching screen edges */
}

/* NEW Scheme Card Styling */
.scheme-card.new-style-card {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 150px; /* Ensure a consistent minimum height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes content to top and bottom */
}

.scheme-card.new-style-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.scheme-label {
    position: absolute; /* Take out of flow */
    top: 1.25rem; /* Position relative to card top */
    left: 1.25rem; /* Position relative to card left */
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.scheme-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 2.5rem; /* Add top margin to make space for the absolute positioned label */
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.scheme-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    flex-grow: 1; /* Allow description to take available vertical space */
}

.scheme-action-btn {
    all: unset; /* Remove all default button styles */
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
    padding: 0; /* Remove default button padding */
    background: none; /* Ensure no background */
    border: none; /* Ensure no border */
    text-align: left; /* Align text to left */
}

.scheme-action-btn:hover {
    opacity: 0.8;
}

.scheme-action-btn i {
    font-size: 1em;
    transition: transform 0.2s ease;
}

.scheme-action-btn:hover i {
    transform: translateX(3px);
}

.scheme-background-shape {
    position: absolute;
    bottom: -15%;
    right: -15%;
    width: 70%; /* Adjust size as needed */
    height: 70%;
    object-fit: contain;
    opacity: 0.5; /* Faded effect */
    z-index: 1;
    pointer-events: none; /* Ensure it doesn't block clicks */
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    padding: 0.35rem 0.525rem;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2.1px rgba(16, 185, 129, 0.1);
}

.btn {
    border-radius: 0.35rem;
    padding: 0.35rem 0.7rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #059669;
    border-color: #059669;
}

.search-wrapper {
    position: relative;
    width: 60%;
}

.search-wrapper .form-control {
    padding-right: 1.75rem;
    background-color: white;
    border: 1px solid var(--border-color);
}

.mobile-search-wrapper {
    position: relative;
    width: 100%;
}

.mobile-search-wrapper .form-control {
    padding-right: 1.75rem;
    background-color: white;
    border: 1px solid var(--border-color);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.mobile-search-wrapper .search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 0.7rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--secondary-color);
}

.search-icon {
    position: absolute;
    right: 0.525rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.mobile-search-wrapper .search-icon {
    position: absolute;
    right: 0.525rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.profile-icon {
    width: 33.6px;
    height: 33.6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--primary-color);
    background-color: transparent;
}

.profile-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-icon-list {
    width: 28px;
    height: 28px;
    background-color: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.member-list-item {
    background: white;
    border-radius: 0.525rem;
    padding: 0.7rem;
    margin-bottom: 0.7rem;
    margin-right: 0.7rem;
    margin-left: 0.7rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-list-item:hover {
    transform: translateY(-0.7px);
    box-shadow: var(--shadow-lg);
}

.member-info p {
    font-size: 0.7rem;
}

.btn-group .btn {
    padding: 0.2625rem 0.525rem;
}

/* Relation badges */
.badge-relation {
    font-size: 0.525rem;
    padding: 0.175rem 0.35rem;
    border-radius: 0.21rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-green {
    background-color: #10b981;
    color: #fff;
}

.badge-orange {
    background-color: #f97316;
    color: #fff;
}

.badge-yellow {
    background-color: #eab308;
    color: #fff;
}

/* New badge for search results */
.search-scheme-badge {
    font-size: 0.65em; /* Slightly smaller than parent text */
    vertical-align: middle;
    margin-left: 0.5rem;
    padding: 0.1em 0.4em;
    border-radius: 0.25rem;
    font-weight: 500;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #059669 100%);
}

/* Adjust upload-section styles since card was moved into dashboard */
.upload-section {
    display: none; /* Sidebar upload section no longer used */
}

.upload-card {
    background: linear-gradient(135deg, #10b981 0%, #065f46 100%);
    border-radius: 0.4rem;
    box-shadow: var(--shadow);
}

.upload-card-body {
   color: white;
}

.upload-card-body i {
    font-size: 1.5rem;
    display: block;
}

.upload-card-body p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
}

.upload-card .btn-light {
    border: none;
    color: var(--secondary-color);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.upload-card .btn-light:hover {
    background-color: white;
    
}

.family-member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* Enhanced Profile Card Styles */
.profile-card-modern {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.profile-header {
    position: relative;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.profile-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    background-size: 100px 100px;
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.profile-status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-member-id {
    font-size: 0.9rem;
    opacity: 0.9;
}

.relation-badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stats {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
}

.stat-item i {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.contact-info {
    padding: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.contact-item:hover {
    background-color: rgba(16, 185, 129, 0.05);
    border-radius: 0.5rem;
    margin: 0 -0.5rem;
    padding: 0.75rem 0.5rem;
}

.contact-item:last-child {
    border-bottom: none;
}

/* Enhanced Info Card Styles */
.info-card-modern,
.policy-card-modern,
.family-card-modern {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-card-modern:hover,
.policy-card-modern:hover,
.family-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.card-icon-container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-item,
.policy-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.info-item:hover,
.policy-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.info-icon,
.policy-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    background: rgba(16, 185, 129, 0.1);
}

.info-content,
.policy-content {
    text-align: center;
}

.info-content small,
.policy-content small {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.policy-status {
    background: rgba(16, 185, 129, 0.05);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

/* Enhanced Family Member Cards */
.family-member-card-modern {
    background: white;
    border-radius: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.family-member-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(16, 185, 129, 0.2);
}

.family-member-card-modern.current-member {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.member-card-content {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-avatar-section {
    position: relative;
    flex-shrink: 0;
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.member-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

.member-info-section {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.member-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-id {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    align-items: center;
}

.member-relation-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.current-viewing-indicator {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

/* Enhanced Member Card Styles */
.member-card-modern {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

.member-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(16, 185, 129, 0.2);
}

.member-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.member-avatar-grid {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.member-status-grid {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
}

.member-name-grid {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.member-id-grid {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.member-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.detail-item i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* Clean Member Card Design */
.member-card-clean {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 0.75rem;
}

.member-card-clean:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
    transform: translateY(-1px);
}

.member-card-header-clean {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.member-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.member-avatar-clean {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f9fafb;
}

.member-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-main {
    background-color: #10b981;
}

.status-spouse {
    background-color: #f59e0b;
}

.status-child {
    background-color: #3b82f6;
}

.member-info-main {
    flex: 1;
    min-width: 0;
}

.member-name-clean {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.member-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.member-id-clean {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.member-details-grid-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-group.email-group {
    grid-column: 1 / -1;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-label i {
    font-size: 0.875rem;
    opacity: 0.7;
}

.detail-value {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .profile-header {
        padding: 1.5rem 1rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .member-card-content {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .member-avatar {
        width: 50px;
        height: 50px;
    }

    .info-item,
    .policy-item {
        margin-bottom: 1rem;
    }

    .member-card-modern {
        padding: 1.25rem;
    }

    .member-card-clean {
        padding: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .member-card-header-clean {
        gap: 0.875rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .member-avatar-clean {
        width: 44px;
        height: 44px;
    }

    .member-name-clean {
        font-size: 1rem;
    }

    .member-details-grid-clean {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .detail-group.email-group {
        grid-column: 1;
    }

    .member-card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .member-details-grid {
        align-items: center;
    }
}

/* Enhanced About page styles */
.service-item {
    text-align: left;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color) !important;
}

.service-item:hover {
    transform: translateY(-3px);
    background: #d1fae5;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-item h6 {
    margin: 0;
    font-weight: 600;
    color: #334155;
}

.service-item p {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Sticky contact form */
.sticky-top {
    top: 1rem;
}

/* Enhanced contact form styling */
#contactForm .form-control:focus,
#contactForm .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#contactForm textarea {
    resize: vertical;
    min-height: 120px;
}

#contactForm .form-label {
    color: #374151;
    margin-bottom: 0.5rem;
}

/* File management styles */
.btn-group .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Modal enhancements */
.modal-content {
    border-radius: 0.75rem;
}

.modal-header.bg-success,
.modal-header.bg-danger {
    border-radius: 0.75rem 0.75rem 0 0;
}

.btn-close-white {
    filter: brightness(0) invert(1); /* Makes close button white */
}

.toast-container {
    /* Ensure default Bootstrap styling is sufficient */
    /* Example for top-right corner, adjust as needed */
    /* top: 0; */
    /* right: 0; */
    /* padding: 1rem; */
    /* z-index: 1050; */ /* Should be higher than modals if toasts appear over modals */
}

/* Custom styles for toast types (optional, Bootstrap handles basic coloring) */
.toast-header.bg-success {
    background-color: #28a745 !important; /* Bootstrap success green */
}

.toast-header.bg-danger {
    background-color: #dc3545 !important; /* Bootstrap danger red */
}

.toast-header.bg-warning {
    background-color: #ffc107 !important; /* Bootstrap warning yellow */
}

.toast-header.bg-primary {
    background-color: #10b981 !important; /* Jade green */
}

.toast-header.text-white {
    color: white !important;
}

.toast-header.text-dark {
    color: #212529 !important;
}

/* Ensure the close button is visible on colored headers */
.toast-header .btn-close-white {
    filter: brightness(0) invert(1); /* Makes close button white */
}

/* Pagination styles */
.pagination {
    background-color: var(--secondary-color);
    border-radius: 0.35rem;
    padding: 0.5rem;
    margin: 0;
}

.page-link {
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem !important;
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: #059669;
    background-color: #d1fae5;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.page-item.disabled .page-link {
    color: #64748b;
    background-color: transparent;
    border-color: var(--border-color);
}

/* Provider Specialty Card Styles */
.provider-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.provider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 1;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Inpatient Specialty Styles */
.provider-card.inpatient::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.provider-card.inpatient .card-title {
    color: #1e40af;
}

.provider-card.inpatient .specialty-badge {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.provider-card.inpatient .specialty-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

/* Outpatient Specialty Styles */
.provider-card.outpatient::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.provider-card.outpatient .card-title {
    color: #065f46;
}

.provider-card.outpatient .specialty-badge {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.provider-card.outpatient .specialty-icon {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

/* Dental Specialty Styles */
.provider-card.dental::before {
    background: linear-gradient(90deg, #14b8a6, #0f766e);
}

.provider-card.dental .card-title {
    color: #0f766e;
}

.provider-card.dental .specialty-badge {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: #0f766e;
    border: 1px solid #5eead4;
}

.provider-card.dental .specialty-icon {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: #0f766e;
}

/* Optical Specialty Styles */
.provider-card.optical::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.provider-card.optical .card-title {
    color: #6d28d9;
}

.provider-card.optical .specialty-badge {
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    color: #6d28d9;
    border: 1px solid #c084fc;
}

.provider-card.optical .specialty-icon {
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    color: #6d28d9;
}

/* Maternity Specialty Styles */
.provider-card.maternity::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.provider-card.maternity .card-title {
    color: #be185d;
}

.provider-card.maternity .specialty-badge {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
    border: 1px solid #f9a8d4;
}

.provider-card.maternity .specialty-icon {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
}

/* Pharmacy Specialty Styles */
.provider-card.pharmacy::before {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.provider-card.pharmacy .card-title {
    color: #c2410c;
}

.provider-card.pharmacy .specialty-badge {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    color: #c2410c;
    border: 1px solid #fb923c;
}

.provider-card.pharmacy .specialty-icon {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    color: #c2410c;
}

/* Default/Other Specialty Styles */
.provider-card.default::before {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

.provider-card.default .card-title {
    color: #374151;
}

.provider-card.default .specialty-badge {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    border: 1px solid #d1d5db;
}

.provider-card.default .specialty-icon {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
}

/* Specialty Badge and Icon Styles */
.specialty-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.specialty-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Provider Background Icons */
.provider-background-icon {
    position: absolute;
    bottom: -5%;
    right: -5%;
    width: 120px;
    height: 120px;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.provider-card.inpatient .provider-background-icon {
    color: #3b82f6;
}

.provider-card.outpatient .provider-background-icon {
    color: #10b981;
}

.provider-card.dental .provider-background-icon {
    color: #14b8a6;
}

.provider-card.optical .provider-background-icon {
    color: #8b5cf6;
}

.provider-card.maternity .provider-background-icon {
    color: #ec4899;
}

.provider-card.pharmacy .provider-background-icon {
    color: #f97316;
}

.provider-card.default .provider-background-icon {
    color: #6b7280;
}

/* New: Tab styles specific to our app */
.nav-tabs {
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.nav-tabs .nav-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Scheme filter dropdown styling */
#schemeFilter {
    border: none !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--primary-color) !important;
    font-weight: 500;
}

#schemeFilter:focus {
    border: none !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--primary-color) !important;
}

#schemeFilter option {
    background-color: white !important;
    color: var(--text-color) !important;
}

@media (max-width: 992px) {
    .sidebar {
        width: 175px;
        position: fixed;
        left: 0;
        top: 42px;
        z-index: 1050;
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    /* .navbar .container-fluid {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .navbar .d-flex {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper,
    .file-upload-wrapper {
        width: 100%;
    }

    .search-wrapper {
        order: 1;
    }

    .file-upload-wrapper {
        order: 2;
        margin-top: 0.35rem;
    }
 */
    .stat-card {
        margin-bottom: 0.7rem;
    }

    .btn-group.position-fixed {
        position: static !important;
        margin-top: 0.7rem;
    }

    .member-card {
        min-width: auto;
        width: 100%;
    }

    /* Adjust scheme card layout for mobile */
    #dashboard-schemes-container,
    #schemes-container {
        gap: 0.75rem; /* Reduce gap on smaller screens */
        padding: 0 0.25rem; /* Reduce padding on smaller screens */
        justify-content: center; /* Center cards if only one is on a row */
    }

    .scheme-card-item {
        flex: 1 1 100%; /* Make cards take full width on mobile */
        max-width: 100%; /* Ensure no max-width limits them */
        padding: 0 0.25rem; /* Add horizontal padding to the item itself to prevent sticking to edges */
    }
    .scheme-card.new-style-card {
        padding: 0.75rem; /* Slightly reduce overall card padding */
    }

    .main-content {
        padding: 0.7rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        padding: 0.7rem;
    }

    .sidebar .nav-link {
        margin: 0.175rem 0;
        padding: 0.35rem 0.7rem;
    }

    .main-content {
        padding: 0.35rem;
    }

    .row {
        margin-right: -0.35rem;
        margin-left: -0.35rem;
    }

    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-lg-4,
    .col-lg-6,
    .col-xl-4 {
        padding-right: 0.35rem;
        padding-left: 0.35rem;
    }

    .member-card {
        padding: 0.7rem;
    }

    .scheme-card.new-style-card {
        padding: 0.7rem; /* Re-adjust padding for smaller screens if needed */
    }

    .btn-group.position-fixed {
        width: 100%;
        right: auto !important;
        top: auto !important;
    }

    .btn-group .btn {
        flex: 1;
    }

    .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }
}

h2 { font-size: 1.4rem; }
h4 { font-size: 1.05rem; }

.w-lg-50 {
    width: 50% !important;
}

.w-md-75 {
    width: 75% !important;
}

.w-100 {
    width: 100% !important;
}

@media (min-width: 992px) {
    .w-lg-50 {
        width: 50% !important;
    }
}

@media (max-width: 991px) {
    .w-md-75 {
        width: 75% !important;
    }
}

@media (max-width: 767px) {
    .w-100 {
        width: 100% !important;
    }
}