/**
 * Employee Card System CSS - Secure & Modern Version
 * เวอร์ชัน: 2.0.0 - สไตล์ทันสมัยและปลอดภัย
 */

/* ========================================
   ตัวแปร CSS และการตั้งค่าพื้นฐาน
======================================== */
:root {
    /* สีหลัก */
    --emp-primary-color: #2563eb;
    --emp-primary-dark: #1d4ed8;
    --emp-primary-light: #dbeafe;
    --emp-secondary-color: #f59e0b;
    --emp-secondary-dark: #d97706;
    --emp-secondary-light: #fef3c7;
    
    /* สีระบบ */
    --emp-success-color: #10b981;
    --emp-warning-color: #f59e0b;
    --emp-error-color: #ef4444;
    --emp-info-color: #3b82f6;
    
    /* สีข้อความ */
    --emp-text-primary: #1f2937;
    --emp-text-secondary: #6b7280;
    --emp-text-muted: #9ca3af;
    
    /* สีพื้นหลัง */
    --emp-bg-primary: #ffffff;
    --emp-bg-secondary: #f9fafb;
    --emp-bg-muted: #f3f4f6;
    
    /* เส้นขอบ */
    --emp-border-color: #e5e7eb;
    --emp-border-light: #f3f4f6;
    
    /* เงา */
    --emp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --emp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --emp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --emp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* รัศมีมุม */
    --emp-border-radius: 8px;
    --emp-border-radius-lg: 12px;
    --emp-border-radius-xl: 16px;
    
    /* ระยะห่าง */
    --emp-spacing-xs: 4px;
    --emp-spacing-sm: 8px;
    --emp-spacing-md: 16px;
    --emp-spacing-lg: 24px;
    --emp-spacing-xl: 32px;
    --emp-spacing-2xl: 48px;
    
    /* การเปลี่ยนผ่าน */
    --emp-transition: all 0.2s ease-in-out;
    --emp-transition-slow: all 0.3s ease-in-out;
}

/* ========================================
   Reset และ Base Styles
======================================== */
.emp-card-system-ab34 {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--emp-text-primary);
    background-color: var(--emp-bg-secondary);
    border-radius: var(--emp-border-radius-lg);
    padding: var(--emp-spacing-xl);
    box-shadow: var(--emp-shadow-sm);
    max-width: 1200px;
    margin: 0 auto;
}

.emp-card-system-ab34 *,
.emp-card-system-ab34 *::before,
.emp-card-system-ab34 *::after {
    box-sizing: border-box;
}

/* ========================================
   Header Section
======================================== */
.emp-card-header-ab34 {
    text-align: center;
    margin-bottom: var(--emp-spacing-2xl);
    padding-bottom: var(--emp-spacing-lg);
    border-bottom: 2px solid var(--emp-border-light);
}

.emp-card-header-ab34 h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--emp-primary-color);
    margin: 0 0 var(--emp-spacing-sm);
    letter-spacing: -0.025em;
}

.emp-card-header-ab34 p {
    font-size: 1.125rem;
    color: var(--emp-text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ========================================
   Container Layout
======================================== */
.emp-card-container-ab34 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--emp-spacing-2xl);
    margin-top: var(--emp-spacing-xl);
}

@media (max-width: 1024px) {
    .emp-card-container-ab34 {
        grid-template-columns: 1fr;
        gap: var(--emp-spacing-xl);
    }
}

/* ========================================
   Control Panel
======================================== */
.emp-control-panel-ab34 {
    display: flex;
    flex-direction: column;
    gap: var(--emp-spacing-lg);
}

.emp-control-section-ab34 {
    background: var(--emp-bg-primary);
    border-radius: var(--emp-border-radius-lg);
    padding: var(--emp-spacing-lg);
    box-shadow: var(--emp-shadow-sm);
    border: 1px solid var(--emp-border-color);
}

.emp-control-section-ab34 h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--emp-text-primary);
    margin: 0 0 var(--emp-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--emp-spacing-sm);
}

.emp-control-section-ab34 h3::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: var(--emp-primary-color);
    border-radius: 2px;
}

/* ========================================
   Forms
======================================== */
.emp-form-group-ab34 {
    margin-bottom: var(--emp-spacing-md);
}

.emp-form-group-ab34 label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--emp-text-primary);
    margin-bottom: var(--emp-spacing-xs);
}

.emp-form-control-ab34 {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--emp-border-color);
    border-radius: var(--emp-border-radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--emp-text-primary);
    background-color: var(--emp-bg-primary);
    transition: var(--emp-transition);
    outline: none;
}

.emp-form-control-ab34:focus {
    border-color: var(--emp-primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.emp-form-control-ab34:disabled {
    background-color: var(--emp-bg-muted);
    color: var(--emp-text-muted);
    cursor: not-allowed;
}

/* ========================================
   Buttons
======================================== */
.emp-btn-group-ab34 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--emp-spacing-sm);
}

.emp-btn-primary-ab34,
.emp-btn-secondary-ab34,
.emp-btn-success-ab34,
.emp-btn-outline-ab34,
.emp-btn-camera-ab34 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--emp-spacing-xs);
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: var(--emp-border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--emp-transition);
    outline: none;
    min-height: 44px;
    white-space: nowrap;
}

.emp-btn-primary-ab34 {
    background-color: var(--emp-primary-color);
    color: white;
}

.emp-btn-primary-ab34:hover:not(:disabled) {
    background-color: var(--emp-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--emp-shadow-md);
}

.emp-btn-secondary-ab34 {
    background-color: var(--emp-secondary-color);
    color: white;
}

.emp-btn-secondary-ab34:hover:not(:disabled) {
    background-color: var(--emp-secondary-dark);
    transform: translateY(-1px);
    box-shadow: var(--emp-shadow-md);
}

.emp-btn-success-ab34 {
    background-color: var(--emp-success-color);
    color: white;
}

.emp-btn-success-ab34:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--emp-shadow-md);
}

.emp-btn-outline-ab34 {
    background-color: transparent;
    color: var(--emp-text-secondary);
    border-color: var(--emp-border-color);
}

.emp-btn-outline-ab34:hover:not(:disabled) {
    background-color: var(--emp-bg-muted);
    border-color: var(--emp-primary-color);
    color: var(--emp-primary-color);
}

.emp-btn-camera-ab34 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--emp-secondary-color);
    color: white;
    font-size: 1.5rem;
    padding: 0;
    box-shadow: var(--emp-shadow-lg);
}

.emp-btn-camera-ab34:hover:not(:disabled) {
    background-color: var(--emp-secondary-dark);
    transform: scale(1.05);
}

/* Disabled State */
.emp-btn-primary-ab34:disabled,
.emp-btn-secondary-ab34:disabled,
.emp-btn-success-ab34:disabled,
.emp-btn-outline-ab34:disabled,
.emp-btn-camera-ab34:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Search Section
======================================== */
.emp-search-section-ab34 {
    background: var(--emp-bg-primary);
    border-radius: var(--emp-border-radius-lg);
    padding: var(--emp-spacing-xl);
    box-shadow: var(--emp-shadow-sm);
    border: 1px solid var(--emp-border-color);
}

.emp-search-form-ab34 {
    display: flex;
    gap: 0;
    margin-bottom: var(--emp-spacing-lg);
}

.emp-search-form-ab34 input {
    flex: 1;
    border-radius: var(--emp-border-radius) 0 0 var(--emp-border-radius);
    border-right: none;
}

.emp-search-form-ab34 button {
    border-radius: 0 var(--emp-border-radius) var(--emp-border-radius) 0;
}

.emp-search-results-ab34 {
    min-height: 200px;
}

.emp-search-placeholder-ab34,
.emp-loading-ab34,
.emp-no-results-ab34,
.emp-error-ab34 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--emp-spacing-2xl);
    color: var(--emp-text-secondary);
}

.emp-search-placeholder-ab34 i,
.emp-loading-ab34 i,
.emp-no-results-ab34 i,
.emp-error-ab34 i {
    font-size: 3rem;
    margin-bottom: var(--emp-spacing-md);
    opacity: 0.5;
}

.emp-loading-ab34 i {
    animation: emp-spin-ab34 1s linear infinite;
}

@keyframes emp-spin-ab34 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.emp-employee-list-ab34 {
    display: flex;
    flex-direction: column;
    gap: var(--emp-spacing-xs);
}

.emp-employee-item-ab34 {
    border: 1px solid var(--emp-border-color);
    border-radius: var(--emp-border-radius);
    overflow: hidden;
    transition: var(--emp-transition);
}

.emp-employee-item-ab34:hover {
    border-color: var(--emp-primary-color);
    box-shadow: var(--emp-shadow-md);
}

.emp-employee-link-ab34 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--emp-spacing-md);
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.emp-employee-info-ab34 h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--emp-spacing-xs);
    color: var(--emp-text-primary);
}

.emp-employee-info-ab34 p {
    font-size: 0.875rem;
    color: var(--emp-text-secondary);
    margin: 0;
}

.emp-employee-arrow-ab34 {
    color: var(--emp-text-muted);
    font-size: 1.25rem;
}

/* ========================================
   Camera Section
======================================== */
.emp-camera-section-ab34 {
    background: var(--emp-bg-primary);
    border-radius: var(--emp-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--emp-shadow-lg);
    border: 1px solid var(--emp-border-color);
    margin-top: var(--emp-spacing-xl);
}

.emp-camera-container-ab34 {
    position: relative;
    background: #000;
    aspect-ratio: 4/3;
}

#emp-camera-video-ab34 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}

.emp-camera-overlay-ab34 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.emp-camera-frame-ab34 {
    width: 200px;
    height: 200px;
    border: 3px dashed rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: emp-pulse-ab34 2s infinite;
}

@keyframes emp-pulse-ab34 {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.emp-camera-controls-ab34 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--emp-spacing-lg);
    padding: var(--emp-spacing-lg);
    background: var(--emp-bg-secondary);
}

/* ========================================
   Employee Card - ใช้โครงสร้างเดิม
======================================== */
.emp-card-preview-ab34 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.emp-card-ab34 {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 0.654; /* อัตราส่วนสูง:กว้าง 500:764.7059 */
    margin: 0 auto;
    perspective: 1000px;
    border-radius: var(--emp-border-radius-lg);
    box-shadow: var(--emp-shadow-xl);
    background-color: #2C2C2C; /* สีพื้นหลังดำเข้ม */
    position: relative;
    overflow: hidden;
}

.emp-card-inner-ab34 {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.emp-card-flipped-ab34 .emp-card-inner-ab34 {
    transform: rotateY(180deg);
}

.emp-card-front-ab34,
.emp-card-back-ab34 {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--emp-border-radius-lg);
    overflow: hidden;
}

.emp-card-front-ab34 {
    background-image: url('https://dcn4.screwthai.com/wp-content/uploads/2025/03/EMP-FRONT-V4-2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2; /* ให้ด้านหน้าอยู่บนสุดเมื่อไม่ได้หมุน */
    transform: rotateY(0deg); /* อยู่ด้านหน้าตอนเริ่มต้น */
}

.emp-card-back-ab34 {
    background-image: url('https://dcn4.screwthai.com/wp-content/uploads/2025/03/EMP-BACK-V4.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: rotateY(180deg); /* หมุนด้านหลังให้กลับ 180 องศา */
    z-index: 1; /* ให้ด้านหลังอยู่ด้านล่างเมื่อไม่ได้หมุน */
}

/* องค์ประกอบเดิมของการ์ด */
.emp-orange-curve-small-ab34 {
    position: absolute;
    top: 20%;
    right: 0;
    width: 50%;
    height: 40%;
    background-color: #FFA500; /* สีส้มอ่อน */
    border-radius: 100% 0 0 100%;
    z-index: 3;
}

.emp-white-curve-ab34 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background-color: white;
    border-radius: 50% 50% 0 0;
    z-index: 4;
}

.emp-orange-curve-ab34 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70%;
    height: 70%;
    background-color: #FF6E00; /* สีส้ม */
    border-radius: 100% 0 0 0;
    z-index: 2;
}

.emp-card-logo-ab34 {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 140px;
    height: auto;
    z-index: 10;
}

/* ส่วนรูปพนักงาน - ปรับตำแหน่งให้ตรงกรอบในดีไซน์ */
.emp-photo-container-ab34 {
    position: absolute;
    top: 15%; /* ปรับจาก 8.2% เป็น 15% */
    right: 8%; /* เปลี่ยนจาก left: 50% เป็น right: 8% เพื่อให้อยู่ด้านขวา */
    transform: none; /* ยกเลิก translateX(-50%) */
    width: 200px; /* ลดขนาดจาก 275px เป็น 200px */
    height: 200px; /* ลดขนาดจาก 275px เป็น 200px */
    border-radius: 50%;
    overflow: hidden; /* สำคัญ: ทำให้ภาพที่เกินขอบเขตถูกตัดออก */
    z-index: 5;
    background-color: transparent; /* เปลี่ยนจาก white เป็น transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none; /* ลบ shadow ออก */
}

.emp-photo-ab34 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    object-position: 20% center; /* ปรับตำแหน่งให้อยู่ตรงกลาง */
    transform: none; /* ยกเลิกการเลื่อนภาพ */
    border: none; /* ลบเส้นขอบเพื่อให้ภาพเต็มวงกลม */
}

/* เพิ่มเอฟเฟกต์ให้ภาพมีโทนสีส้มเล็กน้อย */
.emp-photo-container-ab34::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 110, 0, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
}

.emp-photo-placeholder-ab34 {
    width: 85%;
    height: 85%;
    background-color: rgba(242, 242, 242, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777;
    font-size: 2.5rem;
}

/* ข้อมูลพนักงาน - ปรับตำแหน่งให้อยู่ในส่วนสีขาวด้านล่าง */
.emp-info-ab34 {
    position: absolute;
    bottom: 35%; /* ปรับให้อยู่ในส่วนสีขาว */
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 6;
    text-align: center;
    padding: 0 var(--emp-spacing-md);
}

.emp-name-ab34 {
    font-size: 28px; /* ลดขนาดลงจาก 36px */
    font-weight: bold;
    color: #FF6E00; /* สีส้ม */
    margin: 0;
    line-height: 1.2;
}

.emp-department-ab34 {
    font-size: 16px; /* ลดขนาดลงจาก 20px */
    color: #666;
    margin: 2px 0 0;
    font-weight: 400;
}

/* ข้อมูลรายละเอียด - ปรับให้อยู่ด้านล่างสุด */
.emp-details-ab34 {
    position: absolute;
    bottom: 8%; /* ปรับให้อยู่ด้านล่างสุด */
    left: var(--emp-spacing-md);
    right: var(--emp-spacing-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 6;
}

.emp-details-ab34 p {
    margin: 0;
    font-size: 14px; /* ลดขนาดลงจาก 18px */
    color: #333;
    text-align: left; /* เปลี่ยนจาก center เป็น left */
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
}

.emp-details-ab34 span:first-child {
    font-weight: 600;
    color: #666;
}

.emp-details-ab34 span:last-child {
    font-weight: 500;
    color: #333;
}

/* Card Back Content */
.emp-card-back-content-ab34 {
    text-align: center;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
}

.emp-card-back-content-ab34 h3 {
    font-size: 1.5rem;
    margin: 0 0 var(--emp-spacing-md);
    font-weight: 600;
}

.emp-card-back-content-ab34 p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

/* ฟิกซ์สำหรับ Firefox */
@-moz-document url-prefix() {
    .emp-card-front-ab34, .emp-card-back-ab34 {
        backface-visibility: hidden;
    }
}

/* ฟิกซ์สำหรับ Safari */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .emp-card-front-ab34, .emp-card-back-ab34 {
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
    }
}

/* ฟิกซ์สำหรับ IE และ Edge เก่า */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .emp-card-front-ab34 {
        z-index: 2;
    }
    .emp-card-back-ab34 {
        z-index: 1;
    }
    .emp-card-flipped-ab34 .emp-card-front-ab34 {
        z-index: 1;
    }
    .emp-card-flipped-ab34 .emp-card-back-ab34 {
        z-index: 2;
    }
}

/* ========================================
   Notifications
======================================== */
.emp-notification-ab34 {
    position: fixed;
    bottom: var(--emp-spacing-lg);
    right: var(--emp-spacing-lg);
    max-width: 400px;
    padding: var(--emp-spacing-md) var(--emp-spacing-lg);
    border-radius: var(--emp-border-radius);
    color: white;
    font-weight: 500;
    box-shadow: var(--emp-shadow-xl);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--emp-spacing-sm);
    animation: emp-slide-in-ab34 0.3s ease-out;
}

@keyframes emp-slide-in-ab34 {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.emp-notification-success-ab34 {
    background-color: var(--emp-success-color);
}

.emp-notification-error-ab34 {
    background-color: var(--emp-error-color);
}

.emp-notification-warning-ab34 {
    background-color: var(--emp-warning-color);
    color: var(--emp-text-primary);
}

.emp-notification-info-ab34 {
    background-color: var(--emp-info-color);
}

/* ========================================
   Error & Empty States
======================================== */
.emp-card-error-ab34 {
    padding: var(--emp-spacing-xl);
    text-align: center;
}

.emp-alert-error-ab34 {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--emp-error-color);
    border-radius: var(--emp-border-radius);
    padding: var(--emp-spacing-md);
    display: flex;
    align-items: flex-start;
    gap: var(--emp-spacing-sm);
    color: var(--emp-error-color);
}

.emp-alert-error-ab34 i {
    margin-top: 2px;
    font-size: 1.25rem;
}

.emp-card-view-only-ab34 {
    display: flex;
    justify-content: center;
    padding: var(--emp-spacing-xl);
}

/* ========================================
   Print Styles - ปรับให้เหมาะกับตำแหน่งใหม่
======================================== */
@media print {
    @page {
        size: 60.452mm 92.456mm;
        margin: 0;
    }
    
    body.emp-printing-ab34 * {
        visibility: hidden;
    }
    
    body.emp-printing-ab34 .emp-card-ab34,
    body.emp-printing-ab34 .emp-card-ab34 * {
        visibility: visible;
    }
    
    body.emp-printing-ab34 .emp-card-ab34 {
        position: absolute;
        top: 0;
        left: 0;
        width: 60.452mm;
        height: 92.456mm;
        box-shadow: none;
        border-radius: 4mm;
        margin: 0;
        padding: 0;
    }
    
    /* ซ่อนด้านหลังเมื่อพิมพ์ */
    .emp-card-flipped-ab34 .emp-card-inner-ab34 {
        transform: none;
    }
    
    .emp-card-back-ab34 {
        display: none;
    }
    
    /* ปรับขนาดองค์ประกอบสำหรับการพิมพ์ */
    .emp-photo-container-ab34 {
        top: 15%;
        right: 8%;
        width: 15mm;
        height: 15mm;
    }
    
    .emp-info-ab34 {
        bottom: 30%;
        font-size: 3mm;
    }
    
    .emp-name-ab34 {
        font-size: 4mm;
    }
    
    .emp-department-ab34 {
        font-size: 2.5mm;
    }
    
    .emp-details-ab34 {
        bottom: 8%;
    }
    
    .emp-details-ab34 p {
        font-size: 2mm;
        margin: 1mm 0;
    }
}

/* ========================================
   Responsive Design - ปรับให้เหมาะกับตำแหน่งใหม่
======================================== */
@media (max-width: 768px) {
    .emp-card-system-ab34 {
        padding: var(--emp-spacing-lg);
    }
    
    .emp-card-header-ab34 h2 {
        font-size: 1.875rem;
    }
    
    .emp-card-container-ab34 {
        gap: var(--emp-spacing-lg);
    }
    
    .emp-card-ab34 {
        max-width: 350px;
    }
    
    .emp-btn-group-ab34 {
        flex-direction: column;
    }
    
    .emp-btn-group-ab34 > * {
        width: 100%;
    }
    
    .emp-search-form-ab34 {
        flex-direction: column;
    }
    
    .emp-search-form-ab34 input,
    .emp-search-form-ab34 button {
        border-radius: var(--emp-border-radius);
        border: 2px solid var(--emp-border-color);
    }
    
    .emp-notification-ab34 {
        right: var(--emp-spacing-md);
        left: var(--emp-spacing-md);
        max-width: none;
    }
    
    /* ปรับขนาดองค์ประกอบในบัตรสำหรับมือถือ */
    .emp-photo-container-ab34 {
        width: 150px;
        height: 150px;
        top: 18%;
        right: 10%;
    }
    
    .emp-name-ab34 {
        font-size: 22px;
    }
    
    .emp-department-ab34 {
        font-size: 14px;
    }
    
    .emp-details-ab34 p {
        font-size: 12px;
    }
    
    .emp-info-ab34 {
        bottom: 38%;
    }
    
    .emp-details-ab34 {
        bottom: 10%;
    }
}

@media (max-width: 480px) {
    .emp-card-ab34 {
        max-width: 280px;
    }
    
    .emp-photo-container-ab34 {
        width: 120px;
        height: 120px;
        top: 20%;
        right: 12%;
    }
    
    .emp-name-ab34 {
        font-size: 18px;
    }
    
    .emp-department-ab34 {
        font-size: 12px;
    }
    
    .emp-details-ab34 p {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .emp-info-ab34 {
        bottom: 42%;
    }
    
    .emp-details-ab34 {
        bottom: 12%;
    }
}

/* ========================================
   Animation & Transitions
======================================== */
.emp-card-ab34:hover {
    transform: translateY(-4px);
    box-shadow: var(--emp-shadow-xl), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.emp-control-section-ab34 {
    animation: emp-fade-in-up-ab34 0.6s ease-out;
}

.emp-control-section-ab34:nth-child(2) {
    animation-delay: 0.1s;
}

.emp-control-section-ab34:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes emp-fade-in-up-ab34 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Accessibility
======================================== */
.emp-card-system-ab34 :focus {
    outline: 2px solid var(--emp-primary-color);
    outline-offset: 2px;
}

.emp-card-system-ab34 :focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --emp-border-color: #000000;
        --emp-text-secondary: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .emp-card-system-ab34 *,
    .emp-card-system-ab34 *::before,
    .emp-card-system-ab34 *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --emp-bg-primary: #1f2937;
        --emp-bg-secondary: #111827;
        --emp-bg-muted: #374151;
        --emp-text-primary: #f9fafb;
        --emp-text-secondary: #d1d5db;
        --emp-text-muted: #9ca3af;
        --emp-border-color: #374151;
        --emp-border-light: #4b5563;
    }
}