﻿/*
* demo.css
* File include item demo only specific css only
******************************************************************************/
body {
    overflow-x: hidden;
    background: linear-gradient(135deg, #eef2f7 0%, #e8edf5 100%);
    min-height: 100vh;
}

.card {
    border: 1px solid rgba(30, 58, 95, 0.08);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.06);
    border-radius: 10px;
}
.navbar, .header-navbar {
    backdrop-filter: blur(10px);
    background: rgba(30, 58, 95, 0.95) !important;
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.15);
}
.btn {
    border-radius: 6px;
}

.card-header {
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.04) 0%, rgba(46, 134, 193, 0.03) 100%);
    border-bottom: 2px solid rgba(30, 58, 95, 0.08);
    color: #1E3A5F;
}

    .card-header h6 {
        margin: 0;
        color: #1E3A5F;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .card-header h6 i {
            font-size: 1rem;
            opacity: 0.7;
        }


.dt-toolbar {
    padding: 0 !important;
    background: transparent;
    margin-bottom: 0 !important;
}

.form-label, .col-form-label, .table th {
    text-transform: none;
}
.light-style .menu .app-brand.demo {
    height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;
  /*width: 30px;*/
  height: 30px;
}

.app-brand-logo.demo svg {
  width: 1.7rem;
  height: 1.7rem;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.45px;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 62px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 231px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}
.language-parent:hover .language-submenu {
    display: block !important;
}

.language-submenu {
    display: none;
}
.small-lang a {
    font-size: 0.78rem !important;
    padding: 4px 8px !important;
    line-height: 1.1;
    border-radius: 4px;
}

/* Reduce spacing between submenu items */
.small-lang li {
    margin-bottom: 2px;
}

/* Soft hover effect */
.small-lang a:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Reduce top/bottom spacing of the submenu itself */
.language-submenu {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

/* Make arrow look cleaner */
.language-parent i.bx-chevron-down {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Slight hover change on parent to show it's interactive */
.language-parent:hover .dropdown-header {
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
}


.dt-table {
    border-radius: 8px;
    overflow: hidden;
}

    .dt-table thead th {
        background: #f8f9fc !important;
        font-weight: 600;
    }

    .dt-table tbody tr td {
        vertical-align: middle !important;
    }

.dataTables_filter input {
    border: 1px solid #d9dee3;
    border-radius: 6px;
    padding: 6px 10px;
    height: 38px;
}

/* Make export button clean & rounded */
.dt-export .btn {
    border-radius: 6px !important;
    padding: 6px 14px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

    /* Align icons inside export button */
    .dt-export .btn i {
        margin-right: 6px;
    }

/* Remove ugly default label from search */
.dataTables_filter label {
    font-weight: 600;
    margin-right: 8px;
}
.dataTables_wrapper .card-header {
    padding-bottom: 0.1rem !important;
    padding-top: 0.1rem !important;
}
}

/* Reduce spacing before the table rows */
table.dataTable {
    margin-top: 0 !important;
}

.ta-toolbar {
    background: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}

    .ta-toolbar .btn {
        padding: 6px 16px;
        font-weight: 500;
    }

    .ta-toolbar .btn-light {
        background: #f8f9fa;
    }

.dt-table tbody tr td {
    padding: 7px !important;
}

.nospin-button input[type=number]::-webkit-inner-spin-button,
.nospin-button input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Firefox */
.nospin-button input[type=number] {
    -moz-appearance: textfield;
}

.select2-container .select2-selection--single {
    margin-bottom:4px;
}
input, button, select, optgroup, textarea {
    margin-bottom: 4px;
}

.time-input {
    min-width:130px;
}

div.dt-buttons {
    position: relative;
}

div.dt-button-collection {
    position: fixed !important;
    z-index: 9999 !important;
}

.flatpickr-input.form-control {
    border-radius: 0.375rem 0 0 0.375rem !important;
    border-right: 0 !important;
}

.flatpickr-input + .flatpickr-input[readonly] {
    display: none;
}
.input-group-text {
    height:38px;
}

a.btn-sm {
    display: inline-flex;
    align-items: center;
    height: 29px;
}

.perm-module-header {
    background: #f0f4ff;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    margin-top: 12px;
    color: #495057;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.perm-row {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

    .perm-row:last-child {
        border-bottom: none;
    }

.perm-desc {
    flex: 1;
    font-size: 0.875rem;
    color: #555;
}

.perm-check .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

    .perm-check .form-check-input:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.admin-badge {
    font-size: 0.75rem;
    background: #e8f4fd;
    color: #0c7cd5;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Red border on Select2 when invalid */
.select2-container--default .select2-selection--single.select2-invalid {
    border-color: #dc3545 !important;
}

.field-validation-error {
    color: #dc3545;
    font-size: 0.875em;
}

.input-group-text {
    height: 38px;
}

.emp-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

    .emp-row:last-child {
        border-bottom: none;
    }

.emp-info {
    flex: 1;
    font-size: 0.875rem;
}

.emp-dept {
    color: #888;
    font-size: 0.8rem;
}

#empListWrap {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.select-all-bar {
    background: #f8f9fa;
    padding: 6px 10px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.rule-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    height: 100%;
}

.rule-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

    .rule-row label {
        min-width: 160px;
        margin: 0;
    }

.hm-input {
    width: 58px;
    text-align: center;
}

.hm-label {
    color: #6c757d;
    font-size: .85em;
}

.day-row td {
    vertical-align: middle;
    padding: 6px 8px;
}

.time-input {
    width: 110px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

input[type=number] {
    -moz-appearance: textfield;
}

.btn-saving {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

    .btn-saving::after {
        content: '';
        display: inline-block;
        width: 14px;
        height: 14px;
        margin-left: 8px;
        border: 2px solid #fff;
        border-top-color: transparent;
        border-radius: 50%;
        animation: btn-spin 0.6s linear infinite;
        vertical-align: middle;
    }

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.badge.ta-late, .badge.ta-early, .badge.ta-absent,
.badge.ta-missing, .badge.ta-sl, .badge.ta-holiday,
.badge.ta-vacation {
    color: #333 !important;
}

#taTable th, #taTable td {
    font-size: 0.82rem;
    padding: 4px 6px;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center; /* ADD */
}

.app-brand-logo img {
    width: 200px !important;
}

/* ── Reports ── */
.report-panel {
    height: calc(100vh - 180px);
    overflow-y: auto;
}

.report-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    padding: 8px 12px 4px;
    letter-spacing: 1px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 6px;
    margin: 2px 6px;
    transition: all 0.15s;
    border: 1px solid transparent;
}

    .report-item:hover {
        background: #f0f4ff;
        border-color: #d0d8ff;
    }

    .report-item.active {
        background: #e8f0fe;
        border-color: #4361ee;
        color: #4361ee;
    }

    .report-item .rep-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0;
    }

.rep-icon-attendance {
    background: #e8f0fe;
    color: #4361ee;
}

.rep-icon-leaves {
    background: #e8f8ee;
    color: #2a9d5c;
}

.rep-icon-general {
    background: #fef3e8;
    color: #e8a020;
}

.report-item .rep-name {
    font-size: 0.85rem;
    line-height: 1.3;
}

/* ── Right panel ── */
.filter-panel {
    min-height: 300px;
}

.filter-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.period-type-btn {
    border-radius: 6px;
}

/* ── Empty state ── */
#reportEmpty {
    padding: 60px 20px;
    text-align: center;
    color: #aaa;
}

.ta-toolbar .btn {
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
}

/* ── SS Home cards ── */
.ss-welcome {
    background: linear-gradient(135deg,#4361ee,#3a0ca3);
    color: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 24px;
}

.ss-card {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s;
    text-decoration: none;
    display: block;
    background: #fff; /* ← force white background */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* ← subtle shadow */
    min-height:120px;
}

    .ss-card:hover {
        box-shadow: 0 6px 20px rgba(67,97,238,.18);
        transform: translateY(-3px);
        border-color: #4361ee; /* ← highlight border on hover */
    }

    .ss-card i {
        font-size: 2.2rem;
        margin-bottom: 10px;
        display: block;
    }

.ss-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #2d2d2d; /* ← darker, more visible */
}

.ss-card-sub {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
    display:none;
}

.n-empname {
    color: #4051a8;
    font-size: 0.8rem;
}
.n-username {
    color: #5368d3;
    font-size: 0.7rem;
}

#monitorTable th, #monitorTable td {
    font-size: 0.82rem;
    padding: 4px 8px;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

#monitorTable thead th {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

#monitorTable td:nth-child(3) {
    text-align: start;
}

.monitor-wrap {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.badge-in {
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    padding: 2px 8px;
}

.badge-out {
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    padding: 2px 8px;
}

.badge-ovin {
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    padding: 2px 8px;
}

.badge-other {
    background: #e2e3e5;
    color: #383d41;
    border-radius: 4px;
    padding: 2px 8px;
}

.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    margin-inline-end: 6px;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.counter-badge {
    font-size: 0.75rem;
    background: #e9ecef;
    border-radius: 20px;
    padding: 2px 10px;
    color: #555;
}

#lastRefresh {
    font-size: 0.75rem;
    color: #888;
}

#autoCountdown {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 600;
}

.new-row {
    animation: fadeNew 2s ease-out;
}

@keyframes fadeNew {
    0% {
        background-color: #fff3cd;
    }

    100% {
        background-color: transparent;
    }
}

tbody tr:hover td {
    background-color: #f2f3f5;
}

.select2-sm .select2-selection {
    font-size: 0.775rem !important;
    min-height: 31px !important;
}

.select2-sm .select2-selection__rendered {
    font-size: 0.775rem !important;
    line-height: 37px !important;
    color:#22a168 !important;
}

/* ── Horizontal view ── */
#viewHorizontal {
    overflow-x: auto;
}

    #viewHorizontal table {
        font-size: 0.72rem;
        border-collapse: separate;
        border-spacing: 0;
    }

    #viewHorizontal td, #viewHorizontal th {
        font-size: 0.64rem;
        padding: 4px 6px;
        vertical-align: middle;
        width: 75px !important;
        max-width: 75px !important;
        white-space: break-spaces;
        overflow: hidden;
        text-overflow: clip;
        border: 1px solid #dee2e6;
    }

    /* Collapse borders manually */
    #viewHorizontal tr td + td,
    #viewHorizontal tr th + th {
        border-left: none;
    }

    #viewHorizontal tr + tr td,
    #viewHorizontal tr + tr th {
        border-top: none;
    }

    #viewHorizontal .horiz-label {
        position: sticky;
        left: 0;
        background: #f8f9fa;
        font-weight: 600;
        z-index: 2;
        min-width: 90px;
        text-align: start;
        box-shadow: 4px 0 6px -2px rgba(0,0,0,0.12);
    }

    /* Date number header cells */
    #viewHorizontal .horiz-date-header {
        background: #4e73df;
        color: #fff;
        font-weight: 700;
        font-size: 0.85rem;
        letter-spacing: 0.03em;
    }

    /* Day name row */
    #viewHorizontal .horiz-day-cell {
        background: #eef0fb;
        color: #4e73df;
        font-weight: 600;
        font-size: 0.7rem;
    }

    /* Weekend date + day override */
    #viewHorizontal .horiz-date-header.ta-weekend {
        background: #4e73df !important;
        color: #fff !important;
    }

    #viewHorizontal .horiz-day-cell.ta-weekend {
        background: #eef0fb !important;
        color: #5075df !important;
    }

.horiz-label-date {
    font-weight: 600;
    background: #4e73df !important;
    color: #fff !important;
}

.horiz-label-day {
    font-weight: 600;
    background: #eef0fb !important;
    color: #5075df !important;
}

/* ── DataTable Pagination ── */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .paginate_button.page-item a.page-link {
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 5px 4px 4px 4px;
    color: #4e73df;
    border: 1px solid #dee2e6;
    border-radius: 6px !important;
    margin: 0 0px;
    background: #fff;
}

    div.dataTables_wrapper div.dataTables_paginate ul.pagination .paginate_button.page-item a.page-link:hover {
        background: #eef0fb;
        color: #4e73df;
        border-color: #4e73df;
    }

div.dataTables_wrapper div.dataTables_paginate ul.pagination .paginate_button.page-item.active a.page-link {
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 4px 4px 6px 4px !important;
    background: #4e73df;
    color: #fff !important;
    border-color: #4e73df;
    font-weight: 600;
    border-radius: 6px !important;
    height: 27px !important;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination .paginate_button.page-item.disabled a.page-link {
    color: #aaa;
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Tighten the pagination container */
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    gap: 3px;
    flex-wrap: wrap;
}
    div.dataTables_wrapper div.dataTables_paginate ul.pagination .paginate_button.page-item {
        background: transparent !important;
        border: none !important;
    }


#photoModal .modal-dialog {
    max-width: 320px;
}
#photoModal .modal-body {
    padding: 8px;
}
#photoModalImg {
    max-width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 6px;
}