/* CustomerKeeper 2026 interface layer.
   Loaded after the legacy styles so existing routes and JavaScript contracts stay intact. */
:root {
    color-scheme: light;
    --ck-primary: #20c3e3;
    --ck-primary-hover: #16aac8;
    --ck-on-primary: #ffffff;
    --ck-primary-container: #e4f8fc;
    --ck-on-primary-container: #0b5d6d;
    --ck-secondary: #55615d;
    --ck-secondary-container: #e4eeeb;
    --ck-on-secondary-container: #283330;
    --ck-surface: #f7f7f7;
    --ck-surface-low: #ffffff;
    --ck-surface-container: #f0f2f1;
    --ck-surface-high: #e7e9e8;
    --ck-on-surface: #333333;
    --ck-on-surface-muted: #676d6b;
    --ck-outline: #8a9390;
    --ck-outline-soft: #d8dddb;
    --ck-danger: #ba1a1a;
    --ck-danger-soft: #ffdad6;
    --ck-shadow: 0 18px 55px rgba(31, 35, 68, 0.12);
    --ck-shadow-soft: 0 8px 24px rgba(31, 35, 68, 0.08);
    --ck-radius-sm: 12px;
    --ck-radius-md: 18px;
    --ck-radius-lg: 28px;
    --ck-sidebar: 320px;
    --ck-agenda: 300px;
    --ck-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    min-height: 100%;
    background: var(--ck-surface);
    color: var(--ck-on-surface);
    font-size: 16px;
}

body.ck-app,
body.ck-app input,
body.ck-app textarea,
body.ck-app select,
body.ck-app button {
    font-family: var(--ck-font);
}

body.ck-app {
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% -20%, rgba(32, 195, 227, 0.1), transparent 42%),
        var(--ck-surface);
    color: var(--ck-on-surface);
    font-size: 15px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.ck-app a,
body.ck-app button,
body.ck-app input,
body.ck-app select,
body.ck-app textarea {
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
        box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

body.ck-app :focus {
    outline: none;
}

body.ck-app :focus-visible {
    outline: 3px solid rgba(32, 195, 227, 0.42);
    outline-offset: 3px;
}

body.ck-app .ck-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.ck-app input,
body.ck-app textarea,
body.ck-app select {
    color: var(--ck-on-surface);
}

body.ck-app input::placeholder,
body.ck-app textarea::placeholder {
    color: var(--ck-on-surface-muted);
    opacity: 0.72;
}

body.ck-app .in,
body.ck-app .out {
    animation-duration: 240ms;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

/* Keep the established CustomerKeeper artwork. Font glyphs vary by platform and
   can render as several unrelated pieces, especially for search. */
body.ck-app .BtnBack,
body.ck-app .BtnSetting,
body.ck-app .BtnCategory,
body.ck-app .BtnEdit,
body.ck-app .BtnSave,
body.ck-app a.BtnDelete {
    display: inline-block;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background-color: transparent !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    color: var(--ck-on-surface-muted);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

body.ck-app .BtnBack:hover,
body.ck-app .BtnSetting:hover,
body.ck-app .BtnCategory:hover,
body.ck-app .BtnEdit:hover,
body.ck-app .BtnSave:hover {
    background-color: var(--ck-surface-high) !important;
    color: var(--ck-primary);
}

body.ck-app .BtnBack { background-image: url(../images/back.png) !important; }
body.ck-app .BtnSetting { background-image: url(../images/setting.png) !important; }
body.ck-app .BtnCategory { background-image: url(../images/down.png) !important; }
body.ck-app .BtnEdit { background-image: url(../images/edit.png) !important; }
body.ck-app .BtnSave { background-image: url(../images/save.png) !important; }
body.ck-app a.BtnDelete { background-image: url(../images/icon_delete.png) !important; }

body.ck-app .BtnBack::before,
body.ck-app .BtnSetting::before,
body.ck-app .BtnCategory::before,
body.ck-app .BtnEdit::before,
body.ck-app .BtnSave::before,
body.ck-app a.BtnDelete::before {
    content: none;
}

/* Three-column app workspace. */
body.ck-app #ClientList,
body.ck-app #CategoryList,
body.ck-app #Setting {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ck-sidebar);
    padding: 0 14px;
    border-right: 1px solid var(--ck-outline-soft);
    background: rgba(247, 247, 247, 0.96);
    box-shadow: none;
    color: var(--ck-on-surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.ck-app .content {
    position: fixed;
    inset: 0 var(--ck-agenda) 0 var(--ck-sidebar);
    width: auto;
    height: auto;
    box-sizing: border-box;
    overflow: hidden;
    padding: 18px 24px;
    background: var(--ck-surface);
    color: var(--ck-on-surface);
}

body.ck-app #Upcoming {
    position: fixed;
    inset: 0 0 0 auto;
    width: var(--ck-agenda);
    border-left: 1px solid var(--ck-outline-soft);
    background: #55615d;
    color: #ffffff;
}

/* Shared headers. */
body.ck-app #ClientList .title,
body.ck-app #Upcoming .title,
body.ck-app .content .title,
body.ck-app #Setting .title {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 72px;
    height: 72px;
    margin: 0;
    padding: 12px 4px;
    border: 0;
    background: transparent;
    background-image: none;
    color: var(--ck-on-surface);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.2;
}

body.ck-app #ClientList .title span,
body.ck-app #Upcoming .title span,
body.ck-app .content .title > span,
body.ck-app #Setting .title span {
    color: var(--ck-on-surface);
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

body.ck-app #ClientList .title span {
    position: static;
    flex: 1;
    text-align: center;
    line-height: 44px;
}

body.ck-app #ClientList .title .BtnSetting,
body.ck-app #ClientList .title .BtnCategory {
    position: relative;
    inset: auto;
    float: none;
}

body.ck-app #ClientList .title .BtnCategory {
    width: 44px;
    height: 44px;
}

body.ck-app .content .title .BtnBack,
body.ck-app #Upcoming .title .BtnBack {
    float: none;
    margin: 0 10px 0 0;
}

/* Customer navigation and lists. */
body.ck-app #ClientList .search {
    position: relative;
    display: block;
    height: 58px;
    margin: 2px 0 12px;
    padding: 0 50px 0 0;
    border: 0;
    background: transparent;
}

body.ck-app #ClientList .search input[type="text"],
body.ck-app #Search .search-input input {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 26px;
    background: var(--ck-surface-container);
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 16px;
}

body.ck-app #ClientList .search input[type="text"]:focus,
body.ck-app #Search .search-input input:focus {
    border-color: var(--ck-primary);
    background: var(--ck-surface);
    box-shadow: 0 0 0 4px rgba(32, 195, 227, 0.14);
}

body.ck-app #ClientList .search button,
body.ck-app #Search .search-box button {
    position: absolute;
    top: 4px;
    right: 2px;
    display: block;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: transparent;
    background-image: url(../images/search.png);
    background-position: center;
    background-repeat: no-repeat;
    color: var(--ck-on-surface-muted);
    cursor: pointer;
}

body.ck-app #ClientList .search button::before,
body.ck-app #Search .search-box button::before {
    content: none;
}

body.ck-app #ClientList .search button#UpcomingBtn {
    background-image: url(../images/btn_upcoming.png);
}

body.ck-app #ClientListBox {
    inset: 144px 4px 0 14px;
    padding: 0 10px 18px 0;
}

body.ck-app #ClientList .add,
body.ck-app #CategoryList .add,
body.ck-app #ClientDetail .ClientRecords .add {
    min-height: 52px;
    height: auto;
    margin: 4px 0 10px;
    padding: 0 16px 0 48px;
    border: 1px dashed var(--ck-outline);
    border-radius: var(--ck-radius-md);
    background: var(--ck-primary-container);
    background-image: url(../images/icon_create.png);
    background-position: 18px center;
    background-repeat: no-repeat;
    color: var(--ck-on-primary-container);
    font-size: 15px;
    font-weight: 650;
    line-height: 50px;
    text-align: center;
}

body.ck-app #ClientList .add::before,
body.ck-app #CategoryList .add::before,
body.ck-app #ClientDetail .ClientRecords .add::before {
    content: none;
}

body.ck-app #ClientList .list,
body.ck-app #RecordList,
body.ck-app #ClientCategoryList,
body.ck-app #UpcomingList,
body.ck-app #Search #SearchList {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.ck-app #ClientList .list li,
body.ck-app #ClientCategoryList li,
body.ck-app #RecordList li,
body.ck-app #Search #SearchList li {
    position: relative;
    min-height: 64px;
    margin: 0 0 8px;
    padding: 10px 52px 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--ck-radius-md);
    background: var(--ck-surface-low);
    color: var(--ck-on-surface);
    font-size: 15px;
    line-height: 42px;
    cursor: pointer;
}

body.ck-app #ClientList .list li:hover,
body.ck-app #ClientList .list li.hover,
body.ck-app #ClientCategoryList li:hover,
body.ck-app #RecordList li:hover,
body.ck-app #Search #SearchList li:hover {
    border-color: var(--ck-outline-soft);
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
    transform: translateY(-1px);
}

body.ck-app #ClientList .list li .BtnDelete,
body.ck-app #CategoryList .BtnDelete,
body.ck-app #RecordList li a.BtnDelete {
    position: absolute;
    top: 10px;
    right: 8px;
    float: none;
    width: 44px;
    height: 44px;
    border: 0;
    background-color: transparent !important;
    background-image: url(../images/icon_delete.png) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    color: var(--ck-danger);
}

body.ck-app #ClientList .list li .BtnDelete:hover,
body.ck-app #CategoryList .BtnDelete:hover,
body.ck-app #RecordList li a.BtnDelete:hover {
    background-color: var(--ck-danger-soft) !important;
}

body.ck-app #ClientList .list li.ck-list-status,
body.ck-app #ClientList .list li.ck-list-more,
body.ck-app #RecordList li.ck-list-status,
body.ck-app #RecordList li.ck-list-more {
    min-height: 48px;
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--ck-on-surface-muted);
    line-height: 40px;
    text-align: center;
    cursor: default;
}

body.ck-app #ClientList .list li.ck-list-status:hover,
body.ck-app #ClientList .list li.ck-list-more:hover,
body.ck-app #RecordList li.ck-list-status:hover,
body.ck-app #RecordList li.ck-list-more:hover {
    border: 0;
    background: transparent;
    color: var(--ck-on-surface-muted);
    transform: none;
}

body.ck-app .ck-list-status.is-error {
    color: var(--ck-danger) !important;
}

body.ck-app .ck-list-more button {
    min-width: 180px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 14px;
    background: var(--ck-surface-container);
    color: var(--ck-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

body.ck-app .ck-list-more button:hover {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
}

/* Settings drawer. */
body.ck-app #Setting {
    z-index: 1200;
    overflow-y: auto;
    padding: 8px 14px 24px;
    list-style: none;
}

body.ck-app #Setting li {
    position: relative;
    min-height: 58px;
    height: auto;
    margin: 0 0 8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 16px;
    background: var(--ck-surface-low);
    background-image: none;
    color: var(--ck-on-surface);
    line-height: 42px;
}

body.ck-app #Setting li.title {
    margin-bottom: 12px;
    padding: 12px 4px;
    background: transparent;
}

body.ck-app #Setting .title .BtnBack {
    float: none;
    margin: 0 10px 0 0;
}

body.ck-app #Setting .action {
    color: var(--ck-on-surface);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

body.ck-app #Setting .action:hover {
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
}

body.ck-app #Setting .action span {
    min-height: 42px;
    padding-left: 44px;
    color: inherit;
    line-height: 42px;
}

body.ck-app #Setting input[type="text"] {
    position: absolute;
    top: 8px;
    right: 12px;
    left: 62px;
    width: auto;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 15px;
}

body.ck-app #Setting input[type="text"]:focus {
    border-color: var(--ck-primary);
    background: var(--ck-surface);
}

body.ck-app #Setting label.checkbox {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    margin: 9px 0 0;
    border: 2px solid var(--ck-outline);
    border-radius: 8px;
    background: transparent;
}

/* Agenda rail. */
body.ck-app #Upcoming .title {
    position: absolute;
    inset: 0 0 auto;
    padding: 12px 14px;
    background: #55615d;
}

body.ck-app #Upcoming .title span {
    flex: 1;
    margin: 0;
    line-height: 44px;
    color: var(--ck-primary);
}

body.ck-app #Upcoming .title a {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 0 0 6px;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.09);
    background-position: center;
    background-repeat: no-repeat;
    color: var(--ck-primary);
}

body.ck-app #Upcoming .title .BtnBack {
    display: none;
}

body.ck-app #Upcoming .title .BtnNow { background-image: url(../images/icon_upcoming.png); }
body.ck-app #Upcoming .title .BtnPass { background-image: url(../images/icon_past.png); }
body.ck-app #Upcoming .title .BtnNow::before,
body.ck-app #Upcoming .title .BtnPass::before { content: none; }

body.ck-app #UpcomingContent {
    inset: 76px 0 0;
    padding: 0 10px 18px;
}

body.ck-app #UpcomingList li {
    margin: 0 0 10px;
}

body.ck-app #UpcomingList li .Content {
    min-height: 72px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: var(--ck-radius-md);
    background: var(--ck-surface);
    background-image: none;
    box-shadow: var(--ck-shadow-soft);
}

body.ck-app #UpcomingList li .Content:hover {
    border-color: var(--ck-outline-soft);
    transform: translateY(-1px);
}

body.ck-app #UpcomingList span,
body.ck-app #UpcomingList #Description,
body.ck-app #UpcomingList #Date {
    color: var(--ck-on-surface);
}

body.ck-app #UpcomingList #Date {
    height: auto;
    margin: 12px 4px 6px;
    padding: 0;
    background: transparent;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 24px;
    text-transform: uppercase;
}

body.ck-app #UpcomingList #Time,
body.ck-app #UpcomingList li.Birthday #Time {
    color: var(--ck-primary);
}

/* Search and editor surfaces. */
body.ck-app #Search {
    position: fixed;
    inset: 0 var(--ck-agenda) 0 0;
    background: var(--ck-surface);
    color: var(--ck-on-surface);
}

body.ck-app #Search .search-box {
    position: absolute;
    inset: 0 0 auto;
    height: 76px;
    padding: 12px 18px;
    border: 0;
    background: rgba(248, 249, 255, 0.94);
    backdrop-filter: blur(18px);
}

body.ck-app #Search .search-box a.BtnBack {
    top: 16px;
    left: 18px;
}

body.ck-app #Search .search-box .search-input {
    max-width: 720px;
    height: 52px;
    padding-right: 50px;
}

body.ck-app #Search #SearchContent {
    top: 80px;
}

body.ck-app #Search #SearchList {
    padding: 18px;
}

body.ck-app #Search #SearchList li {
    display: block;
    padding-left: 68px;
    background-position: 18px center;
}

body.ck-app #Search #SearchList li.Client #ClientName,
body.ck-app #Search #SearchList li.Record #Description {
    color: var(--ck-primary);
    font-size: 18px;
    font-weight: 650;
}

body.ck-app #ClientDetail,
body.ck-app #ClientAdd,
body.ck-app #RecordDetail {
    background: var(--ck-surface);
}

body.ck-app .content .detail,
body.ck-app #ClientDetail .details {
    overflow: hidden;
    border: 1px solid var(--ck-outline-soft);
    border-radius: var(--ck-radius-lg);
    background: var(--ck-surface-low);
    box-shadow: none;
}

body.ck-app .content .detail .item {
    width: 100%;
    min-height: 86px;
    padding: 14px 18px 8px;
    border: 0;
    border-bottom: 1px solid var(--ck-outline-soft);
}

body.ck-app .content .detail .item > label {
    margin: 4px 0 0;
    color: var(--ck-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.ck-app .content .detail .item input[type="text"],
body.ck-app .content .detail .item textarea,
body.ck-app .content .detail .item select {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 17px;
}

body.ck-app .content .detail .item textarea {
    min-height: 100px;
    resize: vertical;
}

body.ck-app .content .detail .action {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 18px;
}

body.ck-app .content .detail .action button,
body.ck-app .ck-primary-action {
    float: none;
    min-width: 150px;
    min-height: 50px;
    margin: 0;
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    background: var(--ck-primary);
    box-shadow: none;
    color: var(--ck-on-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

body.ck-app .content .detail .action button:hover,
body.ck-app .ck-primary-action:hover {
    background: var(--ck-primary-hover);
    transform: translateY(-1px);
}

body.ck-app .content .detail .action .BtnDelete {
    background: var(--ck-danger-soft);
    color: var(--ck-danger);
}

body.ck-app #ClientDetail .details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
}

body.ck-app #ClientDetail .details > div {
    position: relative;
    float: none;
    width: auto;
    height: 78px;
    padding: 14px;
    border: 0;
    border-radius: 16px;
}

body.ck-app #ClientDetail .details > div:hover {
    background: var(--ck-surface-container);
}

body.ck-app #ClientDetail .details > div label {
    bottom: 10px;
    left: 14px;
    color: var(--ck-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

body.ck-app #ClientDetail .details > div span,
body.ck-app #ClientDetail .details > div a {
    color: var(--ck-on-surface);
}

body.ck-app #ClientDetail .details .Email,
body.ck-app #ClientDetail .details .Edit {
    grid-column: 1 / -1;
}

body.ck-app #ClientDetail .details .Edit {
    position: relative;
    inset: auto;
    height: 50px;
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
    text-align: center;
}

body.ck-app #ClientDetail .details .Edit span.pc {
    display: none;
}

body.ck-app #ClientDetail .details .Edit span.mobile {
    position: static;
    display: flex;
    width: 100%;
    height: 100%;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: none;
    color: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

body.ck-app #ClientDetail .details .Email a {
    padding: 3px 12px;
    border-radius: 12px;
    background: var(--ck-secondary-container);
    color: var(--ck-on-secondary-container);
}

body.ck-app #ClientDetail .ClientRecords .title {
    border: 0;
}

body.ck-app #ClientDetail.ck-detail-empty #ClientContent,
body.ck-app #ClientDetail.ck-detail-empty .BtnBack {
    display: none;
}

body.ck-app #ClientDetail .ck-detail-empty-state {
    position: absolute;
    inset: 72px 24px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    padding: 32px;
    border: 1px dashed var(--ck-outline-soft);
    border-radius: var(--ck-radius-lg);
    background: var(--ck-surface-low);
    color: var(--ck-on-surface-muted);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.ck-app #ClientDetail .ck-detail-empty-state::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    margin: 0;
    background: url(../images/icon_customer_nml.png) center / contain no-repeat;
}

body.ck-app #RecordList li div#Description,
body.ck-app #RecordList li div#Date {
    height: auto;
    margin: 0;
    color: var(--ck-on-surface);
    line-height: 24px;
}

body.ck-app #RecordList li div#Date {
    color: var(--ck-primary);
    font-size: 12px;
}

body.ck-app div.SelectBox,
body.ck-app div.SelectBox.Closed,
body.ck-app div.SelectBox.Opened {
    border-radius: 14px;
    background-color: var(--ck-surface-container);
    color: var(--ck-on-surface);
}

body.ck-app div.SelectBox span,
body.ck-app div.SelectBox.Closed span,
body.ck-app div.SelectBox.Opened span,
body.ck-app div.SelectBox ul li {
    color: var(--ck-on-surface);
}

body.ck-app div.SelectBox ul {
    border-radius: 0 0 14px 14px;
    background: var(--ck-surface-container);
    box-shadow: var(--ck-shadow-soft);
}

body.ck-app div.SelectBox ul li:hover {
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
}

/* Auth and account pages. */
body.ck-app[id^="Page-User"] > .ck-app-shell,
body.ck-app#Page-Account > .ck-app-shell {
    display: none !important;
}

body.ck-app .PageUser {
    position: fixed;
    inset: 0;
    z-index: 2500;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    background:
        radial-gradient(circle at 15% 5%, rgba(32, 195, 227, 0.18), transparent 30%),
        radial-gradient(circle at 85% 0%, rgba(85, 97, 93, 0.12), transparent 38%),
        var(--ck-surface);
}

body.ck-app .PageUser .topbar {
    min-height: 270px;
    border: 0;
    background-color: #42453c;
    background-image: url(../images/logo.png), linear-gradient(135deg, #3b3f38, #4d544f);
    background-position: center top, center;
    background-repeat: no-repeat;
    color: #fff;
}

body.ck-app .PageUser .topbar .title {
    bottom: 24px;
    min-height: 90px;
}

body.ck-app .PageUser .topbar .title h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 6vw, 44px);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.1;
    text-shadow: none;
}

body.ck-app .PageUser .topbar .title p {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    font-weight: 500;
}

body.ck-app .PageUser .container {
    width: calc(100% - 32px);
    max-width: 480px;
    margin: -20px auto 40px;
    padding: 24px;
    border: 1px solid rgba(199, 199, 209, 0.72);
    border-radius: var(--ck-radius-lg);
    background: rgba(248, 249, 255, 0.96);
    box-shadow: var(--ck-shadow);
    backdrop-filter: blur(18px);
}

body.ck-app .PageUser .container .control-group.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

body.ck-app .PageUser .container .control-group.header::after {
    display: none;
}

body.ck-app .PageUser .container .control-group.header span {
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    line-height: 1.3;
}

body.ck-app .PageUser .container .control-group.header span.title {
    margin: 0;
    color: var(--ck-on-surface);
    font-size: 26px;
    font-weight: 720;
    letter-spacing: -0.03em;
}

body.ck-app .PageUser .container .control-group.header span.ToPage {
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--ck-primary-container);
    background-image: none;
    color: var(--ck-on-primary-container);
    font-size: 14px;
    font-weight: 650;
}

body.ck-app .PageUser input,
body.ck-app .PageUser input[type="text"],
body.ck-app .PageUser input[type="email"],
body.ck-app .PageUser input[type="password"] {
    width: 100%;
    height: 54px;
    margin: 0 0 12px;
    padding: 0 16px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 16px;
    background: var(--ck-surface);
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 16px;
}

body.ck-app .PageUser input:focus {
    border-color: var(--ck-primary);
    box-shadow: 0 0 0 4px rgba(32, 195, 227, 0.14);
}

body.ck-app .PageUser .password {
    height: 54px;
    margin-bottom: 18px;
    padding-right: 54px;
}

body.ck-app .PageUser .password button {
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 0 16px 16px 0;
    background-color: transparent;
}

body.ck-app .PageUser .btn {
    float: none;
    width: 100%;
    height: 52px;
    margin: 0 0 10px;
    border: 0;
    border-radius: 16px;
    background: var(--ck-surface-high);
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 15px;
    font-weight: 700;
    line-height: 32px;
    text-shadow: none;
}

body.ck-app .PageUser .BtnHighlight {
    background: var(--ck-primary);
    color: var(--ck-on-primary);
}

body.ck-app .PageUser .BtnHighlight.ToURL {
    border: 1px solid var(--ck-outline-soft);
    background: var(--ck-surface-low);
    color: var(--ck-on-surface-muted);
}

body.ck-app .ListContainer .nav li {
    height: 58px;
    margin: 0 0 10px;
    padding: 0 14px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 16px;
    background: var(--ck-surface-low);
    line-height: 58px;
}

/* Export route. */
body.ck-app .ck-export-page {
    overflow: hidden;
}

body.ck-app .ck-export-scroll {
    position: absolute;
    inset: 88px 16px 0;
    overflow: auto;
    padding: 0 8px 40px;
    scrollbar-gutter: stable;
}

body.ck-app .ck-export-form {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

body.ck-app .ck-export-intro {
    padding: 8px 4px 12px;
}

body.ck-app .ck-eyebrow {
    display: block;
    color: var(--ck-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.ck-app .ck-export-intro h1 {
    margin: 6px 0 8px;
    color: var(--ck-on-surface);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

body.ck-app .ck-export-intro p,
body.ck-app .ck-card-heading p {
    margin: 0;
    color: var(--ck-on-surface-muted);
}

body.ck-app .ck-form-card {
    margin-top: 14px;
    padding: 22px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 24px;
    background: var(--ck-surface-low);
}

body.ck-app .ck-card-heading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

body.ck-app .ck-card-heading h2 {
    margin: 0 0 4px;
    color: var(--ck-on-surface);
    font-size: 20px;
    line-height: 1.3;
}

body.ck-app .ck-step {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
    font-weight: 800;
}

body.ck-app .ck-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

body.ck-app .ck-choice {
    position: relative;
    display: flex;
    min-height: 144px;
    padding: 16px;
    flex-direction: column;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 18px;
    background: var(--ck-surface);
    cursor: pointer;
}

body.ck-app .ck-choice:hover {
    border-color: var(--ck-primary);
    transform: translateY(-1px);
}

body.ck-app .ck-choice:has(input:checked) {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    box-shadow: inset 0 0 0 1px var(--ck-primary);
}

body.ck-app .ck-choice input {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 20px;
    height: 20px;
    accent-color: var(--ck-primary);
}

body.ck-app .ck-choice-mark {
    align-self: flex-start;
    margin-bottom: 22px;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--ck-surface-container);
    color: var(--ck-primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

body.ck-app .ck-choice strong,
body.ck-app .ck-switch-row strong {
    color: var(--ck-on-surface);
    font-size: 15px;
}

body.ck-app .ck-choice small,
body.ck-app .ck-switch-row small {
    display: block;
    margin-top: 4px;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
    line-height: 1.4;
}

body.ck-app .ck-switch-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

body.ck-app .ck-switch-row {
    display: flex;
    min-height: 72px;
    padding: 12px 14px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 16px;
    background: var(--ck-surface);
    cursor: pointer;
}

body.ck-app .ck-switch-row > span {
    flex: 1;
}

body.ck-app .ck-switch-row input {
    position: absolute;
    opacity: 0;
}

body.ck-app .ck-switch-row i {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--ck-surface-high);
    box-shadow: inset 0 0 0 1px var(--ck-outline);
}

body.ck-app .ck-switch-row i::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ck-outline);
    transition: transform 180ms ease, background-color 180ms ease;
}

body.ck-app .ck-switch-row input:checked + i {
    background: var(--ck-primary);
    box-shadow: none;
}

body.ck-app .ck-switch-row input:checked + i::after {
    background: var(--ck-on-primary);
    transform: translateX(20px);
}

body.ck-app .ck-switch-row input:focus-visible + i {
    outline: 3px solid rgba(32, 195, 227, 0.42);
    outline-offset: 3px;
}

body.ck-app .ck-switch-row input:disabled + i {
    opacity: 0.5;
}

body.ck-app .ck-field-grid {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

body.ck-app .ck-date-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.ck-app .ck-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
    font-weight: 700;
}

body.ck-app .ck-field select,
body.ck-app .ck-field input {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 14px;
    background: var(--ck-surface);
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 15px;
}

body.ck-app .ck-inline-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--ck-secondary-container);
    color: var(--ck-on-secondary-container);
}

body.ck-app .ck-check-row {
    display: flex;
    margin: 18px 0 0;
    align-items: center;
    gap: 10px;
    color: var(--ck-on-surface);
    cursor: pointer;
}

body.ck-app .ck-check-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--ck-primary);
}

body.ck-app .ck-export-status {
    min-height: 24px;
    margin: 14px 0 8px;
    color: var(--ck-on-surface-muted);
}

body.ck-app .ck-primary-action {
    width: 100%;
}

body.ck-app .ck-primary-action.is-busy::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: ck-spin 700ms linear infinite;
}

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

/* Modal refresh. */
body.ck-app .modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(520px, calc(100% - 32px));
    margin: 0;
    padding: 8px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 24px;
    background: var(--ck-surface);
    box-shadow: var(--ck-shadow);
    color: var(--ck-on-surface);
    transform: translate(-50%, -50%);
}

body.ck-app .modal .modal-body {
    padding: 20px;
}

body.ck-app .modal .modal-body h2 {
    margin: 0 0 8px;
    color: var(--ck-on-surface);
    font-size: 20px;
}

body.ck-app .modal .modal-body p {
    color: var(--ck-on-surface-muted);
}

body.ck-app .modal .modal-footer {
    padding: 12px 20px 20px;
    border: 0;
    background: transparent;
}

body.ck-app .modal .modal-footer .btn {
    min-width: 120px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--ck-surface-high);
    color: var(--ck-on-surface);
}

body.ck-app .modal .modal-footer .btn-primary {
    background: var(--ck-primary);
    color: var(--ck-on-primary);
}

body.ck-app .modal-backdrop {
    background: #10121b;
}

body.ck-app .nano .nano-content {
    padding-right: 8px;
}

body.ck-app .nano .nano-pane {
    width: 5px;
    border-radius: 4px;
    background: transparent;
}

body.ck-app .nano .nano-slider {
    border-radius: 4px;
    background: var(--ck-outline-soft);
}

@media (max-width: 1180px) and (min-width: 1024px) {
    :root {
        --ck-sidebar: 320px;
        --ck-agenda: 300px;
    }
}

@media (max-width: 1023px) {
    body.ck-app {
        overflow: hidden;
    }

    body.ck-app .ck-shell-piece.hidden {
        visibility: hidden;
        pointer-events: none;
    }

    body.ck-app .ck-shell-piece.page-active {
        visibility: visible;
        pointer-events: auto;
    }

    body.ck-app #ClientList,
    body.ck-app #CategoryList,
    body.ck-app #Setting,
    body.ck-app #Upcoming,
    body.ck-app #Search,
    body.ck-app .content {
        inset: 0;
        width: 100%;
        max-width: none;
        border: 0;
    }

    body.ck-app .content {
        padding: 10px 16px max(20px, env(safe-area-inset-bottom));
    }

    body.ck-app #ClientList,
    body.ck-app #CategoryList,
    body.ck-app #Setting {
        padding-right: max(14px, env(safe-area-inset-right));
        padding-left: max(14px, env(safe-area-inset-left));
    }

    body.ck-app #Upcoming .title .BtnBack {
        display: block;
    }

    body.ck-app #Search .search-box .search-input {
        padding-left: 52px;
    }

    body.ck-app .ck-export-scroll {
        inset: 78px 0 0;
        padding: 0 0 32px;
    }
}

@media (max-width: 640px) {
    body.ck-app .content .title,
    body.ck-app #ClientList .title,
    body.ck-app #Upcoming .title,
    body.ck-app #Setting .title {
        min-height: 64px;
        height: 64px;
    }

    body.ck-app .ck-form-card {
        padding: 18px;
        border-radius: 20px;
    }

    body.ck-app .ck-choice-grid,
    body.ck-app .ck-switch-list,
    body.ck-app .ck-date-fields {
        grid-template-columns: 1fr;
    }

    body.ck-app .ck-choice {
        min-height: 112px;
    }

    body.ck-app .ck-choice-mark {
        margin-bottom: 12px;
    }

    body.ck-app #ClientDetail .details {
        grid-template-columns: 1fr;
    }

    body.ck-app #ClientDetail .details .Email,
    body.ck-app #ClientDetail .details .Edit {
        grid-column: auto;
    }

    body.ck-app .content .detail .action {
        flex-direction: column;
    }

    body.ck-app .content .detail .action button {
        width: 100%;
    }

    body.ck-app .PageUser .topbar {
        min-height: 230px;
        background-size: 140px auto, auto;
    }

    body.ck-app .PageUser .container {
        margin-top: -14px;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ck-app *,
    body.ck-app *::before,
    body.ck-app *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}

/* Standalone secure utilities (export/import links outside the signed-in SPA). */
body.ck-utility,
body.ck-utility input,
body.ck-utility select,
body.ck-utility button {
    font-family: var(--ck-font);
}

body.ck-utility {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at 12% -8%, rgba(32, 195, 227, 0.2), transparent 33%),
        radial-gradient(circle at 88% -12%, rgba(85, 97, 93, 0.12), transparent 38%),
        var(--ck-surface);
    color: var(--ck-on-surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.ck-utility * {
    box-sizing: border-box;
}

body.ck-utility :focus-visible {
    outline: 3px solid rgba(32, 195, 227, 0.42);
    outline-offset: 3px;
}

.ck-utility-shell {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 56px;
}

.ck-utility-brand {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
}

.ck-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ck-on-surface);
    text-decoration: none;
}

.ck-wordmark > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    background: var(--ck-primary);
    color: var(--ck-on-primary);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.ck-wordmark strong {
    font-size: 17px;
    letter-spacing: -0.02em;
}

.ck-quiet-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--ck-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ck-quiet-link:hover {
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
}

.ck-utility-card {
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 32px;
    background: rgba(248, 249, 255, 0.95);
    box-shadow: var(--ck-shadow);
    backdrop-filter: blur(18px);
}

.ck-utility-heading {
    padding: 36px 36px 30px;
    background: linear-gradient(135deg, rgba(228, 248, 252, 0.96), rgba(228, 238, 235, 0.72));
}

.ck-utility .ck-eyebrow {
    display: block;
    color: var(--ck-primary);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ck-utility-heading h1 {
    max-width: 720px;
    margin: 8px 0 10px;
    color: var(--ck-on-surface);
    font-size: clamp(34px, 6vw, 56px);
    font-weight: 780;
    letter-spacing: -0.055em;
    line-height: 1.04;
}

.ck-utility-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--ck-on-surface-muted);
    font-size: 17px;
}

.ck-utility-section {
    padding: 28px 36px;
    border-top: 1px solid var(--ck-outline-soft);
}

.ck-utility-section h2 {
    margin: 0 0 16px;
    color: var(--ck-on-surface);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.ck-utility-fields,
.ck-utility .ck-date-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ck-utility .ck-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
    font-weight: 750;
}

.ck-utility .ck-field input,
.ck-utility .ck-field select {
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 15px;
    background: var(--ck-surface);
    box-shadow: none;
    color: var(--ck-on-surface);
    font-size: 16px;
}

.ck-utility .ck-field input:focus,
.ck-utility .ck-field select:focus {
    border-color: var(--ck-primary);
    box-shadow: 0 0 0 4px rgba(32, 195, 227, 0.14);
    outline: 0;
}

.ck-utility .ck-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ck-utility .ck-choice {
    position: relative;
    display: flex;
    min-height: 144px;
    padding: 16px;
    flex-direction: column;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 18px;
    background: var(--ck-surface-low);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.ck-utility .ck-choice:hover {
    border-color: var(--ck-primary);
    transform: translateY(-1px);
}

.ck-utility .ck-choice:has(input:checked) {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    box-shadow: inset 0 0 0 1px var(--ck-primary);
}

.ck-utility .ck-choice input {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 20px;
    height: 20px;
    accent-color: var(--ck-primary);
}

.ck-utility .ck-choice-mark {
    align-self: flex-start;
    margin-bottom: 22px;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--ck-surface-container);
    color: var(--ck-primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.ck-utility .ck-choice strong,
.ck-utility .ck-switch-row strong {
    color: var(--ck-on-surface);
    font-size: 15px;
}

.ck-utility .ck-choice small,
.ck-utility .ck-switch-row small {
    display: block;
    margin-top: 4px;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
    line-height: 1.4;
}

.ck-utility .ck-switch-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ck-utility .ck-switch-row {
    display: flex;
    min-height: 72px;
    padding: 12px 14px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 16px;
    background: var(--ck-surface-low);
    cursor: pointer;
}

.ck-utility .ck-switch-row > span {
    flex: 1;
}

.ck-utility .ck-switch-row input {
    position: absolute;
    opacity: 0;
}

.ck-utility .ck-switch-row i {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--ck-surface-high);
    box-shadow: inset 0 0 0 1px var(--ck-outline);
}

.ck-utility .ck-switch-row i::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ck-outline);
    transition: transform 180ms ease, background-color 180ms ease;
}

.ck-utility .ck-switch-row input:checked + i {
    background: var(--ck-primary);
    box-shadow: none;
}

.ck-utility .ck-switch-row input:checked + i::after {
    background: var(--ck-on-primary);
    transform: translateX(20px);
}

.ck-utility .ck-switch-row input:focus-visible + i {
    outline: 3px solid rgba(32, 195, 227, 0.42);
    outline-offset: 3px;
}

.ck-utility .ck-date-fields {
    margin-top: 14px;
}

.ck-utility .ck-inline-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--ck-secondary-container);
    color: var(--ck-on-secondary-container);
}

.ck-utility .ck-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ck-on-surface);
    cursor: pointer;
}

.ck-utility .ck-check-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--ck-primary);
}

.ck-utility .ck-export-status {
    min-height: 24px;
    margin: 14px 0 8px;
    color: var(--ck-on-surface-muted);
}

.ck-utility .ck-primary-action {
    width: 100%;
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    background: var(--ck-primary);
    color: var(--ck-on-primary);
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
}

.ck-utility .ck-primary-action:hover {
    background: var(--ck-primary-hover);
    transform: translateY(-1px);
}

.ck-utility .ck-primary-action:disabled {
    cursor: wait;
    opacity: 0.72;
}

.ck-utility .ck-primary-action.is-busy::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: currentColor;
    border-radius: 50%;
    vertical-align: -2px;
    animation: ck-spin 700ms linear infinite;
}

.ck-security-note {
    margin: 12px 0 0;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
    text-align: center;
}

.ck-file-drop {
    position: relative;
    display: flex;
    min-height: 170px;
    padding: 24px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 2px dashed var(--ck-outline);
    border-radius: 22px;
    background: var(--ck-surface-low);
    color: var(--ck-on-surface);
    text-align: center;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.ck-file-drop:hover {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    transform: translateY(-1px);
}

.ck-file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.ck-file-drop:has(input:focus-visible) {
    outline: 3px solid rgba(32, 195, 227, 0.42);
    outline-offset: 3px;
}

.ck-file-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 16px;
    background: var(--ck-primary);
    color: var(--ck-on-primary);
    font-size: 24px;
}

.ck-file-drop strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--ck-on-surface);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-file-drop small {
    margin-top: 4px;
    color: var(--ck-on-surface-muted);
}

.ck-template-link {
    display: inline-block;
    margin-top: 14px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--ck-primary);
    font-weight: 700;
    text-decoration: none;
}

.ck-template-link:hover {
    background: var(--ck-primary-container);
    color: var(--ck-on-primary-container);
}

@media (max-width: 680px) {
    .ck-utility-shell {
        width: min(100% - 20px, 980px);
        padding-top: 8px;
    }

    .ck-utility-card {
        margin-top: 8px;
        border-radius: 24px;
    }

    .ck-utility-heading,
    .ck-utility-section {
        padding: 24px 20px;
    }

    .ck-utility-fields,
    .ck-utility .ck-choice-grid,
    .ck-utility .ck-switch-list,
    .ck-utility .ck-date-fields {
        grid-template-columns: 1fr;
    }

    .ck-utility .ck-choice {
        min-height: 112px;
    }

    .ck-utility .ck-choice-mark {
        margin-bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ck-utility *,
    body.ck-utility *::before,
    body.ck-utility *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }
}

/* Needs Attention dashboard. Data is loaded only while this route is open. */
body.ck-app #ClientList .ck-attention-entry {
    display: grid;
    width: 100%;
    min-height: 68px;
    margin: 4px 0 10px;
    padding: 10px 12px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--ck-outline-soft);
    border-radius: var(--ck-radius-md);
    background: var(--ck-surface-low);
    box-shadow: none;
    color: var(--ck-on-surface);
    text-align: left;
    cursor: pointer;
}

body.ck-app #ClientList .ck-attention-entry:hover,
body.ck-app #ClientList .ck-attention-entry:focus-visible {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    transform: translateY(-1px);
}

body.ck-app .ck-attention-entry-badge {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    background: var(--ck-primary);
    color: var(--ck-on-primary);
    font-size: 20px;
    font-weight: 850;
}

body.ck-app .ck-attention-entry-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

body.ck-app .ck-attention-entry-copy strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ck-app .ck-attention-entry-copy small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--ck-on-surface-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ck-app .ck-attention-entry-action {
    color: var(--ck-primary);
    font-size: 12px;
    font-weight: 750;
}

body.ck-app #Setting .action .attention {
    position: relative;
    background-image: none;
}

body.ck-app #Setting .action .attention::before {
    position: absolute;
    top: 9px;
    left: 5px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 9px;
    background: var(--ck-primary);
    color: var(--ck-on-primary);
    content: "!";
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
}

body.ck-app .ck-dashboard-page {
    overflow: hidden;
}

body.ck-app .ck-dashboard-page .ck-page-title > span {
    flex: 1;
}

body.ck-app .ck-dashboard-refresh {
    min-width: 76px;
    height: 40px;
    margin-left: 12px;
    padding: 0 14px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 13px;
    background: var(--ck-surface-low);
    color: var(--ck-primary);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

body.ck-app .ck-dashboard-refresh:hover {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
}

body.ck-app .ck-dashboard-refresh:disabled {
    cursor: wait;
    opacity: 0.55;
}

body.ck-app .ck-dashboard-scroll {
    position: absolute;
    inset: 88px 16px 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 8px 40px;
    scrollbar-gutter: stable;
}

body.ck-app .ck-dashboard-intro,
body.ck-app .ck-attention-summary,
body.ck-app .ck-attention-filters,
body.ck-app .ck-attention-status,
body.ck-app .ck-attention-list {
    width: 100%;
    max-width: 900px;
    margin-right: auto;
    margin-left: auto;
}

body.ck-app .ck-dashboard-intro {
    padding: 8px 4px 18px;
}

body.ck-app .ck-dashboard-intro h1 {
    margin: 6px 0 8px;
    color: var(--ck-on-surface);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

body.ck-app .ck-dashboard-intro p {
    max-width: 680px;
    margin: 0;
    color: var(--ck-on-surface-muted);
    font-size: 15px;
}

body.ck-app .ck-attention-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.ck-app .ck-attention-card {
    display: flex;
    min-width: 0;
    min-height: 126px;
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 20px;
    background: var(--ck-surface-low);
    box-shadow: none;
    color: var(--ck-on-surface);
    text-align: left;
    cursor: pointer;
}

body.ck-app .ck-attention-card:hover,
body.ck-app .ck-attention-card.is-active {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    transform: translateY(-1px);
}

body.ck-app .ck-attention-card.overdue.is-active {
    border-color: var(--ck-danger);
    background: var(--ck-danger-soft);
}

body.ck-app .ck-attention-card.inactive.is-active {
    border-color: var(--ck-secondary);
    background: var(--ck-secondary-container);
}

body.ck-app .ck-attention-count {
    margin-bottom: auto;
    color: var(--ck-primary);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

body.ck-app .ck-attention-card.overdue .ck-attention-count {
    color: var(--ck-danger);
}

body.ck-app .ck-attention-card.inactive .ck-attention-count {
    color: var(--ck-secondary);
}

body.ck-app .ck-attention-card strong {
    margin-top: 14px;
    font-size: 15px;
}

body.ck-app .ck-attention-card small {
    margin-top: 2px;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
}

body.ck-app .ck-attention-filters {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding: 2px 0;
    overflow-x: auto;
}

body.ck-app .ck-attention-filters button {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 15px;
    border: 1px solid var(--ck-outline-soft);
    border-radius: 19px;
    background: var(--ck-surface-low);
    box-shadow: none;
    color: var(--ck-on-surface-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

body.ck-app .ck-attention-filters button:hover,
body.ck-app .ck-attention-filters button.is-active {
    border-color: var(--ck-primary);
    background: var(--ck-primary);
    color: var(--ck-on-primary);
}

body.ck-app .ck-attention-status {
    min-height: 22px;
    margin-top: 14px;
    margin-bottom: 8px;
    color: var(--ck-on-surface-muted);
    font-size: 13px;
}

body.ck-app .ck-attention-status.is-error {
    color: var(--ck-danger);
}

body.ck-app .ck-attention-list {
    padding: 0;
    list-style: none;
}

body.ck-app .ck-attention-group {
    padding: 14px 4px 8px;
}

body.ck-app .ck-attention-group h2 {
    margin: 0;
    color: var(--ck-on-surface);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

body.ck-app .ck-attention-item {
    margin: 0 0 9px;
}

body.ck-app .ck-attention-open {
    display: grid;
    width: 100%;
    min-height: 88px;
    padding: 14px 16px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--ck-radius-md);
    background: var(--ck-surface-low);
    box-shadow: none;
    color: var(--ck-on-surface);
    text-align: left;
    cursor: pointer;
}

body.ck-app .ck-attention-open:hover,
body.ck-app .ck-attention-open:focus-visible {
    border-color: var(--ck-primary);
    background: var(--ck-primary-container);
    transform: translateY(-1px);
}

body.ck-app .ck-attention-badge {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 15px;
    background: var(--ck-primary);
    color: var(--ck-on-primary);
    font-size: 18px;
    font-weight: 850;
}

body.ck-app .ck-attention-badge.overdue {
    background: var(--ck-danger-soft);
    color: var(--ck-danger);
}

body.ck-app .ck-attention-badge.inactive {
    background: var(--ck-secondary-container);
    color: var(--ck-on-secondary-container);
    font-size: 13px;
}

body.ck-app .ck-attention-row-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

body.ck-app .ck-attention-row-copy strong,
body.ck-app .ck-attention-row-copy span,
body.ck-app .ck-attention-row-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ck-app .ck-attention-row-copy strong {
    font-size: 15px;
}

body.ck-app .ck-attention-meta {
    margin-top: 2px;
    color: var(--ck-primary);
    font-size: 13px;
    font-weight: 700;
}

body.ck-app .ck-attention-row-copy small {
    margin-top: 3px;
    color: var(--ck-on-surface-muted);
    font-size: 12px;
}

body.ck-app .ck-attention-open-label {
    color: var(--ck-primary);
    font-size: 12px;
    font-weight: 750;
}

body.ck-app .ck-attention-empty {
    margin-top: 18px;
    padding: 32px 20px;
    border: 1px dashed var(--ck-outline-soft);
    border-radius: var(--ck-radius-md);
    background: var(--ck-surface-low);
    color: var(--ck-on-surface-muted);
    text-align: center;
}

body.ck-app .ck-attention-empty.is-error {
    border-color: var(--ck-danger-soft);
    color: var(--ck-danger);
}

body.ck-app #Dashboard[aria-busy="true"] .ck-attention-summary {
    opacity: 0.65;
}

@media (max-width: 1023px) {
    body.ck-app .ck-dashboard-scroll {
        inset: 78px 0 0;
        padding: 0 0 max(32px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 560px) {
    body.ck-app .ck-dashboard-intro {
        padding-top: 4px;
    }

    body.ck-app .ck-dashboard-intro h1 {
        font-size: 30px;
    }

    body.ck-app .ck-attention-summary {
        gap: 7px;
    }

    body.ck-app .ck-attention-card {
        min-height: 112px;
        padding: 12px 10px;
        border-radius: 17px;
    }

    body.ck-app .ck-attention-count {
        font-size: 28px;
    }

    body.ck-app .ck-attention-card strong {
        font-size: 13px;
    }

    body.ck-app .ck-attention-card small {
        font-size: 10px;
    }

    body.ck-app .ck-attention-open {
        padding: 12px;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;
    }

    body.ck-app .ck-attention-badge {
        width: 42px;
        height: 42px;
    }

    body.ck-app .ck-attention-open-label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ck-app .ck-dashboard-page *,
    body.ck-app .ck-dashboard-page *::before,
    body.ck-app .ck-dashboard-page *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }
}

