
/* === Reset & Base Styles === */
body, html {
    height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
}

/* === Typography === */
h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #343a40;
}

h2 {
    font-size: 1.4rem;
    margin-top: 10px;
    color: #0d6efd;
}

p, li {
    line-height: 1.7;
}

.section-title {
    font-weight: bold;
    margin-top: 25px;
    color: #0d6efd;
}

/* === Layout & Containers === */
.container {
    max-width: 1200px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

.container-fluid.p-0 {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.main-content, .page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.main-content-wrapper {
    min-height: calc(100vh - 56px - 48px);
    overflow-y: auto;
}

/* === Header & Navigation === */
header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: #0d6efd;
    width: 100%;
}

header.navbar .navbar-toggler {
    border: 2px solid white;
    border-radius: 0.25rem;
}

.header-icon {
    margin-right: 6px;
    vertical-align: middle;
}

/* === Tabs === */
#tabsContainer {
    position: sticky;
    top: 56px;
    z-index: 1020;
    background-color: white;
    width: 100%;
    border-bottom: 1px solid #ddd;
}

/* under sticky tabs */
#tabsContainer + .main-content-wrapper { padding-top: 10px; }

/* avoid OS bottom bar overlap on phones */
.main-content-wrapper{
    padding-bottom: calc(2.25rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width:576px){
    .main-content-wrapper{
        padding-bottom: calc(2.75rem + env(safe-area-inset-bottom, 0px));
    }
}

.tab-button {
    border: none;
    background: none;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    color: #333;
    transition: color 0.2s ease;
}

.tab-button.active,
.tab-button:hover {
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
}

.tab-content {
    display: none;
    padding: 0px;
}

.active-tab {
    display: block;
}


/* === Table Styles === */
.table-responsive {
    position: relative;
    max-height: 70vh; /* Adjust this value as needed */
    overflow-y: auto;
    padding-bottom: 10px;
}

table {
    border-collapse: separate; /* Changed from collapse to separate */
    border-spacing: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    width: 100%;
    background-color: white;
}

thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

thead tr {
    background-color: #343a40;
    color: #fff;
    text-align: left;
    font-weight: bold;
}

th {
    background-color: #343a40;
    padding: 8px;
    position: sticky;
    top: 0;
    z-index: 2;
    vertical-align: middle;
    text-align: left;
}

td {
    padding: 8px;
}

tbody tr {
    border-bottom: 1px solid #ddd;
}

tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

tbody tr:last-child td {
    border-bottom: 1px solid #ddd !important;
}

table th i {
    margin-right: 6px;
    color: #0d6efd;
}

/* === Column Specifications === */
.col-activities {
    min-width: 300px;
    width: 20%;
}

.col-goal {
    min-width: 80px;
    width: 10%;
}

/* === Trophy & Icons === */
.trophy {
    font-size: 1.2em;
    margin-left: 5px;
}

.trophy-icon {
    margin-right: 8px;
    color: #f0ad4e;
}

.gold { color: gold; }
.silver { color: silver; }
.bronze { color: #cd7f32; }

/* === Accordion Styles === */
.accordion-content {
    display: none;
}

.accordion-content.active {
    display: block;
}

.accordion-button {
    cursor: pointer;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.accordion-arrow {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.accordion-button.active .accordion-arrow {
    transform: rotate(180deg);
}

.btn-primary.accordion-button {
    background-color: #0d6efd;
    color: white;
}

.btn-secondary.accordion-button {
    background-color: #6c757d;
    color: white;
}

.accordion-button:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5);
}

/* === Headings === */
.history-heading {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0d6efd;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.history-heading i {
    font-size: 1.2rem;
}

.history-subheading {
    font-size: .8rem;
    color: #666;
    margin-bottom: 10px;
}

/* === Off-canvas === */
.offcanvas-start {
    width: 75% !important;
    max-width: 400px;
}

/* === Responsive Styles === */
@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-button {
        margin-bottom: 10px;
    }

    .btn-group {
        width: 100%;
        display: flex;
        gap: 10px;
        flex-direction: column;
    }

    .accordion-button {
        flex-direction: row;
        flex-wrap: wrap;
        font-size: 1rem;
    }

    .mt-4 {
        margin-top: .75rem !important;
    }

    .brand-link{
        display:flex;
        align-items:center;
        gap:.4rem;
        color:#fff !important;
        text-decoration:none;
    }

    /* Responsive title that shrinks rather than truncates */
    .brand-text{
        /* Auto scale between 18px and 28px depending on viewport */
        font-size: clamp(1.125rem, 5vw, 1.75rem);
        line-height: 1.1;
        white-space: nowrap;                /* keep on one line */
        max-width: calc(100vw - 6rem);      /* leave space for the hamburger + padding */
        overflow: hidden;                    /* safety */
        text-overflow: ellipsis;             /* as a last resort */
    }

    /* Make toggler visible on blue */
    .navbar-toggler{
        border-color: rgba(255,255,255,.6);
    }
    .navbar-toggler .navbar-toggler-icon{
        filter: invert(1) grayscale(100%);   /* white icon */
    }

    /* Very small phones: hide the emoji to gain width */
    @media (max-width: 380px){
        .brand-emoji{ display:none; }
        .brand-text{ font-size: clamp(1rem, 5.5vw, 1.4rem); }
    }

    /* Typography scale that matches the dashboard feel */
    .page-typography h1 {
        font-size: clamp(1.25rem, 4.8vw, 1.75rem);   /* ~20–28px */
        line-height: 1.2;
        margin-bottom: .75rem;
    }
    .page-typography h2 {
        font-size: clamp(1.05rem, 4vw, 1.35rem);     /* ~17–22px */
        line-height: 1.3;
        margin-top: 1.25rem;
        margin-bottom: .5rem;
    }
    .page-typography p,
    .page-typography li {
        font-size: clamp(0.98rem, 3.6vw, 1.0625rem); /* ~15.7–17px */
        line-height: 1.6;
    }
    .page-typography ul { padding-left: 1.2rem; }

    /* Prevent mobile browsers from auto shrinking text */
    html { -webkit-text-size-adjust: 100%; }

    .user-chip{
        color:#fff;
        background:rgba(255,255,255,.12);
        border:1px solid rgba(255,255,255,.28);
        border-radius:9999px;
        padding:.25rem .5rem;
        line-height:1.1;
    }
}
/* === Shared standalone-page layout (Scoring / Privacy / Disclaimer) === */
:root {
    /* match your dashboard card max width */
    --dash-max: 1100px;
}

/* outer shell: same padding feel as dashboard */
.page-wrap {
    padding: 0.75rem 0.75rem 2rem;
}
@media (min-width: 576px){
    .page-wrap { padding: 1rem 1rem 2.5rem; }
}
@media (min-width: 992px){
    .page-wrap { padding: 1.25rem 2rem 3rem; }
}

/* inner card that mirrors dashboard cards */
.page-card {
    max-width: var(--dash-max);
    margin: 0 auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 .25rem 1.25rem rgba(0,0,0,.08);
    overflow: hidden;
}
.page-card .page-body {
    padding: 1rem;
}
@media (min-width: 576px){
    .page-card .page-body { padding: 1.25rem 1.25rem 1.5rem; }
}
@media (min-width: 992px){
    .page-card .page-body { padding: 1.5rem 1.75rem 2rem; }
}
