/*
 * Responsive Website Stylesheet
 * Author: AI Assistant
 * Description: Styles for a responsive website supporting both mobile and desktop.
 * Key Features: Collapsible navigation, fluid typography, and responsive images.
 */

/* ==========================================================================
   1. CSS Variables and Global Resets
   ========================================================================== */

   :root {
    /* Color Palette */
    --primary-color: #337ab7; /* A nice blue for primary actions/backgrounds */
    --secondary-color: #5cb85c; /* Green for secondary actions/accents */
    --text-color: #333;
    --background-color: #f8f8f8;
    --nav-bg-color: #222;
    --nav-link-color: #fff;
    --nav-link-hover: #ddd;

    /* Typography */
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --padding-sm: 10px;
    --padding-md: 20px;
    --padding-lg: 40px;
}

/* Box-sizing reset for easier layout management */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Basic body styling */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
    /* Prevents horizontal scrolling caused by elements extending beyond viewport */
    overflow-x: hidden;
}

/* temporary style for light text */
.light_text {
    color: #fff;
}

/* ==========================================================================
   2. Fluid Typography and Media
   ========================================================================== */

/* Use viewport units for fluid typography. Base size is set on body. */
h1 { font-size: 2.5em; margin-bottom: 0.6em; }
h2 { font-size: 2em; margin-bottom: 0.7em; }
h3 { font-size: 1.5em; margin-bottom: 0.8em; }
p { margin-bottom: 1em; }

/* Fluid images: ensure all images, videos, and media elements resize automatically */
img, video, iframe {
    max-width: 100%; /* Guarantees they won't exceed their container width */
    height: auto;    /* Maintains aspect ratio */
    display: block;  /* Removes extra space beneath images */
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   3. Navigation Banner (Desktop First)
   ========================================================================== */

/* The main navigation container */
.navbar {
    background-color: var(--nav-bg-color);
    padding: var(--padding-sm) var(--padding-md);
    display: flex;
    justify-content: space-between; /* Logo on left, links on right */
    align-items: center;
    width: 100%;
    position: sticky; /* Keeps the nav fixed at the top when scrolling */
    top: 0;
    z-index: 1000; /* Ensures the nav is above other content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Logo/Brand styling */
.navbar-brand {
    color: var(--nav-link-color);
    font-size: 1.5em;
    text-decoration: none;
    font-weight: bold;
}

.navbar-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.environment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #ffc107;
    color: #212529;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation links container - default desktop view */
.nav-links {
    list-style: none;
    display: flex; /* Display links horizontally */
    gap: var(--padding-md); /* Space between links */
}

/* Individual link styling */
.nav-links a {
    color: var(--nav-link-color);
    text-decoration: none;
    padding: 5px 10px;
    display: block;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--nav-link-hover);
}

/* Hamburger menu button (hidden on desktop) */
.hamburger-menu {
    display: none; /* Hide by default */
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    color: var(--nav-link-color);
    font-size: 1.5rem;
    margin-left: auto; /* Push to the right */
}

/* ==========================================================================
   4. Mobile Responsiveness (Media Query)
   ========================================================================== */

/* Styles applied when the screen width is 768px or less (typical tablet/mobile cutoff) */
@media (max-width: 768px) {

    /* Increase base font size for better readability on mobile */
    /* :root {
    } */


    /* Hamburger menu is shown and right-aligned */
    .hamburger-menu {
        display: block;
        margin-left: auto; /* Right-align the hamburger menu */
    }

    /* Navigation links container is collapsed by default on mobile */
    .nav-links {
        /* Full width and positioned below the brand/hamburger */
        position: absolute;
        top: 100%; /* Places it right below the navbar */
        left: 0;
        width: 100%;
        background-color: var(--nav-bg-color); /* Matches navbar background */
        flex-direction: column; /* Stacks links vertically */
        align-items: center; /* Center links in the column */
        max-height: 0; /* Initially collapsed height */
        overflow: hidden; /* Hide content that exceeds the zero height */
        transition: max-height 0.3s ease; /* Smooth transition for the collapse/expand effect */
    }

    /* When the menu is active (assuming a JavaScript class '.open' is toggled) */
    .nav-links.open {
        /* Use max-height with a value large enough to accommodate all items */
        max-height: 300px; /* Increased to ensure all navigation items are visible */
        height: auto;
        padding: var(--padding-sm) 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        overflow: visible;
    }

    /* Individual links take full width and add vertical padding */
    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        padding: var(--padding-sm) var(--padding-md);
    }
}

/* ==========================================================================
   5. Main Content Layout (Simple Example)
   ========================================================================== */

.container {
    max-width: 1200px; /* Max width for desktop content */
    margin: 0 auto; /* Center the container */
    padding: var(--padding-md);
}

.section {
    padding: var(--padding-lg) 0;
    border-bottom: 1px solid #eee;
}

/* Simple two-column layout that collapses to one column on mobile */
.row {
    display: flex;
    flex-wrap: wrap; /* Allows columns to stack */
    gap: var(--padding-md);
}

.col-half {
    flex: 1 1 100%; /* Start at 100% width (mobile view) */
    min-width: 300px;
}

@media screen and (min-width: 769px) {
    .col-half {
        flex: 1 1 calc(50% - var(--padding-md) / 2); /* 50% width on desktop, accounting for gap */
    }
}

/* ==========================================================================
   6. Accessibility and Focus States
   ========================================================================== */

/* Better focus styles for keyboard users */
a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Visually hide content while keeping it accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   7. Table Styles
   ========================================================================== */

.table-container {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--primary-color);
}

table thead tr {
    background-color: var(--primary-color);
    color: white;
}

table th {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

table td {
    padding: 10px;
    border: 1px solid #ddd;
}

table tbody tr {
    background-color: white;
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ==========================================================================
   8. Login Form Styles (Responsive & Mobile-Friendly)
   ========================================================================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: var(--padding-md);
}

.login-card {
    width: 100%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: var(--padding-lg);
}

.login-title {
    font-size: 1.75em;
    margin-bottom: 1.5em;
    text-align: center;
    color: var(--text-color);
}

.login-form {
    width: 100%;
}

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

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

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.25rem; /* Prevents zoom on iOS */
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-family);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none; /* Removes iOS default styling */
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.25rem; /* Prevents zoom on iOS */
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent; /* Removes tap highlight on mobile */
    touch-action: manipulation; /* Improves touch responsiveness */
}

.btn-submit:hover {
    background-color: #286090;
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 1.5em;
    border-radius: 8px;
    font-size: 0.9em;
}

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

.mb-3 {
    margin-bottom: 1em;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .login-container {
        min-height: calc(100vh - 150px);
        padding: var(--padding-sm);
    }

    .login-card {
        padding: var(--padding-md);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .login-title {
        font-size: 2.75em;
        margin-bottom: 1.25em;
    }

    .form-control {
        padding: 16px; /* Larger touch target for mobile */
        font-size: 2.25rem; /* Prevents iOS zoom on focus */
    }

    .btn-submit {
        padding: 16px; /* Larger touch target (minimum 44x44px recommended) */
        font-size: 1.25rem;
    }

    /* Ensure inputs don't zoom on iOS */
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        font-size: 1.25rem !important;
    }
}

/* Very small screens */
@media screen and (max-width: 480px) {
    .login-card {
        padding: var(--padding-md);
    }

    .login-title {
        font-size: 1.35rem;
    }
}

/* ==========================================================================
   9. Subnav Styles
   ========================================================================== */

.subnav {
    /* font-size: 1.75rem; */
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
    padding: 0;
}

.subnav-menu {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--padding-md);
}

.subnav-item {
    display: block;
    padding: 12px 24px;
    color: #333;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.subnav-item:hover {
    background-color: #e9ecef;
    border-bottom-color: var(--secondary-color);
    color: var(--primary-color);
}

.subnav-item.active {
    background-color: #e9ecef;
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

@media (max-width: 768px) {
    .subnav-menu {
        flex-direction: column;
    }
    
    .subnav-item {
        border-bottom: 1px solid #dee2e6;
        border-left: 3px solid transparent;
    }
    
    .subnav-item:hover {
        border-bottom-color: transparent;
        border-left-color: var(--secondary-color);
    }
}

/* ==========================================================================
   10. Exercise Action Cards
   ========================================================================== */

.actions-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 600px) {
    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.action-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--padding-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.action-card-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.action-card-type {
    background-color: rgba(51, 122, 183, 0.1);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.action-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.action-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    min-height: 44px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.action-card-button:hover {
    transform: translateY(-1px);
}

.action-card-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.action-card-button--primary {
    background-color: var(--primary-color);
    color: #fff;
}

.action-card-button--primary:hover {
    background-color: #286090;
}

.action-card-button--danger {
    background-color: #dc3545;
    color: #fff;
}

.action-card-button--danger:hover {
    background-color: #a71d2a;
}

/* ==========================================================================
   11. Exercise Action Form
   ========================================================================== */

.page-header {
    margin: 20px 0;
}

.page-header h1 {
    font-size: 2rem;
    margin: 0;
}

.page-header--centered {
    text-align: center;
}

.page-header--centered h1 {
    width: 100%;
}

.page-header--with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.page-header__cta {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.page-header__cta .button {
    min-width: 200px;
}

@media (max-width: 600px) {
    .page-header--with-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header__actions {
        width: 100%;
    }

    .page-header__actions .button {
        flex: 1 1 100%;
    }
}

.exercise-action-form {
    max-width: 540px;
    margin: 0 auto;
    padding: var(--padding-md);
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-field__label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.form-field__input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    appearance: none;
}

.form-field__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.1);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    color: #fff;
    min-height: 48px;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.button--primary {
    background-color: var(--secondary-color);
}

.button--primary:hover {
    background-color: #3f8f45;
}

.button--secondary {
    background-color: #6c757d;
}

.button--secondary:hover {
    background-color: #545b62;
}

.button--danger {
    background-color: #dc3545;
}

.button--danger:hover {
    background-color: #a71d2a;
}

.button--ghost {
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.button--ghost:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.button--info {
    background-color: #17a2b8;
}

.button--info:hover {
    background-color: #10758a;
}

.button--small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 40px;
}

@media (max-width: 540px) {
    .exercise-action-form {
        padding: var(--padding-sm);
        border-radius: 10px;
    }

    .button {
        flex: 1 1 100%;
    }
    .button_50 {
        flex: 1 1 50%;
    }
}

/* ==========================================================================
   12. Exercise Session Grid
   ========================================================================== */

.session-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 600px) {
    .session-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.session-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--padding-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.session-card-date {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.session-card-sets {
    background-color: rgba(92, 184, 92, 0.15);
    color: var(--secondary-color);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.session-card-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.session-card-actions .action-card-button {
    min-width: 150px;
}

/* ==========================================================================
   13. Track Exercise Page
   ========================================================================== */

.session-hero {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.12), rgba(51, 122, 183, 0.08));
    border-left: 4px solid var(--secondary-color);
    border-radius: 12px;
    padding: var(--padding-md);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.session-hero__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-hero__title {
    margin: 0;
    color: #2e7d32;
    font-size: 1.4rem;
}

.session-hero__subtitle {
    margin: 0;
    color: #3f3f3f;
    font-size: 1rem;
}

.session-hero__actions .button {
    min-width: 180px;
}

.session-hero__actions {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.session-hero {
    flex-direction: column;
    align-items: flex-start;
}

.track-layout {
    display: grid;
    gap: 30px;
}

@media (min-width: 960px) {
    .track-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.session-workout,
.session-sidebar section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: var(--padding-md);
}

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

.section-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.empty-state {
    color: #666;
    font-style: italic;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 16px;
    border-radius: 8px;
    margin: 0;
}

.empty-state--subtle {
    background: transparent;
    padding: 12px 0;
}

.set-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.set-card {
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fafafa;
}

.set-card-header {
    background-color: #f5f5f5;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.set-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.set-card-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.set-card-tag {
    background-color: #e0e0e0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.set-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rep-grid {
    display: grid;
    gap: 16px;
    padding: 16px;
}

@media (min-width: 600px) {
    .rep-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.rep-card {
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #ececec;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.rep-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rep-card-index {
    font-weight: 700;
}

.rep-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rep-card-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
}

.rep-card-label {
    color: #666;
}

.rep-card-value {
    font-weight: 600;
    color: var(--text-color);
}

.session-notes h3 {
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.form-field__textarea {
    min-height: 140px;
    resize: vertical;
}

.form-actions--right {
    justify-content: flex-end;
}

.session-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ==========================================================================
   14. New Set Rep Page
   ========================================================================== */

.rep-set-summary {
    background: linear-gradient(135deg, rgba(92, 184, 92, 0.12), rgba(51, 122, 183, 0.08));
    border-left: 4px solid var(--secondary-color);
    border-radius: 12px;
    padding: var(--padding-md);
    margin-bottom: 30px;
}

.rep-set-summary__header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rep-set-summary__title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rep-set-summary__title h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #2e7d32;
}

.rep-set-summary__tag {
    background-color: #e0e0e0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.rep-set-summary__session {
    font-size: 1rem;
    color: #333;
}

.rep-history {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: var(--padding-md);
}

.rep-history__list {
    display: grid;
    gap: 16px;
}

@media (min-width: 600px) {
    .rep-history__list {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.rep-history-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #ececec;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rep-history-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rep-history-card__title {
    font-weight: 700;
    font-size: 1rem;
}

.rep-history-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rep-history-card__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
}

.rep-history-card__label {
    color: #666;
}

.rep-history-card__value {
    font-weight: 600;
    color: var(--text-color);
}

.rep-form-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--padding-md);
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field-help {
    margin: 6px 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* ==========================================================================
   15. To-Do List Pages
   ========================================================================== */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.alert--success {
    background-color: #e6f4ea;
    color: #1f6b34;
    border: 1px solid rgba(31, 107, 52, 0.2);
}

.alert--error {
    background-color: #fdecea;
    color: #b42510;
    border: 1px solid rgba(180, 37, 16, 0.2);
}

.hidden {
    display: none !important;
}

.todo-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .todo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.todo-card {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--padding-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.todo-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.todo-card__title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.todo-card__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.todo-card__status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: rgba(51, 122, 183, 0.12);
    color: var(--primary-color);
    margin-top: 6px;
}

.todo-card__favorite {
    font-size: 1.3rem;
    color: #f5b301;
}

.todo-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-card__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
}

.todo-card__label {
    color: #666;
}

.todo-card__value {
    font-weight: 600;
    color: var(--text-color);
}

.todo-card__footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.todo-form {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--padding-md);
}

.todo-form__delete {
    margin-top: 1rem;
}

.health-note-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.health-note-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    align-items: center;
}

@media (max-width: 600px) {
    .health-note-row {
        grid-template-columns: 1fr 1fr;
        font-size: 0.9rem;
    }
}

.health-note-row:last-child {
    border-bottom: none;
}

.health-note-row:hover {
    background-color: #f8f9fa;
}

.health-note-row--header {
    font-weight: 600;
    color: #666;
    background-color: #f8f9fa;
    pointer-events: none;
}

.health-note-row--header:hover {
    background-color: #f8f9fa;
}

.health-note-row__date {
    font-weight: 600;
}

.health-note-detail {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--padding-md);
}

.health-note-detail__row {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.health-note-detail__row:last-child {
    border-bottom: none;
}

.health-note-detail__row dt {
    font-weight: 600;
    min-width: 140px;
    color: #666;
}

.health-note-detail__row dd {
    margin: 0;
}

.inline-delete-form {
    display: inline;
}

.food-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.food-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.food-row:last-child {
    border-bottom: none;
}

.food-row:hover {
    background-color: #f8f9fa;
}

.food-row--header {
    font-weight: 600;
    color: #666;
    background-color: #f8f9fa;
    pointer-events: none;
}

.food-row--header:hover {
    background-color: #f8f9fa;
}

@media (max-width: 600px) {
    .food-row {
        grid-template-columns: 1fr 1fr;
        font-size: 0.9rem;
    }
}

.form-field--inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.checkbox-inline__label {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

.todo-items-manage__new,
.todo-items-manage__list {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: var(--padding-md);
    margin-bottom: 30px;
}

.todo-items-manage__completed-heading {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.todo-items-manage__new-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.todo-item-form {
    display: grid;
    gap: 16px;
}

.todo-item-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.todo-item-row {
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #ececec;
    padding: var(--padding-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item-grid {
    display: grid;
    gap: 16px;
}

.todo-item-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.todo-item-summary__main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.todo-item-summary__status {
    background-color: rgba(51, 122, 183, 0.12);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
}

.todo-item-summary__meta {
    font-size: 0.85rem;
    color: #666;
}

.todo-item-summary__actions {
    display: flex;
    gap: 8px;
}

.todo-item-form-inline {
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #ececec;
    padding: var(--padding-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .todo-item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-field--full {
    grid-column: 1 / -1;
}

.todo-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}