<?php
// style.css
$css = <<<'CSS'
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background: white;
    border-bottom: 1px solid #e1e8ed;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo a {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f0f2f5;
    color: #667eea;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.user-role {
    color: #666;
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-primary {
    background: #667eea;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.quick-actions {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quick-actions h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 250px;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
}

.data-table td {
    padding: 15px;
    border-top: 1px solid #f0f2f5;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.priority-low { color: #28a745; font-weight: 600; }
.priority-medium { color: #ffc107; font-weight: 600; }
.priority-high { color: #fd7e14; font-weight: 600; }
.priority-critical { color: #dc3545; font-weight: 600; }

.status-new { color: #17a2b8; font-weight: 600; }
.status-assigned { color: #6c757d; font-weight: 600; }
.status-in_progress { color: #007bff; font-weight: 600; }
.status-pending { color: #ffc107; font-weight: 600; }
.status-pending_user { color: #fd7e14; font-weight: 600; }
.status-approved { color: #28a745; font-weight: 600; }
.status-rejected { color: #dc3545; font-weight: 600; }
.status-resolved { color: #28a745; font-weight: 600; }
.status-closed { color: #6c757d; font-weight: 600; }
.status-completed { color: #28a745; font-weight: 600; }
.status-cancelled { color: #6c757d; font-weight: 600; }
.status-available { color: #28a745; font-weight: 600; }
.status-maintenance { color: #ffc107; font-weight: 600; }
.status-retired { color: #6c757d; font-weight: 600; }

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.meta {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.card dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
}

.card dt {
    font-weight: 600;
    color: #555;
}

.card dd {
    color: #333;
}

.comment {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment.internal {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.comment-header strong {
    color: #333;
}

.comment-header span {
    color: #666;
    font-size: 13px;
}

.comment p {
    color: #555;
    font-size: 14px;
}

.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    margin-bottom: 10px;
    min-height: 80px;
}

.tasks-table {
    width: 100%;
}

.tasks-table th {
    text-align: left;
    padding: 10px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.tasks-table td {
    padding: 10px;
    border-top: 1px solid #e9ecef;
}

.task-notes td {
    background: #f8f9fa;
    font-size: 13px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.text-danger {
    color: #dc3545;
}

.text-success {
    color: #28a745;
}

.details-list {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 15px;
}

.simple-table {
    width: 100%;
}

.simple-table th {
    text-align: left;
    padding: 10px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
}

.simple-table td {
    padding: 10px;
    border-top: 1px solid #e9ecef;
}

.mt-3 {
    margin-top: 15px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
CSS;

file_put_contents(__DIR__ . '/style.css', $css);
?>