﻿/* =========================================================
   FTTH Technician App - app.css (CLEANED + ORGANIZED)
   ========================================================= */

/* =========================================================
   1) Global / Base
   ========================================================= */
.page, main, article.content {
    overflow: visible;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

h1:focus {
    outline: none;
}

.content {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Bootstrap focus ring tweak */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Override primary button (optional: keep if you want) */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Floating placeholder alignment */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Blazor error boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }


/* =========================================================
   2) Layout Shell
   ========================================================= */
.page {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}



/* =========================================================
   3) Scan Overlay (Camera)
   ========================================================= */
.scan-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
}

    .scan-stage video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.scan-hitbox {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}

.scan-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,.4);
}

.scan-status {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}


/* =========================================================
   4) Selectable Output Box
   ========================================================= */
.selectable-box {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    min-height: 16rem;
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: .375rem;
    padding: .5rem .75rem;
    background: #fff;
    user-select: text;
}


/* =========================================================
   5) Billing Codes Picker (Tags + Suggestions)
   ========================================================= */
.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    background: var(--bs-body-bg);
}

    .tags-input .tag {
        display: inline-flex;
        align-items: center;
        gap: .375rem;
        padding: .25rem .5rem;
        border-radius: 999px;
        background: var(--bs-secondary-bg);
    }

        .tags-input .tag .remove {
            border: 0;
            background: transparent;
            cursor: pointer;
            line-height: 1;
        }

    .tags-input input {
        border: 0;
        outline: 0;
        min-width: 10ch;
        flex: 1 1 auto;
        background: transparent;
        padding: .25rem;
    }

.suggest-menu {
    position: absolute;
    z-index: 1100;
    width: 100%;
    max-height: 240px;
    overflow: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.suggest-item {
    padding: .5rem .75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .suggest-item:hover {
        background: var(--bs-secondary-bg);
    }

    .suggest-item .code {
        font-weight: 600;
    }

    .suggest-item .desc {
        opacity: .8;
        margin-left: .5rem;
    }

    .suggest-item .price {
        opacity: .8;
        font-variant-numeric: tabular-nums;
    }

/* Only show suggestions while anything inside has focus */
.billing-picker .suggest-menu {
    display: none;
}

.billing-picker:focus-within .suggest-menu {
    display: block;
}


/* =========================================================
   6) Sidebar Nav (Dark)
   ========================================================= */
.ftth-nav {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0b1220 0%, #0b1220 40%, #070b14 100%);
    border-right: 1px solid rgba(255,255,255,.08);
}

.ftth-nav__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.ftth-nav__logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: .5px;
    color: #0b1220;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.ftth-nav__brandText {
    line-height: 1.05;
}

.ftth-nav__title {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}

.ftth-nav__subtitle {
    color: rgba(255,255,255,.65);
    font-size: .82rem;
    margin-top: 2px;
}

.ftth-nav__toggle {
    margin: 10px 16px;
}

.ftth-nav__body {
    padding: 10px 10px 14px;
}

.ftth-nav__links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ftth-nav__section {
    margin: 14px 10px 6px;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
}

.ftth-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(255,255,255,.85);
    border: 1px solid transparent;
    background: transparent;
    transition: transform .08s ease, background-color .15s ease, border-color .15s ease;
}

    .ftth-link .bi {
        font-size: 1.05rem;
        width: 20px;
        text-align: center;
    }

    .ftth-link:hover {
        background: rgba(59,130,246,.12);
        border-color: rgba(59,130,246,.25);
        transform: translateY(-1px);
        color: #fff;
    }

    .ftth-link.active {
        background: rgba(34,197,94,.14);
        border-color: rgba(34,197,94,.35);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    }

.ftth-link--danger:hover {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.28);
}

.ftth-nav__form {
    margin: 0;
}

.ftth-nav__divider {
    height: 1px;
    margin: 12px 10px;
    background: rgba(255,255,255,.08);
}

.ftth-supervisor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 10px 6px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(59,130,246,.35);
    background: rgba(59,130,246,.18);
}

    .ftth-supervisor:hover {
        background: rgba(59,130,246,.28);
        border-color: rgba(59,130,246,.5);
    }

.ftth-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 160px;
}

/* Optional: nicer sidebar scrollbars */
.nav-scrollable {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}

    .nav-scrollable::-webkit-scrollbar {
        width: 10px;
    }

    .nav-scrollable::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.18);
        border-radius: 10px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }


/* =========================================================
   7) History Page (Light Theme)
   ========================================================= */
.hist {
    padding: 18px;
    max-width: 1100px;
    margin: 0 auto;
    color: #0f172a;
}

.hist__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.hist__title {
    margin: 0;
    font-weight: 900;
    letter-spacing: .2px;
    color: #0f172a;
}

.hist__subtitle {
    margin-top: 6px;
    color: #475569;
    font-size: .95rem;
}

.hist__headerActions {
    display: flex;
    gap: 10px;
}

.hist__ghostBtn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

    .hist__ghostBtn:hover {
        background: #eff6ff;
        border-color: #93c5fd;
    }

/* Sticky summary */
.hist__summary {
    position: sticky;
    top: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.hist__summaryItem {
    min-width: 140px;
}

.hist__summaryLabel {
    color: #475569;
    font-size: .85rem;
}

.hist__summaryValue {
    font-weight: 900;
    font-size: 1.15rem;
    margin-top: 2px;
    color: #0f172a;
}

.hist__summaryHint {
    color: #334155;
    font-size: .9rem;
    text-align: right;
}

/* Week card */
.hist__weekCard {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    margin: 14px 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.hist__weekHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.hist__weekTitle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #0f172a;
}

.hist__weekMeta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hist__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-size: .9rem;
}

.hist__pill--money {
    background: #ecfdf5;
    border-color: #86efac;
}

/* Table */
.hist__tableWrap {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    overflow-x: auto;
}

.hist__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

    .hist__table thead th {
        background: #f8fafc;
        color: #334155;
        font-weight: 800;
        font-size: .85rem;
        padding: 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .hist__table tbody td {
        padding: 12px;
        border-bottom: 1px solid #edf2f7;
        color: #0f172a;
    }

    .hist__table tbody tr:hover {
        background: #f1f5f9;
    }

.hist__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #0f172a;
}

.hist__tag {
    font-weight: 900;
    letter-spacing: .2px;
}

.hist__muted {
    color: #334155;
}

.hist__money {
    font-weight: 900;
}

/* Buttons */
.hist__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    font-size: .85rem;
}

    .hist__btn:hover {
        background: #eff6ff;
        border-color: #93c5fd;
    }

.hist__btn--danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.hist__actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.hist-action {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15,23,42,.06);
    transition: transform .08s ease, background-color .15s ease, border-color .15s ease;
}

    .hist-action:hover {
        transform: translateY(-1px);
        background: #eff6ff;
        border-color: #93c5fd;
    }

    .hist-action:active {
        transform: translateY(0);
    }

.hist-action--delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Slightly larger tap target on phones */
@media (max-width: 576px) {
    .hist-action {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }
}

/* Loading / empty */
.hist__loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.hist__spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    border-top-color: #0f172a;
    animation: histspin .9s linear infinite;
}

@keyframes histspin {
    to {
        transform: rotate(360deg);
    }
}

.hist__empty {
    padding: 28px 18px;
    border-radius: 22px;
    border: 1px dashed #cbd5e1;
    background: #fff;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.hist__emptyIcon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 1.35rem;
    color: #1d4ed8;
}

.hist__emptyTitle {
    font-weight: 900;
    font-size: 1.2rem;
    color: #0f172a;
}

.hist__emptyText {
    color: #475569;
    margin-top: 6px;
}

.hist__primaryBtn {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
    font-weight: 900;
    border: 0;
    box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}

    .hist__primaryBtn:hover {
        filter: brightness(1.03);
    }


/* =========================================================
   8) PreText Page (Light Theme)
   ========================================================= */
.ptx {
    padding: 18px;
    max-width: 820px;
    margin: 0 auto;
}

.ptx__card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.ptx__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.ptx__icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 1.25rem;
}

.ptx__title {
    margin: 0;
    font-weight: 900;
    color: #0f172a;
}

.ptx__sub {
    margin-top: 4px;
    color: #475569;
}

.ptx__field {
    margin-top: 10px;
}

.ptx__label {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    display: block;
}

.ptx__input {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    outline: none;
    box-shadow: 0 6px 14px rgba(15,23,42,.04);
}

    .ptx__input:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 4px rgba(59,130,246,.15);
    }

.ptx__hint {
    margin-top: 8px;
    font-size: .9rem;
    color: #64748b;
}

.ptx__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ptx__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.ptx__btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
    box-shadow: 0 10px 20px rgba(37,99,235,.18);
}

    .ptx__btn--primary:disabled {
        opacity: .6;
        cursor: not-allowed;
        box-shadow: none;
    }

.ptx__btn--ghost {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}

    .ptx__btn--ghost:hover {
        background: #eff6ff;
        border-color: #93c5fd;
    }

.ptx__error {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 700;
}

.ptx__success {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #166534;
    font-weight: 800;
}


/* =========================================================
   9) Notes Page (Light Theme)
   ========================================================= */
.note-page {
    padding: 18px;
    max-width: 1200px;
    margin: 0 auto;
    color: #0f172a;
}

.note-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.note-head__title {
    margin: 0;
    font-weight: 950;
    letter-spacing: .2px;
}

.note-head__sub {
    margin-top: 6px;
    color: #475569;
}

.note-head__right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.note-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    white-space: nowrap;
}

.note-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
    box-shadow: 0 10px 20px rgba(37,99,235,.18);
}

.note-btn--ghost {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

    .note-btn--ghost:hover {
        background: #eff6ff;
        border-color: #93c5fd;
    }

.note-btn--small {
    padding: 8px 10px;
    border-radius: 12px;
    font-weight: 900;
}

/* Cards */
.note-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
    margin: 14px 0;
    overflow: hidden;
}

.note-card__summary {
    list-style: none;
    cursor: pointer;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

    .note-card__summary::-webkit-details-marker {
        display: none;
    }

.note-card__summaryLeft {
    display: flex;
    align-items: center;
    gap: 12px;
}

.note-card__title {
    font-weight: 950;
}

.note-card__desc {
    color: #475569;
    font-size: .92rem;
    margin-top: 2px;
}

.note-card__chev {
    color: #64748b;
    transition: transform .15s ease;
}

details[open] .note-card__chev {
    transform: rotate(180deg);
}

.note-card__body {
    padding: 14px;
}

/* Section helpers */
.note-badge {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 1.1rem;
}

.note-badge--green {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.note-badge--blue {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.note-badge--amber {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.note-badge--purple {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #5b21b6;
}

.note-badge--slate {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

.note-help {
    margin-top: 8px;
    color: #64748b;
    font-size: .9rem;
}

.note-blockTitle {
    font-weight: 950;
}

.note-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.note-row {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

.note-total {
    font-weight: 950;
}

/* Output */
.note-output {
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
    overflow: hidden;
}

.note-output__head {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.note-output__title {
    font-weight: 950;
    display: flex;
    align-items: center;
    gap: 10px;
}

.note-output__hint {
    color: #64748b;
    font-size: .9rem;
}

.note-output__box {
    margin: 0;
    border: 0;
    border-radius: 0;
}

/* ===== Sticky TOP actions (Notes) ===== */

/* If you want it under your top-row, set this to 56px. If top-row is NOT sticky, set it to 0px. */
:root {
    --ftth-topbar-h: 0px;
}

.note-actions {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--ftth-topbar-h) + 10px);
    z-index: 1030;
    margin: 10px 0 14px;
}

.note-actions__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
    box-shadow: 0 12px 26px rgba(15,23,42,.12);
}

/* ✅ These must NOT be nested */
.note-actions__meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.note-actions__total {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.note-actions__label {
    color: #475569;
    font-weight: 800;
}

.note-actions__value {
    font-weight: 950;
    color: #0f172a;
}

/* Mobile layout */
@media (max-width: 576px) {
    .note-actions {
        top: calc(var(--ftth-topbar-h) + 8px);
    }

    .note-actions__bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

        .note-actions__bar .note-btn--primary {
            width: 100%;
            justify-content: center;
        }

    .note-actions__meta,
    .note-actions__total {
        width: 100%;
        justify-content: space-between;
    }
}



/* =========================================================
   10) Auth Pages (Light Theme)
   ========================================================= */
.auth {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: radial-gradient(900px 500px at 10% 10%, rgba(37,99,235,.10), transparent 60%), radial-gradient(900px 500px at 90% 30%, rgba(22,163,74,.10), transparent 60%), #f8fafc;
}

.auth__shell {
    width: 100%;
    max-width: 980px;
}

.auth__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 14px;
    color: #0f172a;
}

.auth__logo {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 950;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
    box-shadow: 0 10px 22px rgba(15,23,42,.12);
}

.auth__app {
    font-weight: 950;
}

.auth__tag {
    color: #475569;
    font-size: .92rem;
    margin-top: 2px;
}

.auth__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.auth__card, .auth__sideCard {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 12px 26px rgba(15,23,42,.10);
}

.auth__card {
    padding: 18px;
}

.auth__sideCard {
    padding: 18px;
}

.auth__cardHead {
    margin-bottom: 10px;
}

.auth__title {
    margin: 0;
    font-weight: 950;
    color: #0f172a;
}

.auth__subtitle {
    margin-top: 6px;
    color: #475569;
}

.auth__field {
    margin-top: 12px;
}

.auth__label {
    font-weight: 850;
    color: #0f172a;
    margin-bottom: 6px;
    display: block;
}

.auth__inputWrap {
    position: relative;
}

.auth__inputIcon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.auth__input {
    padding-left: 38px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 6px 14px rgba(15,23,42,.04);
}

    .auth__input:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 4px rgba(59,130,246,.15);
    }

.auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.auth__check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-weight: 700;
}

.auth__checkBox {
    width: 18px;
    height: 18px;
    border-color: #94a3b8;
}

.auth__primaryBtn {
    width: 100%;
    margin-top: 12px;
    border-radius: 14px;
    padding: 11px 12px;
    font-weight: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 18px rgba(37,99,235,.18);
}

.auth__secondaryBtn {
    width: 100%;
    margin-top: 10px;
    border-radius: 14px;
    padding: 11px 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth__divider {
    margin: 14px 0 2px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-weight: 800;
}

    .auth__divider:before,
    .auth__divider:after {
        content: "";
        flex: 1;
        height: 1px;
        background: #e2e8f0;
    }

    .auth__divider span {
        padding: 2px 10px;
        border-radius: 999px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

.auth__links {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth__link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 800;
}

    .auth__link:hover {
        text-decoration: underline;
    }

.auth__dot {
    color: #94a3b8;
    font-weight: 900;
}

.auth__sideTitle {
    font-weight: 950;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth__sideSub {
    color: #475569;
    margin-top: 6px;
    margin-bottom: 10px;
}

.auth__external {
    padding-top: 6px;
}

.auth__tip {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    background: #ffffffcc;
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

.auth__tipIcon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.auth__tipTitle {
    font-weight: 950;
    color: #0f172a;
}

.auth__tipText {
    color: #475569;
    margin-top: 2px;
}


/* =========================================================
   11) Mobile Fixes (Single place)
   ========================================================= */
@media (max-width: 576px) {

    /* History */
    .hist__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .hist__headerActions {
        width: 100%;
    }

    .hist__ghostBtn {
        width: 100%;
        justify-content: center;
    }

    .hist__summary {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .hist__summaryItem {
        min-width: 0;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
    }

    .hist__summaryHint {
        text-align: left;
        width: 100%;
    }

    .hist__weekHeader {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .hist__weekMeta {
        width: 100%;
    }

    .hist__table {
        min-width: 720px;
    }

    /* Notes */
    .note-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .note-head__right {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

        .note-head__right .note-btn {
            width: 100%;
            justify-content: center;
        }

    .note-page .form-label {
        font-size: .92rem;
    }

    /* Sticky actions (stack) */
    .note-actions__bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

        .note-actions__bar .note-btn--primary {
            width: 100%;
            justify-content: center;
        }

    .note-actions__total {
        width: 100%;
        justify-content: space-between;
    }

    /* Input groups (barcode + buttons) */
    .input-group {
        flex-wrap: wrap;
    }

        .input-group > .form-control {
            flex: 1 1 100%;
            min-width: 0;
            border-radius: 14px !important;
        }

        .input-group > .btn {
            flex: 1 1 auto;
        }

    /* Extender remove button */
    .note-row .btn.btn-outline-danger {
        width: 100% !important;
    }
}




