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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    /* max-width: 1400px; */
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.header {
    border-bottom: 2px solid black;
    color: #1b13a8;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 280px 280px 1fr;
    gap: 10px;
    padding: 10px;
}

.form-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.form-section h2 {
    color: #374151;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.file-input-label:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

/* Tab styles */
.upload-method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.tab-btn:hover {
    color: #4f46e5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Employee Grid Section - NEW COMPACT LAYOUT */
.employee-grid-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.stats-badge {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    max-height: 500px;
    overflow-y: auto;
    padding: 0px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    padding: 40px 20px;
    font-size: 1.1rem;
}

/* Employee Card - COMPACT DESIGN */
.employee-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #4f46e5;
}

.employee-card.has-photo {
    border-color: #10b981;
    background: #f0fdf4;
    width: 136px;
}

.employee-card-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid #e5e7eb;
}

.employee-card.has-photo .employee-card-photo {
    border-color: #10b981;
}

.employee-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.employee-card-info {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

.employee-card-name {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-card-meta {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-upload-mini {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-upload-mini:hover {
    background: #4338ca;
    transform: scale(1.05);
}

.status-check {
    font-size: 24px;
    color: #10b981;
}

/* Alert styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    line-height: 1.6;
    font-size: 12px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Button styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-template {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    width: 100%;
}

.btn-template:hover {
    background: linear-gradient(135deg, #0e7490, #0891b2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.3);
}

.btn-success {
    background: #10b981;
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-svg {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

.btn-svg:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.export-buttons {
    display: grid;
    /* grid-template-columns: 1fr; */
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    /* margin-top: 20px; */
}

.btn-back {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

.btn-back:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.id-card-preview {
    width: 100%;
    aspect-ratio: 1.6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: white;
    font-size: 10px;
    display: flex;
    flex-direction: column;
}

.preview-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

/* Code styling */
code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

/* Scrollbar styling */
.employee-grid::-webkit-scrollbar {
    width: 8px;
}

.employee-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.employee-grid::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 10px;
}

.employee-grid::-webkit-scrollbar-thumb:hover {
    background: #4338ca;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .employee-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .employee-grid-section {
        grid-column: span 2;
    }
    
    .employee-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .employee-grid-section {
        grid-column: span 1;
    }
    
    .employee-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}

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

/* Company Logo */
.company-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 10px;
}

.company-logo img {
    height: 102px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
