:root {
    /* Text */
    --primary-color: #111;
    --secondary-color: #888;

    /* Surfaces */
    --background-color: #f5f5f5;
    --card-color: #fff;
    --border-color: #e8e8e8;

    /* Brand */
    --accent-color: #2196F3;
    --accent-hover: #0d8bf2;

    /* Semantic */
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-elevated: 0 4px 16px rgba(0,0,0,0.12);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: Helvetica, Arial, sans-serif;
}

body {
    font-family: inherit;
    background-color: var(--background-color);
    color: var(--primary-color);
    padding-bottom: 70px; /* Space for bottom nav */
}

/* Lowercase UI labels */
.nav-item span,
.card-title,
.card-header-title,
button,
.submit-button,
.logout-button,
.logo,
.plan-name,
.vol-label {
    text-transform: lowercase;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.profile-icon {
    width: 32px;
    height: 32px;
    background-color: #ddd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    background-size: cover;
    background-position: center;
}

/* Navigation Bar Styles */
.main-nav {
    background-color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.nav-logo a {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

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

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 20px 15px;
    display: block;
    transition: all 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        padding: 10px;
    }
} 


.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    text-decoration: none;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
    z-index: 999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 10px;
    min-width: 44px;
    min-height: 44px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.volume-card, .workout-card, .stats-card, .exercise-card {
    background-color: var(--card-color);
    border-radius: var(--radius-md);
    margin: 8px 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background-color: var(--card-color);
    border-bottom: 1px solid var(--border-color);
}

.card-title, .card-header-title {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.card-chevron, .card-header-icon {
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.card-header-icon.collapsed {
    transform: rotate(180deg);
}

.card-body {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.card-body.active {
    max-height: 1000px;
}

.volume-amount {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-change, .metric-change {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.05);
}

.change-up {
    color: var(--success-color);
}

.change-down {
    color: var(--danger-color);
}

.previous-period {
    font-size: 14px;
    color: var(--secondary-color);
}

.workout-suggestion-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.suggestion-content {
    display: flex;
    align-items: center;
    padding: 20px;
}

.suggestion-text {
    flex-grow: 1;
}

.suggestion-text h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.suggestion-text p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 14px;
}

.suggestion-arrow {
    color: var(--secondary-color);
    font-size: 18px;
}

/* Featured black card styling with shiny effect */
.featured-card {
    background-color: #1a1a1a;
    margin: 16px 20px;
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden; /* Important for the animation */
}

/* Shiny effect overlay */
.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shinyEffect 6s infinite ease-in-out;
    pointer-events: none; /* So it doesn't interfere with clicks */
}

/* Glow effect around the edges */
.featured-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
    animation: glowPulse 4s infinite alternate;
    pointer-events: none;
}

@keyframes shinyEffect {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 150%;
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05),
                    0 0 5px rgba(75, 105, 255, 0.1);
    }
    100% {
        box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1),
                    0 0 15px rgba(75, 105, 255, 0.2);
    }
}

.featured-card .suggestion-content {
    padding: 22px 20px;
    position: relative; /* Keep content above the effects */
    z-index: 1;
}

.featured-card .suggestion-text h3 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Make text more readable over effects */
}

.featured-card .suggestion-text p {
    color: rgba(255, 255, 255, 0.7);
}

.featured-card .suggestion-arrow {
    color: white;
    font-size: 20px;
}

/* Updated Styles for Enhanced Cards */
.metrics-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0 20px;
}

.stats-card {
    padding: 18px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
}

.metric {
    flex: 1;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.metric-detail {
    font-size: 12px;
    color: var(--secondary-color);
    opacity: 0.7;
}

/* Exercise cards in simple suggestions */
.exercise-cards {
    margin: 10px 0;
}

.card-content {
    padding: 15px;
}

.sets-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.sets-table th, .sets-table td {
    padding: 8px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.sets-table th {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
}

.sets-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.set-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.add-set-btn, .log-workout-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.add-set-btn {
    background-color: #f1f1f1;
    color: var(--primary-color);
}

.log-workout-btn {
    background-color: var(--primary-color);
    color: white;
}

.bodyweight-btn {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 6px;
    margin-left: 5px;
    font-size: 12px;
    cursor: pointer;
}

.delete-set-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 16px;
}

.compound-badge {
    display: inline-block;
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Equipment filter container */
.filter-container {
    background-color: var(--card-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 8px 20px;
    box-shadow: var(--shadow-card);
}

.filter-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

.equipment-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.equipment-filter label {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #f1f1f1;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.equipment-filter input[type="checkbox"] {
    margin-right: 5px;
}

.no-data {
    text-align: center;
    padding: 30px 20px;
    color: var(--secondary-color);
}

.no-data i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-data p {
    margin-bottom: 10px;
}

/* Messages */
.success-message, .error-message {
    padding: 12px 20px;
    margin: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
}

.success-message {
    background-color: rgba(34, 197, 94, 0.08);
    color: var(--success-color);
    border-left: 3px solid var(--success-color);
}

.error-message {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
}

/* Header beta tag */
.beta-tag {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background-color: #000;
    border-radius: 10px;
    padding: 2px 6px;
    margin-left: 5px;
    vertical-align: middle;
    display: inline-block;
}

/* Feedback button */
.feedback-button {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 999;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ── Admin global ─────────────────────────────────────────────────────────
   Admin pages are white, full-width desktop tools.
   Use body { background: #fff; } in each admin page's own <style>.
   ─────────────────────────────────────────────────────────────────────── */

.admin-navbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-navbar-container {
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    gap: 12px;
}

.admin-navbar-brand a {
    font-size: 13px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
}

.admin-navbar-menu {
    display: flex;
    gap: 1px;
    flex: 1;
}

.admin-navbar-menu a {
    padding: 5px 10px;
    border-radius: 5px;
    color: #888;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}

.admin-navbar-menu a:hover { background: #f5f5f5; color: #000; }
.admin-navbar-menu a.active { background: #000; color: #fff; }

.admin-back-link {
    padding: 5px 10px;
    border-radius: 5px;
    color: #888;
    text-decoration: none;
    font-size: 12px;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: color 0.1s;
}
.admin-back-link:hover { color: #000; }

/* Container — full-width, white */
.admin-container {
    padding: 24px 28px;
    max-width: none;
}

/* Stats row */
.admin-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-stat-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px 18px;
    min-width: 120px;
}

.admin-stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
    margin-bottom: 4px;
}

.admin-stat-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.5px;
    color: #000;
}

/* Table — stretches to full width */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
}

.admin-table th {
    background: #fafafa;
    padding: 9px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
    border-bottom: 1px solid #e8e8e8;
}

.admin-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #111;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }

/* Sub status badge — monochrome */
.sub-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid currentColor;
}

.sub-badge.active   { color: #16a34a; }
.sub-badge.trialing { color: #2563eb; }
.sub-badge.expired  { color: #999; }
.sub-badge.canceled { color: #dc2626; }
.sub-badge.past_due { color: #d97706; }
.sub-badge.none     { color: #bbb; }

/* Page title */
.admin-page-title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 18px;
}

/* Inline messages */
.admin-msg, .admin-err {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 14px;
}
.admin-msg { background: #f0fdf4; color: #16a34a; border-left: 2px solid #16a34a; }
.admin-err { background: #fef2f2; color: #dc2626; border-left: 2px solid #dc2626; }

@media (max-width: 768px) {
    .admin-navbar-container {
        padding: 8px 16px;
        height: auto;
        flex-wrap: wrap;
        gap: 8px;
    }
    .admin-navbar-menu { width: 100%; overflow-x: auto; }
    .admin-container { padding: 16px; }
}

/* ── Global input / button polish ───────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

button {
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, background-color 0.15s, box-shadow 0.15s;
}

/* Ensure primary action buttons meet touch target minimums */
.btn, .log-submit-btn, .log-exercise-btn, .submit-button, .feedback-button {
    min-height: 44px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Settings card shared style */
.settings-card {
    background-color: var(--card-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 8px 20px;
    box-shadow: var(--shadow-card);
}

/* Empty state — shared across all pages */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--secondary-color);
}

.empty-state-icon {
    font-size: 40px;
    color: #d8d8d8;
    display: block;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.empty-state-cta {
    display: inline-block;
    padding: 10px 22px;
    background: var(--accent-color);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

