/* ============================================
   IMPORT ATTENDANCE PAGE STYLES
   Pixel-perfect match with Figma design
   ============================================ */

/* ===== PAGE CONTAINER ===== */
.import-attendance-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding-bottom: var(--space-8);
}

/* ===== PAGE HEADER SECTION ===== */
.import-attendance-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
}

.import-attendance-header-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.import-header-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.import-header-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-primary);
}

.import-header-text h1 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
    line-height: var(--line-height-tight);
}

.import-header-text p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: var(--space-1) 0 0 0;
    line-height: var(--line-height-normal);
}

/* ===== MAIN CONTENT CONTAINER ===== */
.import-attendance-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ===== IMPORT INSTRUCTIONS SECTION ===== */
.import-instructions-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(var(--glass-blur));
}

.import-instructions-section h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.import-instructions-section h2 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
}

.import-instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.import-instruction-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.instruction-number {
    width: 28px;
    height: 28px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.instruction-text {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    padding-top: 4px;
}

/* ===== DOWNLOAD TEMPLATE SECTION ===== */
.download-template-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(var(--glass-blur));
}

.download-template-section h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.download-template-section h2 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-green);
}

.template-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.template-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.template-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.template-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.template-info {
    flex: 1;
}

.template-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.template-file {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

.template-download-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-download-btn:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.template-download-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
}

/* ===== UPLOAD ATTENDANCE FILE SECTION ===== */
.upload-attendance-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(var(--glass-blur));
}

.upload-attendance-section h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.upload-attendance-section h2 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-purple);
}

.upload-area {
    border: 2px dashed var(--border-medium);
    border-radius: 12px;
    padding: var(--space-12);
    text-align: center;
    background: var(--bg-tertiary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-purple);
    background: var(--bg-card-hover);
}

.upload-area.dragover {
    border-color: var(--accent-purple);
    background: var(--bg-card-hover);
}

.upload-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.upload-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
}

.upload-text h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.upload-text p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0 0 var(--space-4) 0;
}

.browse-files-btn {
    padding: var(--space-3) var(--space-6);
    background: var(--gradient-purple);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.browse-files-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

.browse-files-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== RECENT IMPORTS SECTION ===== */
.recent-imports-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(var(--glass-blur));
}

.recent-imports-section h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.recent-imports-section h2 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
}

.recent-imports-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.import-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all 0.3s ease;
}

.import-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

.import-status-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.import-status-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.import-details {
    flex: 1;
}

.import-filename {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.import-meta {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

.import-action-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--accent-green);
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.import-action-btn:hover {
    background: var(--accent-green-dark);
}

/* ===== TABLE PREVIEW ===== */
.table-preview-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-6);
    margin-top: var(--space-6);
    backdrop-filter: blur(var(--glass-blur));
}

.table-preview-section table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
}

.table-preview-section thead {
    background: var(--bg-secondary);
}

.table-preview-section th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
}

.table-preview-section td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.table-preview-section tbody tr:last-child td {
    border-bottom: none;
}

.table-preview-section tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .import-attendance-container {
        padding: 0 var(--space-4);
    }

    .import-attendance-header {
        padding: var(--space-4) 0;
    }

    .import-header-icon {
        width: 48px;
        height: 48px;
    }

    .import-header-icon svg {
        width: 24px;
        height: 24px;
    }

    .import-header-text h1 {
        font-size: var(--font-size-xl);
    }

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

    .upload-area {
        padding: var(--space-8);
    }

    .import-item {
        flex-direction: column;
        align-items: flex-start;
    }
}