/* ==========================================================================
   Modern dialogs (resources/views/modals/*)
   Opt-in: only modals with the .cmodal class are styled, so other dialogs
   keep the Bootstrap look. Loaded once by layouts/app.blade.php.
   Same tokens as the report pages; logical properties keep RTL and LTR identical.
   ========================================================================== */

.cmodal {
    --cm-surface: #ffffff;
    --cm-surface-2: #f8fafc;
    --cm-border: #e5e9f2;
    --cm-ink: #0f172a;
    --cm-text: #334155;
    --cm-muted: #64748b;
    --cm-faint: #94a3b8;
    --cm-accent: #2563eb;
    --cm-accent-hover: #1d4ed8;
    --cm-accent-soft: #eff4ff;
    --cm-success: #16a34a;
    --cm-success-soft: #ecfdf3;
    --cm-danger: #dc2626;
    --cm-danger-soft: #fef2f2;
    --cm-warning: #d97706;
    --cm-warning-soft: #fffbeb;
    --cm-info: #0891b2;
    --cm-info-soft: #ecfeff;
    --cm-violet: #7c3aed;
    --cm-violet-soft: #f5f3ff;
    --cm-ring: 0 0 0 3px rgba(37, 99, 235, .15);
}

.cmodal *,
.cmodal *::before,
.cmodal *::after { box-sizing: border-box; }

/* --- Dialog shell -------------------------------------------------------- */

.cmodal .modal-dialog {
    width: auto;
    max-width: 520px;
    margin: 64px auto;
    padding: 0 16px;
}

.cmodal.cmodal-lg .modal-dialog { max-width: 760px; }

.cmodal.fade .modal-dialog {
    transform: translateY(14px) scale(.98);
    opacity: 0;
    transition: transform .2s ease-out, opacity .2s ease-out;
}

.cmodal.in .modal-dialog { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .cmodal.fade .modal-dialog { transition: none; }
}

.cmodal .modal-content {
    border: 0;
    border-radius: 18px;
    background: var(--cm-surface);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .06);
    color: var(--cm-text);
    font-size: 14px;
    line-height: 1.6;
    overflow: visible; /* date/time pickers pop out of the dialog */
}

/* Header: [icon] title / subtitle ............ [x] */
.cmodal .modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--cm-border);
}

.cmodal .modal-header::before,
.cmodal .modal-header::after { display: none; } /* bootstrap clearfix */

.cm-head-icon {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--cm-accent-soft);
    color: var(--cm-accent);
    font-size: 17px;
}

.cm-head-icon.is-green  { background: var(--cm-success-soft); color: var(--cm-success); }
.cm-head-icon.is-violet { background: var(--cm-violet-soft);  color: var(--cm-violet); }
.cm-head-icon.is-amber  { background: var(--cm-warning-soft); color: var(--cm-warning); }

.cm-head-text { flex: 1; min-width: 0; }

.cmodal .modal-title {
    margin: 0;
    color: var(--cm-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.cm-subtitle { margin: 2px 0 0; color: var(--cm-muted); font-size: 12.5px; }

.cmodal .modal-header .close {
    order: 3;
    float: none;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--cm-surface-2);
    color: var(--cm-muted);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    opacity: 1;
    transition: background .15s, color .15s;
}

.cmodal .modal-header .close:hover { background: var(--cm-danger-soft); color: var(--cm-danger); }

/* Body */
.cmodal .modal-body { padding: 20px 22px; }

.cm-fields {
    display: grid;
    gap: 16px;
}

.cm-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.cm-label {
    margin: 0;
    color: var(--cm-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.cm-hint { margin: 0; color: var(--cm-faint); font-size: 12px; }

.cmodal .form-control {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: var(--cm-surface);
    box-shadow: none;
    color: var(--cm-ink);
    font-size: 14px;
}

.cmodal textarea.form-control { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }

.cmodal .form-control:focus { border-color: var(--cm-accent); box-shadow: var(--cm-ring); outline: none; }

/* Input with a leading icon (notes) */
.cm-input-icon,
.cm-time { position: relative; } /* .cm-time is the anchor of the datetimepicker widget */

.cm-input-icon > i {
    position: absolute;
    inset-inline-start: 12px;
    top: 12px;
    color: var(--cm-faint);
    pointer-events: none;
    z-index: 2;
}

.cmodal .cm-input-icon .form-control { padding-inline-start: 36px; }
/* time fields: left-to-right digits, no leading icon (the time picker / browser shows its own) */
.cmodal .cm-time .form-control { direction: ltr; text-align: start; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Read-only value (date of the punch) */
.cm-static {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border: 1px dashed var(--cm-border);
    border-radius: 10px;
    background: var(--cm-surface-2);
    color: var(--cm-ink);
    font-weight: 600;
}

.cm-static i { color: var(--cm-accent); }
.cm-static span { direction: ltr; unicode-bidi: isolate; }

/* select2 inside a dialog */
.cmodal .select2-container { width: 100% !important; }

.cmodal .select2-container--bootstrap .select2-selection--single,
.cmodal .select2-container--bootstrap .select2-selection--multiple {
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    box-shadow: none;
}

.cmodal .select2-container--bootstrap.select2-container--focus .select2-selection,
.cmodal .select2-container--bootstrap.select2-container--open .select2-selection {
    border-color: var(--cm-accent);
    box-shadow: var(--cm-ring);
}

/* Transaction type picker: colored choices driving the hidden <select class="trans_types"> */
.cm-type-picker select.trans_types {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    opacity: 0; pointer-events: none;
}

.cm-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* equal widths, but never narrower than the label (wraps to a new line instead) */
.cm-choice { flex: 1 1 0; min-width: max-content; margin: 0; font-weight: normal; cursor: pointer; }

.cm-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cm-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: var(--cm-surface);
    color: var(--cm-text);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.cm-choice span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--choice-color, var(--cm-faint));
}

.cm-choice:hover span { border-color: #cbd5e1; }

.cm-choice input:checked + span {
    border-color: var(--choice-color);
    background: var(--choice-soft);
    color: var(--choice-color);
    box-shadow: 0 0 0 3px var(--choice-soft);
}

.cm-choice input:focus-visible + span { outline: 2px solid var(--cm-accent); outline-offset: 2px; }

.cm-choice.c-attend { --choice-color: var(--cm-success); --choice-soft: var(--cm-success-soft); }
.cm-choice.c-exout  { --choice-color: var(--cm-warning); --choice-soft: var(--cm-warning-soft); }
.cm-choice.c-exin   { --choice-color: var(--cm-info);    --choice-soft: var(--cm-info-soft); }
.cm-choice.c-depart { --choice-color: var(--cm-danger);  --choice-soft: var(--cm-danger-soft); }
.cm-choice.c-accent { --choice-color: var(--cm-accent);  --choice-soft: var(--cm-accent-soft); }

/* Option cards with a switch (is paid, random check-in / check-out) */
.cm-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--cm-border);
    border-radius: 12px;
    background: var(--cm-surface);
    font-weight: normal;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.cm-option:hover { border-color: #cbd5e1; }
.cm-option:has(input:checked) { border-color: #bfdbfe; background: var(--cm-accent-soft); }

.cm-option-text { display: flex; align-items: center; gap: 10px; color: var(--cm-ink); font-weight: 600; }
.cm-option-text i { width: 18px; text-align: center; color: var(--cm-accent); }

.cm-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cm-switch {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .15s;
}

.cm-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .25);
    transition: inset-inline-start .15s;
}

.cm-option input:checked ~ .cm-switch { background: var(--cm-accent); }
.cm-option input:checked ~ .cm-switch::after { inset-inline-start: 18px; }
.cm-option input:focus-visible ~ .cm-switch { outline: 2px solid var(--cm-accent); outline-offset: 2px; }

/* Info note */
.cm-note {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--cm-accent-soft);
    color: #1e3a8a;
    font-size: 12.5px;
}

.cm-note i { margin-top: 3px; color: var(--cm-accent); }

/* Footer: primary first in reading order, close next to it */
.cmodal .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--cm-border);
    background: var(--cm-surface-2);
    border-radius: 0 0 18px 18px;
}

.cmodal .modal-footer::before,
.cmodal .modal-footer::after { display: none; }

.cmodal .modal-footer .btn { margin: 0 !important; }

.cmodal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
    transition: background .15s, border-color .15s, color .15s;
}

.cmodal .btn-primary { background: var(--cm-accent); border-color: var(--cm-accent); color: #fff; }
.cmodal .btn-primary:hover,
.cmodal .btn-primary:focus { background: var(--cm-accent-hover); border-color: var(--cm-accent-hover); color: #fff; }

.cmodal .btn-default { background: var(--cm-surface); border-color: var(--cm-border); color: var(--cm-text); }
.cmodal .btn-default:hover,
.cmodal .btn-default:focus { background: var(--cm-surface); border-color: #cbd5e1; color: var(--cm-ink); }

/* --- Photo comparison ----------------------------------------------------- */

.cm-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cm-photo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--cm-border);
    border-radius: 14px;
    background: var(--cm-surface-2);
}

.cm-photo img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
}

.cm-photo figcaption { color: var(--cm-muted); font-size: 12.5px; text-align: center; }

.cm-verified {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--cm-success-soft);
    color: var(--cm-success);
    font-size: 12.5px;
    font-weight: 600;
}

/* Content injected into the breaks dialog */
.cmodal #breaks_content table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--cm-border); border-radius: 12px; overflow: hidden; }
.cmodal #breaks_content th { padding: 10px; background: var(--cm-surface-2); color: var(--cm-muted); font-size: 12.5px; border-bottom: 1px solid var(--cm-border); }
.cmodal #breaks_content td { padding: 10px; border-bottom: 1px solid var(--cm-border); }
.cmodal #breaks_content tr:last-child td { border-bottom: 0; }

/* --- Small screens ------------------------------------------------------ */

@media (max-width: 600px) {
    .cmodal .modal-dialog { margin: 16px auto; padding: 0 10px; }
    .cmodal .modal-header, .cmodal .modal-body { padding-inline: 16px; }
    .cmodal .modal-footer { padding-inline: 16px; }
    .cmodal .modal-footer .btn { flex: 1; }
    .cm-row-2, .cm-photos { grid-template-columns: 1fr; }
    .cm-head-icon { display: none; }
}

/* ==========================================================================
   Popups, menus and pickers on every page (layouts/app.blade.php sets <body class="cm-ui">)
   (SweetAlert2 6.x, Bootstrap popovers, BootstrapMenu, datetimepicker)
   ========================================================================== */

body.cm-ui .swal2-container { background-color: rgba(15, 23, 42, .45) !important; }

body.cm-ui .swal2-modal {
    width: min(460px, calc(100% - 32px)) !important;
    padding: 28px 24px 22px !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .06);
    font-family: inherit;
}

body.cm-ui .swal2-modal .swal2-title {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.45;
}

body.cm-ui .swal2-modal .swal2-content {
    color: #475569;
    font-size: 14px !important;
    font-family: inherit !important;
    line-height: 1.75;
}

body.cm-ui .swal2-modal .swal2-content div,
body.cm-ui .swal2-modal .swal2-content p { font-family: inherit !important; font-size: 13.5px !important; }
body.cm-ui .swal2-modal .swal2-content a { color: #2563eb; font-weight: 600; }

body.cm-ui .swal2-modal .swal2-icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    border-width: 3px;
    transform: scale(.85);
}

body.cm-ui .swal2-modal .swal2-image { max-width: 64px; margin: 8px auto 12px; }

body.cm-ui .swal2-modal .swal2-buttonswrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

body.cm-ui .swal2-modal .swal2-buttonswrapper .swal2-styled,
body.cm-ui .swal2-modal .swal2-buttonswrapper .btn {
    min-width: 110px;
    height: 40px;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600;
    box-shadow: none !important;
}

body.cm-ui .swal2-modal .swal2-confirm { background-color: #2563eb !important; color: #fff !important; }
body.cm-ui .swal2-modal .swal2-confirm:hover { background-color: #1d4ed8 !important; }
body.cm-ui .swal2-modal .swal2-buttonswrapper .swal2-cancel,
body.cm-ui .swal2-modal .swal2-buttonswrapper .btn-success { background-color: #fff !important; border-color: #e5e9f2 !important; color: #334155 !important; }
body.cm-ui .swal2-modal .swal2-buttonswrapper .swal2-cancel:hover,
body.cm-ui .swal2-modal .swal2-buttonswrapper .btn-success:hover { border-color: #cbd5e1 !important; color: #0f172a !important; }
body.cm-ui .swal2-modal.cm-danger .swal2-confirm,
body.cm-ui .swal2-modal .swal2-buttonswrapper .btn-danger { background-color: #dc2626 !important; color: #fff !important; }
body.cm-ui .swal2-modal.cm-danger .swal2-confirm:hover,
body.cm-ui .swal2-modal .swal2-buttonswrapper .btn-danger:hover { background-color: #b91c1c !important; }

body.cm-ui .swal2-modal .swal2-close {
    top: 12px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 22px;
    line-height: 32px;
}

/* Bootstrap popovers (punch warnings, notes, edited by) */
body.cm-ui .popover {
    max-width: 320px;
    padding: 0;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    font-family: inherit;
}

body.cm-ui .popover-title {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e9f2;
    border-radius: 12px 12px 0 0;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

body.cm-ui .popover-content { padding: 10px 14px; color: #475569; font-size: 13px; line-height: 1.7; }

/* Punch-time menu (BootstrapMenu) */
body.cm-ui .bootstrapMenu .dropdown-menu {
    min-width: 230px;
    padding: 6px;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}

body.cm-ui .bootstrapMenu .dropdown-menu > li > a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #334155;
    font-size: 13.5px;
}

body.cm-ui .bootstrapMenu .dropdown-menu > li > a i { width: 16px; text-align: center; color: #94a3b8; }
body.cm-ui .bootstrapMenu .dropdown-menu > li > a:hover { background: #eff4ff; color: #2563eb; }
body.cm-ui .bootstrapMenu .dropdown-menu > li > a:hover i { color: #2563eb; }
body.cm-ui .bootstrapMenu .dropdown-menu > li.action-danger > a,
body.cm-ui .bootstrapMenu .dropdown-menu > li > a.action-danger { background: transparent; color: #dc2626; }
body.cm-ui .bootstrapMenu .dropdown-menu > li.action-danger > a i { color: #dc2626; }
body.cm-ui .bootstrapMenu .dropdown-menu > li.action-danger > a:hover { background: #fef2f2; color: #dc2626; }

/* Date / time picker */
body.cm-ui .bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 8px;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}

body.cm-ui .bootstrap-datetimepicker-widget td.day,
body.cm-ui .bootstrap-datetimepicker-widget td span { border-radius: 8px; }
body.cm-ui .bootstrap-datetimepicker-widget td.active,
body.cm-ui .bootstrap-datetimepicker-widget td.active:hover,
body.cm-ui .bootstrap-datetimepicker-widget td span.active { background-color: #2563eb; }
body.cm-ui .bootstrap-datetimepicker-widget a[data-action] { color: #2563eb; }
body.cm-ui .bootstrap-datetimepicker-widget .timepicker-hour,
body.cm-ui .bootstrap-datetimepicker-widget .timepicker-minute,
body.cm-ui .bootstrap-datetimepicker-widget .timepicker-second { color: #0f172a; font-weight: 700; }

/* Single choice list as cards (e.g. default schedule) */
.cm-radios {
    display: grid;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.cm-radio { margin: 0; font-weight: normal; cursor: pointer; }

.cm-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cm-radio span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: var(--cm-surface);
    color: var(--cm-ink);
    font-weight: 600;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.cm-radio span i { color: var(--cm-faint); }
.cm-radio:hover span { border-color: #cbd5e1; }
.cm-radio input:checked + span { border-color: var(--cm-accent); background: var(--cm-accent-soft); box-shadow: var(--cm-ring); color: var(--cm-accent); }
.cm-radio input:checked + span i { color: var(--cm-accent); }
.cm-radio input:focus-visible + span { outline: 2px solid var(--cm-accent); outline-offset: 2px; }

/* ==========================================================================
   Shared feedback on every page: flash messages (flash.blade.php), Laravel
   validation alerts, alertify toasts and small helpers of the global dialogs
   ========================================================================== */

.alert.cm-flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff4ff;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: none;
}

.cm-flash .cm-flash-icon { flex: 0 0 auto; margin-top: 4px; font-size: 16px; }
.cm-flash .cm-flash-text { flex: 1; min-width: 0; }
.cm-flash .cm-flash-text strong { margin-inline-end: 4px; }
.cm-flash .cm-flash-text a { color: inherit; font-weight: 700; text-decoration: underline; }
.cm-flash .cm-flash-text ul { margin: 4px 0 0; padding-inline-start: 18px; }

.alert.cm-flash .close {
    position: static;
    float: none;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: -2px 0 0;
    border-radius: 8px;
    color: inherit;
    font-size: 20px;
    line-height: 26px;
    opacity: .55;
    text-shadow: none;
}

.alert.cm-flash .close:hover { background: rgba(255, 255, 255, .6); opacity: 1; }

.alert.cm-flash.alert-success { border-color: #bbf7d0; background: #ecfdf3; color: #166534; }
.alert.cm-flash.alert-danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert.cm-flash.alert-warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }

/* alertify toasts */
.alertify-notifier .ajs-message {
    width: auto !important;
    min-width: 240px;
    max-width: 360px;
    padding: 12px 16px !important;
    border: 1px solid #e5e9f2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    text-align: start !important;
    text-shadow: none !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .16) !important;
}

.alertify-notifier .ajs-message.ajs-success { border-color: #bbf7d0 !important; border-inline-start: 4px solid #16a34a !important; background: #ecfdf3 !important; color: #166534 !important; }
.alertify-notifier .ajs-message.ajs-error { border-color: #fecaca !important; border-inline-start: 4px solid #dc2626 !important; background: #fef2f2 !important; color: #991b1b !important; }
.alertify-notifier .ajs-message.ajs-warning { border-color: #fde68a !important; border-inline-start: 4px solid #d97706 !important; background: #fffbeb !important; color: #92400e !important; }

/* global dialogs of the layout */
.cm-req { color: var(--cm-danger, #dc2626); }
.cm-error {
    padding: 8px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
}
.cm-issues { margin: 0; padding-inline-start: 18px; color: #334155; line-height: 1.9; }
.cm-issues:empty { display: none; }
.cm-ok { display: flex; align-items: center; gap: 10px; color: #166534; font-weight: 600; }
.cm-ok i { color: #16a34a; font-size: 22px; }
.cm-pwd { display: flex; align-items: center; gap: 10px; }
.cm-pwd .form-control { flex: 1; }

/* delete confirmations that only pass confirmButtonColor '#d33' / '#dc2626' (no cm-danger class) */
body.cm-ui .swal2-modal .swal2-confirm[style*="rgb(221, 51, 51)"],
body.cm-ui .swal2-modal .swal2-confirm[style*="rgb(220, 38, 38)"] { background-color: #dc2626 !important; }
body.cm-ui .swal2-modal .swal2-confirm[style*="rgb(221, 51, 51)"]:hover,
body.cm-ui .swal2-modal .swal2-confirm[style*="rgb(220, 38, 38)"]:hover { background-color: #b91c1c !important; }
.cmodal #shift_id { width: 100% !important; }

/* select + "create new" link (vacation type picker) */
.cm-inline-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cm-inline-pick .form-control { flex: 1 1 180px; width: auto; min-width: 0; }
.cm-inline-link { display: inline-flex; align-items: center; gap: 6px; color: #2563eb; font-size: 13px; font-weight: 600; text-decoration: none; }
.cm-inline-link:hover, .cm-inline-link:focus { color: #1d4ed8; text-decoration: none; }

/* "Loading..." dialog */
.cmodal.cm-loading .modal-dialog { max-width: 280px; }
.cmodal.cm-loading .modal-content { padding: 26px 20px 22px; text-align: center; }
.cm-loading-icon { margin-bottom: 12px; color: var(--cm-accent); font-size: 30px; }

/* Bootstrap alerts inside the redesigned pages (validation errors, notes) take the flash look */
:is(.crc, .stg, .drp, .mrp, .ofr, .ibr, .sdh, .shs) .alert:not(.cm-flash) {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff4ff;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: none;
}

:is(.crc, .stg, .drp, .mrp, .ofr, .ibr, .sdh, .shs) .alert:not(.cm-flash) ul { margin: 0; padding-inline-start: 18px; }
:is(.crc, .stg, .drp, .mrp, .ofr, .ibr, .sdh, .shs) .alert-success:not(.cm-flash) { border-color: #bbf7d0; background: #ecfdf3; color: #166534; }
:is(.crc, .stg, .drp, .mrp, .ofr, .ibr, .sdh, .shs) .alert-danger:not(.cm-flash) { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
:is(.crc, .stg, .drp, .mrp, .ofr, .ibr, .sdh, .shs) .alert-warning:not(.cm-flash) { border-color: #fde68a; background: #fffbeb; color: #92400e; }
