* {
    box-sizing: border-box;
}

html, body {
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #0f1117;
    color: #f5f5f5;
    margin: 0;
}

a {
    color: inherit;
}

h1, h2, h3 {
    margin: 0 0 0.5rem;
}

p {
    margin: 0.25rem 0 0;
}

.page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-center {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header p {
    color: #9aa4b2;
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.page-header .primary {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding: 0;
}

.card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    color: #f5f5f5;
    font-size: 1rem;
}

.input:focus {
    outline: none;
    border-color: #ff3b3b;
    box-shadow: 0 0 0 2px rgba(255, 59, 59, 0.2);
}

.input-sm {
    max-width: 110px;
}

.primary {
    background: #ff3b3b;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
}

.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ghost {
    background: transparent;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    border-radius: 14px;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #101010;
    border-radius: 14px;
    border: 1px solid #2a2a2a;
}

.list-item.done {
    background: #10331a;
    border-color: #1f6b38;
}

.item-title {
    font-weight: 600;
}

.item-subtitle {
    color: #bdbdbd;
    font-size: 0.85rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.checkbox-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: #f0f0f0;
}

.muted {
    color: #bdbdbd;
}

.input-unit {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.input-unit .unit {
    padding: 0.4rem 0.6rem;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.85rem;
}

#blazor-error-ui {
    color-scheme: dark;
    background: #1f2937;
    color: #f8fafc;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.loading-screen {
    position: absolute;
    inset: 20vh 0 auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.app-shell {
    min-height: 100vh;
    background: #0b0b0b;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 1.5rem 1.25rem 6rem;
}

.brand-header {
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 1.25rem 0 0.25rem;
}

.brand-white {
    color: #ffffff;
}

.brand-red {
    color: #ff3b3b;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 96px;
    background: #141414;
    border-top: 1px solid #2a2a2a;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    z-index: 10;
}

.nav-item {
    color: #bdbdbd;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    border: 1px solid transparent;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: 100%;
    max-width: 160px;
    margin: 0 auto;
    justify-self: center;
    text-align: center;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-item.active {
    color: #ffffff;
    font-weight: 700;
    border-color: #ff3b3b;
    box-shadow: 0 0 0 2px rgba(255, 59, 59, 0.15);
    background: rgba(255, 59, 59, 0.12);
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-logo {
    width: 80px;
    height: 80px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.nav-logo img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem 2.5rem 7rem;
        max-width: 960px;
        margin: 0 auto;
    }

    .bottom-nav {
        left: 50%;
        transform: translateX(-50%);
        max-width: 720px;
        border-radius: 24px 24px 0 0;
    }
}

.loading-screen img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.loading-progress-text {
    text-align: center;
    font-weight: bold;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (min-width: 640px) {
    .form-row {
        flex-direction: row;
    }
}