/*
 * Page-specific CSS extracted from inline <style> blocks in individual Blade
 * views. Kept separate from tmt-ui.css (cross-cutting component overrides)
 * so that file stays small; each section below belongs to exactly one page.
 * Load order does not matter between sections, but this file must load
 * after material-dashboard.css.
 */

/* Page: attendance/devices (resources/views/livewire/pages/attendance/devices.blade.php) */
.device-header-action {
    background: #fff;
    color: #000;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.device-header-action:hover,
.device-header-action:focus {
    background: #e91e63;
    color: #fff;
}

/* Page: attendance/raw-logs (resources/views/livewire/pages/attendance/raw-logs.blade.php) */
.manual-log-tabulator-card .tabulator {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.82rem;
}

.manual-log-tabulator-card .tabulator .tabulator-header {
    border-bottom: 1px solid #dee2e6;
}

.manual-log-tabulator-card .tabulator-row.tabulator-selected {
    background-color: rgba(233, 30, 99, 0.08);
}

.manual-log-tabulator-card .manual-time-column {
    background-color: rgba(25, 118, 210, 0.04);
    font-weight: 600;
}

.manual-log-tabulator-card .manual-time-value {
    color: #344767;
    font-weight: 700;
}

.manual-log-tabulator-card .manual-time-empty {
    color: #adb5bd;
    font-weight: 500;
}

/* Page: attendance/tabulator-demo (resources/views/livewire/pages/attendance/tabulator-demo.blade.php) */
.tmt-tabulator-demo .tabulator {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.tmt-tabulator-demo .tabulator .tabulator-header {
    border-bottom: 1px solid #dee2e6;
}

.tmt-tabulator-demo .tabulator-row.tabulator-selected {
    background-color: rgba(233, 30, 99, 0.08);
}

/* Page: employees/index (resources/views/livewire/pages/employees/index.blade.php) */
.employee-column-filter-menu {
    background-color: #f4f5f7;
    border: 1px solid #d2d6da;
    box-shadow: 0 8px 24px rgba(52, 71, 103, 0.18);
    color: #344767;
    min-width: 260px;
    max-width: min(320px, 90vw);
    opacity: 1;
    z-index: 1080;
}

.employee-column-filter-menu .dropdown-item {
    color: #344767;
    font-weight: 500;
}

.employee-column-filter-menu .dropdown-item:hover,
.employee-column-filter-menu .dropdown-item:focus {
    background-color: #e9ecef;
    color: #e91e63;
}

.employee-column-filter-menu .form-control {
    background-color: #fff;
    color: #344767;
}

.employee-filter-options {
    max-height: 240px;
    overflow-y: auto;
}

.employee-column-filter-trigger.text-primary {
    opacity: 1 !important;
}

/* Page: attendance/shift-timeline-demo (resources/views/livewire/pages/attendance/shift-timeline-demo.blade.php) */
.shift-timeline-demo .schedule-grid {
    min-width: 1180px;
}

.shift-timeline-demo .employee-column {
    width: 210px;
}

.shift-timeline-demo .day-column {
    min-width: 138px;
    width: 138px;
}

.shift-timeline-demo .shift-cell {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    min-height: 86px;
    padding: 0.55rem;
}

.shift-timeline-demo .timeline-shell {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    height: 18px;
    margin-top: 0.45rem;
    overflow: hidden;
    position: relative;
}

.shift-timeline-demo .timeline-midnight {
    background: rgba(33, 37, 41, 0.35);
    bottom: 0;
    left: 75%;
    position: absolute;
    top: 0;
    width: 1px;
    z-index: 2;
}

.shift-timeline-demo .timeline-bar {
    background: var(--shift-color);
    border-radius: 4px;
    bottom: 3px;
    left: var(--shift-left);
    min-width: 9px;
    opacity: 0.9;
    position: absolute;
    top: 3px;
    width: var(--shift-width);
    z-index: 1;
}

.shift-timeline-demo .timeline-bar.is-overnight {
    background: linear-gradient(90deg, var(--shift-color) 0%, var(--shift-color) 68%, rgba(233, 30, 99, 0.42) 68%, rgba(233, 30, 99, 0.42) 100%);
}

.shift-timeline-demo .timeline-axis {
    display: grid;
    font-size: 0.62rem;
    grid-template-columns: 18.75% 18.75% 18.75% 18.75% 15.625% 9.375%;
    line-height: 1.1;
    margin-top: 0.3rem;
}

.shift-timeline-demo .timeline-axis span {
    color: #7b809a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shift-timeline-demo .shift-title {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    min-width: 0;
}

.shift-timeline-demo .shift-code {
    border-radius: 4px;
    color: #ffffff;
    flex: 0 0 auto;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.22rem 0.35rem;
}

.shift-timeline-demo .shift-name {
    color: #344767;
    font-size: 0.72rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shift-timeline-demo .shift-time {
    color: #7b809a;
    font-size: 0.68rem;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.shift-timeline-demo .empty-shift {
    align-items: center;
    color: #adb5bd;
    display: flex;
    font-size: 0.75rem;
    min-height: 70px;
}

.shift-timeline-demo .compact-shift {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
    min-height: 70px;
}

.shift-timeline-demo .compact-time {
    color: #344767;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.shift-timeline-demo .compact-name {
    color: #7b809a;
    font-size: 0.68rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shift-timeline-demo .scheduler-board {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    min-width: 1180px;
    overflow: hidden;
}

.shift-timeline-demo .scheduler-toolbar,
.shift-timeline-demo .scheduler-date-row,
.shift-timeline-demo .scheduler-time-row,
.shift-timeline-demo .scheduler-row {
    display: grid;
    grid-template-columns: 190px repeat(7, minmax(140px, 1fr));
}

.shift-timeline-demo .scheduler-toolbar {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    min-height: 58px;
}

.shift-timeline-demo .scheduler-controls {
    align-items: center;
    border-right: 1px solid #dee2e6;
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem;
}

.shift-timeline-demo .scheduler-current-date {
    align-items: center;
    color: #344767;
    display: flex;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 1rem;
}

.shift-timeline-demo .scheduler-date-row {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

.shift-timeline-demo .scheduler-date-title {
    border-right: 1px solid #dee2e6;
    color: #212529;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.65rem 0.5rem;
    text-align: center;
}

.shift-timeline-demo .scheduler-date-title:last-child {
    border-right: 0;
}

.shift-timeline-demo .scheduler-time-row {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

.shift-timeline-demo .scheduler-time-grid,
.shift-timeline-demo .scheduler-lane,
.shift-timeline-demo .scheduler-day-lane {
    background-image: linear-gradient(to right, transparent calc(25% - 1px), #e9ecef calc(25% - 1px), #e9ecef 25%, transparent 25%);
    background-size: 25% 100%;
    position: relative;
}

.shift-timeline-demo .scheduler-time-grid {
    display: grid;
    border-right: 1px solid #dee2e6;
    grid-template-columns: repeat(4, 1fr);
    min-height: 44px;
}

.shift-timeline-demo .scheduler-time-grid:last-child {
    border-right: 0;
}

.shift-timeline-demo .scheduler-time-grid span {
    align-items: center;
    color: #212529;
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    justify-content: center;
}

.shift-timeline-demo .scheduler-row {
    min-height: 76px;
}

.shift-timeline-demo .scheduler-row + .scheduler-row {
    border-top: 1px solid #dee2e6;
}

.shift-timeline-demo .scheduler-resource {
    align-items: center;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.65rem;
}

.shift-timeline-demo .scheduler-resource strong {
    color: #344767;
    font-size: 0.82rem;
    line-height: 1.2;
    width: 100%;
}

.shift-timeline-demo .scheduler-resource span {
    color: #7b809a;
    font-size: 0.68rem;
    width: 100%;
}

.shift-timeline-demo .scheduler-lane {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    min-height: 76px;
}

.shift-timeline-demo .scheduler-lane:last-child {
    border-right: 0;
}

.shift-timeline-demo .scheduler-month-lane {
    background: #f8f9fa;
    display: grid;
    grid-column: span 7;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    min-height: 76px;
    position: relative;
}

.shift-timeline-demo .scheduler-day-lane {
    border-right: 1px solid #dee2e6;
    min-height: 76px;
}

.shift-timeline-demo .scheduler-day-lane:last-child {
    border-right: 0;
}

.shift-timeline-demo .scheduler-day-lane::after {
    background: rgba(233, 30, 99, 0.35);
    bottom: 0;
    content: "";
    position: absolute;
    right: -1px;
    top: 0;
    width: 1px;
    z-index: 1;
}

.shift-timeline-demo .scheduler-next-day {
    background: rgba(233, 30, 99, 0.06);
    bottom: 0;
    left: 75%;
    position: absolute;
    top: 0;
    width: 25%;
}

.shift-timeline-demo .scheduler-midnight {
    background: rgba(233, 30, 99, 0.55);
    bottom: 0;
    left: 75%;
    position: absolute;
    top: 0;
    width: 2px;
    z-index: 2;
}

.shift-timeline-demo .scheduler-event {
    background: var(--event-color);
    border-left: 3px solid rgba(63, 81, 181, 0.95);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    color: #ffffff;
    left: calc(var(--event-left) * 1%);
    min-width: 0;
    overflow: hidden;
    padding: 0.5rem 0.6rem;
    position: absolute;
    top: 14px;
    width: calc(var(--event-width) * 1%);
    z-index: 3;
}

.shift-timeline-demo .scheduler-event.is-overnight {
    background: linear-gradient(90deg, var(--event-color) 0%, var(--event-color) var(--midnight-offset), rgba(233, 30, 99, 0.72) var(--midnight-offset), rgba(233, 30, 99, 0.72) 100%);
    border-right: 2px solid rgba(255, 255, 255, 0.75);
}

.shift-timeline-demo .scheduler-event.is-overnight::after {
    background: rgba(255, 255, 255, 0.88);
    bottom: 4px;
    content: "";
    left: var(--midnight-offset);
    position: absolute;
    top: 4px;
    width: 1px;
}

.shift-timeline-demo .scheduler-event-next-day {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 3px;
    bottom: 4px;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.16rem 0.22rem;
    position: absolute;
    right: 4px;
    z-index: 4;
}

.shift-timeline-demo .scheduler-event-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shift-timeline-demo .scheduler-event-time {
    display: block;
    font-size: 0.68rem;
    line-height: 1.2;
    margin-top: 0.2rem;
    opacity: 0.9;
    white-space: nowrap;
}

/* Employee detail avatar editor */
.employee-avatar-editor {
    display: inline-flex;
    position: relative;
}

.employee-avatar-editor .avatar img {
    object-fit: cover;
}

.employee-header-avatar {
    height: 3.75rem;
    width: 3.75rem;
}

.employee-portrait-editor {
    background: #ffffff;
    border: 1px solid rgba(52, 71, 103, 0.14);
    border-radius: 0.75rem;
    box-shadow: 0 0.45rem 1.15rem rgba(52, 71, 103, 0.16);
    display: inline-flex;
    padding: 0.35rem;
    position: relative;
}

.employee-portrait-frame {
    align-items: center;
    aspect-ratio: 4 / 6;
    border-radius: 0.5rem;
    display: flex;
    height: 12rem;
    overflow: hidden;
    justify-content: center;
}

.employee-portrait-frame img {
    object-fit: cover;
}

.employee-portrait-edit-overlay,
.employee-portrait-loading {
    align-items: center;
    background: rgba(33, 37, 41, 0.62);
    border-radius: 0.5rem;
    color: #ffffff;
    inset: 0.35rem;
    justify-content: center;
    position: absolute;
}

.employee-portrait-edit-overlay {
    border: 0;
    cursor: pointer;
    display: flex;
    opacity: 0;
    transition: opacity 0.18s ease-in-out;
}

.employee-portrait-edit-overlay:focus-visible,
.employee-portrait-editor:hover .employee-portrait-edit-overlay {
    opacity: 1;
}

.employee-portrait-edit-overlay .material-icons {
    font-size: 1.5rem;
}

.employee-portrait-loading {
    display: none;
    z-index: 2;
}

.employee-avatar-edit-overlay,
.employee-avatar-loading {
    align-items: center;
    background: rgba(33, 37, 41, 0.62);
    border-radius: 50%;
    color: #ffffff;
    inset: 0;
    justify-content: center;
    position: absolute;
}

.employee-avatar-edit-overlay {
    border: 0;
    cursor: pointer;
    display: flex;
    opacity: 0;
    transition: opacity 0.18s ease-in-out;
}

.employee-avatar-edit-overlay:focus-visible,
.employee-avatar-editor:hover .employee-avatar-edit-overlay {
    opacity: 1;
}

.employee-avatar-edit-overlay .material-icons {
    font-size: 1.35rem;
}

.employee-avatar-loading {
    display: none;
    z-index: 2;
}
