:root {

    --app-background: #f7f7fb;

    --card-background: #ffffff;

    --primary: #6c63ff;

    --text-primary: #20212a;

    --text-secondary: #8b8d98;

    --border: #ececf2;

    --shadow-small: 0 2px 12px rgba(25, 25, 45, .055);

    --shadow-card: 0 8px 25px rgba(25, 25, 45, .07);
}


html,
body {
    margin: 0;

    padding: 0;

    width: 100%;

    min-height: 100%;

    background: var(--app-background);

    color: var(--text-primary);

    font-family: -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;

    -webkit-font-smoothing: antialiased;

    -webkit-text-size-adjust: 100%;
}

.startup-loader,
.startup-error {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.startup-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e3ff;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: startup-spin .75s linear infinite;
}

.startup-error strong {
    color: var(--text-primary);
    font-size: 17px;
}

.startup-error button {
    min-width: 128px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
}

@keyframes startup-spin {
    to {
        transform: rotate(360deg);
    }
}

.pull-to-refresh-indicator {
    position: fixed;
    z-index: 10000;
    top: calc(env(safe-area-inset-top) + 8px);
    left: 50%;
    padding: 8px 13px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, .96);
    border-radius: 999px;
    box-shadow: var(--shadow-small);
    font-size: 12px;
    transform: translate(-50%, -64px);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
    pointer-events: none;
}

.pull-to-refresh-indicator.visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.pull-to-refresh-indicator.refreshing::before {
    content: "↻";
    display: inline-block;
    margin-right: 6px;
    animation: pull-refresh-spin .8s linear infinite;
}

@keyframes pull-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}


body {
    min-height: 100dvh;

    overflow-x: hidden;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    -webkit-tap-highlight-color: transparent;
}


a {
    -webkit-tap-highlight-color: transparent;
}


* {
    box-sizing: border-box;
}

.auth-card {
    padding: 30px 24px 24px;
    background: var(--card-background);
    border: 1px solid rgba(108, 99, 255, .08);
    border-radius: 26px;
    box-shadow: var(--shadow-card);
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 17px;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, #7b73ff, #5e56e8);
    font-size: 27px;
    box-shadow: 0 10px 20px rgba(108, 99, 255, .25);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.auth-card h1 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -.7px;
}

.auth-subtitle {
    margin: 8px 0 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.auth-card label {
    display: block;
    margin: 15px 0 0;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafafe;
    color: var(--text-primary);
    outline: 0;
}

.auth-card input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, .12);
}

.auth-primary {
    width: 100%;
    margin-top: 22px;
    padding: 14px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(108, 99, 255, .2);
}

.auth-primary:disabled {
    opacity: .65;
}

.auth-link {
    display: block;
    margin-top: 17px;
    color: var(--primary);
    text-align: center;
    font-size: 13px;
    text-decoration: none;
}

.auth-footer {
    margin: 21px 0 0;
    color: var(--text-secondary);
    text-align: center;
    font-size: 13px;
}

.auth-footer a, .auth-back {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-back {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 13px;
}

.auth-alert, .auth-success {
    margin: 0 0 16px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.35;
}

.auth-alert {
    color: #9b2836;
    background: #fff0f1;
}

.auth-success {
    color: #27683c;
    background: #ecf9ef;
}

.password-note {
    margin: 8px 0 -6px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
}


/* IOS */

html {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}


/* SCROLLBAR */

::-webkit-scrollbar {
    width: 0;
    height: 0;
}


/* BLAZOR */

#blazor-error-ui {
    display: none;
}


.blazor-error-boundary {
    padding: 12px;

    color: #842029;

    background: #f8d7da;
}


/* DESKTOP */

@media (min-width: 601px) {

    body {
        background: #ededf2;
    }

}

/* =========================================
   BABYSLEEP BOTTOM NAVIGATION
   ========================================= */

.bottom-navigation {
    position: fixed !important;

    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    z-index: 9999 !important;

    box-sizing: border-box;

    padding: 8px 12px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;

    pointer-events: none;
}

.bottom-navigation-inner {
    box-sizing: border-box;

    width: 100%;
    max-width: 560px;

    height: 68px;

    margin: 0 auto;

    padding: 5px;

    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 22px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.10),
    0 2px 10px rgba(0, 0, 0, 0.05);

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    pointer-events: auto;
}


/* ITEM */

.bottom-navigation .nav-item {
    box-sizing: border-box;

    position: relative;

    flex: 1 1 0 !important;

    width: 25% !important;
    min-width: 0 !important;

    height: 58px;

    display: flex !important;
    flex-direction: column !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 1px;

    padding: 4px 2px;

    color: #9297a3;

    text-decoration: none !important;

    border-radius: 17px;

    transition: background-color .18s ease,
    color .18s ease,
    transform .12s ease;

    -webkit-tap-highlight-color: transparent;
}


/* ICON */

.bottom-navigation .nav-icon {
    box-sizing: border-box;

    width: 26px;
    height: 26px;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    flex-shrink: 0;
}

.bottom-navigation .nav-icon svg {
    display: block;

    width: 21px;
    height: 21px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* LABEL */

.bottom-navigation .nav-label {
    display: block !important;

    margin: 0;

    padding: 0;

    font-family: -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    sans-serif;

    font-size: 10px;
    line-height: 12px;

    font-weight: 600;

    color: inherit;

    text-decoration: none !important;

    white-space: nowrap;
}


/* ACTIVE */

.bottom-navigation .nav-item.active {
    color: #6865e8;

    background: #f0efff;
}

.bottom-navigation .nav-item.active .nav-icon svg {
    stroke-width: 2.1;
}

.bottom-navigation .nav-item.active::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 3px;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: currentColor;

    transform: translateX(-50%);
}


/* PRESS */

.bottom-navigation .nav-item:active {
    transform: scale(.94);
}


/* HOVER */

@media (hover: hover) and (pointer: fine) {
    .bottom-navigation .nav-item:not(.active):hover {
        color: #555b6b;
        background: #f7f7fa;
    }
}


/* SMALL PHONE */

@media (max-width: 380px) {

    .bottom-navigation {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .bottom-navigation-inner {
        height: 66px;
        border-radius: 21px;
    }

    .bottom-navigation .nav-item {
        height: 56px;
    }

    .bottom-navigation .nav-label {
        font-size: 9px;
    }
}


/* DESKTOP */

@media (min-width: 601px) {

    .bottom-navigation {
        left: 50% !important;
        right: auto !important;

        width: 600px;

        transform: translateX(-50%);
    }
}

.sync-status-wrap {
    position: relative;
    margin-left: auto
}

.sync-status {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 132px;
    padding: .42rem .55rem .42rem .48rem;
    border: 1px solid rgba(28, 35, 49, .06);
    border-radius: 14px;
    background: linear-gradient(135deg, #f7f8fa, #eef1f5);
    color: #343a46;
    box-shadow: 0 3px 10px rgba(28, 35, 49, .06);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease
}

.sync-status:active {
    transform: scale(.97)
}

.sync-status-icon {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    flex: none;
    border-radius: 10px;
    background: #e3e7ed;
    color: #7b8492
}

.sync-status-icon svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round
}

.sync-status-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    line-height: 1.15
}

.sync-status-title {
    font-size: .72rem;
    font-weight: 750
}

.sync-status-subtitle {
    margin-top: 2px;
    overflow: hidden;
    color: #7a8290;
    font-size: .58rem;
    white-space: nowrap;
    text-overflow: ellipsis
}

.sync-status-count {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ff9e56;
    color: #fff;
    font-size: .62rem;
    font-weight: 800
}

.sync-status-chevron {
    width: 14px;
    flex: none;
    fill: none;
    stroke: #9299a5;
    stroke-width: 1.8
}

.sync-status.online .sync-status-icon {
    background: #e0f7e9;
    color: #24a860
}

.sync-status.synchronizing .sync-status-icon {
    background: #eceaff;
    color: #6c63ff;
    animation: pulse 1.2s infinite
}

.sync-status.offline .sync-status-icon, .sync-status.syncerror .sync-status-icon {
    background: #fff0df;
    color: #d98232
}

.sync-panel-backdrop {
    position: fixed;
    z-index: 920;
    inset: 0;
    border: 0;
    background: rgba(20, 25, 35, .22);
    backdrop-filter: blur(2px)
}

.sync-panel {
    position: absolute;
    z-index: 921;
    top: calc(100% + 10px);
    right: 0;
    width: min(370px, calc(100vw - 24px));
    max-height: min(520px, 70vh);
    overflow: hidden;
    border: 1px solid rgba(28, 35, 49, .08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(25, 31, 43, .2)
}

.sync-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #eef0f3
}

.sync-panel-header h2 {
    margin: 0;
    color: #252a34;
    font-size: 1rem
}

.sync-panel-header p {
    margin: 4px 0 0;
    color: #838a96;
    font-size: .7rem
}

.sync-panel-close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6f7784;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer
}

.sync-operation-list {
    max-height: 410px;
    overflow: auto;
    padding: 8px
}

.sync-operation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 9px;
    border-radius: 14px
}

.sync-operation + .sync-operation {
    border-top: 1px solid #f2f3f5
}

.sync-operation-kind {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 11px;
    background: #eceaff;
    color: #665cdf;
    font-weight: 800
}

.sync-operation-kind.create {
    background: #e3f7eb;
    color: #21a25c
}

.sync-operation-kind.delete {
    background: #ffebeb;
    color: #d85555
}

.sync-operation-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column
}

.sync-operation-copy strong {
    color: #343945;
    font-size: .75rem
}

.sync-operation-copy span {
    margin-top: 2px;
    color: #858c98;
    font-size: .65rem
}

.sync-operation-copy small {
    margin-top: 4px;
    overflow: hidden;
    color: #d16f38;
    font-size: .59rem;
    white-space: nowrap;
    text-overflow: ellipsis
}

.sync-operation-state {
    flex: none;
    padding: 4px 7px;
    border-radius: 8px;
    background: #fff4e8;
    color: #c97833;
    font-size: .58rem;
    font-weight: 700
}

.sync-panel-empty {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 28px;
    color: #9299a4;
    font-size: .7rem;
    text-align: center
}

.sync-panel-empty strong {
    margin: 9px 0 3px;
    color: #343945;
    font-size: .84rem
}

.sync-panel-check {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #e3f7eb;
    color: #22a45d;
    font-size: 1.2rem;
    font-weight: 800
}

@media (max-width: 480px) {
    .sync-status {
        min-width: 0
    }

    .sync-status-subtitle, .sync-status-chevron {
        display: none
    }

    .sync-panel {
        top: calc(100% + 8px);
        right: 0;
        bottom: auto;
        left: auto;
        width: min(370px, calc(100vw - 20px));
        max-height: 65vh
    }

    .sync-status-title {
        font-size: .68rem
    }
}
