* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: #0f1725;
    color: #ffffff;
}

a {
    text-decoration: none;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(430px, 100%);
    background: #182235;
    border-radius: 28px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.login-logo {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
}

.login-text,
.small-text {
    color: #c8d6ef;
}

.google-button {
    display: block;
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    color: #111625;
    font-weight: 800;
}

/* DASHBOARD */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: #182235;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.logo-circle,
.profile-avatar,
.avatar {
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
    font-weight: 900;
}

.logo-circle {
    width: 64px;
    height: 64px;
    font-size: 30px;
}

.sidebar-label,
.eyebrow,
.card-label {
    color: #8ea3c6;
    margin: 0 0 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    padding: 16px 18px;
    border-radius: 16px;
    color: #d5e0f5;
    font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
    background: #243047;
}

.logout-sidebar,
.logout-button {
    background: #ffffff;
    color: #111625;
    font-weight: 800;
}

.logout-sidebar {
    display: block;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
}

.main-content {
    flex: 1;
    padding: 38px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.profile-pill {
    background: #182235;
    padding: 14px 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
}

.stats-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.stat-card,
.large-card,
.side-card,
.mini-card,
.card,
.hero-card {
    background: #182235;
    border-radius: 24px;
    padding: 24px;
}

.stat-card h2,
.side-card h2,
.card h2 {
    font-size: 34px;
    margin: 10px 0;
}

.stat-card span,
.profile-pill p,
.card p,
.settings-item p {
    color: #8ea3c6;
}

.highlight {
    background: linear-gradient(135deg, #1f5142, #243047);
}

.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
    margin-bottom: 22px;
}

.large-card {
    min-height: 320px;
}

.fake-chart {
    margin-top: 28px;
    height: 200px;
    border-radius: 22px;
    background: #0f1725;
    position: relative;
    overflow: hidden;
}

.chart-line {
    position: absolute;
    width: 120%;
    height: 140px;
    border-radius: 50%;
    border: 6px solid #69f0ae;
    border-color: #69f0ae transparent transparent transparent;
    top: 80px;
    left: -10%;
}

.progress-ring {
    width: 120px;
    height: 120px;
    margin-top: 24px;
    border-radius: 50%;
    border: 10px solid #69f0ae;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 900;
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* OLD DASHBOARD SUPPORT */

.dashboard {
    width: min(1200px, calc(100% - 48px));
    margin: 54px auto;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.avatar {
    width: 78px;
    height: 78px;
    font-size: 34px;
}

.progress-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    background: #0f1725;
    border-radius: 18px;
    padding: 20px;
}

.card.wide {
    grid-column: span 2;
}

.bar {
    height: 12px;
    background: #0f1725;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 24px;
}

.bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #69f0ae, #42a5f5);
}

/* SETTINGS */

.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.settings-button,
.logout-button,
.connect-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 800;
}

.settings-button {
    background: #313956;
    color: #ffffff;
}

.settings-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.settings-item {
    background: #0f1725;
    border-radius: 20px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.connect-button {
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
    white-space: nowrap;
}

/* MOBILE */

@media (max-width: 1100px) {
    .stats-grid,
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .bottom-grid,
    .progress-box {
        grid-template-columns: 1fr;
    }

    .card.wide {
        grid-column: span 1;
    }
}

@media (max-width: 800px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

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

    .topbar,
    .settings-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.settings-panel {
    display: grid;
    gap: 22px;
}

.integration-card {
    background: #182235;
    border-radius: 24px;
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
}

.integration-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
}

.integration-content h2 {
    margin: 0 0 8px;
}

.integration-content p {
    color: #8ea3c6;
    margin-bottom: 0;
}

.connect-button.muted {
    background: #313956;
    color: #ffffff;
}

@media (max-width: 800px) {
    .integration-card {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .connect-button {
        width: 100%;
    }
}

.connected-badge {
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
    font-weight: 900;
    padding: 14px 20px;
    border-radius: 14px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.info-grid div {
    background: #0f1725;
    border-radius: 18px;
    padding: 18px;
}

.info-grid p {
    color: #8ea3c6;
    margin: 0 0 8px;
}

.info-grid strong {
    font-size: 22px;
}

.settings-form {
    display: grid;
    gap: 24px;
}

.form-section {
    background: #182235;
    border-radius: 24px;
    padding: 28px;
    display: grid;
    gap: 18px;
}

.form-section h2 {
    margin: 0 0 8px;
}

.form-section label {
    display: grid;
    gap: 8px;
    color: #c8d6ef;
    font-weight: 700;
}

.form-section input,
.form-section select {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 14px;
    background: #0f1725;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

.save-button {
    border: 0;
    border-radius: 16px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
}

.settings-link {
    margin-top: 22px;
}

@media (max-width: 800px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    background: #182235;
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-header h2 {
    margin: 0;
    font-size: 30px;
}

.weight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 22px;
}

.chart-card {
    background: #0f1725;
    border-radius: 24px;
    padding: 22px;
}

.chart-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.chart-tab {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    background: #243047;
    color: #c8d6ef;
    font-weight: 800;
    cursor: pointer;
}

.chart-tab.active {
    background: linear-gradient(135deg, #69f0ae, #42a5f5);
    color: #101522;
}

.line-chart {
    height: 260px;
    background: linear-gradient(180deg, rgba(105, 240, 174, 0.08), transparent);
    border-radius: 20px;
    overflow: hidden;
}

.line-chart svg {
    width: 100%;
    height: 100%;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    color: #8ea3c6;
    font-weight: 700;
}

@media (max-width: 800px) {
    .weight-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-two-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.compact-section {
    padding: 22px;
    margin-bottom: 0;
}

.compact-topbar {
    margin-bottom: 22px;
}

.mini-stat-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.mini-stat {
    background: #0f1725;
    border-radius: 18px;
    padding: 18px;
}

.mini-stat p {
    margin: 0 0 8px;
    color: #8ea3c6;
    font-weight: 700;
}

.mini-stat h3 {
    margin: 0;
    font-size: 28px;
}

.small-tabs {
    margin-bottom: 14px;
}

.compact-chart {
    height: 210px;
}

#weightPoints circle {
    fill: #0f1725;
    stroke: #69f0ae;
    stroke-width: 5;
}

#weightPoints text {
    fill: #ffffff;
    font-size: 24px;
    font-weight: 800;
    text-anchor: middle;
}

.calorie-progress-card {
    background: #0f1725;
    border-radius: 20px;
    padding: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #c8d6ef;
    font-weight: 800;
    margin-bottom: 14px;
}

.calorie-bar {
    height: 16px;
    background: #243047;
    border-radius: 999px;
    overflow: hidden;
}

.calorie-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #69f0ae, #42a5f5);
    border-radius: inherit;
}

.progress-note {
    color: #8ea3c6;
    margin: 14px 0 0;
}

@media (max-width: 1100px) {
    .dashboard-two-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .mini-stat-row {
        grid-template-columns: 1fr;
    }
}

.overview-card {
    background: #182235;
    border-radius: 28px;
    padding: 28px;
    color: #ffffff;
    display: grid;
    gap: 28px;
    transition: 0.2s;
}

.overview-card:hover {
    transform: translateY(-2px);
    background: #202c44;
}

.overview-card h2 {
    font-size: 42px;
    margin: 8px 0;
}

.overview-card p {
    color: #8ea3c6;
}

.overview-progress {
    background: #0f1725;
    border-radius: 20px;
    padding: 20px;
}

#weightPoints circle {
    fill: #0f1725;
    stroke: #69f0ae;
    stroke-width: 4;
}

#weightPoints text.weight-label {
    fill: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-anchor: middle;
}

#weightPoints text.date-label {
    fill: #8ea3c6;
    font-size: 13px;
    font-weight: 700;
    text-anchor: middle;
}

.compact-chart {
    height: 280px;
}
