/* Clock pages (time clock, loaded by Views/Clock/_ClockLayout.cshtml after babel.css and locker.css, and by the kiosk
   page). Part 1 recolors the shared blocks (indigo / amber), part 2 adds the clock widgets: office navigation, state
   badges, stamp button, day timeline, work model editor, the stamp dialog and the full screen terminal. */

/* ===================================================================== */
/* Part 1: theme                                                         */
/* ===================================================================== */
.bab-site.lck-site.clk-site {
    --bab-indigo: #3d4fc4;
    --bab-indigo-dark: #3141a8;
    --bab-purple: #2b3a67;
    --bab-gradient: linear-gradient(135deg, #4b5fe0 0%, #2b3a67 100%);
    --bab-lavender: #e9ecfb;
    --bab-lavender-2: #d5dbf7;
    --bab-ink: #1f2743;
    --bab-ink-muted: #667091;
    --lck-accent: #3d4fc4;
    --lck-accent-pale: #e9ecfb;
    --lck-blue: #2b8a9e;
    --lck-blue-pale: #e2f3f6;
    --lck-orange: #d98a1f;
    --lck-orange-pale: #fdf1dc;
    --clk-green: #2f9e61;
    --clk-green-pale: #e2f5ea;
    max-width: none;
}

.clk-site .bab-hero {
    background:
        radial-gradient(circle at 92% 0%, rgba(253, 241, 220, 0.95), transparent 42%),
        radial-gradient(circle at 0% 100%, var(--lck-accent-pale), transparent 55%),
        linear-gradient(135deg, #f3f5fd 0%, #eef1f8 100%);
}

/* ===================================================================== */
/* Part 2: widgets                                                       */
/* ===================================================================== */

/* Office navigation: pills, swipeable on phones */
.clk-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 2px; }
.clk-nav::-webkit-scrollbar { display: none; }
.clk-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem;
    color: var(--bab-ink) !important; background: #fff; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(31, 39, 67, .1); white-space: nowrap; }
.clk-nav a i { color: var(--lck-accent); }
.clk-nav a.active { background: var(--lck-accent); color: #fff !important; box-shadow: none; }
.clk-nav a.active i { color: #fff; }
.clk-nav .badge { background: var(--lck-orange); }

/* State badges */
.clk-st { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.clk-st-ok { background: var(--clk-green-pale); color: #1f7a48; }
.clk-st-open { background: var(--lck-red-pale); color: var(--lck-red); }
.clk-st-update { background: var(--lck-orange-pale); color: #a66310; }
.clk-st-discuss { background: #fff7cc; color: #8a6d00; }
.clk-st-info { background: var(--lck-accent-pale); color: var(--lck-accent); }
.clk-st-grey { background: var(--lck-grey-pale); color: var(--lck-grey); }
.clk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c5ccd8; margin-right: 6px; }
.clk-dot.in { background: var(--clk-green); box-shadow: 0 0 0 4px rgba(47, 158, 97, .18); }
.clk-dot.out { background: var(--lck-orange); }
.clk-dot.off { background: var(--lck-accent); }

/* Two columns on wide screens, one on phones */
.clk-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 992px) { .clk-cols { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); } }
.clk-cols > * { min-width: 0; }
.clk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* Stamp panel of the employee */
.clk-stamp-panel { text-align: center; }
.clk-now { font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1; color: var(--bab-ink); }
.clk-date { color: var(--bab-ink-muted); font-weight: 600; margin-bottom: 14px; }
.clk-stamp { width: min(240px, 62vw); height: min(240px, 62vw); border-radius: 50%; border: 0; color: #fff; font-weight: 800; font-size: 1.35rem;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    background: radial-gradient(circle at 30% 25%, #5fd08f, var(--clk-green)); box-shadow: 0 22px 40px -18px rgba(47, 158, 97, .9), inset 0 -6px 0 rgba(0, 0, 0, .12);
    transition: transform .12s ease, filter .12s ease; }
.clk-stamp i { font-size: 2.4rem; }
.clk-stamp.out { background: radial-gradient(circle at 30% 25%, #f3b65a, var(--lck-orange)); box-shadow: 0 22px 40px -18px rgba(217, 138, 31, .9), inset 0 -6px 0 rgba(0, 0, 0, .12); }
.clk-stamp:hover { filter: brightness(1.05); }
.clk-stamp:active { transform: scale(.96); }
.clk-stamp:disabled { filter: grayscale(.6); cursor: default; }
.clk-status-line { margin-top: 14px; font-weight: 700; }

/* Day timeline: 24 h track, target time pale, entries solid */
.clk-bar { position: relative; height: 16px; border-radius: 8px; background: var(--lck-grey-pale); overflow: hidden; min-width: 160px; }
.clk-bar .t { position: absolute; top: 0; bottom: 0; background: var(--bab-lavender-2); }
.clk-bar .b { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #fff, #fff 3px, var(--bab-lavender-2) 3px, var(--bab-lavender-2) 6px); }
.clk-bar .e { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--clk-green); min-width: 3px; }
.clk-bar .e.open { background: repeating-linear-gradient(90deg, var(--clk-green), var(--clk-green) 6px, #7fd3a3 6px, #7fd3a3 12px); }
.clk-bar .e.all { background: var(--lck-accent); opacity: .75; }
.clk-bar .e.warn { background: var(--lck-orange); }
.clk-bar .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--lck-red); }
.clk-bar-scale { display: flex; justify-content: space-between; font-size: .66rem; color: var(--bab-ink-muted); margin-top: 2px; }

.clk-days { list-style: none; margin: 0; padding: 0; }
.clk-days li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--lck-line); }
.clk-days li:last-child { border-bottom: 0; }
.clk-days .d { font-weight: 700; font-size: .86rem; }
.clk-days .d small { display: block; color: var(--bab-ink-muted); font-weight: 600; }
.clk-days .h { text-align: right; font-variant-numeric: tabular-nums; font-size: .86rem; white-space: nowrap; }
.clk-entries { font-size: .78rem; color: var(--bab-ink-muted); margin-top: 3px; }
.clk-plus { color: #1f7a48; font-weight: 700; }
.clk-minus { color: var(--lck-red); font-weight: 700; }

/* Work model editor */
.clk-wm { display: grid; grid-template-columns: 96px repeat(4, minmax(0, 1fr)); gap: 6px 8px; align-items: center; }
.clk-wm .hd { font-size: .7rem; font-weight: 700; color: var(--bab-ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.clk-wm input { padding: 4px 6px; font-size: .88rem; }
@media (max-width: 575.98px) { .clk-wm { grid-template-columns: 54px repeat(4, minmax(0, 1fr)); } .clk-wm .dn { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; } }

.clk-qr { background: #fff; border-radius: 16px; padding: 10px; display: inline-block; box-shadow: inset 0 0 0 1px var(--lck-line); }
.clk-qr img { width: 170px; height: 170px; display: block; image-rendering: pixelated; }

/* Stamp dialog (employee page and terminal) */
.clk-flow { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 26, 48, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.clk-flow[hidden] { display: none; }
.clk-flow-box { width: min(640px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 26px; padding: clamp(18px, 4vw, 34px); text-align: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .4); }
.clk-flow-icon { width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 12px;
    background: var(--lck-accent-pale, #e9ecfb); color: var(--lck-accent, #3d4fc4); }
.clk-flow-icon.ok { background: #e2f5ea; color: #2f9e61; }
.clk-flow-icon.out { background: #fdf1dc; color: #d98a1f; }
.clk-flow-icon.err { background: #fbe9e6; color: #c4513f; }
.clk-flow-box h2 { font-weight: 800; font-size: clamp(1.25rem, 3.6vw, 1.7rem); margin-bottom: 6px; }
.clk-flow-box p { color: #667091; margin-bottom: 16px; }
.clk-flow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 576px) { .clk-flow-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.clk-flow-btn { border: 0; border-radius: 16px; padding: 16px 10px; font-weight: 700; font-size: 1rem; background: #eef1f8; color: #1f2743; cursor: pointer; }
.clk-flow-btn:hover { background: #dfe4f3; }
.clk-flow-btn.primary { background: #3d4fc4; color: #fff; }
.clk-flow-btn.green { background: #2f9e61; color: #fff; }
.clk-flow-btn.amber { background: #d98a1f; color: #fff; }
.clk-flow-btn.wide { grid-column: 1 / -1; }
.clk-flow-count { margin-top: 14px; font-size: .8rem; color: #98a0b8; }
.clk-flow-box input[type="datetime-local"] { font-size: 1.2rem; padding: 10px; border-radius: 12px; border: 2px solid #d5dbf7; width: 100%; margin-bottom: 12px; text-align: center; }

/* Terminal (full screen kiosk) */
body.clk-kiosk-body { background: radial-gradient(circle at 85% 0%, #3b4a9a, transparent 50%), radial-gradient(circle at 0% 100%, #1d6b70, transparent 55%), #151b33; min-height: 100vh; padding: 0; }
.clk-kiosk { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: clamp(14px, 3vw, 34px); align-items: center; color: #fff; }
@media (min-width: 900px) { .clk-kiosk { grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); } }
.clk-kiosk-clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(3.4rem, 13vw, 9rem); line-height: 1; letter-spacing: -.02em; }
.clk-kiosk-date { font-size: clamp(1rem, 2.4vw, 1.6rem); opacity: .8; font-weight: 600; margin-top: 8px; }
.clk-kiosk-name { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 14px; background: rgba(255, 255, 255, .12); font-weight: 700; margin-bottom: 18px; }
.clk-kiosk-hint { margin-top: 22px; opacity: .85; font-size: clamp(.95rem, 1.8vw, 1.2rem); max-width: 520px; }
.clk-kiosk-modes { display: inline-flex; gap: 6px; margin-top: 22px; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px; }
.clk-kiosk-modes button { border: 0; border-radius: 999px; padding: 8px 18px; font-weight: 700; color: #fff; background: transparent; }
.clk-kiosk-modes button.active { background: #fff; color: #1f2743; }
.clk-kiosk-pad { background: rgba(255, 255, 255, .96); color: #1f2743; border-radius: 28px; padding: clamp(16px, 3vw, 26px); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.clk-code { height: 58px; border-radius: 14px; background: #eef1f8; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; letter-spacing: .35em; font-weight: 800; margin-bottom: 12px; }
.clk-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.clk-keys button { border: 0; border-radius: 16px; padding: clamp(12px, 2.4vh, 20px) 0; font-size: 1.55rem; font-weight: 700; background: #eef1f8; color: #1f2743; }
.clk-keys button:active { background: #d5dbf7; }
.clk-keys button.go { background: #2f9e61; color: #fff; }
.clk-kiosk-video { width: 100%; border-radius: 16px; background: #000; margin-bottom: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.clk-info { text-align: left; }
.clk-info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; }
.clk-info dt { color: #667091; font-weight: 600; }
.clk-info dd { margin: 0; font-weight: 700; }

/* Public message pages (token links) */
.clk-center { max-width: 640px; margin: 0 auto; }

/* Terminal: company logo, camera picture with hint, identification buttons */
.clk-kiosk-logo { margin-bottom: 16px; }
.clk-kiosk-logo img { max-height: 84px; max-width: min(320px, 70vw); object-fit: contain; background: rgba(255, 255, 255, .94); border-radius: 16px; padding: 10px 14px; }
.clk-kiosk-cam { position: relative; margin-bottom: 12px; }
.clk-kiosk-cam .clk-kiosk-video { margin-bottom: 0; display: block; }
.clk-kiosk-cam .clk-kiosk-video[hidden] { display: none; }
.clk-kiosk-cam-msg { position: absolute; left: 8px; right: 8px; bottom: 8px; text-align: center; color: #fff; font-weight: 700; font-size: .95rem; background: rgba(20, 26, 48, .7); border-radius: 12px; padding: 6px 10px; }
.clk-kiosk-cam-msg:empty { display: none; }
.clk-kiosk-ids { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.clk-kiosk-ids .clk-flow-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; font-size: .9rem; }
.clk-kiosk-ids .clk-flow-btn i { font-size: 1.4rem; color: #3d4fc4; }
.clk-kiosk-ids .clk-flow-btn:disabled { opacity: .7; }

/* Pill menus: the office navigation (signed in) and the section bar of the introduction (signed out) share one
   look - white ground, white pills with a fine outline, the chosen one in the accent - and are always centered.
   The auto margins center the row and still let it be swiped on phones (justify-content would cut off the start). */
.clk-nav a:first-child { margin-left: auto; }
.clk-nav a:last-child { margin-right: auto; }
/* the section bar wraps and centers itself from tablet width on (service-welcome.css); below it is one swipeable row */
@media (max-width: 767.98px) {
    .mw-subnav.ckw .mw-subnav-inner a:first-child { margin-left: auto; }
    .mw-subnav.ckw .mw-subnav-inner a:last-child { margin-right: auto; }
}
.mw-subnav.ckw { background: rgba(255, 255, 255, .94); box-shadow: 0 1px 0 rgba(31, 39, 67, .08), 0 8px 18px -14px rgba(31, 39, 67, .35); }
.mw-subnav.ckw a, .mw-subnav.ckw a.mw-subnav-cta { color: #1f2743; background: #fff; border: 0; box-shadow: inset 0 0 0 1px rgba(31, 39, 67, .1); white-space: nowrap; }
.mw-subnav.ckw a i, .mw-subnav.ckw a.mw-subnav-cta i, .mw-subnav.ckw a[data-panel-link^="watch"] i { color: #3d4fc4; }
.mw-subnav.ckw a:hover { color: #1f2743; background: #eef1fd; }
.mw-subnav.ckw a.active, .mw-subnav.ckw a.mw-subnav-cta.active { color: #fff; background: #3d4fc4; box-shadow: none; }
.mw-subnav.ckw a.active i, .mw-subnav.ckw a.mw-subnav-cta.active i, .mw-subnav.ckw a.active[data-panel-link^="watch"] i { color: #fff; }

/* Setup wizard: numbered steps (done = green check), step navigation at the bottom */
.clk-steps { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 18px; padding: 2px; }
.clk-steps::-webkit-scrollbar { display: none; }
.clk-steps a { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: #fff; color: var(--bab-ink) !important;
    text-decoration: none; font-weight: 600; font-size: .88rem; box-shadow: inset 0 0 0 1px rgba(31, 39, 67, .1); white-space: nowrap; }
.clk-steps a .n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--lck-grey-pale); font-size: .8rem; font-weight: 800; }
.clk-steps a.done .n { background: var(--clk-green); color: #fff; }
.clk-steps a.active { box-shadow: inset 0 0 0 2px var(--lck-accent); }
.clk-steps a.active .n { background: var(--lck-accent); color: #fff; }
.clk-step-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--lck-line); }
