:root {
    --cvcs-blue: #405898;
    --cvcs-red: #cd2228;
}

body {
    background: #f5f7fb;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-logo {
    width: 65px;
    height: auto;
}

.card {
    border: 1px solid rgba(20, 30, 60, .08);
    border-radius: 1rem;
}

.card-header {
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}

.btn-primary {
    --bs-btn-bg: var(--cvcs-blue);
    --bs-btn-border-color: var(--cvcs-blue);
    --bs-btn-hover-bg: #31477e;
    --bs-btn-hover-border-color: #31477e;
    --bs-btn-active-bg: #2a3d6d;
    --bs-btn-active-border-color: #2a3d6d;
}

.report-editor {
    min-height: 260px;
    background: #fff;
}

.ql-toolbar.ql-snow {
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
    border-color: #dee2e6;
}

.ql-container.ql-snow {
    min-height: 260px;
    border-bottom-left-radius: .75rem;
    border-bottom-right-radius: .75rem;
    border-color: #dee2e6;
    font-size: 15px;
}

.drop-zone {
    border: 2px dashed #b8c1d8;
    background: #f9fbff;
    border-radius: 1rem;
    transition: .15s ease-in-out;
}

.drop-zone.is-dragging {
    border-color: var(--cvcs-blue);
    background: #eef3ff;
}

.photo-card {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: .5rem;
    background: #fff;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.photo-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: .5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .18s ease-in-out;
}

.photo-remove {
    position: absolute;
    top: .65rem;
    right: .65rem;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.summary-card {
    top: 6rem;
}

.pdf-preview-wrapper {
    width: 100%;
    min-height: 70vh;
}

.pdf-preview-frame {
    display: block;
    width: 100%;
    height: 78vh;
    border: 0;
    background: #f8f9fa;
}

@media (max-width: 991.98px) {
    .pdf-preview-wrapper {
        min-height: 60vh;
    }

    .pdf-preview-frame {
        height: 65vh;
    }
}

.preview-sort-item {
    touch-action: none;
}

.photo-card {
    box-shadow: 0 2px 10px rgba(18, 34, 71, .04);
}

.photo-order-badge {
    position: absolute;
    top: .65rem;
    left: .65rem;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    background: var(--cvcs-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.photo-drag-handle {
    position: absolute;
    top: .65rem;
    right: 5.35rem;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #34405f;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(0, 0, 0, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.photo-drag-handle:active {
    cursor: grabbing;
}

.preview-sort-ghost {
    opacity: .35;
}

.preview-sort-chosen .photo-card,
.preview-sort-drag .photo-card {
    border-color: rgba(64, 88, 152, .45);
    box-shadow: 0 12px 28px rgba(64, 88, 152, .18);
}


.photo-drag-handle:hover {
    background: #fff;
    border-color: rgba(64, 88, 152, .45);
}

.photo-drag-handle:active {
    cursor: grabbing;
}

.sortable-fallback {
    opacity: .92 !important;
    transform: rotate(1deg);
}


.photo-card:active {
    cursor: grabbing;
}

.photo-remove {
    cursor: pointer;
}

.header-clock-card {
    min-width: 218px;
    padding: .55rem .8rem;
    border: 1px solid rgba(64, 88, 152, .14);
    border-radius: .95rem;
    background: linear-gradient(135deg, rgba(64, 88, 152, .08), rgba(255, 255, 255, .96));
    box-shadow: 0 8px 22px rgba(20, 30, 60, .06);
    color: #24304d;
}

.header-clock-topline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    margin-bottom: .15rem;
    font-size: .76rem;
    line-height: 1.1;
    white-space: nowrap;
}

.header-clock-date {
    color: #59657f;
    text-transform: capitalize;
}

.header-clock-week {
    display: inline-flex;
    align-items: center;
    padding: .16rem .45rem;
    border-radius: 999px;
    color: var(--cvcs-blue);
    background: rgba(64, 88, 152, .10);
    font-weight: 700;
}

.header-clock-time {
    font-size: 1.32rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
}

.header-clock-time.is-loading {
    color: #8b94a8;
}

.header-logout-link {
    display: inline-block;
    margin-top: .3rem;
    color: #68728a;
    text-decoration: none;
    font-size: .72rem;
}

.header-logout-link:hover {
    color: var(--cvcs-blue);
    text-decoration: underline;
}


.photo-rotate {
    position: absolute;
    top: .65rem;
    right: 3rem;
    z-index: 4;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(0, 0, 0, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    cursor: pointer;
}

.photo-rotate:hover {
    background: #fff;
    border-color: rgba(64, 88, 152, .45);
}

.header-actions {
    flex-shrink: 0;
}

.header-action-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .app-header .container {
        align-items: flex-start !important;
    }

    .app-header h1 {
        font-size: 1rem;
    }

    .app-header .text-secondary.small {
        max-width: 180px;
    }
}
