/* Checkipe Base Styles */
:root {

    /* Brand Colors */
    --brand-green-primary: #28a745;
    --brand-green-dark: #1e7e34;
    --brand-blue-primary: #007bff;
    --brand-blue-dark: #0056b3;
    --brand-blue-focus: rgb(0, 123, 255, 25%);

    /* Text Colors */
    --text-darkest: #212529;
    --text-primary: #333;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-light: #999;
    --text-lighter: #888;
    --text-lightest: #666;

    /* Background Colors */
    --bg-primary: #fff;
    --bg-light: #f8f9fa;
    --bg-medium-light: #f9f9f9;
    --bg-soft: #fafafa;

    /* Border Colors */
    --border-primary: #e9ecef;
    --border-secondary: #dee2e6;
    --border-light: #e0e0e0;
    --border-lighter: #ddd;

    /* Status Colors - Success/Green */
    --success-text: #155724;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --completed-bg: #e8f5e8;
    --completed-border: #4caf50;

    /* Status Colors - Error/Red */
    --error-text: #721c24;
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --danger-primary: #dc3545;

    /* Status Colors - Warning/Yellow */
    --warning-text: #856404;
    --warning-bg: #fff3cd;
    --warning-border: #ffeaa7;

    /* Status Colors - Info/Blue */
    --info-text: #004085;
    --info-bg: #cce7ff;
    --info-border: #007bff;

    /* Interactive States */
    --hover-bg: #f0f0f0;
    --focus-outline: 2px solid var(--brand-blue-dark);
    --focus-shadow: 0 0 0 3px var(--brand-blue-focus);

    /* Shadows and Effects */
    --shadow-small: 0 2px 4px rgb(0, 0, 0, 10%);
    --shadow-medium: 0 2px 8px rgb(0, 123, 255, 30%);
    --shadow-large: 0 2px 10px rgb(0, 0, 0, 10%);
}

* {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Styles */
header {
    background-color: var(--bg-light);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-secondary);
    margin-bottom: 2rem;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-content h1 {
    margin: 0;
    font-size: 1.25rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    color: var(--brand-green-primary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo-env {
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: 400;
}

.logo-gradient-stop-start {
    stop-color: var(--brand-green-primary);
}

.logo-gradient-stop-end {
    stop-color: var(--brand-green-dark);
}

/* Hamburger Menu Styles */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.hamburger-menu:hover {
    background-color: var(--border-primary);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation Menu Styles */
.nav-menu {
    position: absolute;
    top: 100%;
    right: 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    box-shadow: var(--shadow-large);
    z-index: 1000;
    min-width: 200px;
    display: none;
}

.nav-menu.active {
    display: block;
}

.nav-menu a,
.nav-menu span {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--bg-light);
    transition: background-color 0.2s;
}

.nav-menu-link,
.nav-menu-form button[type="submit"] {
    background: none;
    border: none;
    border-bottom: 1px solid var(--bg-light);
    color: var(--text-primary);
    display: block;
    padding: 0.75rem 1rem;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-menu-link:hover,
.nav-menu-form button[type="submit"]:hover {
  background-color: var(--bg-light);
}

/* Main Content Styles */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Alert Styles - Consolidated */
.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-error {
    color: var(--error-text);
    background-color: var(--error-bg);
    border-color: var(--error-border);
}

.alert-success {
    color: var(--success-text);
    background-color: var(--success-bg);
    border-color: var(--success-border);
}

/* Global Link Styles for Recipe and Run Slugs */
.recipe-link {
    font-size: 0.9em;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    margin-left: 0.5rem;
}

.recipe-link:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.run-slug-link {
    display: inline-flex;
    align-items: center;
    font-family: 'SF Mono', Monaco, Inconsolata, 'Fira Code', Consolas, monospace;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--brand-blue-primary);
    background-color: var(--bg-light);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid var(--brand-blue-primary);
}

.run-slug-link:hover {
    background-color: var(--brand-blue-primary);
    color: var(--bg-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   Utility Classes (formerly from colors.css)
   ========================================================================== */

/* Display Utilities */
.hidden {
    display: none;
}

/* Mode Toggle */
.mode-toggle {
    margin-bottom: 2rem;
}

.mode-toggle-buttons {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border-lighter);
}

.mode-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.mode-btn:hover {
    background-color: var(--bg-light);
}

.mode-btn.active {
    background-color: var(--brand-blue-primary);
    color: var(--bg-primary);
}

/* Recipe Form Specific */
.instruction-with-toggle {
    position: relative;
}

.number-fields {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 4px;
    border: 1px solid var(--border-lighter);
}

.number-field-group {
    margin-bottom: 1rem;
}

.number-field-group:last-child {
    margin-bottom: 0;
}

.number-tracking-toggle-compact {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0.25rem;
    background: var(--brand-blue-primary);
    color: var(--bg-primary);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.step-instruction {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    border: 2px solid var(--border-lighter);
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
}

.step-instruction:focus {
    outline: none;
    border-color: var(--brand-blue-primary);
    box-shadow: 0 0 0 2px var(--brand-blue-focus);
}

.step-order-input {
    width: 60px;
    text-align: center;
    padding: 0.25rem;
    margin: 0 0.5rem;
    border: 1px solid var(--border-lighter);
    border-radius: 3px;
    font-size: 0.9rem;
}

.btn-add {
    background-color: var(--brand-green-primary);
    color: var(--bg-primary);
    border-color: var(--brand-green-primary);
}

.btn-add:hover {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
}

.delete-step {
    color: var(--danger-primary);
    margin-left: 0.5rem;
}

.delete-step:hover {
    background-color: var(--error-bg);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Button Styles */
.btn {
    padding: 0.875rem 1.75rem;
    border: 2px solid var(--border-lighter);
    border-radius: 6px;
    background-color: var(--bg-primary);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    min-height: 44px; /* Touch-friendly minimum */
}

.btn:hover {
    background-color: var(--bg-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-small);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-blue-focus);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--brand-blue-primary);
    color: var(--bg-primary);
    border-color: var(--brand-blue-primary);
}

.btn-primary:hover {
    background-color: var(--brand-blue-dark);
    border-color: var(--brand-blue-dark);
    color: var(--bg-primary);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px var(--brand-blue-focus);
}

.btn-secondary {
    background-color: var(--text-muted);
    color: var(--bg-primary);
    border-color: var(--text-muted);
}

.btn-secondary:hover {
    background-color: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--bg-primary);
}

.btn-secondary:focus {
    box-shadow: 0 0 0 3px rgb(108, 117, 125, 25%);
}

.btn-success {
    background-color: var(--brand-green-primary);
    color: var(--bg-primary);
    border-color: var(--brand-green-primary);
}

.btn-success:hover {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
    color: var(--bg-primary);
}

.btn-danger {
    background-color: var(--danger-primary);
    color: var(--bg-primary);
    border-color: var(--danger-primary);
}

.btn-danger:hover {
    background-color: var(--error-text);
    border-color: var(--error-text);
    color: var(--bg-primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
    min-height: 52px;
}

.btn-outline {
    background-color: transparent;
    color: var(--brand-blue-primary);
    border-color: var(--brand-blue-primary);
}

.btn-outline:hover {
    background-color: var(--brand-blue-primary);
    color: var(--bg-primary);
}

/* Responsive adjustments for forms */
@media (width <= 768px) {
    .step-edit-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .step-form {
        padding: 1.5rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .page-header h1 {
        font-size: 1.5em;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    .status-info {
        align-self: stretch;
    }
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-latest {
    background-color: var(--brand-green-primary);
    color: var(--bg-primary);
}

.badge-published {
    background-color: var(--brand-blue-primary);
    color: var(--bg-primary);
}

.badge-draft {
    background-color: var(--text-muted);
    color: var(--bg-primary);
}

.badge-edited {
    background-color: var(--info-border);
    color: var(--bg-primary);
}

.alert-warning {
    color: var(--warning-text);
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
}

.alert-info {
    color: var(--info-text);
    background-color: var(--info-bg);
    border-color: var(--info-border);
}

/* Recipe Notice Styles - extends alert styles */
.recipe-notice {
    margin-top: 0.5rem;
    font-size: 0.9em;
}

/* Status Badge Styles */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-completed {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.status-skipped {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

.status-incomplete {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

/* Form Styles - Consolidated */
.form-control {
    border: 2px solid var(--border-light);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--bg-primary);
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-blue-primary);
    box-shadow: 0 0 0 3px var(--brand-blue-focus);
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 1;
}

/* Standard form group - default spacing */
.form-group {
    margin-bottom: 1.5rem;
    display: block;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
}

/* Compact form styles for lists and inline usage */
.form-compact .form-group {
    margin-bottom: 0.75rem;
}

.form-compact .form-control {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.form-compact .form-group label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* Inline form styles for single-line layouts */
.form-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.form-inline .form-group label {
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 0.9rem;
}

.form-inline .form-control {
    width: auto;
    min-width: 120px;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.form-inline .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: auto;
}

/* Detail form styles for spacious, focused editing */
.form-detail .form-group {
    margin-bottom: 2.5rem;
}

.form-detail .form-group:last-of-type {
    margin-bottom: 2rem;
}

.form-detail .form-control {
    padding: 0.875rem;
    font-size: 1rem;
}

.form-detail .form-control.textarea {
    min-height: 140px;
    line-height: 1.6;
}

.form-detail .form-control.textarea.notes {
    min-height: 220px;
}

.form-detail .form-group label {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-errors {
    margin-top: 0.25rem;
}

.form-errors .error {
    color: var(--error-text);
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

/* Text Color Utilities */
.text-primary { color: var(--text-primary); }

.text-secondary { color: var(--text-secondary); }

.text-muted { color: var(--text-muted); }

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

.text-success { color: var(--success-text); }

.text-error { color: var(--error-text); }

.text-warning { color: var(--warning-text); }

.text-info { color: var(--info-text); }

/* Background Color Utilities */
.bg-light { background-color: var(--bg-light); }

.bg-soft { background-color: var(--bg-soft); }

.bg-success { background-color: var(--success-bg); }

.bg-error { background-color: var(--error-bg); }

.bg-warning { background-color: var(--warning-bg); }

.bg-info { background-color: var(--info-bg); }

/* Border Color Utilities */
.border { border: 1px solid var(--border-primary); }

.border-light { border: 1px solid var(--border-light); }

.border-success { border: 1px solid var(--success-border); }

.border-error { border: 1px solid var(--error-border); }

.border-warning { border: 1px solid var(--warning-border); }

/* Link Styles */
.link-primary {
    color: var(--brand-blue-primary);
    text-decoration: none;
}

.link-primary:hover {
    color: var(--brand-blue-dark);
    text-decoration: underline;
}

.link-muted {
    color: var(--text-muted);
    text-decoration: none;
}

.link-muted:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Legacy form-container class */
.form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-medium-light);
    border-radius: 8px;
    box-shadow: var(--shadow-small);
}

.steps-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-secondary);
}

.step-form {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-lighter);
    border-radius: 4px;
}

.step-number {
    min-width: 40px;
    height: 40px;
    background: var(--brand-blue-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Checklist Styles (formerly from checklist.css)
   ========================================================================== */

.checklist {
    max-width: 600px;
    margin: 20px 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background-color: var(--bg-soft);
    transition: background-color 0.2s ease;
}

.checklist-item:hover {
    background-color: var(--hover-bg);
}

.step-checkbox {
    margin-right: 12px;
    transform: scale(1.2);
    cursor: pointer;
}

.step-label {
    display: flex;
    align-items: baseline;
    cursor: pointer;
    flex: 1;
}

.step-text {
    line-height: 1.4;
}

.step-checkbox:checked + .step-label .step-text {
    text-decoration: line-through;
    color: var(--text-lighter);
}

.step-checkbox:checked + .step-label {
    opacity: 0.7;
}

.checklist-item:has(.step-checkbox:checked) {
    background-color: var(--completed-bg);
    border-color: var(--completed-border);
}

.no-steps {
    padding: 20px;
    text-align: center;
    color: var(--text-lightest);
    font-style: italic;
}

/* ==========================================================================
   Containers - Unified patterns
   ========================================================================== */

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.container-form {
    background: var(--bg-medium-light);
    border-radius: 8px;
    box-shadow: var(--shadow-small);
}

.container-small {
    max-width: 400px;
    border: 1px solid var(--border-lighter);
}

/* Headers */
.password-reset-container h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Success icon */
.success-icon {
    font-size: 4rem;
    color: var(--brand-green-primary);
    margin-bottom: 1rem;
}

/* Password reset uses shared form container and login form styles */

/* Next steps section */
.next-steps {
    text-align: left;
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-secondary);
    margin-bottom: 2rem;
}

.next-steps h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.next-steps ul {
    margin: 0;
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Action buttons */
.login-actions,
.reset-links {
    margin-bottom: 2rem;
}

/* Navigation links */
.password-reset-links {
    text-align: center;
    margin-top: 2rem;
}

.password-reset-links a {
    color: var(--brand-blue-primary);
    text-decoration: none;
    margin: 0 0.5rem;
}

/* Move these selectors before hover pseudo-selectors for specificity */
.login-links a {
    color: var(--brand-blue-primary);
    text-decoration: none;
}

.run-title a {
    color: var(--brand-blue-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.header-content h1 a {
    text-decoration: none;
    color: var(--text-primary);
}

.password-reset-links a:hover {
    text-decoration: underline;
}



/* Shared header pattern for pages */
.page-header,
.recipe-header,
.runs-header,
.versions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

/* ==========================================================================
   Login Styles
   ========================================================================== */



/* Login form uses shared form styles - no additional styling needed */
.login-form {
    display: flex;
    flex-direction: column;
}

.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links p {
    margin: 0.5rem 0;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Recipe info styling */
.recipe-info h2 {
    margin: 0 0 0.3125rem;
    color: var(--text-darkest);
    font-size: 1.75em;
}

.recipe-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95em;
}

.recipe-owner-actions {
    margin-top: 0.625rem;
    display: flex;
    gap: 0.625rem;
}

.breadcrumb {
    margin-bottom: 0.5rem;
    font-size: 0.9em;
    color: var(--text-muted);
}





/* Navigation Arrows */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 70px;
    background: rgb(255, 255, 255, 70%);
    border: 1px solid rgb(222, 226, 230, 60%);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgb(0, 0, 0, 5%);
}

.nav-arrow::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
}

.nav-arrow.prev::before {
    border-width: 8px 12px 8px 0;
    border-color: transparent rgb(108, 117, 125, 70%) transparent transparent;
}

.nav-arrow.next::before {
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent rgb(108, 117, 125, 70%);
}

.nav-arrow:hover {
    background: rgb(255, 255, 255, 90%);
    border-color: var(--border-primary);
    box-shadow: var(--shadow-medium);
    transform: translateY(-50%) scale(1.05);
}

.nav-arrow.prev:hover::before {
    border-color: transparent var(--text-primary) transparent transparent;
}

.nav-arrow.next:hover::before {
    border-color: transparent transparent transparent var(--text-primary);
}

.nav-arrow.prev { left: 10px; }

.nav-arrow.next { right: 10px; }

@media (width <= 768px) {
    .nav-arrow { display: none; }
}

/* ==========================================================================
   Run Detail Page Styles
   ========================================================================== */

.run-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: var(--bg-light);
    border-radius: 4px;
    border: 1px solid var(--border-primary);
    font-size: 0.9em;
}

.run-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.run-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
}

.run-title:hover {
    color: var(--brand-blue-primary);
}

.run-title a:hover {
    color: var(--brand-blue-dark);
    text-decoration: underline;
}

.run-info span {
    font-size: 0.9em;
    color: var(--text-muted);
}

.run-slug {
    font-family: monospace;
    background-color: var(--border-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

.run-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.steps-remaining {
    display: flex;
    align-items: center;
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 8px;
    background-color: var(--bg-light);
    border-radius: 3px;
    border: 1px solid var(--border-primary);
}

.slug-editor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.slug-input {
    font-family: 'SF Mono', Monaco, Inconsolata, 'Fira Code', Consolas, monospace;
    background-color: var(--border-primary);
    padding: 3px 10px;
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    font-size: 0.85em;
    width: auto;
    min-width: 150px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.slug-input:focus {
    outline: 2px solid var(--brand-blue-dark);
    outline-offset: 2px;
    border-color: var(--brand-blue-primary);
    background-color: var(--bg-primary);
    box-shadow: var(--focus-shadow);
}

.slug-editor .btn-primary {
    display: none;
}

.slug-editor:focus-within .btn-primary {
    display: inline-block;
}



/* Enhanced step UI styles */
.step-container {
    position: relative;
    margin-bottom: 10px;
}

.step-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--bg-soft);
}

.order-form {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.order-input {
    width: 40px;
    height: 28px;
    padding: 4px 6px;
    border: 1px solid var(--border-lighter);
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
    background-color: var(--bg-light);
    transition: all 0.2s;
}

.order-input:hover {
    background-color: var(--bg-primary);
    border-color: var(--brand-blue-primary);
}

.order-input:focus {
    outline: 2px solid var(--brand-blue-dark);
    outline-offset: 2px;
    border-color: var(--brand-blue-primary);
    background-color: var(--bg-primary);
    box-shadow: var(--focus-shadow);
}

.step-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 1rem;
}

.step-description {
    margin: 0 0 8px;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.step-notes {
    font-size: 0.9em;
    color: var(--text-lightest);
    font-style: italic;
    margin: 0;
}

.step-status {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.simple-icon-btn {
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--text-lightest);
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.simple-icon-btn:hover {
    background-color: var(--border-primary);
    color: var(--text-secondary);
}

.hamburger-menu-trigger {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--text-lightest);
    border-radius: 4px;
}

.hamburger-menu-trigger:hover {
    background-color: var(--border-primary);
}

.step-hamburger-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-lighter);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgb(0, 0, 0, 15%);
    z-index: 1000;
    min-width: 200px;
    display: none;
}

.step-hamburger-menu.active {
    display: block;
}

.menu-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-light);
}

.menu-section:last-child {
    border-bottom: none;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-primary);
    text-decoration: none;
}

.menu-item:hover {
    background-color: var(--bg-light);
}

.menu-form {
    margin: 0;
}

/* Number input styles */
.step-number-input {
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid var(--border-primary);
}

.number-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.number-input {
    flex: 1;
    min-width: 100px;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid var(--border-lighter);
    border-radius: 4px;
    font-size: 0.9em;
    background-color: var(--bg-primary);
    transition: all 0.2s;
}

.number-input:focus {
    outline: 2px solid var(--brand-blue-primary);
    outline-offset: 2px;
    border-color: var(--brand-blue-primary);
    box-shadow: var(--focus-shadow);
}

.number-input:required {
    border-color: var(--danger-primary);
}

.number-input:required:valid {
    border-color: var(--brand-green-primary);
}

.number-unit {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.number-display {
    margin-top: 4px;
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
    background-color: var(--border-primary);
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.insert-step-form {
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-lighter);
    border-radius: 8px;
    margin-bottom: 10px;
    display: none;
}

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

.insert-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-lighter);
    border-radius: 4px;
    margin-bottom: 8px;
}

.form-buttons {
    display: flex;
    gap: 8px;
}

.char-counter {
    font-size: 0.875em;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.5rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
}

.char-counter.warning {
    color: var(--warning-text);
    font-weight: 600;
}

.char-counter.error {
    color: var(--error-text);
    font-weight: 700;
}

/* Section divider */
.section-divider {
    margin: 20px 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-lighter) 20%, var(--border-lighter) 80%, transparent);
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: var(--border-lighter);
    border-radius: 50%;
}

/* Subtle styling differences for sections */
.completed-section .step-main {
    background-color: var(--bg-medium-light);
    opacity: 0.85;
}

.todo-section .step-main {
    background-color: var(--bg-soft);
}

/* Make the content area more responsive to touch */
.touch-device .checklist {
    touch-action: pan-y;

    /* Allow vertical scrolling but detect horizontal swipes */
}

/* ==========================================================================
   Runs Page Styles
   ========================================================================== */



.run-item {
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--bg-primary);
    transition: box-shadow 0.2s;
}

.run-item:hover {
    box-shadow: var(--shadow-small);
}

.run-header span {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recipe-link-runs {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--brand-blue-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.recipe-link-runs:hover {
    color: var(--brand-blue-dark);
    text-decoration: underline;
}

.run-slug-link-runs {
    display: inline-flex;
    align-items: center;
    font-family: 'SF Mono', Monaco, Inconsolata, 'Fira Code', Consolas, monospace;
    font-size: 0.85em;
    color: var(--text-secondary);
    background-color: var(--border-primary);
    padding: 3px 10px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border-secondary);
}

.run-slug-link-runs:hover {
    background-color: var(--border-secondary);
    color: var(--text-darkest);
    border-color: var(--border-lighter);
    text-decoration: none;
}

.run-date {
    font-size: 0.9em;
    color: var(--text-lightest);
}

.run-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background-color: var(--border-primary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--brand-green-primary);
    transition: width 0.3s;
}

.progress-fill-complete {
    width: 100%;
}

.progress-text {
    font-size: 0.9em;
    color: var(--text-lightest);
    min-width: 100px;
}

.run-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-in-progress {
    background-color: var(--warning-bg);
    color: var(--warning-text);
}

.status-not-started {
    background-color: var(--error-bg);
    color: var(--error-text);
}

.no-runs {
    text-align: center;
    padding: 40px;
    color: var(--text-lightest);
}

.runs-section {
    margin-bottom: 40px;
}



.no-runs-section {
    text-align: center;
    padding: 20px;
    color: var(--text-lightest);
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

/* ==========================================================================
   Step Detail Page Styles
   ========================================================================== */

.step-edit-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-small);
}

.page-header h1 {
    margin: 0.5rem 0 0;
    font-size: 1.75em;
    color: var(--text-darkest);
    font-weight: 700;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 500;
}

.step-info {
    background: var(--info-bg);
    color: var(--info-text);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--info-border);
    border-left: 4px solid var(--brand-blue-primary);
}

.step-info p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Step detail form styles - override flex layouts for detail editing */
.step-form.form-detail {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-medium);
    display: block;
    align-items: initial;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-light);
    margin-top: 2rem;
    clear: both;
}

.form-actions .btn {
    min-width: 140px;
    font-weight: 600;
    font-size: 0.95em;
}

/* ==========================================================================
   Utility Styles
   ========================================================================== */

.inline-form {
    display: inline;
}



/* ==========================================================================
   Empty State and Notice Styles - Standardized
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted);
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.empty-state-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-state-description {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.empty-state-actions {
    margin-top: 1rem;
}

/* Notices & Alerts - Unified */
.notice,
.alert {
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    border-radius: 6px;
    border: 1px solid;
    font-size: 0.9em;
    line-height: 1.4;
}

.notice-info, .alert-info { 
    color: var(--info-text); 
    background: var(--info-bg); 
    border-color: var(--info-border); 
}

.notice-warning, .alert-warning { 
    color: var(--warning-text); 
    background: var(--warning-bg); 
    border-color: var(--warning-border); 
}

.notice-success, .alert-success { 
    color: var(--success-text); 
    background: var(--success-bg); 
    border-color: var(--success-border); 
}

.notice-error, .alert-error { 
    color: var(--error-text); 
    background: var(--error-bg); 
    border-color: var(--error-border); 
}

/* Welcome Page Styles */
.welcome-center { 
    text-align: center; 
}

.welcome-features { 
    text-align: left; 
    max-width: 400px; 
    margin: 0 auto 2rem;
}

.welcome-features ul {
    list-style-type: none;
    padding: 0;
}

.welcome-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--success-text);
}

.welcome-cta {
    margin-top: 2rem;
}

/* Recipe Item Styles for Lists */
.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-item {
    padding: 0.75rem;
    background: var(--bg-medium-light);
    border-radius: 4px;
    border-left: 4px solid var(--brand-blue-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-item-actions {
    margin-left: 1rem;
}

.recipe-item-actions form {
    margin: 0;
}

/* Version List Styles */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-item {
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgb(0, 0, 0, 10%);
}

.version-item.latest {
    border-color: var(--brand-green-primary);
    background-color: #f8fff9;
}

.version-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.version-info h3 {
    margin: 0 0 0.25rem;
    color: var(--text-darkest);
    font-size: 1.25em;
}

.version-id {
    font-weight: normal;
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.7em;
}

.version-meta {
    font-size: 0.9em;
    color: var(--text-muted);
}

.version-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.version-description {
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.version-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.edit-relationship {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: var(--info-bg);
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--info-text);
}

/* Higher specificity selectors - must come after all base selectors */
.nav-menu span {
    color: var(--text-muted);
    font-weight: 500;
    background-color: var(--bg-light);
}

.nav-menu a:hover {
    background-color: var(--bg-light);
}

.nav-menu a:last-child {
    border-bottom: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.recipe-item a:hover {
    color: var(--brand-blue-primary);
}