/* Tailwind CSS (utility subset for mobile layout) */
* { box-sizing: border-box; }
html { font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; cursor: pointer; background: none; }
input { font: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --cream-50: #f8f1e8;
    --cream-100: #f4e7da;
    --cream-200: #e3d3c0;
    --forest-700: #2f4f4f;
    --forest-900: #253633;
    --sand-500: #c6a072;
    --rose-400: #dd8c7b;
    --charcoal: #202020;
    --muted: #7b7b7b;
    --white: #ffffff;
    --safe-area-top: 0px;
    --safe-area-bottom: 0px;
}

@supports (padding: env(safe-area-inset-top)) {
    :root {
        --safe-area-top: env(safe-area-inset-top);
        --safe-area-bottom: env(safe-area-inset-bottom);
    }
}

.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1 1 0%; }
.text-center { text-align: center; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }

.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }

.text-white { color: #ffffff; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5f5; }
.text-slate-400 { color: #94a3b8; }
.text-rose-100 { color: #ffe4e6; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.625; }

.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/90 { background-color: rgba(15, 23, 42, 0.9); }
.bg-slate-800 { background-color: #1e293b; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-600 { background-color: #059669; }
.bg-rose-500 { background-color: #f43f5e; }
.bg-rose-500\/20 { background-color: rgba(244, 63, 94, 0.2); }
.bg-gradient-to-br { background-image: linear-gradient(135deg, var(--tw-gradient-stops)); }
.from-slate-900 { --tw-gradient-from: #0f172a; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(15, 23, 42, 0)); }
.via-slate-800 { --tw-gradient-stops: var(--tw-gradient-from), #1e293b, var(--tw-gradient-to, rgba(30, 41, 59, 0)); }
.to-slate-900 { --tw-gradient-to: #0f172a; }

.border { border-width: 1px; border-style: solid; }
.border-slate-700 { border-color: #334155; }
.border-rose-500 { border-color: #f43f5e; }

.shadow-md { box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2); }
.shadow-lg { box-shadow: 0 16px 24px rgba(15, 23, 42, 0.25); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45); }

.transition { transition: all 0.2s ease-in-out; }
.hover\:bg-indigo-600:hover { background-color: #4f46e5; }
.hover\:bg-emerald-600:hover { background-color: #059669; }
.hover\:bg-rose-600:hover { background-color: #e11d48; }

.backdrop-blur { backdrop-filter: blur(16px); }

.placeholder-slate-400::placeholder { color: #94a3b8; }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35); }
.focus\:ring-indigo-500:focus { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35); }

button.bg-indigo-500,
button.bg-emerald-500,
button.bg-rose-500 { color: #ffffff; border-radius: 1rem; }

form button { border: none; }

@media (min-width: 640px) {
    .max-w-sm { max-width: 24rem; }
}

/* --- App specific styles --- */

body.app-body {
    min-height: 100vh;
    background: radial-gradient(circle at -20% -10%, #1a4438 0, rgba(26, 68, 56, 0) 55%),
        radial-gradient(circle at 110% 0%, #d1896f 0, rgba(209, 137, 111, 0) 60%),
        radial-gradient(circle at 10% 105%, #2a2a2a 0, rgba(32, 32, 32, 0) 55%),
        linear-gradient(180deg, var(--cream-50), var(--cream-100));
    display: flex;
    justify-content: center;
    padding: 2.5rem 1.25rem 3.5rem;
    color: var(--charcoal);
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
}

body.app-body--embedded {
    background: transparent;
    min-height: 100%;
    padding: 0;
}

.app-shell {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.app-main {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.hero-card {
    position: relative;
    background: linear-gradient(150deg, rgba(32, 47, 45, 0.97), rgba(52, 79, 75, 0.92));
    color: var(--white);
    border-radius: 30px;
    padding: 0.875rem 1.5rem 1rem;
    overflow: hidden;
    box-shadow: 0 25px 45px rgba(32, 47, 45, 0.25);
}

.hero-card--compact {
    padding: 0.5rem 1.25rem 0.6rem;
}

.hero-card::before,
.hero-card::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(0);
    opacity: 0.7;
}

.hero-card::before {
    width: 180px;
    height: 180px;
    background: rgba(194, 146, 104, 0.65);
    top: -55px;
    left: -40px;
}

.hero-card::after {
    width: 200px;
    height: 200px;
    background: rgba(24, 98, 69, 0.65);
    bottom: -100px;
    right: -70px;
}

.hero-top {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    position: relative;
    z-index: 1;
}

.profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile-actions {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 0.75rem;
}

.profile-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar.is-hidden {
    display: none;
}

.profile-avatar__initial {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profile-avatar__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-copy {
    flex: 1;
}

.eyebrow {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.profile-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.profile-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.82);
}

.hero-back {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-back:focus-visible,
.hero-back:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(-1px);
}

.hero-back__icon {
    width: 18px;
    height: 18px;
}

.hero-add {
    background: #22c55e;
    border-radius: 50%;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-add:focus-visible,
.hero-add:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.hero-add__icon {
    width: 18px;
    height: 18px;
}

.hero-action {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hero-action span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.hero-action--link {
    text-decoration: none;
}

.hero-action--link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 3px;
}

.hero-home {
    margin-left: auto;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.hero-home:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 3px;
}

.hero-home__icon {
    width: 18px;
    height: 18px;
}

.balance {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.balance .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.7;
}

.balance .amount {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 600;
}

.balance .subtle {
    font-size: 0.85rem;
    opacity: 0.75;
}

.quick-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.12);
    padding: 1.1rem 1.2rem;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.75;
}

.stat-value {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
}

.stat-meta {
    font-size: 0.75rem;
    opacity: 0.75;
}

.learning-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4.5rem 0 6rem;
}

.learning-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 45, 52, 0.85) 0%, rgba(45, 37, 55, 0.4) 35%, rgba(255, 239, 224, 0.45) 100%);
    filter: blur(18px);
    opacity: 0.9;
}

.learning-stage__glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.5;
}

.learning-stage__glow--left {
    top: -25%;
    left: -35%;
    background: #1f6f5d;
}

.learning-stage__glow--right {
    top: -10%;
    right: -30%;
    background: #b36d50;
}

.learning-stack {
    position: relative;
    width: min(78vw, 320px);
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.learning-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 38px 70px rgba(18, 30, 37, 0.32);
    transform-origin: center bottom;
}

.learning-card--second {
    transform: translateY(28px) scale(0.94);
    opacity: 0.75;
}

.learning-card--third {
    transform: translateY(56px) scale(0.88);
    opacity: 0.55;
}

.learning-card--front {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.25rem 2.25rem 2.6rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 10%, rgba(237, 242, 254, 0.96) 100%);
}

.learning-card__screen {
    flex: 1;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(16, 30, 40, 0.92), rgba(17, 17, 19, 0.8));
    box-shadow: inset 0 18px 35px rgba(0, 0, 0, 0.45);
}

.learning-card__footer {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.learning-card__chip {
    flex: 1;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(80, 104, 120, 0.25), rgba(80, 104, 120, 0.65));
}

.learning-card__chip--small {
    flex: 0.6;
    opacity: 0.6;
}

.learning-stack__shadow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 88%;
    height: 48px;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translateX(-50%);
}

.card {
    background: var(--white);
    border-radius: 28px;
    padding: 1.75rem;
    box-shadow: 0 20px 40px rgba(31, 43, 41, 0.12);
}

.card--placeholder {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 150px;
}

.card-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--forest-900);
}

.admin-users-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-users-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-users-card__title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--forest-900);
}

.admin-users-card__subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(37, 54, 51, 0.65);
}

.admin-users-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-users-card__actions {
    display: flex;
    gap: 0.75rem;
}

.admin-users-card__add {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(42, 75, 63, 0.18);
    color: var(--forest-900);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.admin-users-card__add:focus-visible,
.admin-users-card__add:hover {
    background: rgba(42, 75, 63, 0.28);
    transform: translateY(-1px);
}

.admin-users-card__add:active {
    transform: translateY(0);
}

.admin-users-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 18px;
    background: rgba(42, 75, 63, 0.12);
    color: var(--forest-900);
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(42, 75, 63, 0.14);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-users-edit:focus-visible,
.admin-users-edit:hover {
    background: rgba(42, 75, 63, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(42, 75, 63, 0.18);
}

.admin-users-edit:active {
    transform: translateY(0);
}

.admin-users-edit__icon {
    width: 1.15rem;
    height: 1.15rem;
}

.admin-users-message {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(32, 32, 32, 0.75);
}

.admin-users-total {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: rgba(32, 32, 32, 0.65);
}

.admin-users-message--error {
    color: #c2410c;
}

.user-edit-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.user-edit-intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.user-edit-photo {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    object-fit: cover;
    box-shadow: 0 16px 32px rgba(31, 43, 41, 0.18);
    background: rgba(42, 75, 63, 0.12);
}

.user-edit-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--forest-900);
}

.user-edit-copy {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.user-edit-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--forest-900);
}

.user-edit-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(37, 54, 51, 0.65);
    line-height: 1.5;
}

.user-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.user-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.user-edit-divider {
    margin: 2rem 0 1.5rem;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, rgba(42, 75, 63, 0), rgba(42, 75, 63, 0.25), rgba(42, 75, 63, 0));
}

.user-edit-renewal {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.user-edit-renewal__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--forest-900);
}

.user-edit-renewal__subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(37, 54, 51, 0.7);
}

.user-edit-form--code {
    gap: 1rem;
}

.user-edit-code-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.user-edit-code-input {
    flex: 1 1 180px;
    text-transform: uppercase;
}

.user-edit-code-button {
    border: none;
    border-radius: 18px;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #2a5748, #1f4033);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 16px 30px rgba(34, 71, 57, 0.25);
}

.user-edit-code-button:hover:not(:disabled),
.user-edit-code-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(34, 71, 57, 0.35);
    outline: none;
}

.user-edit-code-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.user-edit-label {
    font-weight: 600;
    color: var(--forest-900);
    font-size: 0.95rem;
}

.user-edit-input,
.user-edit-file {
    border-radius: 18px;
    border: 1px solid rgba(42, 75, 63, 0.22);
    padding: 0.85rem 1rem;
    background: rgba(42, 75, 63, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
    min-height: 3.2rem;
    line-height: 1.35;
    font-size: 1rem;
    color:black;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

select.user-edit-input {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%232A4B3F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.75rem;
    padding-right: 2.75rem;
    font-size: 1rem;
    color:black;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.user-edit-input:focus,
.user-edit-file:focus {
    outline: none;
    border-color: rgba(42, 75, 63, 0.55);
    box-shadow: 0 0 0 4px rgba(42, 75, 63, 0.18);
    background: rgba(42, 75, 63, 0.08);
    color:black;
}

.user-edit-file {
    background: var(--white);
    padding: 0.7rem 1rem;
}

.user-edit-hint {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(37, 54, 51, 0.6);
}

.user-edit-hint--warning {
    color: #b45309;
    font-weight: 600;
}

.user-edit-camera {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-edit-camera__panel[hidden],
.user-edit-camera__preview[hidden] {
    display: none !important;
}

.user-edit-camera__toggle,
.user-edit-camera__capture,
.user-edit-camera__remove {
    border: none;
    border-radius: 16px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.user-edit-camera__toggle {
    align-self: flex-start;
    background: rgba(42, 75, 63, 0.12);
    color: var(--forest-900);
    box-shadow: 0 18px 28px rgba(37, 64, 57, 0.15);
}

.user-edit-camera__toggle:hover,
.user-edit-camera__toggle:focus {
    transform: translateY(-1px);
    background: rgba(42, 75, 63, 0.18);
    box-shadow: 0 20px 34px rgba(37, 64, 57, 0.2);
}

.user-edit-camera__panel {
    border-radius: 20px;
    background: rgba(42, 75, 63, 0.08);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-edit-camera__viewport {
    position: relative;
    width: min(220px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    overflow: hidden;
    background: #111;
    align-self: center;
}

.user-edit-camera__video,
.user-edit-camera__canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #111;
}

.user-edit-camera__canvas[hidden] {
    display: none !important;
}

.user-edit-camera__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.user-edit-camera__capture {
    background: linear-gradient(135deg, #2d4f46, #24413b);
    color: var(--white);
    box-shadow: 0 16px 28px rgba(37, 64, 57, 0.18);
}

.user-edit-camera__capture:hover,
.user-edit-camera__capture:focus {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(37, 64, 57, 0.22);
}

.user-edit-camera__preview {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

.user-edit-camera__image {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(31, 43, 41, 0.18);
    background: rgba(42, 75, 63, 0.1);
}

.user-edit-camera__remove {
    background: rgba(42, 75, 63, 0.12);
    color: var(--forest-900);
}

.user-edit-camera__remove:hover,
.user-edit-camera__remove:focus {
    transform: translateY(-1px);
    background: rgba(42, 75, 63, 0.18);
    box-shadow: 0 18px 30px rgba(37, 64, 57, 0.18);
}

.user-edit-camera__error {
    margin: 0;
    min-height: 1.1em;
    font-size: 0.85rem;
    color: #b2554d;
}

.user-edit-field--roles {
    border: none;
    padding: 0;
    margin: 0;
}

.user-edit-roles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.user-edit-role {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--forest-900);
    font-size: 0.95rem;
}

.user-edit-role input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #2d4f46;
}

.user-edit-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-edit-save {
    border: none;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, #2d4f46, #24413b);
    box-shadow: 0 20px 35px rgba(37, 64, 57, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-edit-save:hover,
.user-edit-save:focus {
    transform: translateY(-2px);
    box-shadow: 0 24px 40px rgba(37, 64, 57, 0.28);
}

.user-edit-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    font-weight: 600;
    color: #a0624e;
    background: rgba(209, 137, 111, 0.16);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-edit-cancel:hover,
.user-edit-cancel:focus {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px rgba(209, 137, 111, 0.22);
}

.user-edit-alert {
    border-radius: 18px;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.user-edit-alert--success {
    background: rgba(42, 75, 63, 0.12);
    color: #1f3430;
}

.user-edit-alert--error {
    background: rgba(209, 90, 90, 0.14);
    color: #7a2626;
}

.user-edit-alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}

.classmates-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.classmates-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.classmates-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(42, 75, 63, 0.08);
}

.classmates-list__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.classmates-list__name {
    font-weight: 600;
    color: var(--forest-900);
}

.classmates-list__code {
    font-size: 0.85rem;
    color: rgba(42, 75, 63, 0.85);
}

.classmates-list__code--muted {
    color: rgba(42, 75, 63, 0.6);
}

.classmates-remove-form {
    margin: 0;
}

.classmates-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: rgba(121, 45, 45, 0.85);
    background: rgba(209, 90, 90, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.classmates-remove:hover,
.classmates-remove:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(209, 90, 90, 0.28);
    background: rgba(209, 90, 90, 0.2);
}

.classmates-remove__icon {
    width: 1.1rem;
    height: 1.1rem;
}

.classmates-empty {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(42, 75, 63, 0.75);
}

.classmates-add-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.classmates-add-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.classmates-add-actions {
    display: flex;
    gap: 0.75rem;
}

.classmates-add-submit {
    width: auto;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
}

@media (min-width: 520px) {
    .user-edit-intro {
        flex-direction: row;
        align-items: center;
    }

    .user-edit-actions {
        flex-direction: row;
    }

    .user-edit-actions > * {
        flex: 1;
    }
}

.calendar-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.75rem;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(230, 240, 238, 0.75));
    border: 1px solid rgba(42, 75, 63, 0.08);
    backdrop-filter: blur(6px);
}

.calendar-card.is-collapsed {
    cursor: pointer;
    gap: 1rem;
    padding-bottom: 1.25rem;
}

.calendar-card.is-collapsed .calendar-grid {
    display: none;
}

.calendar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.calendar-head {
    border: none;
    background: transparent;
    padding: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.calendar-head:focus-visible {
    outline: 2px solid rgba(53, 95, 82, 0.55);
    outline-offset: 4px;
}

.calendar-copy {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.calendar-legend {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(38, 66, 60, 0.55);
}

.calendar-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--forest-900);
}

.calendar-today-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.6rem 0.9rem;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(54, 91, 79, 0.95), rgba(43, 76, 64, 0.65));
    color: var(--white);
    box-shadow: 0 14px 24px rgba(46, 79, 69, 0.22);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.calendar-today-day {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.calendar-today-month {
    font-size: 0.75rem;
    opacity: 0.8;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.calendar-weeks {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.calendar-weekdays,
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.calendar-weekday {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    text-align: center;
    color: rgba(42, 70, 63, 0.6);
}

.calendar-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(45, 66, 61, 0.95);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(45, 71, 62, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendar-day.is-weekend {
    color: rgba(45, 66, 61, 0.45);
    background: rgba(233, 236, 235, 0.85);
    border-color: rgba(45, 71, 62, 0.12);
    box-shadow: none;
    pointer-events: none;
    cursor: default;
}

.calendar-day.has-test {
    border-color: rgba(68, 110, 97, 0.65);
    box-shadow: 0 0 0 2px rgba(94, 150, 133, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.calendar-day.has-test.is-weekend {
    border-color: rgba(68, 110, 97, 0.55);
    box-shadow: 0 0 0 2px rgba(94, 150, 133, 0.35);
}

.calendar-day.is-selected {
    background: linear-gradient(160deg, rgba(68, 110, 97, 0.95), rgba(94, 150, 133, 0.9));
    color: var(--white);
    border-color: rgba(68, 110, 97, 0.8);
    box-shadow: 0 12px 24px rgba(70, 110, 98, 0.35);
}

.calendar-day.has-test.is-selected {
    box-shadow: 0 0 0 2px rgba(224, 255, 238, 0.45), 0 12px 24px rgba(70, 110, 98, 0.35);
}

.calendar-day.is-outside {
    color: rgba(45, 66, 61, 0.35);
    background: rgba(246, 249, 247, 0.8);
    border-style: dashed;
}

.calendar-day.is-today {
    background: rgba(255, 255, 255, 0.95);
    color: rgba(45, 66, 61, 0.95);
    font-weight: 600;
    border-color: rgba(68, 110, 97, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.calendar-day.has-test.is-today {
    border-color: rgba(68, 110, 97, 0.65);
    box-shadow: 0 0 0 2px rgba(94, 150, 133, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.calendar-day.is-weekend.is-today {
    border-color: rgba(68, 110, 97, 0.35);
    color: rgba(45, 66, 61, 0.6);
}

.calendar-day.has-test.is-weekend.is-today {
    border-color: rgba(68, 110, 97, 0.65);
    box-shadow: 0 0 0 2px rgba(94, 150, 133, 0.4);
}

.calendar-day.is-today.is-selected {
    background: linear-gradient(160deg, rgba(68, 110, 97, 0.95), rgba(94, 150, 133, 0.9));
    color: var(--white);
    border-color: rgba(68, 110, 97, 0.8);
    box-shadow: 0 12px 24px rgba(70, 110, 98, 0.35);
}

.calendar-day.has-test.is-today.is-selected {
    box-shadow: 0 0 0 2px rgba(224, 255, 238, 0.45), 0 12px 24px rgba(70, 110, 98, 0.35);
}

.utilities-card {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.utilities-selection {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.25rem 0;
}

.utilities-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.utilities-illustration {
    width: 100%;
    max-width: 100%;
    height: auto;
    align-self: stretch;
    display: block;
}

.utilities-actions {
    margin-top: 0.5rem;
}

.utilities-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    padding: 0.75rem 1.25rem;
}

.utilities-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--forest-900);
}

.utilities-empty {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(43, 61, 59, 0.55);
}

.utilities-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.utilities-item {
    position: relative;
    display: block;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(43, 61, 59, 0.08);
    overflow: hidden;
    touch-action: pan-y;
    --utilities-actions-width: 0px;
    --utilities-actions-offset: 12px;
}

.utilities-item--intro {
    padding-bottom: 0.5rem;
    border-bottom: none;
}

.utilities-intro-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--forest-900);
}

.utilities-intro-text--highlight {
    color: #ffffff;
    text-align: center;
}

.utilities-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.utilities-item__track {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(0);

    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease,
        padding 0.25s ease, border-radius 0.25s ease;
    text-decoration: none;
    color: inherit;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    text-align: left;
    border-radius: 0;
}

.utilities-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.utilities-item__share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: rgba(221, 140, 123, 0.12);
    color: var(--rose-400);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.utilities-item__share-link--meta {
    margin-left: auto;
}

.utilities-item__share-link:hover,
.utilities-item__share-link:focus-visible {
    background: rgba(221, 140, 123, 0.2);
    color: #d36d59;
}

.utilities-item__share-link:focus-visible {
    outline: 2px solid rgba(221, 140, 123, 0.35);
    outline-offset: 4px;
}

.utilities-item__share-link[aria-disabled='true'] {
    pointer-events: none;
    opacity: 0.4;
}

.utilities-item__share-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.share-selected-tests {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.share-selected-tests__item {
    background: rgba(42, 75, 63, 0.08);
    border-radius: 18px;
    padding: 0.9rem 1rem;
}

.share-selected-tests__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--forest-900);
}

.share-selected-tests__meta {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: rgba(37, 54, 51, 0.7);
}

.share-users-section-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--forest-900);
}

.share-users-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.share-users-list__item {
    background: rgba(42, 75, 63, 0.05);
    border-radius: 16px;
    padding: 0.75rem 1rem;
}

.share-users-list__label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.share-users-list__name {
    font-size: 0.9rem;
    color: var(--forest-900);
}

.share-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
}

.toast {
    position: fixed;
    top: calc(1rem + var(--safe-area-top));
    right: 1rem;
    background: rgba(37, 54, 51, 0.95);
    color: var(--white);
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 18px 32px rgba(37, 54, 51, 0.25);
    font-size: 0.9rem;
    z-index: 2000;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast.is-hidden {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.utilities-item--revealed .utilities-item__track {
    transform: translateX(calc(var(--utilities-actions-width, 0px) * -1));
}

.utilities-item__track:focus-visible {
    outline: 2px solid rgba(68, 110, 97, 0.4);
    outline-offset: 4px;
    border-radius: 22px;
}

.utilities-item__toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: rgba(45, 71, 62, 0.12);
    color: rgba(45, 66, 61, 0.65);
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.utilities-item__toggle-icon::before {
    content: '\25BC';
    line-height: 1;
}

.utilities-item.is-expanded .utilities-item__toggle-icon {
    transform: rotate(180deg);
    background: rgba(68, 110, 97, 0.18);
    color: rgba(45, 66, 61, 0.85);
}

.utilities-item.is-expanded {
    overflow: visible;
    padding-bottom: 1.5rem;
}

.utilities-item.is-expanded .utilities-item__track {
    background: linear-gradient(135deg, rgba(224, 255, 242, 0.9), rgba(200, 236, 222, 0.85));
    padding: 0.85rem 1rem;
    border-radius: 22px;
    box-shadow: 0 14px 26px rgba(43, 61, 59, 0.16);
}

.utilities-item.is-expanded .item-label__text {
    color: rgba(43, 61, 59, 0.95);
    font-weight: 600;
}

.utilities-item.is-expanded .item-meta__text {
    color: rgba(43, 61, 59, 0.75);
    font-weight: 600;
}

.utilities-item__panel {
    margin-top: 1rem;
    padding: 1.25rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(45, 71, 62, 0.08);
    box-shadow: 0 18px 32px rgba(45, 71, 62, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.planning-panel__details-link {
    align-self: flex-start;
    font-size: 0.85rem;
    color: rgba(43, 61, 59, 0.7);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.planning-panel__message {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(45, 66, 61, 0.7);
}

.planning-calendar__actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.planning-calendar__actions .user-edit-save {
    width: 100%;
}

.planning-calendar__actions .user-edit-save[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.planning-calendar__intro {
    margin: 0 0 0.75rem;
    color: var(--white);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.planning-calendar__helper {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(45, 66, 61, 0.6);
    text-align: center;
}

.planning-reset-form {
    margin-top: 1.5rem;
}

.planning-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
}

.planning-actions .planning-calendar__actions,
.planning-actions .planning-reset-form {
    margin-top: 0;
    flex: 1 1 12rem;
}


.planning-actions .planning-reset-form {
    display: flex;
    flex-direction: column;
}

.planning-actions .planning-reset-button {
    width: 100%;
    min-width: 0;
}

@media (max-width: 640px) {
    .planning-actions {
        flex-direction: column;
    }

    .planning-actions .planning-calendar__actions .user-edit-save,
    .planning-actions .planning-reset-button {
        width: 100%;
    }
}

.planning-reset-button {
    display: inline-flex;
    justify-content: center;
    width: auto;
    border: none;
    border-radius: 18px;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, #c86d57, #a24f3c);
    box-shadow: 0 18px 32px rgba(162, 79, 60, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.planning-reset-button:hover,
.planning-reset-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(162, 79, 60, 0.32);
}

.planning-reset-button:focus {
    outline: none;
}

.planning-reset-button:focus-visible {
    outline: 2px solid rgba(200, 109, 87, 0.4);
    outline-offset: 4px;
}

.planning-reset-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 12px 24px rgba(162, 79, 60, 0.18);
}

.planning-panel__header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.planning-panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--forest-900);
}

.planning-panel__subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(45, 66, 61, 0.65);
}

.planning-panel__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.8rem;
    color: rgba(45, 66, 61, 0.6);
}

.planning-panel__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.planning-panel__legend-swatch {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(45, 71, 62, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.planning-panel__legend-swatch--selectable {
    background: rgba(255, 255, 255, 0.85);
}

.planning-panel__legend-swatch--selected {
    background: linear-gradient(160deg, rgba(68, 110, 97, 0.95), rgba(94, 150, 133, 0.9));
    border-color: rgba(68, 110, 97, 0.85);
}

.planning-panel__legend-swatch--blocked {
    background: rgba(233, 236, 235, 0.85);
    border-color: rgba(45, 71, 62, 0.16);
}

.planning-calendar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.75rem;
    border-radius: 28px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(230, 240, 238, 0.75));
    border: 1px solid rgba(42, 75, 63, 0.08);
    box-shadow: 0 20px 40px rgba(31, 43, 41, 0.12);
    backdrop-filter: blur(6px);
}

.planning-calendar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.planning-calendar__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.75rem;
}

.planning-calendar__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(45, 71, 62, 0.12);
    color: rgba(45, 66, 61, 0.65);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.planning-calendar__nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.planning-calendar__nav:not(:disabled):hover,
.planning-calendar__nav:not(:disabled):focus-visible {
    background: rgba(68, 110, 97, 0.22);
    color: rgba(45, 66, 61, 0.9);
}

.planning-calendar__nav--prev,
.planning-calendar__nav--next {
    font-size: 1.2rem;
    font-weight: 600;
}

.plan-actions {
    margin-top: 0.25rem;
}

.planning-calendar .calendar-day {
    cursor: pointer;
}

.planning-calendar .calendar-day.is-weekend-selectable {
    background: rgba(255, 255, 255, 0.95);
    color: rgba(45, 66, 61, 0.95);
    border-color: rgba(45, 71, 62, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.planning-calendar .calendar-day.is-selected,
.planning-calendar .calendar-day.is-weekend-selectable.is-selected,
.planning-calendar .calendar-day.is-today.is-selected {
    background: linear-gradient(160deg, rgba(68, 110, 97, 0.95), rgba(94, 150, 133, 0.9));
    color: var(--white);
    border-color: rgba(68, 110, 97, 0.8);
    box-shadow: 0 12px 24px rgba(70, 110, 98, 0.35);
}

.planning-calendar .calendar-day.is-weekend {
    pointer-events: auto;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.85);
    color: rgba(45, 66, 61, 0.95);
    border-color: rgba(45, 71, 62, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.planning-calendar .calendar-day.is-disabled {
    color: rgba(45, 66, 61, 0.45);
    background: #E9EDEB;
    border-color: rgba(45, 71, 62, 0.16);
    box-shadow: none;
    pointer-events: none;
    cursor: default;
}

.planning-calendar .calendar-day--placeholder {
    visibility: hidden;
    pointer-events: none;
}

.planning-calendar .calendar-day.is-test-day {
    background: #6D604C;
    color: var(--white);
    border-color: #6D604C;
    box-shadow: none;
    pointer-events: none;
}

.planning-calendar .calendar-day.is-disabled.is-selected {
    background: #E9EDEB;
    color: rgba(45, 66, 61, 0.45);
    border-color: rgba(45, 71, 62, 0.16);
    box-shadow: none;
}

.planning-calendar .calendar-day.is-today {
    background: rgba(255, 255, 255, 0.95);
    color: rgba(45, 66, 61, 0.95);
    border-color: rgba(68, 110, 97, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.utilities-item__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.utilities-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.utilities-item__actions {
    position: absolute;
    top: 50%;
    right: 0;
    display: flex;
    gap: 0.5rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(var(--utilities-actions-offset, 12px), -50%, 0);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.24s ease-out, visibility 0.24s linear;
}

.utilities-item--revealed .utilities-item__actions,
.utilities-item__actions:focus-within {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, -50%, 0);
}

.utilities-item__action {
    width: 3rem;
    height: 2.75rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--forest-700);
    box-shadow: 0 10px 20px rgba(37, 54, 51, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.utilities-item__action--edit {
    background: var(--sand-500);
    box-shadow: 0 10px 20px rgba(198, 160, 114, 0.28);
}

.utilities-item__action--cards {
    background: var(--forest-900);
    box-shadow: 0 10px 20px rgba(37, 54, 51, 0.32);
}

.utilities-item__action--delete {
    background: var(--rose-400);
    box-shadow: 0 10px 20px rgba(209, 137, 111, 0.28);
}

.utilities-item__action:focus-visible {
    outline: none;
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 10px 24px rgba(32, 47, 45, 0.4);
}

.utilities-item__action--delete:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 10px 24px rgba(209, 137, 111, 0.45);
}

.utilities-item__icon {
    display: block;
    width: 22px;
    height: 22px;
}

.action-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.quick-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--forest-900);
    text-decoration: none;
    box-shadow: 0 18px 36px rgba(42, 61, 59, 0.18);
    transition: box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    cursor: pointer;
}

.quick-action:hover,
.quick-action:focus-visible {
    box-shadow: 0 24px 44px rgba(42, 61, 59, 0.24), 0 0 0 3px rgba(38, 66, 60, 0.2);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

.quick-action__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.7);
    color: #35564d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    flex-shrink: 0;
}

.quick-action__icon svg,
.quick-action__icon img {
    width: 1.35rem;
    height: 1.35rem;
}

.quick-action__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    align-items: flex-start;
    text-align: left;
}

.quick-action__title {
    font-size: 1rem;
    font-weight: 600;
}

.quick-action__subtitle {
    font-size: 0.85rem;
    color: rgba(37, 54, 51, 0.65);
    font-weight: 500;
}

.quick-action__chevron {
    display: flex;
    align-items: center;
    color: rgba(37, 54, 51, 0.45);
}

.quick-action__chevron svg {
    width: 1.1rem;
    height: 1.1rem;
}

.quick-action--make .quick-action__icon {
    background: rgba(38, 66, 60, 0.16);
    color: #27483f;
}

.quick-action--plan .quick-action__icon {
    background: rgba(209, 137, 111, 0.2);
    color: #8a4f3a;
}

.quick-action--learn .quick-action__icon {
    background: rgba(120, 102, 149, 0.22);
    color: #5b4b74;
}

.page-intro {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.page-intro__body {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(37, 54, 51, 0.65);
    line-height: 1.6;
}

.item-label {
    display: block;
    font-weight: 600;
    color: var(--forest-900);
}

.item-label--with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-label__text {
    display: block;
}

.item-meta {
    display: block;
    font-size: 0.8rem;
    color: rgba(43, 61, 59, 0.55);
    margin-top: 0.35rem;
}

.item-meta--with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.item-meta__text {
    display: inline;
}

.item-icon {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
}

.item-icon--calendar {
    color: #6c3927;
}

.item-icon__image {
    width: 100%;
    height: 100%;
}

.item-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.item-action-form {
    display: inline;
}

.item-action-button {
    border: none;
    background: rgba(43, 61, 59, 0.08);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    cursor: pointer;
    color: #2b3d3b;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.item-action-button svg {
    width: 100%;
    height: 100%;
}

.item-action-button:focus-visible {
    outline: 2px solid rgba(43, 61, 59, 0.35);
    outline-offset: 4px;
}

.item-action-button:hover {
    transform: translateY(-1px);
}

.item-action-button--accept {
    color: #2f855a;
    background: rgba(47, 133, 90, 0.12);
}

.item-action-button--accept:hover,
.item-action-button--accept:focus-visible {
    color: #276749;
    background: rgba(47, 133, 90, 0.2);
}

.item-action-button--accept:focus-visible {
    outline: 2px solid rgba(47, 133, 90, 0.35);
}

.item-action-button--reject {
    color: #b4231a;
    background: rgba(180, 35, 26, 0.12);
}

.item-action-button--reject:hover,
.item-action-button--reject:focus-visible {
    color: #912018;
    background: rgba(180, 35, 26, 0.2);
}

.item-action-button--reject:focus-visible {
    outline: 2px solid rgba(180, 35, 26, 0.35);
}

.item-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.item-meta-row .item-meta {
    margin-top: 0;
}

.chevron {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(43, 61, 59, 0.08);
    position: relative;
}

.chevron::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid rgba(43, 61, 59, 0.6);
    border-right: 2px solid rgba(43, 61, 59, 0.6);
    transform: translate(-50%, -50%) rotate(45deg);
}

.primary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.primary-actions form { width: 100%; }

.primary-btn,
.secondary-btn,
.ghost-btn {
    width: 100%;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.test-create-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.test-create-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.test-create-actions .user-edit-save,
.test-create-actions .user-edit-cancel {
    width: 100%;
}

.test-create-feedback {
    width: 100%;
}

.primary-btn {
    background: linear-gradient(135deg, #2d4f46, #2a3b37);
    color: var(--white);
    box-shadow: 0 18px 32px rgba(44, 74, 68, 0.25);
}

.secondary-btn {
    background: rgba(42, 75, 63, 0.08);
    color: var(--forest-900);
}

.ghost-btn {
    background: rgba(209, 137, 111, 0.12);
    color: #a0624e;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 35px rgba(43, 61, 59, 0.18);
}

.side-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 90;
}

.side-menu-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: min(78vw, 280px);
    background: linear-gradient(170deg, #f9efe5 0%, #f0d8c3 55%, #ecd0bc 100%);
    box-shadow: 14px 0 36px rgba(32, 47, 45, 0.22);
    padding: 2.5rem 1.85rem;
    padding-top: calc(2.5rem + var(--safe-area-top));
    padding-bottom: calc(2.5rem + var(--safe-area-bottom));
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.25rem;
    overflow: hidden;
}

.side-menu::before,
.side-menu::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    opacity: 0.55;
}

.side-menu::before {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(250, 224, 204, 0) 65%);
    top: -90px;
    right: -70px;
}

.side-menu::after {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(227, 177, 143, 0.65) 0%, rgba(227, 177, 143, 0) 70%);
    bottom: -60px;
    left: -60px;
}

.side-menu-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2rem;
    min-height: 0;
}

.side-menu.is-open {
    transform: translateX(0);
}

.side-menu-nav {
    display: flex;
    flex-direction: column;
}

.side-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-menu-divider {
    height: 1px;
    background: rgba(38, 66, 60, 0.16);
    margin: 0;
    border-radius: 999px;
}

.side-menu-nav form {
    margin: 0;
}

.side-menu-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(38, 66, 60, 0.08);
    color: #26423c;
    font-weight: 600;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.side-menu-link:hover,
.side-menu-link:focus-visible {
    background: rgba(38, 66, 60, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 18px 35px rgba(42, 61, 59, 0.25);
    outline: none;
}

.side-menu-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    display: grid;
    place-items: center;
    color: #6c3927;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.side-menu-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.side-menu-text {
    flex: 1;
    font-size: 0.95rem;
}

.side-menu-link--logout {
    background: rgba(209, 137, 111, 0.18);
    color: #8a4f3a;
}

.side-menu-link--logout:hover,
.side-menu-link--logout:focus-visible {
    background: rgba(209, 137, 111, 0.32);
}

.side-menu-logout {
    margin-top: auto;
}

@media (min-width: 480px) {
    body.app-body { padding-top: 3.5rem; }
    .hero-card { border-radius: 32px; }
    .card { border-radius: 32px; }
}

/* --- Auth specific styles --- */

body.auth-body {
    min-height: 100vh;
    background: radial-gradient(circle at -20% -10%, #1a4438 0, rgba(26, 68, 56, 0) 55%),
        radial-gradient(circle at 110% 0%, #d1896f 0, rgba(209, 137, 111, 0) 60%),
        radial-gradient(circle at 10% 105%, #2a2a2a 0, rgba(32, 32, 32, 0) 55%),
        linear-gradient(180deg, var(--cream-50), var(--cream-100));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    color: var(--charcoal);
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
}

.auth-layout {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.auth-hero {
    position: relative;
    background: linear-gradient(145deg, rgba(38, 64, 61, 0.95), rgba(26, 52, 48, 0.9));
    color: var(--white);
    border-radius: 30px;
    padding: 1.85rem;
    overflow: hidden;
    box-shadow: 0 22px 45px rgba(32, 47, 45, 0.28);
}

.auth-hero::before,
.auth-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(0);
    opacity: 0.65;
}

.auth-hero::before {
    width: 200px;
    height: 200px;
    background: rgba(194, 146, 104, 0.55);
    top: -90px;
    left: -80px;
}

.auth-hero::after {
    width: 220px;
    height: 220px;
    background: rgba(26, 98, 69, 0.6);
    bottom: -120px;
    right: -90px;
}

.auth-hero__brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.auth-hero__copy h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.auth-hero__meta {
    position: relative;
    z-index: 1;
    margin: 1.5rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.auth-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 18px 40px rgba(32, 42, 40, 0.18);
}

.auth-panel__header h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--forest-900);
}

.auth-panel__header p {
    margin: 0.5rem 0 0;
    color: rgba(32, 32, 32, 0.72);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-alert {
    background: rgba(221, 140, 123, 0.16);
    border: 1px solid rgba(221, 140, 123, 0.6);
    color: #a44632;
    border-radius: 18px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
}

.auth-alert--success {
    background: rgba(123, 221, 167, 0.16);
    border: 1px solid rgba(86, 168, 121, 0.6);
    color: #27613e;
}

.auth-alert__list {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-alert__list li {
    margin: 0.25rem 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-field--hidden {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(32, 32, 32, 0.85);
}

.auth-input {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(38, 64, 61, 0.25);
    background: rgba(255, 255, 255, 0.9);
    color: var(--forest-900);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: rgba(38, 64, 61, 0.45);
}

.auth-input:focus {
    outline: none;
    border-color: rgba(221, 140, 123, 0.7);
    box-shadow: 0 0 0 4px rgba(221, 140, 123, 0.25);
}

.auth-submit {
    margin-top: 0.5rem;
    width: 100%;
    border-radius: 18px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, #dd8c7b, #c6a072);
    box-shadow: 0 18px 30px rgba(209, 137, 111, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover,
.auth-submit:focus {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(209, 137, 111, 0.32);
}

.auth-support {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(32, 32, 32, 0.6);
    text-align: center;
}

.auth-link {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(32, 32, 32, 0.65);
}

.auth-link a {
    color: rgba(31, 83, 69, 0.95);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.auth-link a:hover,
.auth-link a:focus-visible {
    color: rgba(26, 68, 56, 0.95);
    outline: none;
}


body.error-body {
    background: #fef2f2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.error-wrapper {
    width: 100%;
    max-width: 24rem;
}

.error-card {
    background: var(--white);
    border: 1px solid #fecaca;
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    box-shadow: 0 18px 36px rgba(31, 41, 55, 0.08);
    text-align: center;
}

.error-card h1 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: var(--forest-900);
}

.error-card p {
    margin: 0 0 1.5rem;
    color: var(--charcoal);
    line-height: 1.5;
}

.error-action {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--rose-400);
    color: var(--white);
    border-radius: 9999px;
    font-weight: 600;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.error-action:hover,
.error-action:focus {
    background: #c97463;
    transform: translateY(-1px);
}

/* --- Admin modal styles --- */
.admin-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1200;
}

.admin-modal.is-visible {
    display: flex;
}

.admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(6px);
}

.admin-modal__dialog {
    position: relative;
    background: var(--white);
    border-radius: 1.5rem;
    padding: 1.5rem;
    width: min(480px, 100%);
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(17, 24, 39, 0.25);
    display: flex;
    flex-direction: column;
}

.admin-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-modal__header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--forest-900);
}

.admin-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(209, 137, 111, 0.15);
    color: var(--forest-900);
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.admin-modal__close:hover,
.admin-modal__close:focus {
    background: rgba(209, 137, 111, 0.35);
    transform: translateY(-1px);
}

.admin-modal__body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-modal__message {
    margin: 0;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(32, 47, 45, 0.08);
    color: var(--forest-900);
    line-height: 1.5;
}

.admin-modal__message--error {
    background: rgba(221, 140, 123, 0.2);
    color: #9f1c0d;
}

.edit-test-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1100;
}

.edit-test-modal.is-visible {
    display: flex;
}

.edit-test-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.5);
    backdrop-filter: blur(6px);
}

.edit-test-modal__dialog {
    position: relative;
    background: var(--white);
    border-radius: 1.5rem;
    padding: 1.75rem;
    width: min(480px, 100%);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(17, 24, 39, 0.22);
}

.edit-test-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.edit-test-modal__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--forest-900);
}

.edit-test-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(209, 137, 111, 0.15);
    color: var(--forest-900);
    font-size: 1.6rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.edit-test-modal__close:hover,
.edit-test-modal__close:focus {
    background: rgba(209, 137, 111, 0.3);
    transform: translateY(-1px);
}

.edit-test-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.edit-test-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edit-test-collapsible {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(42, 75, 63, 0.08);
    box-shadow: 0 18px 28px rgba(31, 43, 41, 0.12);
}

.edit-test-collapsible__trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.25rem 0;
    border: 0;
    background: transparent;
    color: var(--forest-900);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}

.edit-test-collapsible__trigger:hover,
.edit-test-collapsible__trigger:focus {
    color: var(--forest-700);
}

.edit-test-collapsible__trigger:focus {
    outline: none;
}

.edit-test-collapsible__trigger:focus-visible {
    outline: 2px solid rgba(42, 75, 63, 0.4);
    outline-offset: 4px;
    border-radius: 6px;
}

.edit-test-collapsible__title {
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

.edit-test-collapsible__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--forest-700);
    margin-left: auto;
}

.edit-test-collapsible__icon-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.edit-test-collapsible__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.edit-test-collapsible__header .edit-test-collapsible__trigger {
    flex: 1 1 auto;
}

.edit-test-info-button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(37, 54, 51, 0.18);
    background: rgba(42, 75, 63, 0.08);
    color: var(--forest-900);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-left: auto;
}

.edit-test-info-button:hover,
.edit-test-info-button:focus {
    background: rgba(42, 75, 63, 0.16);
    box-shadow: 0 4px 10px rgba(31, 43, 41, 0.18);
}

.edit-test-info-button:focus-visible {
    outline: 2px solid rgba(42, 75, 63, 0.4);
    outline-offset: 3px;
}

.edit-test-info-button[aria-expanded="true"] {
    background: rgba(42, 75, 63, 0.16);
}

.edit-test-info-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.edit-test-info-button + .edit-test-collapsible__icon {
    margin-left: 0;
}

.edit-test-info {
    margin: -0.25rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(42, 75, 63, 0.08);
    border: 1px solid rgba(37, 54, 51, 0.12);
    color: var(--forest-900);
    font-size: 0.95rem;
    line-height: 1.55;
}

.edit-test-info__text {
    margin: 0;
}

.edit-test-info__text + .edit-test-info__text {
    margin-top: 0.5rem;
}

.edit-test-info__text--example {
    font-style: italic;
}

.edit-test-collapsible__content {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

.edit-test-collapsible__content.is-expanded {
    display: flex;
}

.edit-test-collapsible__content[hidden] {
    display: none !important;
}

.edit-test-form .user-edit-alert {
    margin: 0;
}

.edit-test-form .user-edit-actions {
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.edit-test-form .user-edit-actions > * {
    flex: 0 0 auto;
}

.edit-test-placeholder {
    margin: 0;
    color: var(--forest-700);
    font-size: 0.95rem;
    line-height: 1.5;
}

.edit-test-flashcards-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-test-flashcards-tools-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(37, 54, 51, 0.12);
}

.edit-test-flashcards-tools-section__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--forest-800);
}

.edit-test-flashcards-feedback {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-test-flashcards-manual .user-edit-actions {
    margin-top: 1.25rem;
}

.edit-test-flashcards-upload .user-edit-actions {
    margin-top: 1rem;
}

.edit-test-flashcards-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-test-flashcards-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: #ebeff1;
    border: 1px solid rgba(37, 54, 51, 0.12);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.edit-test-flashcards-item:focus {
    outline: none;
}

.edit-test-flashcards-item:focus-visible {
    outline: 2px solid rgba(26, 77, 65, 0.35);
    outline-offset: 3px;
}

.edit-test-flashcards-item:hover {
    background: #e1e6ea;
    border-color: rgba(37, 54, 51, 0.2);
}

.edit-test-flashcards-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: transparent;
    color: var(--forest-800);
    flex-shrink: 0;
}

.edit-test-flashcards-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.edit-test-flashcards-text {
    margin: 0;
    color: var(--forest-900);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.edit-test-flashcards-delete {
    margin-left: auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: var(--rose-400);
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.edit-test-flashcards-delete:hover,
.edit-test-flashcards-delete:focus {
    background: rgba(221, 140, 123, 0.12);
}

.edit-test-flashcards-delete:focus {
    outline: none;
}

.edit-test-flashcards-delete:focus-visible {
    outline: 2px solid rgba(221, 140, 123, 0.45);
    outline-offset: 2px;
}

.edit-test-flashcards-delete:active {
    transform: scale(0.96);
}

.edit-test-flashcards-delete[aria-busy="true"],
.edit-test-flashcards-delete:disabled {
    opacity: 0.65;
    pointer-events: none;
}

.edit-test-flashcards-delete svg {
    width: 1.05rem;
    height: 1.05rem;
}

.edit-test-delete-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-test-delete-button {
    align-self: stretch;
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, #c86d57, #a24f3c);
    box-shadow: 0 18px 32px rgba(162, 79, 60, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edit-test-delete-button:hover,
.edit-test-delete-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(162, 79, 60, 0.32);
}

.edit-test-delete-button:focus {
    outline: none;
}

.edit-test-delete-button:focus-visible {
    outline: 2px solid rgba(200, 109, 87, 0.4);
    outline-offset: 4px;
}

.edit-test-delete-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 12px 24px rgba(162, 79, 60, 0.18);
}

.edit-test-delete-error {
    margin: 0;
    font-size: 0.9rem;
    color: var(--rose-400);
}

body.modal-open {
    overflow: hidden;
}

.admin-users-table-wrapper {
    border: 1px solid rgba(32, 47, 45, 0.08);
    border-radius: 1.25rem;
    overflow: hidden;
    max-height: 55vh;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-users-table thead {
    background: rgba(32, 47, 45, 0.05);
}

.admin-users-table th,
.admin-users-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--forest-900);
}

.admin-users-table__avatar-header {
    width: 68px;
}

.admin-users-table__avatar-cell {
    width: 68px;
    padding-right: 0.5rem;
}

.admin-users-table__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(32, 47, 45, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-users-table__avatar-initial {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.admin-users-table__avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-users-table tbody tr:nth-child(even) {
    background: rgba(32, 47, 45, 0.03);
}

.admin-users-table tbody tr:hover {
    background: rgba(209, 137, 111, 0.08);
}

.admin-users-table__row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.admin-users-table__row:focus-visible {
    outline: 3px solid rgba(209, 137, 111, 0.55);
    outline-offset: 2px;
}

/* Flashcard learning page */
.flashcard-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.flashcard-stage {
    position: relative;
    width: min(92vw, 560px);
    aspect-ratio: 3 / 2;
    perspective: 1200px;
}

.flashcard-stage--mobile {
    width: 100%;
    max-width: 420px;
}

.flashcard-stage--desktop {
    width: min(92vw, 640px);
}

.flashcard-animator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.flashcard-card {
    position: relative;
    width: 100%;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(40, 70, 66, 0.18);
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.flashcard-card.is-flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding: 1.75rem 1.5rem;
    text-align: center;
    color: #1f3430;
}

.flashcard-color-picker {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.flashcard-color-swatch {
    flex: 1;
    height: 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--flashcard-swatch-color, #ffffff);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.flashcard-color-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(46, 78, 72, 0.15);
}

.flashcard-color-swatch:focus-visible {
    outline: 3px solid rgba(46, 78, 72, 0.4);
    outline-offset: 2px;
}

.flashcard-color-swatch.is-selected {
    border-color: rgba(46, 78, 72, 0.65);
    box-shadow: 0 0 0 2px rgba(46, 78, 72, 0.18);
}

.flashcard-face--question {
    background: linear-gradient(145deg, #fff9ef, #ffffff);
}

.flashcard-face--answer {
    background: linear-gradient(145deg, #fff9ef, #ffffff);
    transform: rotateY(180deg);
}

.flashcard-face__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.flashcard-face__icon svg {
    width: 32px;
    height: 32px;
    color: #2b4742;
}

.flashcard-face--answer .flashcard-face__icon svg {
    color: #d48b1c;
}

.flashcard-face__tag {
    margin-top: auto;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: #b91c1c;
}

.flashcard-text {
    font-size: 1.15rem;
    line-height: 1.5;
    font-weight: 600;
    word-break: break-word;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flashcard-answer-input {
    width: 100%;
    margin-top: 0.5rem;
}

.flashcard-answer-input__field {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 10px 24px rgba(43, 71, 66, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.flashcard-answer-input__field:focus {
    outline: none;
    border-color: #2b4742;
    box-shadow: 0 0 0 3px rgba(43, 71, 66, 0.18);
}

.flashcard-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: auto;
}

.flashcard-actions--awaiting-input {
    justify-content: center;
}

.flashcard-actions--awaiting-input .flashcard-action--reveal {
    flex: 0 0 33%;
    max-width: 14rem;
}

.flashcard-action {
    flex: 1 1 0;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.flashcard-action:focus-visible {
    outline: 3px solid rgba(43, 71, 66, 0.6);
    outline-offset: 2px;
}

.flashcard-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.flashcard-action:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(43, 71, 66, 0.18);
}

.flashcard-action--wrong {
    background: #bc644f;
    color: #ffffff;
}

.flashcard-action--difficult {
    background: #f3f4f6;
    color: #4b5563;
}

.flashcard-action--reveal {
    background: #f3f4f6;
    color: #4b5563;
}

.flashcard-action--correct {
    background: #2c4b43;
    color: #ffffff;
}

.flashcard-animator.enter-from-right {
    transform: translateX(120%);
    opacity: 0;
}

.flashcard-animator.enter-from-left {
    transform: translateX(-120%);
    opacity: 0;
}

.flashcard-animator.is-active {
    transform: translateX(0);
    opacity: 1;
}

.flashcard-progress {
    width: min(90vw, 420px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flashcard-progress__bar {
    position: relative;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(43, 71, 66, 0.15);
    overflow: hidden;
}

.flashcard-progress__fill {
    position: absolute;
    inset: 0;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2b4742, #4fb49f);
    transition: width 0.35s ease;
}

.flashcard-progress__label {
    font-size: 0.95rem;
    color: #2b4742;
    font-weight: 600;
    text-align: center;
}

.day-progress {
    width: 100%;
    margin: 1.2rem 0 0;
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 18px 30px rgba(43, 71, 66, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-self: flex-start;
}

.day-progress__layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    align-items: stretch;
}

.day-progress__controls,
.day-progress__indicator {
    flex: 1 1 24px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.day-progress__controls {
    background: #f8fafc;
    border-radius: 1.25rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.day-progress--controls .day-progress__controls,
.day-progress--indicator .day-progress__indicator {
    background: transparent;
    border: none;
    padding: 0;
}

.day-progress--controls .day-progress__controls {
    gap: 0.6rem;
}

.day-progress__controls-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.day-progress__description {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
}

.day-progress__form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.day-progress__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.day-progress__input {
    width: 100%;
    max-width: 260px;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
    color: #1f2937;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.day-progress__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.day-progress__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.4rem 1.4rem;
    border-radius: 999px;
    border: none;
    background: #2d4b43;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.day-progress__submit:hover,
.day-progress__submit:focus-visible {
    background: #243b35;
}

.day-progress__submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 75, 67, 0.35);
}

.day-progress__indicator {
    padding: 0.25rem 0;
}

.day-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.day-progress__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.day-progress__summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c4b43;
}

.day-progress__bar {
    position: relative;
    width: 100%;
    height: 0.85rem;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.day-progress__segment {
    height: 100%;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.day-progress__segment--correct {
    background: #2d4b43;
}

.day-progress__segment--pending {
    background: #c16751;
}

.day-progress__legend {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #374151;
    flex-wrap: wrap;
}

.day-progress__empty {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
}

.day-progress__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.day-progress__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
}

.day-progress__dot--correct {
    background: #2d4b43;
}

.day-progress__dot--pending {
    background: #c16751;
}

.day-progress__dot--difficult {
    background: rgba(217, 119, 6, 0.85);
}

.learn-day-panels {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.learn-day-panel {
    flex: 1 1 320px;
    display: flex;
}

.learn-day-panel > .day-progress {
    margin: 0;
    width: 100%;
}

.flashcard-remark {
    width: min(92vw, 640px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: auto;
}

.flashcard-remark--mobile {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.flashcard-remark__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2b4742;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.flashcard-remark__field {
    min-height: clamp(140px, 32vh, 220px);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(43, 71, 66, 0.2);
    font-size: 1rem;
    color: #1f3430;
    background-color: #ffffff;
    resize: vertical;
    line-height: 1.5;
    box-shadow: inset 0 1px 3px rgba(31, 52, 48, 0.08);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.flashcard-remark__field--mobile {
    background-color: transparent;
}

.flashcard-remark__field--desktop {
    min-height: clamp(110px, 24vh, 200px);
    background-color: transparent;
}

.flashcard-remark__field:focus {
    outline: 3px solid rgba(43, 71, 66, 0.2);
    outline-offset: 2px;
}

.flashcard-remark__field:disabled {
    background-color: rgba(243, 244, 246, 0.7);
    cursor: not-allowed;
}

.flashcard-empty {
    text-align: center;
    font-size: 1.05rem;
    color: #2b4742;
    font-weight: 600;
}

.flashcard-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background-color: rgba(196, 58, 58, 0.12);
    color: #8f1b1b;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 520px) {
    .flashcard-text {
        font-size: 1.05rem;
    }

}

/* Daily planning overview */
.accordion-trigger {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.accordion-trigger:focus-visible {
    outline: 2px solid #2a5748;
    outline-offset: 2px;
}

.accordion-panel {
    border-top: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.accordion-panel__body {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-panel__text {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
}

.accordion-panel__question-order {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    color: #374151;
    font-size: 0.95rem;
    width: 100%;
    max-width: 22rem;
    align-self: center;
}

.accordion-panel__question-order .accordion-panel__text-label {
    font-weight: 600;
}

.accordion-panel__value {
    font-weight: 600;
}

.accordion-panel__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2a5748;
    color: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.accordion-panel__button:hover,
.accordion-panel__button:focus-visible {
    transform: translateY(-2px);
    color: #ffffff;
    outline: none;
}

.accordion-panel__button--difficult {
    background-color: #2c4b43;
    color: #ffffff;
}

.accordion-panel__button--difficult:hover,
.accordion-panel__button--difficult:focus-visible {
    background-color: #243a33;
}

.accordion-panel__button--remarks {
    background-color: #f8f1e8;
    color: #1f2937;
}

.accordion-panel__button--remarks:hover,
.accordion-panel__button--remarks:focus-visible {
    background-color: #efe1cf;
    color: #1f2937;
}

.item-label__text--complete {
    color: #2a5748;
}

.accordion-panel__value--complete {
    color: #2a5748;
}

.accordion-panel__button--disabled {
    background-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.accordion-panel__button--disabled:hover,
.accordion-panel__button--disabled:focus-visible {
    background-color: #d1d5db;
    color: #6b7280;
    transform: none;
    box-shadow: none;
}

.accordion-panel__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.accordion-panel__primary-actions,
.accordion-panel__reset-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    width: 100%;
    max-width: 22rem;
    align-self: center;
}

.accordion-panel__primary-actions .accordion-panel__button,
.accordion-panel__reset-form .accordion-panel__button {
    width: 100%;
}

.accordion-panel__button--reset {
    background: #c16751;
    color: #ffffff;
    box-shadow: none;
}

.accordion-panel__button--reset:hover,
.accordion-panel__button--reset:focus-visible {
    background-color: #a6533f;
    color: #ffffff;
    box-shadow: none;
    transform: translateY(-2px);
}

.question-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    border: none;
    background-color: #f3f4f6;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.question-toggle:hover {
    background-color: #e5e7eb;
}

.question-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 87, 72, 0.3);
}

.question-toggle__option {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.question-toggle__track {
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.question-toggle__thumb {
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 9999px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.question-toggle[data-order="aq"] .question-toggle__track {
    background-color: #2a5748;
}

.question-toggle[data-order="aq"] .question-toggle__thumb {
    transform: translateX(1.25rem);
}

.question-toggle[data-order="qa"] .question-toggle__option--qa,
.question-toggle[data-order="aq"] .question-toggle__option--aq {
    color: #1f2937;
}

.question-toggle[data-mode="input"] .question-toggle__track {
    background-color: #2a5748;
}

.question-toggle[data-mode="input"] .question-toggle__thumb {
    transform: translateX(1.25rem);
}

.question-toggle[data-mode="show"] .question-toggle__option--qa,
.question-toggle[data-mode="input"] .question-toggle__option--aq {
    color: #1f2937;
}

.question-toggle__state {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.item-icon-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 2.25rem;
}

.item-icon-wrapper--complete {
    color: #2a5748;
}

.item-icon-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.75rem;
    height: 0.75rem;
}

.item-icon-check svg {
    width: 100%;
    height: 100%;
    display: block;
}

