/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #136FD9;
    --primary-dark: #0d5aa8;
    --secondary-color: #4A90E2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: "Nunito Sans", Sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

/* All headings and subheadings use Nunito Sans */
h1, h2, h3, h4, h5, h6,
.cta-subheading,
.brand-tagline,
.page-header h1,
.page-header h2,
.recent-order-section h2,
.care-team-section h2,
.billing-section h2,
.shipping-section h2,
.refill-reminders-section h2,
.refill-offerings-section h2,
.profile-info h2,
.form-section h3,
.address-header h3,
.address-form-card h3,
.refill-reminder-header h3,
.refill-offering-card h3,
.care-team-card h3,
.billing-header h3,
.empty-state-card h3 {
    font-family: "Nunito Sans", Sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navbar */
.navbar {
    background: white;
    color: var(--text-color);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 0 20px;
}

.nav-brand {
    flex-shrink: 0;
}

.nav-brand a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 120px;
    width: auto;
    max-width: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}

.nav-link-btn {
    background: white;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.nav-link-btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.nav-link-btn.active {
    background: var(--primary-color);
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nav-user-dropdown {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-nav-action {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-nav-action:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(19, 111, 217, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
    padding-bottom: 20rem; /* Extra space for footer CTA banner with negative margin */
}

/* Page spacing after header */
.dashboard-page,
.orders-page,
.order-detail-page,
.prescriptions-page,
.prescription-detail-page,
.messages-page,
.message-detail-page,
.messaging-portal-page,
.manage-account-page,
.deliveries-page,
.delivery-detail-page,
.billing-page,
.profile-page,
.shipping-page,
.refills-page {
    padding-top: 2rem;
    padding-bottom: 20rem; /* Extra space for footer CTA banner with negative margin */
}

.dashboard-page .container,
.orders-page .container,
.order-detail-page .container,
.prescriptions-page .container,
.prescription-detail-page .container,
.messages-page .container,
.message-detail-page .container,
.messaging-portal-page .container,
.manage-account-page .container,
.deliveries-page .container,
.delivery-detail-page .container,
.billing-page .container,
.profile-page .container,
.shipping-page .container,
.refills-page .container {
    padding-top: 1rem;
}

/* Recent Order Section */
.recent-order-section {
    margin-top: 2rem;
}

.recent-order-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--info-color);
    color: white;
}

.btn-link {
    background: none;
    color: var(--primary-color);
    text-decoration: underline;
    padding: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Cards */
.order-card, .order-detail-card, .prescription-card, .prescription-detail-card, .message-card, .message-detail-card, .auth-card, .stat-card, .delivery-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.order-header, .prescription-header, .message-header, .delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-body, .prescription-body, .message-body, .delivery-body {
    margin-bottom: 1rem;
}

.order-body p, .prescription-body p, .message-body p, .delivery-body p {
    margin: 0.5rem 0;
}

.message-preview {
    color: var(--text-light);
    font-style: italic;
}

.message-content {
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.order-footer, .prescription-footer, .message-footer, .delivery-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 2px solid var(--primary-light);
    background: linear-gradient(to right, var(--primary-light), transparent);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem -1.5rem -1.5rem -1.5rem;
    border-radius: 0 0 12px 12px;
}

.order-id, .prescription-id, .message-id, .portal-date, .delivery-tracking {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Simplified Prescription Detail Card */
.prescription-simple-header {
    margin-bottom: 2rem;
}

.prescription-simple-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.prescription-date {
    color: var(--text-color);
    font-size: 1rem;
    margin: 0;
}

.prescription-action {
    text-align: center;
    padding-top: 1rem;
}

/* Messaging Portal Styles */
.messaging-portal-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.portal-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.portal-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
}


.messaging-portal-container {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.portal-info {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.portal-iframe-wrapper {
    width: 100%;
    background: linear-gradient(135deg, #136FD9 0%, #0d5aa8 100%);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(19, 111, 217, 0.2);
    position: relative;
}

.portal-iframe-wrapper::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.portal-iframe-wrapper iframe {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    display: block;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.auth-card {
    max-width: 400px;
    width: 100%;
}

.auth-card h1 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Info Grid */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.info-item label {
    display: block;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.info-item p {
    color: var(--text-color);
    font-size: 1rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
}

/* Landing Page */
.landing-page {
    text-align: center;
    padding: 4rem 0;
    padding-bottom: 20rem; /* Extra space for footer CTA banner with negative margin */
}

.landing-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.landing-hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    display: block;
    line-height: 1;
}

.empty-state h2,
.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    font-family: "Nunito Sans", Sans-serif;
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state .btn {
    margin-top: 1rem;
}

/* Empty State Card (for use within sections) */
.empty-state-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 1.5rem 0;
}

.empty-state-card .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    opacity: 0.6;
    display: block;
    line-height: 1;
}

.empty-state-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-family: "Nunito Sans", Sans-serif;
}

.empty-state-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 1.25rem 0;
}

.empty-state-card .btn {
    margin-top: 0.75rem;
}

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    text-align: center;
    padding-bottom: 20rem; /* Extra space for footer CTA banner with negative margin */
}

.error-content h1 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Footer CTA Banner */
.footer-cta-banner {
    background: linear-gradient(135deg, #136FD9 0%, #0d5aa8 100%);
    padding: 4rem 20px;
    margin-top: -15rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border-radius: 50px;
}

.footer-cta-banner .container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.cta-content {
    flex: 1;
    max-width: 600px;
    color: white;
}

.cta-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.cta-heading {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    color: white;
}

.cta-subheading {
    font-size: 1.5rem;
    font-style: italic;
    color: #4A90E2;
    margin: 0 0 1rem 0;
    font-weight: 400;
}

.cta-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2rem 0;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #136FD9;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-decoration {
    flex: 0 0 300px;
    height: 300px;
    position: relative;
    opacity: 0.3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-ecg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Main Footer */
.footer {
    background: #ffffff;
    padding: 3rem 0 1.5rem;
    margin-top: 0;
    color: #333;
    border-top: 1px solid #e5e7eb;
}

/* Top Row: 2 Main Columns */
.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

/* Column 1: Brand Section */
.footer-col-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    flex-shrink: 0;
}

.footer-description {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
    flex: 1;
}

.footer-badges {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.badge-icon {
    width: auto;
    height: 40px;
    object-fit: contain;
    display: inline-block;
}

/* Column 2: Navigation Section */
.footer-col-nav {
    display: flex;
    flex-direction: column;
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-nav-group {
    display: flex;
    flex-direction: column;
}

.footer-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

.footer-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-links li {
    margin-bottom: 0.75rem;
}

.footer-nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    display: inline-block;
}

.footer-nav-links a:hover {
    color: #136FD9;
}

/* Newsletter Row: Separate row at bottom */
.footer-newsletter-row {
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.footer-newsletter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-newsletter-content {
    flex: 1;
}

.footer-newsletter-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.footer-newsletter-desc {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.footer-newsletter-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    flex-shrink: 0;
}

.footer-newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #111827;
    background: #ffffff;
}

.footer-newsletter-input::placeholder {
    color: #9ca3af;
}

.footer-newsletter-input:focus {
    outline: none;
    border-color: #136FD9;
    box-shadow: 0 0 0 3px rgba(19, 111, 217, 0.1);
}

.footer-newsletter-btn {
    padding: 0.625rem 1.5rem;
    background: #136FD9;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.footer-newsletter-btn:hover {
    background: #0d5bb8;
}

/* Bottom Row: Copyright and Motto */
.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer-copyright {
    margin: 0;
}

.footer-motto {
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .footer-nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-logo-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-nav-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .footer-newsletter-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .footer-newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .footer-newsletter-input {
        min-width: 100%;
    }
    
    .footer-newsletter-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .footer-cta-banner {
        padding: 3rem 0;
    }
    
    .cta-heading {
        font-size: 2rem;
    }
    
    .cta-subheading {
        font-size: 1.25rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
    
    .btn-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Manage Account Page */
.profile-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.profile-avatar {
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 auto;
}

.member-since {
    color: var(--text-light);
    font-size: 0.9rem;
}

.care-team-section {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.care-team-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.care-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.care-team-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.care-team-card.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.empty-placeholder {
    color: var(--text-light);
    font-style: italic;
}

.team-avatars {
    display: flex;
    justify-content: center;
    gap: -10px;
    margin-bottom: 1rem;
}

.avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid var(--white);
    margin-left: -10px;
}

.avatar-small:first-child {
    margin-left: 0;
}

.care-team-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.care-team-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.account-links {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.account-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.account-link:last-child {
    border-bottom: none;
}

.account-link:hover {
    background: var(--bg-color);
}

.link-icon {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.link-icon svg {
    width: 100%;
    height: 100%;
}

.link-text {
    flex: 1;
    font-weight: 500;
}

.link-arrow {
    margin-left: auto;
    color: var(--text-light);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-arrow svg {
    width: 100%;
    height: 100%;
}

.logout-section {
    text-align: center;
    margin-top: 2rem;
}

/* Mobile Bottom Navigation */
.navbar-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
}

.bottom-nav-item.active {
    color: #136FD9;
}

.bottom-nav-item.active svg {
    stroke-width: 2.25;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    /* Show bottom nav, hide desktop nav menu */
    .navbar-bottom {
        display: flex;
    }

    .nav-menu-desktop {
        display: none;
    }

    /* Simplify top navbar for mobile */
    .navbar-top .container {
        padding: 0.5rem 1rem;
    }

    .nav-logo {
        height: 50px;
    }

    .nav-user {
        display: none;
    }

    .btn-nav-action {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    /* Add padding to body for bottom nav */
    body {
        padding-bottom: 70px;
    }

    /* Reduce page padding on mobile */
    .dashboard-page,
    .orders-page,
    .order-detail-page,
    .prescriptions-page,
    .prescription-detail-page,
    .messages-page,
    .message-detail-page,
    .messaging-portal-page,
    .manage-account-page,
    .deliveries-page,
    .delivery-detail-page,
    .billing-page,
    .profile-page,
    .shipping-page,
    .refills-page {
        padding-bottom: 6rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .order-info-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero h1 {
        font-size: 2rem;
    }

    .care-team-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .navbar-top .container {
        padding: 0.5rem 0.75rem;
    }

    .nav-logo {
        height: 45px;
    }

    .btn-nav-action {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    .bottom-nav-item {
        font-size: 0.65rem;
    }

    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* Billing Page Styles */
.billing-section {
    margin-bottom: 3rem;
}

.billing-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
}

.billing-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.billing-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.subscription-id, .invoice-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

.subscription-id strong, .invoice-date strong {
    color: var(--primary-color);
    font-weight: 600;
}

.billing-body {
    padding: 1.5rem 0;
}

.billing-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.billing-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.billing-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.subscriptions-list, .invoices-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.empty-state-card {
    background: var(--white);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Profile Page Styles */
.profile-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.profile-header-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.profile-info h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.member-since {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.profile-form {
    margin-top: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control[readonly] {
    background-color: var(--bg-color);
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Shipping Page Styles */
.shipping-section {
    margin-bottom: 3rem;
}

.shipping-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.address-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.address-card.default-address {
    border: 2px solid var(--primary-color);
    background: linear-gradient(to right, rgba(19, 111, 217, 0.05), var(--white));
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.address-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.address-header > div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
}

.address-body {
    color: var(--text-color);
    line-height: 1.8;
}

.address-body p {
    margin: 0.5rem 0;
}

.addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.add-address-section {
    margin-top: 2rem;
    text-align: center;
}

.address-form-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.address-form-card h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Refills Page Styles */
.refill-reminders-section {
    margin-bottom: 2.5rem;
}

.refill-offerings-section {
    margin-bottom: 2rem;
}

.refill-reminders-section h2,
.refill-offerings-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.25rem;
}

.refill-reminders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.refill-reminder-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.refill-reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.refill-reminder-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.refill-reminder-body {
    margin-bottom: 1rem;
}

.refill-reminder-body p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.refill-reminder-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.refill-reminder-footer .btn {
    width: 100%;
}

.refill-offerings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.refill-offering-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.refill-offering-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.offering-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.refill-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.pricing-note {
    font-size: 0.85rem;
    color: var(--text-light);
}

.refill-offering-card .btn {
    width: 100%;
    margin-top: auto;
}

