@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-v23-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-v23-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

html,
body {
font-family: 'Poppins', sans-serif;
background: #f9f9f9;
overscroll-behavior: none;
color: #081c3e;
touch-action: manipulation;
}


/**** RFID ****/

:root {
    --rfid-primary: #3b82f6;
    --rfid-primary-dark: #1d4ed8;
    --rfid-soft: #f4f8ff;
    --rfid-border: #e9eef6;
    --rfid-text: #0f172a;
    --rfid-muted: #64748b;
    --rfid-success: #16a34a;
    --rfid-danger: #dc2626;
    --rfid-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    --rfid-radius: 24px;
}

.rfid-kiosk-card,
.rfid-log-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--rfid-border);
    border-radius: var(--rfid-radius);
    box-shadow: var(--rfid-shadow);
    overflow: hidden;
}

.rfid-kiosk-card {
    padding: 30px;
    min-height: 100%;
}

.rfid-log-card {
    padding: 24px;
    height: 100%;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rfid-primary);
    margin-bottom: 10px;
}

.rfid-topbar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 26px;
}

.rfid-topbar h3 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    color: var(--rfid-text);
}

.rfid-topbar p {
    margin: 0;
    color: var(--rfid-muted);
    font-size: 15px;
}

.rfid-clock-card {
    min-width: 240px;
    border-radius: 22px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #FFF, #FFF);
    color: #000;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.clock-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .7;
    margin-bottom: 8px;
}

.clock-time {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}

.clock-date {
    font-size: 14px;
    opacity: .85;
}

.rfid-scan-panel {
    position: relative;
    border-radius: 28px;
    padding: 44px 24px 28px;
    background:
        radial-gradient(circle at top center, rgba(59,130,246,.16) 0%, rgba(59,130,246,0) 40%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
    border: 1px solid #e4edf9;
    text-align: center;
    overflow: hidden;
}

.rfid-scan-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    background: rgba(128, 70, 49, 0.14);
    filter: blur(60px);
    border-radius: 50%;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.rfid-scan-icon {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #804631, #804631);
    color: #fff;
    font-size: 38px;
}

.rfid-scan-text h1 {
    position: relative;
    z-index: 2;
    margin: 0 0 10px;
    font-size: 42px;
    font-weight: 900;
    color: var(--rfid-text);
}

.rfid-scan-text p {
    position: relative;
    z-index: 2;
    margin: 0 0 26px;
    font-size: 16px;
    color: var(--rfid-muted);
}

.rfid-input-area {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: 0 auto 18px;
}

.rfid-input {
    height: 64px !important;
    border-radius: 18px !important;
    border: 1px solid #dbe7f5 !important;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    background: rgba(255,255,255,.88) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.rfid-input:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 4px rgba(59,130,246,.12) !important;
}

.rfid-helper-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 24px;
}

.helper-chip {
    background: rgba(255,255,255,.75);
    border: 1px solid #e6edf7;
    color: #334155;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.rfid-submit-btn {
    position: relative;
    z-index: 2;
    min-width: 250px;
    border: 0;
    border-radius: 16px;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #804631, #804631);
    box-shadow: 0 14px 28px rgba(59,130,246,.25);
    transition: all .2s ease;
}

.rfid-submit-btn:hover {
    transform: translateY(-1px);
    color: #fff;
}

.rfid-response-box {
    margin-top: 18px;
}

.rfid-status-card {
    border-radius: 20px;
    padding: 20px 22px;
    color: #fff;
    box-shadow: 0 12px 26px rgba(15,23,42,.12);
}

.rfid-status-card.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.rfid-status-card.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.rfid-status-card h4 {
    margin: 0 0 6px;
    font-weight: 800;
    font-size: 22px;
}

.rfid-status-card p {
    margin: 0;
    opacity: .96;
    font-size: 15px;
}

.rfid-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.rfid-log-header h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--rfid-text);
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf3;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.live-pill span {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.attendance-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.attendance-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 16px;
    border: 1px solid #edf2f8;
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    border-radius: 18px;
    transition: .2s ease;
}

.attendance-log-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15,23,42,.05);
}

.attendance-log-item .name {
    font-weight: 800;
    color: var(--rfid-text);
    margin-bottom: 4px;
}

.attendance-log-item .meta {
    font-size: 13px;
    color: var(--rfid-muted);
}

.log-badge {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.log-badge.time-in {
    background: #ecfdf3;
    color: #15803d;
}

.log-badge.time-out {
    background: #fff1f2;
    color: #be123c;
}

.empty-state {
    color: var(--rfid-muted);
    padding: 18px 0;
    text-align: center;
}

@media (max-width: 991px) {
    .rfid-topbar {
        flex-direction: column;
    }

    .rfid-clock-card {
        min-width: 100%;
    }

    .rfid-scan-text h1 {
        font-size: 34px;
    }
}

@media (max-width: 575px) {
    .rfid-kiosk-card,
    .rfid-log-card {
        padding: 18px;
        border-radius: 18px;
    }

    .rfid-scan-panel {
        padding: 30px 16px 22px;
    }

    .rfid-scan-text h1 {
        font-size: 28px;
    }

    .clock-time {
        font-size: 24px;
    }

    .rfid-submit-btn {
        width: 100%;
        min-width: 100%;
    }
}

.team-profile-card,
.team-edit-card {
    background: #fff;
    border: 1px solid #edf1f6;
    border-radius: 26px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.team-profile-card {
    position: sticky;
    top: 20px;
}

.team-cover {
    height: 110px;
    background: linear-gradient(135deg, #804631, #9c5a3e, #b06b4a);
}

.team-profile-content {
    padding: 0 24px 24px;
    text-align: center;
    margin-top: -52px;
}

.team-avatar-wrap {
    margin-bottom: 16px;
}

.team-avatar-img,
.team-avatar-fallback {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-avatar-fallback {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 30px;
    font-weight: 800;
}

.team-profile-content h3 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.team-role {
    color: #64748b;
    margin-bottom: 16px;
}

.team-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.team-badge {
    background: #eff6ff;
    color: #334155;
    border: 1px solid #dbeafe;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.team-badge.status {
    background: #f8fafc;
    color: #334155;
    border-color: #e2e8f0;
}

.team-stats {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.team-stat-box {
    text-align: left;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 16px;
}

.team-stat-box span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    margin-bottom: 4px;
}

.team-stat-box strong {
    color: #0f172a;
    font-size: 15px;
}

.team-edit-card {
    padding: 28px;
}

.edit-section + .edit-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #eef2f7;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 18px;
}

.section-title i {
    color: #804631;
}

.team-edit-card .form-control,
.team-edit-card .form-select {
    border-radius: 14px;
    min-height: 48px;
    border-color: #dbe3ee;
    box-shadow: none;
}

.team-edit-card textarea.form-control {
    min-height: auto;
}

.team-edit-card .form-control:focus,
.team-edit-card .form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.team-edit-card .form-label {
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.edit-footer {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.system-note {
    color: #64748b;
    font-size: 14px;
}

.save-btn {
    border-radius: 14px;
    padding: 12px 22px;
    font-weight: 700;
    background-color: #2b602b !important;
    border: 1px solid #2b602b;
}

@media (max-width: 991px) {
    .team-profile-card {
        position: relative;
        top: 0;
    }
}

.admin-page .navigation-title {
  font-size: 14px;
  opacity: 0.6;
  font-weight: 500;
  margin-bottom: 10px;
}

.management-switcher {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.management-switcher .switch-btn {
    min-width: 180px;
    border: 1px solid #284d7a;
    background: #fff;
    color: #284d7a;
    border-radius: 6px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.management-switcher .switch-btn:hover {
    background: #f5f8fc;
}

.management-switcher .switch-btn.active {
    background: #4cc38a;
    border-color: #4cc38a;
    color: #fff;
}

.tab-pane-custom {
    display: none;
}

.tab-pane-custom.active {
    display: block;
}

.management-switcher {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.management-switcher .switch-btn {
    min-width: 180px;
    border: 1px solid #804631;
    background: #fff;
    color: #804631;
    border-radius: 6px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.management-switcher .switch-btn:hover {
    background: #f5f8fc;
}

.management-switcher .switch-btn.active {
    background: #804631;
    border-color: #804631;
    color: #fff;
}

.tab-pane-custom {
    display: none;
}

.tab-pane-custom.active {
    display: block;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.table-icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    color: #495057;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.table-icon-btn:hover {
    transform: translateY(-1px);
    background: #f8f9fa;
    color: #212529;
}

.table-icon-btn i {
    font-size: 15px;
    line-height: 1;
}

.table-icon-btn.delete {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.18);
}

.table-icon-btn.delete:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #bb2d3b;
}

.employee-account-toggle-wrap .employee-status-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 70px;
}

.employee-status-label.active {
    color: #198754; /* green */
}

.employee-status-label.disabled {
    color: #dc3545; /* red */
}

.form-check-input {
    width: 2em !important;
    height: 1em !important;
    border-radius: 2em !important;
    background-color: #dee2e6;
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border: #0d6efd;
}

.attendance-profile-card,
.attendance-tabs-card {
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(8, 28, 62, 0.05);
    overflow: hidden;
}

.attendance-profile-card {
    position: sticky;
    top: 20px;
}

.attendance-cover {
    height: 96px;
    background: linear-gradient(135deg, #804631, #9c5a3e, #b06b4a);
}

.attendance-profile-content {
    padding: 0 22px 22px;
    text-align: center;
    margin-top: -46px;
}

.attendance-avatar-wrap {
    margin-bottom: 14px;
}

.attendance-avatar-img,
.attendance-avatar-fallback {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(128, 70, 49, 0.15);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attendance-avatar-fallback {
    background: linear-gradient(135deg, #804631, #9c5a3e);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.attendance-profile-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #081c3e;
    margin-bottom: 4px;
}

.attendance-role {
    color: #6c757d;
    margin-bottom: 14px;
    font-size: 14px;
}

.attendance-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.attendance-badge {
    background: #f8f5f2;
    color: #804631;
    border: 1px solid #eadfd8;
    padding: 7px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.attendance-badge.status {
    background: #f7f7f7;
    color: #495057;
    border-color: #e6e6e6;
}

.attendance-stats {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.attendance-stat-box {
    text-align: left;
    padding: 13px 15px;
    background: #fafafa;
    border: 1px solid #edf0f3;
    border-radius: 14px;
}

.attendance-stat-box span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7b8794;
    margin-bottom: 4px;
}

.attendance-stat-box strong {
    color: #081c3e;
    font-size: 14px;
    font-weight: 700;
}

.attendance-tabs-card {
    padding: 0;
    background: #fff;
}

.attendance-tabs-shell {
    background: #f4f4f5;
}

.attendance-tabs-nav {
    display: flex;
    align-items: flex-end;
    gap: 0;
    white-space: nowrap;
}

.attendance-tab-link {
    display: inline-block;
    padding: 14px 18px 12px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    position: relative;
    top: 1px;
    transition: all 0.2s ease;
}

.attendance-tab-link:hover {
    color: #804631;
    text-decoration: none;
}

.attendance-tab-link.active {
    background: #804631;
    color: #fff;
    font-weight: 700;
}

.attendance-tab-body {
    padding: 22px 22px 26px;
}

.attendance-filter-row {
    margin-bottom: 22px;
}

.attendance-filter-row .form-label {
    font-weight: 600;
    color: #081c3e;
    margin-bottom: 7px;
    font-size: 14px;
}

.attendance-filter-row .form-control {
    border-radius: 10px;
    min-height: 46px;
    border-color: #d8dee6;
    box-shadow: none;
}

.attendance-filter-row .form-control:focus {
    border-color: #804631;
    box-shadow: 0 0 0 3px rgba(128, 70, 49, 0.08);
}

.attendance-filter-row .btn-primary {
    background: #2b602b00;
    border-color: #804631;
    color: #804631;
    border-radius: 10px;
    min-height: 46px;
    font-weight: 600;
}

.attendance-tab-content .tab-loading {
    color: #6c757d;
    text-align: center;
    padding: 40px 0;
}

.summary-cards-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.summary-card {
    background: #fafafa;
    border: 1px solid #edf0f3;
    border-radius: 14px;
    padding: 16px;
}

.summary-card span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7b8794;
    font-weight: 700;
    margin-bottom: 6px;
}

.summary-card strong {
    font-size: 22px;
    font-weight: 700;
    color: #081c3e;
}

.attendance-record-table-wrap {
    overflow-x: auto;
}

.attendance-record-table {
    width: 100%;
    border-collapse: collapse;
}

.attendance-record-table th {
    font-size: 13px;
    color: #6c757d;
    padding: 12px 14px;
    font-weight: 700;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}

.attendance-record-table td {
    padding: 14px;
    font-weight: 500;
    color: #081c3e;
    border-bottom: 1px solid #f0f2f5;
    background: #fff;
}

.status-badge {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.present {
    background: #ecfdf3;
    color: #15803d;
}

.status-badge.incomplete {
    background: #fff7ed;
    color: #c2410c;
}

.placeholder-panel {
    background: #fafafa;
    border: 1px solid #edf0f3;
    border-radius: 16px;
    padding: 22px;
}

.placeholder-panel h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #081c3e;
}

.placeholder-panel p {
    color: #6c757d;
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .attendance-profile-card {
        position: relative;
        top: 0;
    }

    .summary-cards-row {
        grid-template-columns: 1fr;
    }
}

.dataTables_filter {
    width: 100%;
    margin-bottom: 16px;
}

.dataTables_filter label {
    width: 100%;
    display: flex;
}

.dataTables_filter input {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #d9dee6;
    font-size: 14px;
}

/** Payroll **/

/* Tabs button override */
.attendance-tabs-shell .btn-primary {
    background: transparent; /* fixed: rgba(128,70,49,0) */
    border-color: #2b602b;
    color: #2b602b;
    border-radius: 10px;
    min-height: 40px;
    font-weight: 600;
    text-align: center;
    transition: 0.2s ease;
}

.attendance-tabs-shell .btn-primary:hover {
    background: #2b602b;
    color: #fff;
}

/* Card wrapper */
.payroll-form-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* Header */
.payroll-header {
    background: #f8fafc;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eef2f6;
}

/* Left section */
.payroll-header .left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #eef2f7;
    color: #001b4f;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.back-btn:hover {
    background: #e2e8f0;
}

/* Title */
.title-group h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.title-group p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Right button */
.payroll-header .right .btn {
    border-radius: 8px;
    padding: 6px 14px;
    background-color: #804631;
    border: 1px solid #804631;
    font-weight: 600;
    transition: 0.2s ease;
}

.payroll-header .right .btn:hover {
    background-color: #6b3a2c;
    border-color: #6b3a2c;
}