/* style.css - Yamato Printing Attendance System Premium UI */
@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #172554;
    --primary-subtle: #eff6ff;
    --secondary: #1d4aea;

    --success: #10b981;
    --success-subtle: #ecfdf5;
    --warning: #f59e0b;
    --warning-subtle: #fffbeb;
    --danger: #ef4444;
    --danger-subtle: #fef2f2;
    --info: #0284c7;
    --info-subtle: #f0f9ff;
    --purple: #8b5cf6;
    --purple-subtle: #f5f3ff;

    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sub: #94a3b8;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 30px -10px rgb(30 58 138 / 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-base: 'Plus Jakarta Sans', 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 50;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
}

.brand-wrapper {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    letter-spacing: -1px;
}

.brand-info {
    overflow: hidden;
}

.brand-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.brand-subtitle {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    font-family: 'Kantumruy Pro', sans-serif;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin: 16px 12px 8px;
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.6);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Main Content Area */
.app-main {
    margin-left: 270px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.app-topbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-date {
    font-size: 13px;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-clock-badge {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fff;
    padding: 8px 16px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

/* Page Body */
.page-body {
    padding: 32px;
    flex: 1;
}

/* Alerts / Flash Messages */
.flash-alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.flash-alert.success {
    background-color: var(--success-subtle);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-alert.error {
    background-color: var(--danger-subtle);
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

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

/* Metric Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.metric-card.card-blue::after {
    background: #3b82f6;
}

.metric-card.card-green::after {
    background: #10b981;
}

.metric-card.card-amber::after {
    background: #f59e0b;
}

.metric-card.card-purple::after {
    background: #8b5cf6;
}

.metric-card.card-red::after {
    background: #ef4444;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.metric-sub {
    font-size: 11px;
    color: var(--text-sub);
    margin-top: 4px;
}

.metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.icon-green {
    background: #ecfdf5;
    color: #059669;
}

.icon-amber {
    background: #fffbeb;
    color: #d97706;
}

.icon-purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.icon-red {
    background: #fef2f2;
    color: #dc2626;
}

/* Content Cards & Sections */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
    overflow: hidden;
}

.card-header-bar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: #fafbfc;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

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

.btn-outline {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-excel {
    background: linear-gradient(135deg, #107c41, #0c5e31);
    color: #fff;
    box-shadow: 0 4px 10px rgba(16, 124, 65, 0.25);
}

.btn-excel:hover {
    background: linear-gradient(135deg, #0d6b38, #094725);
    box-shadow: 0 6px 14px rgba(16, 124, 65, 0.35);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

/* Filter Bar */
.filter-bar {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.filter-input {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    font-size: 13.5px;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-box {
    min-width: 240px;
    padding-left: 36px;
}

.search-icon-inside {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Modern Data Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.yamato-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 13.5px;
}

.yamato-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.yamato-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
}

.yamato-table tr:last-child td {
    border-bottom: none;
}

.yamato-table tbody tr {
    transition: background-color 0.15s ease;
}

.yamato-table tbody tr:hover {
    background-color: #f8faff;
}

/* Table Employee Profile Cell */
.emp-profile-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emp-name-kh {
    font-weight: 700;
    color: var(--text-main);
    font-size: 14px;
}

.emp-name-en {
    font-size: 12px;
    color: var(--text-muted);
}

.emp-id-badge {
    font-family: monospace;
    font-weight: 700;
    color: #1e3a8a;
    background: #eff6ff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #dbeafe;
    display: inline-block;
}

/* National ID (អត្តសញ្ញាណប័ណ្ណ) Styling */
.national-id-badge {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 600;
    color: #0f766e;
    background: #f0fdfa;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    border: 1px solid #ccfbf1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 1px 2px rgba(15, 118, 110, 0.05);
}

.national-id-badge:hover {
    background: #ccfbf1;
    color: #115e59;
    border-color: #99f6e4;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.15);
}

.national-id-badge svg {
    color: #14b8a6;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.national-id-badge:active svg {
    transform: scale(1.15);
}

.national-id-badge.copied {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

.nid-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nid-input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.nid-input-field {
    padding-left: 38px !important;
    padding-right: 75px !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 13.5px !important;
}

.nid-input-status {
    position: absolute;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nid-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* NSSF (ប.ស.ស) Styling */
.nssf-badge {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 600;
    color: #4338ca;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    border: 1px solid #c7d2fe;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 1px 2px rgba(67, 56, 202, 0.05);
}

.nssf-badge:hover {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.18);
}

.nssf-badge svg {
    color: #6366f1;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nssf-badge:active svg {
    transform: scale(1.15);
}

.nssf-badge.copied {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

/* Phone (លេខទូរស័ព្ទ) Badge Styling */
.phone-badge {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 600;
    color: #0369a1;
    background: #f0f9ff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 1px 2px rgba(3, 105, 161, 0.05);
}

.phone-badge:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.18);
}

.phone-badge svg {
    color: #0284c7;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.phone-badge:active svg {
    transform: scale(1.15);
}

.phone-badge.copied {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-present {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-present .badge-dot {
    background-color: #10b981;
}

.badge-late {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-late .badge-dot {
    background-color: #f59e0b;
}

.badge-early {
    background-color: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.badge-early .badge-dot {
    background-color: #f43f5e;
}

.badge-leave {
    background-color: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.badge-leave .badge-dot {
    background-color: #6366f1;
}

.badge-absent {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-absent .badge-dot {
    background-color: #ef4444;
}

.badge-pending {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-pending .badge-dot {
    background-color: #94a3b8;
}

/* Time badges */
.time-stamp {
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    display: inline-block;
}

.time-stamp.in {
    color: #059669;
    background: #ecfdf5;
    border-color: #d1fae5;
}

.time-stamp.out {
    color: #0284c7;
    background: #f0f9ff;
    border-color: #e0f2fe;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 620px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-box form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
}

.btn-close:hover {
    color: var(--text-main);
    background: #e2e8f0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    flex-shrink: 0;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.15s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* POS Kiosk Screen Styles */
.pos-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.pos-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    border-radius: var(--radius-xl);
    padding: 36px;
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-xl);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.pos-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.pos-clock-time {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    font-family: monospace;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    margin-bottom: 6px;
}

.pos-clock-date {
    font-size: 16px;
    color: #93c5fd;
    font-weight: 500;
}

.pos-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.pos-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.btn-pos-punch {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
}

.btn-pos-punch:hover {
    transform: translateY(-4px);
}

.btn-pos-punch:active {
    transform: scale(0.98);
}

.btn-pos-checkin {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-pos-checkout {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.3);
}

.pos-punch-sub {
    font-size: 13px;
    opacity: 0.9;
    font-weight: normal;
}

/* Quick Employee Card in POS */
.selected-emp-preview {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    margin-top: 18px;
}

.selected-emp-preview.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

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

/* Print Styles */
@media print {

    .app-sidebar,
    .app-topbar,
    .filter-bar,
    .card-actions,
    .btn,
    .modal-overlay {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .page-body {
        padding: 0 !important;
    }

    .content-card {
        border: none !important;
        box-shadow: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .print-only-header {
        display: block !important;
        margin-bottom: 20px;
        text-align: center;
    }
}

.print-only-header {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .app-topbar {
        padding: 14px 18px;
    }

    .page-body {
        padding: 18px;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .pos-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* User Profile & Auth Elements */
.sidebar-user-card {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-mini {
    flex-shrink: 0;
}

.user-info-mini {
    flex: 1;
    min-width: 0;
}

.user-name-mini {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge-mini {
    font-size: 10.5px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.btn-logout-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-logout-icon:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.topbar-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 6px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
}

.user-pill-avatar {
    display: flex;
    align-items: center;
}

.user-pill-name {
    font-weight: 600;
    color: var(--text-main);
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-pill-role {
    font-size: 10px;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.topbar-btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.15s;
    margin-left: 2px;
}

.topbar-btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ==============================================================================
   OVERTIME (OT) SYSTEM STYLES - STANDARDIZED YAMATO SPEC
   ============================================================================== */
.metric-card.card-orange::after {
    background: linear-gradient(180deg, #f97316, #ea580c);
}

.icon-orange {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
}

.badge-ot {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    border: 1px solid #fed7aa;
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.08);
    white-space: nowrap;
}

.badge-ot svg {
    color: #ea580c;
    flex-shrink: 0;
}

.badge-ot-none {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

/* OT Stat Banner Bar */
.ot-summary-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.ot-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ot-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ot-summary-data {
    display: flex;
    flex-direction: column;
}

.ot-summary-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.ot-summary-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}