/* Admin Lab Management Styles */
* {
    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;
    color: #333;
}

.dd-admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Mobile Responsiveness for Admin Lab Management */
@media (max-width: 768px) {
    .dd-admin-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .dd-admin-header {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 10px;
    }
    
    .dd-admin-header h1 {
        font-size: 1.8em;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .dd-admin-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .dd-admin-card {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .dd-admin-card h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    .dd-admin-filters {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .dd-admin-filters .filter-group {
        width: 100%;
    }
    
    .dd-admin-filters input,
    .dd-admin-filters select {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .dd-admin-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .dd-admin-table table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .dd-admin-table th,
    .dd-admin-table td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .dd-admin-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .dd-admin-actions button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .dd-admin-modal {
        padding: 10px;
    }
    
    .dd-admin-modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .dd-admin-form {
        padding: 15px;
    }
    
    .dd-admin-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dd-admin-form input,
    .dd-admin-form select,
    .dd-admin-form textarea {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .dd-admin-form .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .dd-admin-form .form-actions button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .dd-admin-container {
        padding: 5px;
    }
    
    .dd-admin-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .dd-admin-header h1 {
        font-size: 1.5em;
    }
    
    .dd-admin-stats {
        gap: 10px;
        margin-top: 10px;
    }
    
    .dd-admin-card {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .dd-admin-filters {
        padding: 10px;
    }
    
    .dd-admin-table table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .dd-admin-table th,
    .dd-admin-table td {
        padding: 6px 2px;
    }
    
    .dd-admin-modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .dd-admin-form {
        padding: 10px;
    }
    
    .dd-admin-form .form-row {
        gap: 10px;
    }
}

/* Header Styles */
.dd-admin-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.dd-admin-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.dd-admin-header h1 i {
    color: #3498db;
}

.dd-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #6c757d;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.pending {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.stat-card.approved {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #a8e6cf 100%);
}

.stat-card.rejected {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #ffb3ba 100%);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filter Styles */
.dd-admin-filters {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.filter-group select,
.filter-group input {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dd-btn-filter,
.dd-btn-clear {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dd-btn-filter {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.dd-btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.dd-btn-clear {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.dd-btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Content Styles */
.dd-admin-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Empty State */
.dd-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.dd-empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    color: #dee2e6;
}

.dd-empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #495057;
}

/* Labs Grid */
.dd-labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

.dd-lab-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dd-lab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.dd-lab-card[data-status="pending"] {
    border-color: #ffc107;
}

.dd-lab-card[data-status="approved"] {
    border-color: #28a745;
}

.dd-lab-card[data-status="rejected"] {
    border-color: #dc3545;
}

.lab-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.lab-info h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.lab-owner {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.lab-type {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: capitalize;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lab-card-body {
    padding: 20px;
}

.lab-details p {
    margin-bottom: 10px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lab-details i {
    color: #3498db;
    width: 16px;
}

.lab-tests {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.lab-tests h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
}

.test-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.test-tag {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid #90caf9;
}

.home-collection {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #a5d6a7;
}

/* Document Status Indicators */
.document-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.document-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.doc-indicator.uploaded {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.doc-indicator.missing {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.doc-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lab-card-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lab-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lab-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dd-btn-view {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.dd-btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.dd-btn-approve {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.dd-btn-approve:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.dd-btn-reject {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.dd-btn-reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.dd-btn-delete {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: 2px solid #c0392b;
}

.dd-btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    border-color: #a93226;
}

.dd-btn-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.lab-date {
    color: #6c757d;
    font-size: 0.8em;
}

/* Modal Styles */
.dd-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.dd-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dd-modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dd-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.dd-modal-close {
    font-size: 2em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.dd-modal-close:hover {
    color: #ffc107;
}

.dd-modal-body {
    padding: 30px;
}

/* Document Preview Styles */
.document-preview {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.document-preview:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.document-preview img {
    border: 2px solid #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    transition: transform 0.3s ease;
}

.document-preview img:hover {
    transform: scale(1.05);
}

/* Detail Section Styles for Documents */
.detail-section {
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #3498db;
}

.detail-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #212529;
    font-size: 1em;
    line-height: 1.4;
}

/* Success/Error Messages */
.dd-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-weight: 500;
}

.dd-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dd-admin-container {
        padding: 10px;
    }
    
    .dd-admin-header {
        padding: 20px;
    }
    
    .dd-admin-header h1 {
        font-size: 2em;
    }
    
    .dd-admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .dd-labs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lab-card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .lab-actions {
        justify-content: center;
    }
    
    .dd-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .dd-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dd-admin-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .lab-actions button {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}
