:root {
    --color-in: #198754;
    --color-out: #dc3545;
    --color-leave: #6c757d;
    --bg-body: #f4f6f9;
    --color-primary: #0d6efd;
    --color-shift-am: #0d6efd;
    --color-shift-pm: #fd7e14;
    --color-shift-night: #6f42c1;
    --color-work-actual: #157347;
}

body {
    background-color: var(--bg-body);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95rem;
}

.hidden {
    display: none !important;
}

.d-none {
    display: none !important;
}

.tab-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-responsive {
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa !important;
    z-index: 10;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transition: 0.2s;
}

.col-user {
    width: 250px;
    min-width: 250px;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-thumb {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mono-font {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
}

.badge-pill {
    border-radius: 50px;
    padding: 0.4em 0.8em;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.nav-tabs .nav-link:hover {
    color: var(--color-primary);
    background: rgba(13, 110, 253, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    background: transparent;
}

.login-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    background: white;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
}

.btn-google {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-weight: 600;
}

.btn-google:hover {
    background-color: #f8f9fa;
}

.btn-google img {
    width: 20px;
    margin-right: 10px;
}

.fc-event {
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
    padding: 2px 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fc-daygrid-event-dot {
    display: none;
}

.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Calendar Custom Styles */
.fc-theme-standard {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: none !important;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #f1f3f5 !important;
}

.fc-col-header-cell {
    background: #f8f9fa;
    padding: 12px 0 !important;
}

.fc-col-header-cell-cushion {
    text-decoration: none !important;
    font-weight: 700;
    color: #495057;
    font-size: 0.9rem;
}

.fc-daygrid-day-number {
    font-weight: 600;
    color: #adb5bd;
    padding: 8px 12px !important;
    text-decoration: none !important;
}

.fc-day-today {
    background: rgba(13, 110, 253, 0.03) !important;
}

.fc-event {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 1px 4px !important;
    box-shadow: none !important;
}

.calendar-event-card {
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

.calendar-event-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    z-index: 100 !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.calendar-event-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.calendar-event-header img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.calendar-event-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    letter-spacing: -0.2px;
}

/* Status variants */
.status-soft-primary {
    background: #f0f7ff;
    border-left-color: #0d6efd;
}

.status-soft-primary .calendar-event-subtitle {
    color: #0d6efd;
}

.status-soft-success {
    background: #f0fff4;
    border-left-color: #198754;
}

.status-soft-success .calendar-event-subtitle {
    color: #198754;
}

.status-soft-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.status-soft-warning .calendar-event-subtitle {
    color: #d97706;
}

.status-soft-danger {
    background: #fef2f2;
    border-left-color: #dc3545;
}

.status-soft-danger .calendar-event-subtitle {
    color: #dc3545;
}

.status-soft-secondary {
    background: #f8f9fa;
    border-left-color: #6c757d;
}

.status-soft-secondary .calendar-event-subtitle {
    color: #6c757d;
}

/* More link */
.fc-daygrid-more-link {
    background: #f1f3f5 !important;
    color: #6c757d !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: block !important;
    text-align: center !important;
    margin-top: 4px !important;
}

.fc-daygrid-more-link:hover {
    background: #e9ecef !important;
}

.fc-event-title-container {
    overflow: visible !important;
}

/* Liquid Glass Segmented Control */
.segmented-control {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.segmented-control input {
    display: none;
}

.segmented-control label {
    flex: 1;
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 8px 0;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.segmented-control .selection {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 9px;
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 0;
}

.segmented-control input#type-out:checked~.selection {
    transform: translateX(100%);
}

.segmented-control input#type-in:checked~.selection {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.segmented-control input#type-out:checked~.selection {
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

.segmented-control input#type-in:checked+label {
    color: #198754;
}

.segmented-control input#type-out:checked+label {
    color: #dc3545;
}

/* Custom Time Stepper */
.time-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 4px 8px;
    width: fit-content;
}

.stepper-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stepper-btn {
    border: none;
    background: transparent;
    color: #adb5bd;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.2rem;
}

.stepper-btn:hover {
    color: var(--color-primary);
}

.stepper-val {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
    padding: 0 4px;
}

.stepper-sep {
    font-weight: 800;
    font-size: 1.2rem;
    color: #ddd;
    margin-top: -2px;
}

/* Shift Chip Buttons */
.shift-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.shift-chip:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.shift-chip.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

/* User Picker Item */
.user-pick-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}

.user-pick-item:hover {
    background: #f0f4ff;
    border-color: #c5d4f7;
}

.user-pick-item.active {
    background: linear-gradient(135deg, #eef2ff 0%, #e8f0fe 100%);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}

.user-pick-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.user-pick-item .user-pick-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-pick-item .user-pick-dept {
    font-size: 0.72rem;
    color: #6c757d;
}