/* Timesheet page enhancements */
.filters-card {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.filters-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-cta {
    display: flex;
    justify-content: flex-end;
}

.filter-chip {
    padding: 0.35rem 0.85rem;
    background: rgba(59, 130, 246, 0.12);
    color: #1e3a8a;
    border-radius: 999px;
    font-size: 0.85rem;
}

.timesheet-toolbar {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.grid-wrapper {
    margin-top: 1rem;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    width: 100%;
    max-width: 100%;
}

.grid-scroll {
    max-height: 60vh;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
    width: 100%;
    max-width: 100%;
}

.grid-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.grid-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.grid-scroll::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.35);
    border-radius: 999px;
}

.grid-wrapper .timesheet-grid {
    border-radius: 18px;
    overflow: hidden;
}

.timesheet-grid table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.timesheet-grid thead th {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(29, 78, 216, 0.22));
    color: #1e3a8a;
    font-weight: 700;
    padding: 0.9rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.timesheet-grid tbody td {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 1rem 1.15rem;
    color: #0f172a;
    font-size: 0.95rem;
}

.timesheet-grid tbody tr:nth-child(even) td {
    background: rgba(241, 245, 255, 0.82);
}

.timesheet-grid tbody tr:hover td {
    background: rgba(59, 130, 246, 0.12);
}

.timesheet-grid .quickgrid-pager,
.timesheet-grid footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
}

.timesheet-grid .quickgrid-pager button,
.timesheet-grid .quickgrid-pager select {
    border-radius: 999px;
    border: none;
    padding: 0.4rem 0.9rem;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
}

.timesheet-grid .quickgrid-pager button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.timesheet-grid .quickgrid-pager .current {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

/* Audit paginator (bottom bar) */
.audit-pager {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.95));
    color: #1f2937;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -6px 18px rgba(15,23,42,0.04);
}

/* layout sections */
.audit-pager .left, .audit-pager .center, .audit-pager .right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.audit-pager .center {
    gap: 1rem;
    justify-content: center;
    flex: 1;
}

.audit-pager .items-count {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}

/* Compact single-line paginator styling */
.audit-pager.compact {
    flex-wrap: nowrap;
    padding: 0.5rem 1rem;
}

.audit-pager.compact .right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.audit-pager.compact .quickgrid-pager {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.audit-pager.compact .rows-select {
    height: 34px;
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    background: rgba(37,99,235,0.06);
    border: none;
    color: #1d4ed8;
    font-weight: 600;
}

.audit-pager.compact .quickgrid-pager button,
.audit-pager.compact .quickgrid-pager select {
    border-radius: 8px;
    border: none;
    padding: 0.35rem 0.6rem;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 600;
    min-width: 34px;
}

.audit-pager.compact .quickgrid-pager button[disabled],
.audit-pager.compact .quickgrid-pager button[aria-disabled='true'] {
    opacity: 0.45;
    cursor: not-allowed;
}

.audit-pager.compact .quickgrid-pager .current {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
}

.audit-pager.compact .quickgrid-pager span,
.audit-pager.compact .quickgrid-pager .info {
    white-space: nowrap;
}

/* Ensure timesheet grid pager stays single-line */
.timesheet-grid .quickgrid-pager,
.timesheet-grid footer {
    flex-wrap: nowrap;
}

.audit-pager .rows-label {
    font-size: 0.85rem;
    color: #374151;
}

.audit-pager .rows-select {
    min-width: 80px;
    border-radius: 999px;
    border: none;
    padding: 0.38rem 0.85rem;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 600;
}

.audit-pager .rows-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.audit-pager .page-info {
    font-size: 0.85rem;
    color: #6b7280;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.03);
    border: 1px solid rgba(15,23,42,0.03);
}

.audit-pager .quickgrid-pager button,
.audit-pager .quickgrid-pager select {
    border-radius: 999px;
    border: none;
    padding: 0.4rem 0.9rem;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
}

.audit-pager .quickgrid-pager button[disabled],
.audit-pager .quickgrid-pager button[aria-disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
}

.audit-pager .quickgrid-pager .current {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 6px 18px rgba(37,99,235,0.12);
}

/* compact variant to match other pages */
.audit-pager.compact {
    justify-content: flex-end;
    padding: 0.45rem 0.6rem;
    background: transparent;
    border-top: 1px solid rgba(148, 163, 184, 0.06);
    box-shadow: none;
}

.audit-pager.compact .rows-select {
    min-width: 70px;
    padding: 0.28rem 0.6rem;
    font-size: 0.85rem;
}

.audit-pager.compact .quickgrid-pager button,
.audit-pager.compact .quickgrid-pager select {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

/* responsive */
@media (max-width: 640px) {
    .audit-pager { flex-wrap: wrap; gap: 0.5rem; }
    .audit-pager .center { order: 3; width: 100%; justify-content: space-between; }
    .audit-pager .left { flex: 1; }
    .audit-pager .right { order: 2; }
    .audit-pager.compact .right { width: 100%; justify-content: flex-end; }
}

.empty-state {
    margin-top: 1.25rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.empty-state h4 {
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: #6b7280;
}

.timesheet-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.primary-btn,
.submit-btn,
.secondary-btn,
.danger-btn,
.tiny-btn {
    border: none;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn,
.submit-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 0.6rem 1.6rem;
    min-width: 140px;
}

.primary-btn:disabled,
.submit-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled,
.tiny-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.secondary-btn {
    background: white !important;
    color: #1d4ed8 !important;
    padding: 0.6rem 1.5rem !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
    min-width: 140px;
}

.danger-btn {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    padding: 0.6rem 1.4rem;
}

@media (max-width: 1200px) {
    .grid-scroll {
        max-height: 55vh;
    }
}

@media (max-width: 768px) {
    .grid-scroll {
        max-height: 50vh;
    }

    .timesheet-grid table {
        min-width: 720px;
    }
}

.tiny-btn {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    border: none;
    min-width: 70px;
}

.tiny-btn.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.primary-btn:not(:disabled):hover,
.submit-btn:not(:disabled):hover,
.secondary-btn:not(:disabled):hover,
.danger-btn:not(:disabled):hover,
.tiny-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.dialog-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 0.75rem;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-backdrop {
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-card {
    background: #ffffff;
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #64748b;
    cursor: pointer;
}

.modal-body {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.input-control,
.input-control select,
.input-control input,
.input-control textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
    background: rgba(249, 250, 251, 0.85);
}

.input-control:focus,
.input-control select:focus,
.input-control input:focus,
.input-control textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-success {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
}

.tag-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}
/* Clock App Styles - Clockly Tracker Design - Mobile & Web Responsive */

/* Base Styles */
.clock-app {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Container for responsive layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Header Styles */
.header {
    padding: 1rem;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    background: inherit;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    font-size: 1.5rem;
    font-weight: bold;
    justify-self: start;
}

.logo {
    color: white;
}

.logo-accent {
    color: #fbbf24;
}

.user-profile {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    gap: 0.5rem;
    justify-self: center;
    min-width: fit-content;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.username {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.time-display {
    justify-self: end;
    text-align: right;
}

.time {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 0.25rem;
}

.period {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.search-section h2 {
    margin: 0 0 1.5rem 0;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
}

.search-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-input-group {
    display: flex;
    flex: 1;
    min-width: 250px;
    max-width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

.search-input:focus {
    border-color: #3b82f6;
}

.search-btn {
    padding: 0.75rem 1rem;
    background: #3b82f6;
    color: white;
    border: 2px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.search-btn:hover {
    background: #2563eb;
}

.add-employee-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    min-width: fit-content;
}

.add-employee-btn:hover {
    background: #059669;
}

/* Employee List */
.employee-list {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.greeting-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.greeting-section h2 {
    margin: 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}

.back-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.back-btn:hover {
    background: #4b5563;
}

/* Action Buttons - Responsive Grid */
.action-buttons,
.responsive-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.action-card {
    background: #4b5563;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border: none; /* Remove default button border */
    font-family: inherit; /* Inherit font from parent */
    font-size: inherit;
}

.action-card:disabled {
    pointer-events: none; /* Prevent all interactions when disabled */
}

.action-card.available:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.action-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-card.clock-in.available {
    background: #10b981;
}

.action-card.clock-out.available {
    background: #ef4444;
}

.action-card.break-toggle.available {
    background: #f59e0b;
}

.action-icon {
    margin-bottom: 1rem;
}

.action-card h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.action-underline {
    width: 60px;
    height: 4px;
    border-radius: 2px;
    margin: 1rem auto 0;
}

.action-underline.green {
    background: #10b981;
}

.action-underline.orange {
    background: #f59e0b;
}

.action-underline.red {
    background: #ef4444;
}

/* Status Information */
.status-info {
    background: white;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.status-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Hours Section */
.hours-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.hours-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.hours-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
}

.hours-label {
    color: #6b7280;
    font-size: 1rem;
}

.self-service {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #06b6d4;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 500;
    min-width: fit-content;
}

.self-service-icon {
    font-size: 1.25rem;
}

/* Employee Card Styles */
.employee-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: default;
    transition: all 0.2s;
    background: white;
}

/* Layout container for employee cards */
.employee-grid {
    display: flex;
    flex-direction: column;
}

.employee-card:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.employee-card:last-child {
    margin-bottom: 0;
}

.employee-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.employee-basic-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.employee-status-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}

.employee-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.employee-select-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 80px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.employee-name {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
}

.employee-info {
    flex: 1;
    min-width: 200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.employee-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.employee-info h4 {
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.employee-id {
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
}

.employee-status {
    text-align: right;
    min-width: fit-content;
}

.last-action {
    color: #6b7280;
    font-size: 0.8rem;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.status-badge.present {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.absent {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.loading {
    background: #f3f4f6;
    color: #6b7280;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.last-action {
    display: block;
    color: #6b7280;
    font-size: 0.8rem;
}

.no-results, .welcome-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.no-results h3, .welcome-message h3 {
    color: #374151;
    margin-bottom: 1rem;
}

/* Search result highlight styles */
.employee-grid.search-mode .employee-card.search-result {
    background: rgba(59, 130, 246, 0.08); /* light blue tint */
    border-color: #93c5fd;
}

.employee-grid.search-mode .employee-card.search-result:hover {
    background: rgba(59, 130, 246, 0.14);
}

.employee-card.selected {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
}

/* Visible error message fallback (if not using .alert) */
.error-message {
    background-color: #fff8e1;
    color: #92400e;
    border: 1px solid #f59e0b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Registration Styles */
.registration-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem auto;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.registration-card h2 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    text-align: center;
}

.subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-control:read-only {
    background-color: #f9fafb;
    color: #6b7280;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.alert h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.alert ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* Device Info */
.device-info {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.device-info h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 1rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 500;
    color: #374151;
    flex-shrink: 0;
}

.info-item .value {
    font-family: monospace;
    color: #6b7280;
    text-align: right;
    word-break: break-all;
    font-size: 0.9rem;
}

.text-muted {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.modal-content h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.5rem;
}

.modal-content p {
    margin: 0 0 2rem 0;
    color: #6b7280;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Warning Modal Styles */
.warning-modal {
    border-left: 4px solid #f59e0b;
    max-width: 500px;
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.warning-modal h3 {
    color: #d32f2f !important;
}

.warning-modal p {
    color: #374151 !important;
    text-align: left !important;
}

/* Button Styles */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    min-width: 120px;
    box-sizing: border-box;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* --- Enhanced dashboard visuals --- */
/* Employee list container as a white card */
.employee-grid {
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Softer blue highlight when searching */
.employee-grid.search-mode .employee-card.search-result {
    background: rgba(59, 130, 246, 0.06);
    border-color: #93c5fd;
}

.employee-grid.search-mode .employee-card.search-result:hover {
    background: rgba(59, 130, 246, 0.12);
}

/* Selected employee emphasized with green accent */
.employee-card.selected {
    border-color: #10b981;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.18);
}

/* Modern action buttons */
.action-section { 
    margin-top: 1.5rem; 
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.action-section .employee-info-display {
    margin-bottom: 2rem;
}

.action-section .employee-info-display h3 {
    color: #374151;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.action-section .status-display {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-section .status-info {
    color: #6b7280;
    font-size: 0.9rem;
}

.action-section .hours-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    text-align: center;
}

.action-section .hours-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.action-section .hours-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
}

.action-section .hours-label {
    color: #6b7280;
    font-size: 1rem;
}

.action-buttons { 
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.action-btn {
    border: none;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
}

.action-btn .action-content { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem;
    flex-direction: row;
    width: 100%;
}

.action-btn .action-icon {
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn .action-text {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
}

.action-btn.clock-in { background: #10b981; }
.action-btn.clock-in:hover { background: #0ea371; transform: translateY(-1px); }

.action-btn.break-toggle { background: #f59e0b; }
.action-btn.break-toggle:hover { background: #d98b09; transform: translateY(-1px); }

.action-btn.clock-out { background: #ef4444; }
.action-btn.clock-out:hover { background: #da3737; transform: translateY(-1px); }

.action-btn.disabled,
.action-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Responsive Design Breakpoints */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .main-content {
        padding: 2rem;
    }
    
    .search-section,
    .employee-list,
    .greeting-section {
        padding: 2rem;
    }
    
    .registration-card {
        padding: 3rem;
    }
}

/* Tablet (768px to 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    .action-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .action-btn {
        padding: 1.25rem 0.75rem;
        min-height: 70px;
    }
    
    .employee-info-row {
        gap: 0.75rem;
    }
    
    .employee-basic-info {
        gap: 0.75rem;
    }
    
    .employee-status-info {
        gap: 0.5rem;
    }
    
    .last-action {
        font-size: 0.75rem;
    }
    
    .hours-number {
        font-size: 2.2rem;
    }
}

/* Mobile Large (640px to 767px) */
@media (max-width: 767px) {
    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
    }
    
    .logo-section,
    .user-profile,
    .time-display {
        justify-self: center;
    }
    
    .user-profile {
        order: 1;
    }
    
    .time-display {
        order: 2;
    }
    
    .logo-section {
        order: 3;
        font-size: 1.25rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .action-btn {
        padding: 1.25rem;
        min-height: 60px;
    }
    
    .action-card {
        min-height: 140px;
        padding: 1.25rem;
    }
    
    .greeting-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .greeting-section h2 {
        min-width: auto;
        font-size: 1.1rem;
    }
    
    .hours-section {
        flex-direction: column;
        text-align: center;
    }
    
    .hours-number {
        font-size: 2rem;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-group {
        min-width: auto;
    }
    
    .employee-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
    }
    
    .employee-info-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        width: 100%;
    }
    
    .employee-basic-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .employee-status-info {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .employee-actions {
        align-self: stretch;
    }
    
    .employee-select-btn {
        width: 100%;
    }
    
    .last-action {
        white-space: normal;
    }
    
    .employee-status {
        text-align: left;
        align-self: stretch;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-item .value {
        text-align: left;
        word-break: break-word;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

/* Mobile Small (480px and below) */
@media (max-width: 480px) {
    .header {
        padding: 0.75rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .search-section,
    .employee-list,
    .greeting-section,
    .hours-section,
    .status-info,
    .action-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 1rem;
        min-height: 50px;
        font-size: 0.9rem;
    }
    
    .action-btn .action-content {
        gap: 0.5rem;
    }
    
    .registration-card {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .registration-card h2 {
        font-size: 1.5rem;
    }
    
    .time {
        font-size: 1.5rem;
    }
    
    .action-card {
        min-height: 120px;
        padding: 1rem;
    }
    
    .action-card h3 {
        font-size: 1rem;
    }
    
    .action-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .hours-number {
        font-size: 1.75rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-content h3 {
        font-size: 1.25rem;
    }
    
    .user-profile {
        padding: 0.4rem 0.8rem;
        min-width: auto;
    }
    
    .username {
        max-width: 100px;
        font-size: 0.9rem;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .search-section,
    .employee-list,
    .greeting-section {
        padding: 0.75rem;
        border-radius: 15px;
    }
    
    .registration-card {
        padding: 1rem;
        margin: 0.25rem;
    }
    
    .action-card {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .action-buttons,
    .responsive-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .action-card {
        min-height: 100px;
        padding: 1rem;
    }
    
    .action-card h3 {
        font-size: 0.9rem;
    }
    
    .action-icon {
        margin-bottom: 0.5rem;
    }
    
    .action-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* Print Styles */
@media print {
    .clock-app {
        background: white !important;
        color: black !important;
    }
    
    .header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #ccc;
    }
    
    .action-card {
        border: 2px solid #ccc !important;
        background: white !important;
        color: black !important;
    }
    
    .btn {
        border: 1px solid #ccc !important;
    }
}

/* Focus and Accessibility */
.btn:focus,
.search-input:focus,
.form-control:focus,
.employee-card:focus,
.action-card:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .action-card {
        border: 2px solid white;
    }
    
    .employee-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .action-card,
    .employee-card,
    .btn {
        transition: none;
    }
    
    .action-card.available:hover {
        transform: none;
    }
}

/* Device Users Page Styles */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.action-btn-small {
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s;
    background: #3b82f6;
    color: white;
}

.action-btn-small:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.action-btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn-small.success {
    background: #10b981;
}

.action-btn-small.warning {
    background: #f59e0b;
}

.action-btn-small.danger {
    background: #ef4444;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content:center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    background: #f9fafb;
    padding: 0.875rem;
    border-radius: 8px;
}

.info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: #111827;
}

.device-item {
    padding: 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .header-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .logo-section {
        justify-self: center;
    }
    
    .time-display {
        justify-self: center;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.75rem !important;
    }
    
    th, td {
        padding: 0.5rem !important;
    }
    
    .action-btn-small {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}
