
[x-cloak] {
    display: none !important;
}

/* Shared data-table look (mirrors the TableView component used by the reference project). */
.table-view {
    width: 100%;
    min-width: 100%;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.table-view thead {
    background-color: #f8fafc;
    color: #64748b;
}

.table-view th {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
}

.table-view td {
    padding: 0.5rem 1rem;
}

.table-view tbody tr + tr {
    border-top: 1px solid #f1f5f9;
}

.table-view tbody tr:hover {
    background-color: #f8fafc;
}

/* Full-screen attendance camera: always fills the whole viewport. */
.camera-frame {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

/* Sidebar scrollbar stays invisible until the sidebar is hovered. */
.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.sidebar-scroll:hover {
    scrollbar-color: #d1d5db transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 9999px;
}

.sidebar-scroll:hover::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

@media (max-width: 767px) {
    .table-view {
        display: block;
        min-width: 0;
    }

    .table-view thead {
        display: none;
    }

    .table-view tbody {
        display: block;
    }

    .table-view tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        padding: 0.5rem 0.875rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        background-color: #fff;
    }

    .table-view tbody tr + tr {
        border-top: 1px solid #e2e8f0;
    }

    .table-view tbody tr:hover {
        background-color: #fff;
    }

    .table-view td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.4rem 0;
        border: 0;
        text-align: right;
        white-space: normal;
    }

    .table-view td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 42%;
        font-weight: 600;
        color: #64748b;
        text-align: left;
    }

    .table-view td.table-empty {
        display: block;
        text-align: center;
    }
}

/* Modern global date/time picker styling. */
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime-local"],
.datepicker-input {
    position: relative;
    min-height: 2.5rem;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='1.8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.25rem;
    box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.04);
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
    cursor: pointer;
}

input[type="date"]:hover,
input[type="month"]:hover,
input[type="time"]:hover,
input[type="datetime-local"]:hover,
.datepicker-input:hover {
    border-color: #9ca3af;
}

input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
.datepicker-input:focus {
    outline: none;
    border-color: #D34B52;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.5rem;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

/* ===== Toastr (fixed bottom) ===== */
#toast-container.toast-bottom-center,
#toast-container.toast-bottom-full-width {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 9999;
    width: auto;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}

#toast-container > div {
    opacity: 1;
    width: auto;
    min-width: 300px;
    max-width: 460px;
    padding: 14px 18px;
    border-radius: 14px;
    background-image: none !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .25);
    pointer-events: auto;
}

#toast-container > div:hover {
    box-shadow: 0 20px 50px rgba(15, 23, 42, .32);
}

#toast-container > .toast-success { background-color: #059669; }
#toast-container > .toast-error { background-color: #dc2626; }
#toast-container > .toast-warning { background-color: #d97706; }
#toast-container > .toast-info { background-color: #0284c7; }
#toast-container .toast-title { color: #fff; font-weight: 700; }
#toast-container .toast-message { color: #fff; }
#toast-container .toast-progress { background-color: rgba(255, 255, 255, .75); }

/* ===== Tiptap editor ===== */
.tiptap {
    min-height: 140px;
    padding: .75rem 1rem;
    outline: none;
    font-size: .875rem;
    line-height: 1.6;
    color: #0f172a;
}
.tiptap p { margin: .35rem 0; }
.tiptap ul { list-style: disc; padding-left: 1.25rem; margin: .35rem 0; }
.tiptap ol { list-style: decimal; padding-left: 1.25rem; margin: .35rem 0; }
.tiptap blockquote { border-left: 3px solid #cbd5e1; padding-left: .75rem; color: #475569; margin: .5rem 0; }
.tiptap a { color: #D34B52; text-decoration: underline; }
.tiptap p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: #94a3b8;
    pointer-events: none;
    height: 0;
}

/* ===== Skeleton ===== */
.ia-skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
    background-size: 400% 100%;
    animation: ia-skeleton 1.4s ease infinite;
}
@keyframes ia-skeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ===== Custom select ===== */
.ia-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

/* ===== Global form controls (works without Tailwind forms plugin) ===== */
select:not([multiple]) {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}
select[multiple] {
    background-image: none;
    padding-right: .75rem;
}
select:focus {
    outline: none;
    border-color: #E2757B;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}
input[type="checkbox"],
input[type="radio"] {
    accent-color: #D34B52;
}

/* ===== Form control fallback (mimics @tailwindcss/forms) ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime-local"],
textarea {
    appearance: none;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #111827;
    box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.04);
}
input::placeholder,
textarea::placeholder { color: #9ca3af; }
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #fff;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #D34B52;
    border-color: #D34B52;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}
input[type="radio"] { border-radius: 9999px; }

/* ===== Toastr icon alignment ===== */
#toast-container > div {
    padding: 14px 18px 14px 54px !important;
    background-repeat: no-repeat !important;
    background-position: 18px center !important;
    background-size: 20px 20px !important;
}
#toast-container > .toast-success {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") !important;
}
#toast-container > .toast-error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") !important;
}
#toast-container > .toast-warning {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3C/svg%3E") !important;
}
#toast-container > .toast-info {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4m0-4h.01'/%3E%3C/svg%3E") !important;
}
#toast-container .toast-title { margin: 0 0 2px !important; }
#toast-container .toast-message { margin: 0 !important; line-height: 1.35 !important; }
