/* Time Clock Frontend Styles */
.tc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
    max-width: 1080px;
    margin: 0 auto;
}

.tc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.tc-card+.tc-card {
    margin-top: 16px;
}

.tc-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #111827;
}

/* Greeting */
.tc-greeting {
    margin: 8px 0 20px;
}

.tc-greeting h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #111827;
}

.tc-greeting p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Timer Card */
.tc-timer-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.tc-timer-display {
    text-align: center;
    padding: 12px 8px 4px;
}

.tc-timer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tc-timer-display .tc-timer-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.tc-timer-display .tc-timer-value {
    font-size: 56px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #111827;
    letter-spacing: -1px;
    margin: 10px 0 14px;
}

.tc-timer-display.active .tc-timer-value {
    color: #2563eb;
}

.tc-timer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: #6b7280;
    font-size: 13px;
}

/* Pulse Dot */
.tc-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    display: inline-block;
}

.tc-pulse-dot.on {
    background: #22c55e;
    animation: tc-pulse 1.6s infinite;
}

@keyframes tc-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Controls */
.tc-controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.tc-controls-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.tc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 100%;
}

.tc-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.tc-select,
.tc-input {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: #1f2937;
}

.tc-select:focus,
.tc-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Track hint */
.tc-track-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
}

/* Buttons */
.tc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.tc-btn-primary {
    background: #111827;
    color: #fff;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
}

.tc-btn-primary:hover {
    background: #374151;
}

.tc-btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
}

.tc-btn-danger:hover {
    background: #b91c1c;
}

.tc-btn-outline {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.tc-btn-outline:hover {
    background: #f9fafb;
}

.tc-btn-block {
    width: 100%;
    justify-content: center;
}

.tc-btn-lg {
    padding: 14px 36px;
    font-size: 15px;
    border-radius: 12px;
}

.tc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status Badges */
.tc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.tc-badge-success {
    background: #d1fae5;
    color: #059669;
}

.tc-badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.tc-badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.tc-badge-info {
    background: #dbeafe;
    color: #2563eb;
}

.tc-badge-muted {
    background: #f3f4f6;
    color: #6b7280;
}

/* Alerts */
.tc-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.tc-alert-warning {
    background: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.tc-alert-danger {
    background: #fee2e2;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.tc-alert-success {
    background: #d1fae5;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.tc-alert-info {
    background: #dbeafe;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Table */
.tc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tc-table thead th {
    text-align: left;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tc-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.tc-table tbody tr:hover {
    background: #f9fafb;
}

.tc-table tbody tr.flagged {
    background: rgba(254, 226, 226, 0.3);
}

.tc-table tbody tr.at-risk {
    background: rgba(254, 226, 226, 0.5);
}

.tc-table-scroll {
    overflow-x: auto;
}

.tc-empty {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
}

/* Stats Grid */
.tc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tc-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.tc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

.tc-stat-card .tc-stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 8px;
}

.tc-stat-card .tc-stat-value {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.tc-stat-card .tc-stat-sublabel {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.tc-stat-card.tc-stat-accent-blue {
    border-top: 3px solid #2563eb;
    border-left: 1px solid #e5e7eb;
}

.tc-stat-card.tc-stat-accent-info {
    border-top: 3px solid #0ea5e9;
    border-left: 1px solid #e5e7eb;
}

.tc-stat-card.tc-stat-accent-green {
    border-top: 3px solid #059669;
    border-left: 1px solid #e5e7eb;
}

.tc-stat-card.tc-stat-accent-purple {
    border-top: 3px solid #7c3aed;
    border-left: 1px solid #e5e7eb;
}

.tc-stat-ic {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0.9;
}

.tc-ic-blue {
    color: #2563eb;
}

.tc-ic-info {
    color: #0ea5e9;
}

.tc-ic-green {
    color: #059669;
}

.tc-ic-purple {
    color: #7c3aed;
}

.tc-val-blue {
    color: #1e40af;
}

.tc-val-info {
    color: #0369a1;
}

.tc-val-green {
    color: #047857;
}

.tc-val-purple {
    color: #6d28d9;
}

/* Tracked Location address */
.tc-geo-address {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #047857;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin: 0 0 12px;
}

/* Progress Bar */
.tc-progress {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.tc-progress-lg {
    height: 8px;
    border-radius: 4px;
}

.tc-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.tc-progress-bar.success {
    background: #059669;
}

.tc-progress-bar.warning {
    background: #f59e0b;
}

.tc-progress-bar.danger {
    background: #dc2626;
}

/* Location Map */
.tc-map-card .tc-map {
    height: 320px;
    border-radius: 12px;
    z-index: 0;
}

.tc-map-note {
    color: #6b7280;
    font-size: 12px;
    margin: 10px 0 0;
}

/* Filters */
.tc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 16px;
}

.tc-filters input,
.tc-filters select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.tc-filters input:focus,
.tc-filters select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Kiosk */
.tc-kiosk {
    background: linear-gradient(160deg, #111827 0%, #1f2937 100%);
    color: #fff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 24px 48px rgba(17, 24, 39, 0.25);
}

.tc-kiosk .tc-kiosk-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tc-kiosk .tc-kiosk-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 24px;
}

.tc-kiosk .tc-pin-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.tc-kiosk .tc-pin-inputs input {
    width: 56px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.tc-kiosk .tc-pin-inputs input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Break / Resume + Auto clock-out countdown */
.tc-out-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.tc-break-ui {
    display: flex;
    justify-content: center;
}

#tc-break-btn {
    min-width: 150px;
}

#tc-break-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tc-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.tc-countdown-label {
    font-size: 12px;
    color: #ea580c;
}

.tc-pulse-dot.break {
    background: #f59e0b;
    animation: tc-pulse-break 1.6s infinite;
}

@keyframes tc-pulse-break {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.tc-timer-display.on-break .tc-timer-value {
    color: #d97706;
}

/* Responsive */
@media (max-width: 768px) {
    .tc-timer-display .tc-timer-value {
        font-size: 40px;
    }

    .tc-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tc-table {
        font-size: 13px;
    }

    .tc-table thead th,
    .tc-table tbody td {
        padding: 10px 12px;
    }
}

/* =========================================================================
   Bento student dashboard (mirrors sample-student-dashboard.php animations)
   ========================================================================= */
.tc-bento .tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Hand waving animation */
@keyframes tc-handWave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(16deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(16deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(12deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.animate-wave {
    display: inline-block;
    transform-origin: 75% 75%;
    animation: tc-handWave 2.4s ease-in-out infinite;
}

/* Warning chip glow & icon pulse */
@keyframes tc-alertGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.25);
        border-color: rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 12px 2px rgba(245, 158, 11, 0.35);
        border-color: rgba(245, 158, 11, 0.8);
    }
}

.tc-bento .animate-warning-chip {
    animation: tc-alertGlow 2s ease-in-out infinite;
}

@keyframes tc-subtleAlertPulse {

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

    50% {
        transform: scale(1.18);
        opacity: 0.85;
    }
}

.tc-bento .animate-alert-icon {
    animation: tc-subtleAlertPulse 1.8s ease-in-out infinite;
}

/* Luxury 360-degree continuous rotating border beam */
@keyframes tc-borderSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.tc-bento .animate-border-beam {
    animation: tc-borderSpin 8s linear infinite;
}

/* Shimmer skeleton */
@keyframes tc-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.tc-bento .skeleton-box {
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
}

.tc-bento .skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.45) 20%,
            rgba(255, 255, 255, 0.75) 60%,
            rgba(255, 255, 255, 0));
    animation: tc-shimmer 1.6s infinite;
    content: '';
}

/* Progress bar light stream */
@keyframes tc-progressLightSweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(250%);
    }
}

.tc-bento .animate-progress-stream {
    animation: tc-progressLightSweep 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom scrollbar for the filter popover */
.tc-bento .custom-scroll::-webkit-scrollbar {
    width: 5px;
}

.tc-bento .custom-scroll::-webkit-scrollbar-track {
    background: #f8fafc;
}

.tc-bento .custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

/* Leaflet container styling */
.tc-bento .leaflet-container {
    font-family: inherit;
    border-radius: 1rem;
}