/* QC Prototype CSS - Balsamiq Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Marker Felt', 'Comic Neue', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #333;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 {
    font-size: 28px;
    color: #333;
}

.header h1 i {
    margin-right: 10px;
    color: #4a6fa5;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border: 2px solid #333;
    border-radius: 0;
    background: white;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 #333;
}

.btn-primary {
    background-color: #4a6fa5;
    color: white;
    border-color: #333;
}

.btn-secondary {
    background-color: #f0f0f0;
    border-color: #333;
}

.btn-danger {
    background-color: #d9534f;
    color: white;
    border-color: #333;
}

/* Filters Section */
.filters-section {
    background: white;
    border: 3px solid #333;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 2px solid #333;
    font-family: inherit;
    font-size: 14px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: bold;
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 6px 10px;
    border: 2px solid #333;
    font-family: inherit;
    background: white;
}

/* Table Styles */
.table-container {
    background: white;
    border: 3px solid #333;
    overflow-x: auto;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #4a6fa5;
    color: white;
    padding: 12px;
    text-align: left;
    border: 2px solid #333;
    font-weight: bold;
}

.data-table td {
    padding: 10px;
    border: 2px solid #333;
    cursor: pointer;
}

.data-table tr:hover {
    background-color: #e8f4ff;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border: 2px solid #333;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.status-badge.approved {
    background-color: #5cb85c;
    color: white;
}

.status-badge.rejected {
    background-color: #d9534f;
    color: white;
}

.status-badge.conditional {
    background-color: #f0ad4e;
    color: white;
}

.status-badge.pending {
    background-color: #6c757d;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.page-info {
    font-weight: bold;
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border: 3px solid #333;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-value.approved { color: #5cb85c; }
.stat-value.rejected { color: #d9534f; }
.stat-value.conditional { color: #f0ad4e; }

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Inspection Detail Styles */
.inspection-header {
    background: white;
    border: 3px solid #333;
    padding: 20px;
    margin-bottom: 20px;
}

.lot-id {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.lot-id h2 {
    font-size: 24px;
}

.inspection-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.inspection-meta div {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 3px solid #333;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: white;
    border: 3px solid #333;
    border-bottom: none;
    margin-right: 5px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.tab-btn.active {
    background-color: #4a6fa5;
    color: white;
}

.tab-content {
    display: none;
    background: white;
    border: 3px solid #333;
    padding: 20px;
    border-top: none;
}

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

/* Parameters Grid */
.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.parameter-card {
    border: 2px solid #333;
    padding: 15px;
    background: #f9f9f9;
}

.parameter-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.parameter-value {
    font-size: 16px;
    font-weight: bold;
}

/* Remarks and Notes Sections */
.remarks-section,
.notes-section {
    background: white;
    border: 2px solid #333;
    padding: 15px;
    margin-bottom: 15px;
}

.remarks-section h3,
.notes-section h3 {
    margin-bottom: 10px;
    color: #4a6fa5;
}

.remarks-content,
.notes-content {
    padding: 10px;
    background: #f9f9f9;
    border: 1px dashed #666;
    min-height: 60px;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.photo-card {
    border: 2px solid #333;
    padding: 15px;
    background: #f0f0f0;
    text-align: center;
}

.photo-placeholder {
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    border: 2px dashed #666;
}

.photo-placeholder i {
    font-size: 48px;
    color: #666;
    margin-bottom: 10px;
}

/* History Timeline */
.history-timeline {
    border-left: 3px solid #333;
    padding-left: 20px;
}

.history-item {
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border: 2px solid #333;
    position: relative;
}

.history-item:before {
    content: '';
    position: absolute;
    left: -26px;
    top: 15px;
    width: 10px;
    height: 10px;
    background: #4a6fa5;
    border: 2px solid #333;
    border-radius: 50%;
}

.history-date {
    font-weight: bold;
    color: #4a6fa5;
    margin-bottom: 5px;
}

.history-action {
    font-weight: bold;
    margin-bottom: 3px;
}

.history-user {
    font-size: 14px;
    color: #666;
}

/* Traceability Flow */
.traceability-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.flow-step {
    flex: 1;
    min-width: 200px;
    border: 2px solid #333;
    padding: 15px;
    background: white;
    text-align: center;
}

.flow-icon {
    font-size: 32px;
    color: #4a6fa5;
    margin-bottom: 10px;
}

.flow-arrow {
    font-size: 24px;
    color: #333;
}

/* Form Styles */
.form-section {
    background: white;
    border: 3px solid #333;
    padding: 20px;
    margin-bottom: 20px;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #333;
    font-family: inherit;
    background: white;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #d9534f;
}

.form-hint {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* Photo Upload */
.photo-upload-area {
    border: 3px dashed #333;
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
    background: #e8f4ff;
    border-color: #4a6fa5;
}

.photo-upload-area i {
    font-size: 48px;
    color: #666;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 16px;
    color: #333;
}

.uploaded-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.uploaded-photo {
    position: relative;
    border: 2px solid #333;
    padding: 5px;
    background: white;
}

.uploaded-photo img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #d9534f;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-name {
    font-size: 12px;
    text-align: center;
    padding: 5px;
    word-break: break-all;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px solid #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .traceability-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
