* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.header-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-edit:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-save {
    background: #007bff;
    color: white;
}

.btn-save:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-add {
    background: #17a2b8;
    color: white;
}

.btn-add:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

.btn-delete:hover {
    background: #c82333;
}

/* Filters */
.filters {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.filter-form {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: #555;
}

.filter-group select {
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-filter {
    background: #667eea;
    color: white;
}

.btn-filter:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card h3 {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
}

.metric-value.overdue {
    color: #dc3545;
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
}

.expected-date-analysis {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.expected-date-analysis h2 {
    margin-bottom: 25px;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Data Table */
.data-table {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.data-table h3 {
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

#editStatus {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: normal;
}

#editStatus.editing {
    background: #dc3545;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e1e5e9;
    position: sticky;
    top: 0;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: top;
}

tr:hover {
    background: #f8f9fa;
}

.view-mode, .edit-mode {
    width: 100%;
}

.edit-mode input, .edit-mode select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
}

.edit-mode input:focus, .edit-mode select:focus {
    outline: none;
    border-color: #667eea;
}

.status-inuse {
    color: #28a745;
    font-weight: 600;
}

.status-notinuse {
    color: #dc3545;
    font-weight: 600;
}

.overdue-date {
    color: #dc3545;
    font-weight: 600;
}

.upcoming-date {
    color: #28a745;
    font-weight: 600;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .charts {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        min-width: auto;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .metrics {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}