/* =============================================================================
   frontend/profile.css — StressMitra Premium Profile System Stylesheet
   ============================================================================= */

/* 1. Global & Shared Variables */
:root {
    --profile-success: #2ec4b6;
    --profile-warning: #ff9f1c;
    --profile-danger: #e71d36;
    --profile-info: #00b4d8;
    --profile-neutral: #e0e0e0;
    --profile-glass-bg: rgba(255, 255, 255, 0.85);
    --profile-glass-border: rgba(255, 255, 255, 0.5);
    --profile-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

/* 2. Custom Avatar (Initials & Images) */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.avatar-large {
    width: 110px;
    height: 110px;
    font-size: 2.5rem;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 3. Header Profile Menu & Premium Dropdown */
.profile-menu-container {
    position: relative;
    display: inline-block;
}

.profile-trigger-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 30px;
    transition: background 0.2s ease;
}

.profile-trigger-btn:hover {
    background: rgba(85, 139, 115, 0.05);
}

.profile-trigger-btn span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.premium-dropdown-menu {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
    animation: fadeInDropdown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-user-info {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(85, 139, 115, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.dropdown-user-info .user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 10px;
    margin-bottom: 2px;
}

.dropdown-user-info .user-email {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    word-break: break-all;
}

.badge-premium-pill {
    background: var(--gold);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.3);
}

.badge-free-pill {
    background: #bdc3c7;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-links {
    padding: 10px 0;
}

.dropdown-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-links a:hover {
    background: rgba(85, 139, 115, 0.08);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

.dropdown-links hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin: 8px 0;
}

/* 4. Complete Profile Modal (First-time / Mandatory Setup) */
.mandatory-overlay {
    z-index: 4000 !important;
}

.mandatory-overlay .close {
    display: none;
    /* Force modal completion, cannot just close it */
}

.modal-content.wide-modal {
    max-width: 750px;
    width: 92%;
    padding: 3rem;
}

.step-indicator-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 2.5rem;
}

.step-indicator-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
    transform: translateY(-50%);
}

.step-progress-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: var(--accent-color);
    z-index: 2;
    transform: translateY(-50%);
    transition: width 0.4s ease;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #888;
    z-index: 3;
    position: relative;
    transition: all 0.3s ease;
}

.step-circle.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(85, 139, 115, 0.2);
}

.step-circle.completed {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.profile-form-step {
    display: none;
    animation: stepFade 0.4s ease;
}

.profile-form-step.active {
    display: block;
}

@keyframes stepFade {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group select,
.form-group input,
.form-group textarea {
    margin: 0;
}

.form-navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 35px;
    gap: 15px;
}

/* 5. Advanced Profile Image Upload Zone */
.image-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px dashed rgba(85, 139, 115, 0.3);
    border-radius: 12px;
    background: #fafcfb;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.image-upload-wrapper:hover,
.image-upload-wrapper.dragover {
    border-color: var(--accent-color);
    background: rgba(85, 139, 115, 0.03);
}

.image-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-upload-icon {
    font-size: 2rem;
    color: var(--accent-color);
}

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

.image-preview-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.image-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 6. Dashboard (My Profile Modal & Tabbed Sections) */
.profile-modal-content {
    max-width: 1200px !important;
    width: 95% !important;
    margin: 2.5% auto !important;
    padding: 3rem !important;
    background: #f8fafc !important; /* Solid light color for performance */
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2) !important;
    border-radius: 24px !important;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 15px;
}

@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .dashboard-sidebar,
    .dashboard-content-panel {
        min-width: 0;
        width: 100%;
    }

    .dashboard-sidebar {
        max-width: 100vw;
    }
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 0;
    max-height: calc(90vh - 5rem); /* modal max height minus padding */
    overflow-y: auto;
    overscroll-behavior: contain; /* Prevents scroll chaining to the main page */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.dashboard-sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.sidebar-user-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-user-details h3 {
    font-size: 1.25rem;
    margin-top: 15px;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.sidebar-user-details p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 2px 0;
}

.sidebar-user-details .meta-location {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.dashboard-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}





.tab-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    background: rgba(44, 85, 69, 0.06);
    color: var(--accent-color);
    transform: translateX(6px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(44, 85, 69, 0.25);
    transform: translateX(8px);
}

.dashboard-content-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-height: 500px;
}

.tab-panel {
    display: none;
    animation: panelFade 0.4s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes panelFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f4f6f6;
    padding-bottom: 12px;
}

/* 7. Grid Dashboard Layouts */
.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-score-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fbfb 100%);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(44, 85, 69, 0.1);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.summary-score-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.summary-score-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(44, 85, 69, 0.1);
}
.summary-score-card:hover::before {
    opacity: 1;
}

.summary-score-card h4 {
    margin: 0 0 10px 0;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-score-card .score-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.summary-score-card .score-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-top: 5px;
    font-weight: 500;
}

/* 8. Circular Progress Canvas & SVGs */
.score-circle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.circular-progress {
    position: relative;
    width: 160px;
    height: 160px;
}

.circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-progress circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.circular-progress .bg-circle {
    stroke: #eef2f1;
}

.circular-progress .fg-circle {
    stroke: var(--accent-color);
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 1s ease-out;
}

.circular-progress .score-number-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* 9. Mental Wellness Breakdown Meters */
.wellness-meter-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.wellness-meter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.meter-bar-container {
    width: 100%;
    height: 8px;
    background: #eef2f1;
    border-radius: 10px;
    overflow: hidden;
}

.meter-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 10px;
    width: 0;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* 10. Mood Analytics & Charts Container */
.chart-container-custom {
    position: relative;
    width: 100%;
    height: 240px;
    margin: 20px 0;
    border: 1px solid #f0f3f2;
    border-radius: 12px;
    background: #fafcfb;
    padding: 10px;
}

.mood-breakdown-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.mood-stat-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
}

.mood-stat-card .emoji {
    font-size: 1.5rem;
}

.mood-stat-card .mood-name {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 4px 0;
}

.mood-stat-card .mood-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* 11. AI Insights Section (Compelling UI Cards) */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.insight-card-custom {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.insight-card-custom.strength {
    border-left-color: var(--profile-success);
}

.insight-card-custom.alert {
    border-left-color: var(--profile-danger);
}

.insight-card-custom.recommendation {
    border-left-color: var(--profile-info);
}

.insight-icon-container {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insight-text-container h5 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.insight-text-container p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* 12. Journal Calendar Activity Grid */
.journal-activity-section {
    margin-top: 25px;
}

.journal-grid-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 15px 0;
}

.journal-grid-day {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: #ebedf0;
    position: relative;
    cursor: pointer;
}

.journal-grid-day.active-level-1 {
    background: #c6e48b;
}

.journal-grid-day.active-level-2 {
    background: #7bc96f;
}

.journal-grid-day.active-level-3 {
    background: #239a3b;
}

.journal-grid-day.active-level-4 {
    background: #196127;
}

.journal-grid-day::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    transition: opacity 0.2s ease;
}

.journal-grid-day:hover::after {
    opacity: 1;
}

/* 13. Achievement Badge System */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.badge-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.badge-icon-wrap {
    font-size: 2.2rem;
    margin-bottom: 8px;
    filter: grayscale(1);
    opacity: 0.4;
    transition: all 0.3s ease;
}

.badge-card.unlocked .badge-icon-wrap {
    filter: grayscale(0);
    opacity: 1;
    animation: pulseBadge 2s infinite alternate;
}

@keyframes pulseBadge {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

.badge-card.unlocked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
}

.badge-card h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.badge-card p {
    margin: 5px 0 0 0;
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.3;
}

.badge-lock-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.05);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #999;
}

.badge-card.unlocked .badge-lock-overlay {
    display: none;
}

/* 14. Activity Log Timeline */
.timeline-vertical {
    position: relative;
    padding-left: 30px;
    margin-top: 15px;
}

.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #eef2f1;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bdc3c7;
    border: 2px solid white;
    box-shadow: 0 0 0 3px #eef2f1;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item.login::before {
    background: var(--profile-info);
}

.timeline-item.profile::before {
    background: var(--accent-color);
}

.timeline-item.assessment::before {
    background: var(--profile-warning);
}

.timeline-item.mood::before {
    background: var(--profile-success);
}

.timeline-item.journal::before {
    background: var(--profile-success);
}

.timeline-item-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
    display: block;
}

.timeline-item-desc {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* 15. Premium Tables */
.premium-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.premium-table th {
    background: #fafcfb;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 1px solid #f0f0f0;
}

.premium-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f9f9f9;
    color: var(--text-dark);
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover td {
    background: #fafcfb;
}

.trend-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.trend-arrow.up {
    color: var(--profile-success);
}

.trend-arrow.down {
    color: var(--profile-danger);
}

.trend-arrow.neutral {
    color: var(--text-light);
}

/* 16. Subscription Status Dashboard Styling */
.subscription-status-card {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.subscription-status-card::after {
    content: '★';
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 10rem;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.subscription-status-card h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.subscription-status-card .plan-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 15px;
}

.subscription-status-card .status-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.status-details span {
    opacity: 0.8;
    display: block;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.status-details strong {
    font-size: 1.05rem;
}

/* 17. Form Elements and Actions inside Modals */
.actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.danger-zone-box {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid rgba(231, 29, 54, 0.2);
    border-radius: 10px;
    background: rgba(231, 29, 54, 0.02);
}

.danger-zone-box h5 {
    color: var(--profile-danger);
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.danger-zone-box p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0 15px 0;
}

.btn-danger {
    background: var(--profile-danger);
    color: white;
}

.btn-danger:hover {
    background: #c31327;
}

/* 18. Subscription Management Card */
.subscription-management-card {
    background: linear-gradient(135deg, rgba(85, 139, 115, 0.04), rgba(85, 139, 115, 0.01));
    border: 1px solid rgba(85, 139, 115, 0.15);
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 12px;
}

.sub-mgmt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.sub-mgmt-row:last-of-type {
    border-bottom: none;
}

.sub-mgmt-label {
    font-size: 0.88rem;
    color: var(--text-light);
    font-weight: 500;
}

.sub-mgmt-value {
    font-size: 0.92rem;
    color: var(--text-dark);
    font-weight: 600;
}

.sub-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sub-status-badge.active {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.sub-status-badge.cancelled {
    background: rgba(230, 81, 0, 0.1);
    color: #e65100;
}

.sub-status-badge.expired {
    background: rgba(120, 120, 120, 0.1);
    color: #666;
}

.sub-status-badge.free {
    background: rgba(85, 139, 115, 0.08);
    color: var(--accent-color);
}

.btn-cancel-sub {
    transition: all 0.2s ease;
}

.btn-cancel-sub:hover {
    background: rgba(230, 81, 0, 0.08) !important;
}

/* 19. Helper Styles */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 15px;
}

.mb-3 {
    margin-bottom: 15px;
}

/* Refund Progress Tracker */
.refund-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    padding-left: 20px;
    margin-top: 15px;
}

.refund-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.timeline-step .step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.timeline-step.active .step-icon {
    background: var(--accent-color, #558b73);
    box-shadow: 0 0 0 2px var(--accent-color, #558b73);
}

.timeline-step.completed .step-icon {
    background: #2e7d32;
    box-shadow: 0 0 0 2px #2e7d32;
}

.timeline-step .step-label {
    font-size: 0.85rem;
    color: var(--text-light, #777);
}

.timeline-step.active .step-label,
.timeline-step.completed .step-label {
    color: var(--text-dark, #333);
    font-weight: 500;
}

/* 19. Nature Retreats Overview Card */
.overview-nature-retreats-card {
    background: #fafcfb;
    border: 1px solid #eef5e2;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    margin-top: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.overview-nature-retreats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.overview-nature-retreats-badge {
    background: #fff3e0;
    color: #ef6c00;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.overview-nature-retreats-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin: 15px 0;
}

.overview-nature-retreats-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid rgba(85, 139, 115, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.overview-nature-retreats-item:hover {
    background: rgba(85, 139, 115, 0.05);
    transform: translateX(2px);
}



/* ========================================================================= */
/* AYURVEDIC WELLNESS ASSESSMENT STYLING                                     */
/* ========================================================================= */

.ayurveda-assessment-container {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    margin-top: 20px;
}

.ayurveda-status-card {
    text-align: center;
    padding: 2rem;
    background: #fafcfb;
    border: 1px dashed #c8dbd1;
    border-radius: 12px;
}

.ayurveda-question {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.ayurveda-question h4 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.ayurveda-report-view {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.report-section {
    margin-bottom: 1.5rem;
}

.report-section h3 {
    color: var(--accent-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.disclaimer-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.85rem;
    color: #e65100;
    border-radius: 4px;
}

/* Dashboard Extra Responsiveness */
.rewards-store-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Extra Mobile Rules */
@media (max-width: 768px) {
    .premium-dropdown-menu {
        max-width: 90vw;
        right: -10px;
    }

    .profile-modal-content {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 20px 15px 15px 15px !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
    }

    .profile-modal-content .close {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        z-index: 1000 !important;
    }

    .ayurveda-assessment-container {
        padding: 1.5rem 1rem;
    }
    
    .ayurveda-report-view {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-sidebar {
        display: contents;
    }
    
    .dashboard-container {
        flex-direction: column;
    }

    .rewards-store-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .dashboard-metrics-grid, .mood-analytics-grid {
        grid-template-columns: 1fr !important;
    }

    /* Sub-headers and layouts that might flex row */
    .dashboard-metrics-grid > div,
    .mood-analytics-grid > div {
        width: 100%;
    }
}
/* Dashboard Tabs Horizontal Scroll on Mobile */
@media (max-width: 900px) {
    .dashboard-tabs {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #f8fafc; /* match modal background */
        padding: 10px 15px;
        margin: 0 -15px; /* pull out to edges perfectly */
        border-bottom: 1px solid #e2e8f0;
        
        flex-direction: row !important;
        overflow-x: auto !important;
        overscroll-behavior-x: contain;
        -ms-overflow-style: none;
        scrollbar-width: none;
        max-width: 100vw;
        gap: 10px !important;
    }

    .dashboard-tabs::-webkit-scrollbar {
        display: none;
    }

    .dashboard-tabs .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 18px;
    }

    /* Remove translateX for horizontal tabs on mobile */
    .dashboard-tabs .tab-btn:hover {
        transform: none;
    }
    .dashboard-tabs .tab-btn.active {
        transform: none;
    }
}

/* Fix close button visibility in profile modal */
.profile-modal-content {
    position: relative;
}

.profile-modal-content .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 36px;
    z-index: 10;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #333;
}

/* Add padding to the top of modal content so h2 doesn't overlap with close button */
.profile-modal-content h2 {
    margin-top: 10px;
    padding-right: 50px;
}

@media (max-width: 768px) {
    .profile-modal-content h2 {
        margin-top: 40px !important; /* push below the fixed close button */
    }
}

/* Button Click States */
.btn-primary:active,
.btn-psychiatrist-book:active,
.btn-confirm-booking:active {
    transform: scale(0.95) !important;
    transition: transform 0.05s ease !important;
}
