body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc;
    color: #23272f;
}
.container {
    max-width: 400px;
    margin: 40px auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
header {
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}
header .logo {
    margin: 0 auto;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0e7c7b;
}
header .logo span {
    color: #23272f;
    font-size: 1rem;
    font-weight: 400;
}
.intro {
    text-align: center;
    margin-bottom: 32px;
}
.intro h1 {
    margin: 0 0 12px 0;
    font-size: 2rem;
    color: #0e7c7b;
}
.intro p {
    color: #555;
    font-size: 1.05rem;
}
.auth {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-box {
    width: 100%;
    background: #f3f7fa;
    border-radius: 10px;
    padding: 24px 18px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.03);
}
.login-box h2 {
    margin-top: 0;
    color: #0e7c7b;
    font-size: 1.3rem;
    margin-bottom: 18px;
}
.login-box form {
    display: flex;
    flex-direction: column;
}
.login-box input[type="text"],
.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    margin-bottom: 6px;
    border: 1px solid #d4dbe4;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #f9fbfc;
}
.login-box input[type="text"]:focus,
.login-box input[type="email"]:focus,
.login-box input[type="password"]:focus {
    outline: none;
    border-color: #0e7c7b;
    background: #fff;
}
.login-box button {
    padding: 10px;
    background: #0e7c7b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.login-box button:hover {
    background: #095e5d;
}
.signup-link {
    margin-top: 16px;
    text-align: center;
    font-size: 0.97rem;
}
.signup-link a {
    color: #0e7c7b;
    text-decoration: none;
    font-weight: 500;
}
.signup-link a:hover {
    text-decoration: underline;
}
.error {
    color: #b00020;
    background: #ffeaea;
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-size: 0.97rem;
    text-align: center;
}
.db-error {
    color: #b00;
    background: #fee;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 1rem;
}
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    margin-top: 32px;
    text-align: center;
    font-size: 1.5rem;
    color: #0e7c7b;
    font-weight: 600;
}
.profile-header h2 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    color: #0e7c7b;
    font-weight: 700;
}
.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.section {
    background: #f3f7fa;
    border-radius: 10px;
    padding: 18px 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.03);
}
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon {
    font-size: 1.3rem;
    margin-right: 4px;
}
.warn {
    color: #b00020;
    font-size: 1.2rem;
    margin-right: 4px;
}
.none {
    color: #aaa;
}
.profile-actions {
    display: flex;
    gap: 16px;
    margin: 24px 0 12px 0;
    justify-content: center;
}
.profile-actions a, .profile-actions button {
    background: #0e7c7b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.profile-actions a:hover, .profile-actions button:hover {
    background: #095e5d;
}
.logout-icon, .back-icon {
    position: absolute;
    top: 24px;
    z-index: 1001;
}
.logout-icon svg, .back-icon svg {
    display: block;
    transition: filter 0.2s;
}
.logout-icon:hover svg, .back-icon:hover svg {
    filter: brightness(0.7);
}
.back-icon {
    left: 24px;
    display: flex;
    align-items: center;
    padding: 4px;
    background: none;
    border-radius: 50%;
    transition: background 0.2s;
    text-decoration: none;
}
.back-icon:hover {
    background: #e8f0fe;
}
.logout-icon {
    right: 24px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
textarea {
    width: 100%;
    resize: vertical;
}
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.progress-bar .step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e7ef;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}
.progress-bar .step.done {
    background: #0e7c7b;
    color: #fff;
}
.progress-bar .step.active {
    background: #3ed7c0;
    color: #fff;
}
.progress-bar .bar {
    width: 40px;
    height: 4px;
    background: #e0e7ef;
    margin: 0 2px;
    border-radius: 2px;
}
.progress-bar .step.done + .bar {
    background: #0e7c7b;
}
.food-label {
    background: #fff;
    border: 4px solid #222;
    border-radius: 12px;
    max-width: 420px;
    margin: 40px auto 0 auto;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 0 0 24px 0;
}
.food-label .label-header {
    background: #f8fafc;
    border-bottom: 4px solid #222;
    padding: 18px 24px 10px 24px;
    text-align: left;
}
.food-label .label-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #222;
    margin-bottom: 2px;
}
.food-label .label-username {
    font-size: 1.1rem;
    color: #0e7c7b;
    font-weight: 600;
}
.food-label .label-section {
    border-top: 2px solid #222;
    padding: 18px 24px 6px 24px;
}
.food-label .label-section-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.food-label .label-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 8px;
}
.food-label .label-list .icon, .food-label .label-list .warn {
    font-size: 1.15rem;
    background: #f3f7fa;
    border-radius: 6px;
    padding: 3px 8px;
    color: #222;
    border: 1px solid #d4dbe4;
}
.food-label .label-list .warn {
    background: #ffeaea;
    color: #b00020;
    border: 1px solid #b00020;
}
.food-label .label-row {
    margin-bottom: 7px;
}
.food-label .label-row b {
    font-weight: 600;
    color: #222;
}
.food-label .none {
    color: #aaa;
    font-style: italic;
}
.form-section {
    margin-bottom: 18px;
}
.form-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 7px;
    color: #0e7c7b;
}
.form-section textarea,
.form-section input[type="text"] {
    margin-bottom: 4px;
}
.checkbox-row {
    margin-bottom: 8px;
}
.section-header, .section-header-static {
    background: #f3f7fa;
    font-weight: 600;
    font-size: 1.08rem;
    padding: 14px 18px;
    border-radius: 7px 7px 0 0;
    border: 1px solid #d4dbe4;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
    margin-right: 2px;
    background: none;
}
.arrow::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    margin: auto;
    border-style: solid;
    border-width: 6px 5px 0 5px;
    border-color: #0e7c7b transparent transparent transparent;
}
.collapsible .section-content {
    display: none;
}
.collapsible.open .section-content {
    display: block;
}
.collapsible.open .arrow {
    transform: rotate(180deg);
}
.always-open .section-header-static {
    background: #f3f7fa;
    font-weight: 600;
    font-size: 1.08rem;
    padding: 14px 18px;
    border-radius: 7px 7px 0 0;
    border: 1px solid #d4dbe4;
    margin-bottom: 0;
    cursor: default;
    transition: none;
    box-shadow: none;
    color: #23272f;
    text-shadow: none;
    font-size: 1.13rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.always-open .section-header-static label,
.always-open .section-header-static span,
.always-open .section-header-static b {
    color: #23272f;
    font-weight: 700;
    font-size: 1.13rem;
    margin-bottom: 0;
}
.always-open .section-header-static .arrow { display: none; }
.always-open .section-content-static {
    padding: 14px 18px 8px 18px;
    border-radius: 0 0 7px 7px;
    border: 1px solid #d4dbe4;
    border-top: none;
    background: #fff;
    display: block;
}
/* Standalone input/textarea style for profile/edit/profile_setup */
.login-box-input {
    width: 100%;
    padding: 9px 11px;
    margin-bottom: 6px;
    border: 1px solid #d4dbe4;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #f9fbfc;
    transition: border-color 0.2s, background 0.2s;
}
.login-box-input:focus {
    outline: none;
    border-color: #0e7c7b;
    background: #fff;
}
/* Standalone button style for profile/edit/profile_setup */
.login-box-button {
    width: 100%;
    padding: 10px;
    background: #0e7c7b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.login-box-button:hover, .login-box-button:focus {
    background: #119b96;
}
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    align-items: stretch;
}
.next-bottom-btn {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0;
    box-sizing: border-box;
}
.next-bottom-btn {
    width: 75%;
    background: #0e7c7b;
    color: #fff;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.2s;
    margin-bottom: 0;
}
.next-bottom-btn:focus, .next-bottom-btn:hover {
    background: #119b96;
}
.next-bottom-btn.only-next {
    width: 100%;
    margin-left: 0;
}
.back-bottom-btn {
    width: 25%;
    min-width: 48px;
    max-width: 90px;
    height: 48px;
    background: #f4f8fa;
    border: 1px solid #d4dbe4;
    color: #0e7c7b;
    transition: background 0.2s, border 0.2s;
    cursor: pointer;
    line-height: 1;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.back-bottom-btn:focus, .back-bottom-btn:hover {
    background: #e8f0fe;
    border-color: #0e7c7b;
}
.back-arrow-char {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
@media (max-width: 600px) {
    .container {
        max-width: 98vw;
        margin: 12px;
        padding: 12px;
    }
    .login-box {
        padding: 16px 6px;
    }
    .login-box input[type="text"],
    .login-box input[type="email"],
    .login-box input[type="password"] {
        margin-bottom: 10px;
    }
    .section-header, .section-header-static {
        padding: 10px 8px;
    }
    .section-content-static {
        padding: 10px 8px 6px 8px;
    }
    .always-open .section-header-static {
        padding: 10px 8px;
        font-size: 1rem;
    }
    .back-icon {
        top: 10px;
        left: 10px;
    }
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
    }
    .back-bottom-btn, .next-bottom-btn, .next-bottom-btn.only-next {
        width: 100%;
        max-width: none;
        height: 44px;
    }
}
@media (max-width: 700px) {
    .profile-sections { gap: 16px; }
    .section { padding: 12px 6px; }
}
@media (max-width: 600px) {
    .food-label { max-width: 99vw; margin: 18px 2vw 0 2vw; }
    .food-label .label-header, .food-label .label-section { padding-left: 8px; padding-right: 8px; }
}
/* Removed unused .back-form and .back-bottom-btn svg styles (SVG replaced with Unicode arrow) */

.profile-last-edited {
    margin-top: 10px;
    font-size: 0.97rem;
    color: #888;
    text-align: center;
}

.profile-last-edited.subtle {
    background: none;
    border: none;
    color: #888;
    font-size: 0.95em;
    text-align: right;
    margin: 0 0 10px 0;
    padding: 0;
    box-shadow: none;
    display: block;
}
