﻿/* Main container styles */
.edit-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Page header styles with gradient line */
.page-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

    /* Add the gradient line at the top */
    .page-header::before {
        content: "";
        position: absolute;
        top: -20px;
        left: -20px;
        right: -20px;
        height: 6px;
        background: linear-gradient(to right, #2980b9, #e74c3c);
        z-index: 1;
    }

    .page-header h3 {
        color: #2c3e50;
        font-size: 1.5rem;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
    }

        .page-header h3::before {
            content: "⚡";
            margin-right: 10px;
            color: #f39c12;
        }

.breadcrumb {
    display: flex;
    align-items: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

    .breadcrumb .separator {
        margin: 0 5px;
    }

    .breadcrumb .current {
        color: #3498db;
        font-weight: 500;
    }

/* Filter buttons styles */
.filter-buttons {
    display: flex;
    margin: 20px 0;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    width: fit-content;
}

    .filter-buttons::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        height: 3px;
        width: 100%;
        background-color: #2980b9;
        z-index: 1;
    }

.filter-btn {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.2s ease;
}

    .filter-btn:hover {
        background-color: #e9ecef;
    }

    .filter-btn.active {
        background-color: #34495e;
        color: white;
    }

/* Form container styles */
.form-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Form section styles */
.form-section {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
    position: relative;
}

/* Maintenance schedule section styles */
.maintenance-schedule {
    background-color: #fff;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

    .schedule-header .alert {
        margin-top: 10px;
        padding: 8px 15px;
        border-radius: 4px;
        display: flex;
        align-items: center;
    }

        .schedule-header .alert i {
            margin-right: 8px;
        }

/* Date card styles */
.date-card {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    height: 100%;
}

/* Maintenance input group styles */
.maintenance-input {
    display: flex;
    gap: 10px;
}

.date-input-wrapper, .status-input-wrapper {
    position: relative;
    flex: 1;
}

    .date-input-wrapper .input-icon, .status-input-wrapper .input-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #7f8c8d;
        z-index: 1;
    }

    .date-input-wrapper input, .status-input-wrapper select {
        padding-left: 35px !important;
    }

/* Input wrapper styles */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
    padding-left: 35px !important;
    height: 38px;
}

/* Form validation styles */
.validation-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Form control styles */
.form-control, .form-select {
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    }

.form-label {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Form actions styles */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn i {
        margin-right: 5px;
    }

.btn-primary {
    background-color: #2ecc71;
    color: white;
    border: none;
}

    .btn-primary:hover {
        background-color: #27ae60;
    }

.btn-secondary {
    background-color: #7f8c8d;
    color: white;
    border: none;
}

    .btn-secondary:hover {
        background-color: #6c7a7d;
    }

.btn-info {
    background-color: #3498db;
    color: white;
    border: none;
}

    .btn-info:hover {
        background-color: #2980b9;
    }

/* Add New Transformer Maintenance button */
.add-new-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .add-new-btn:hover {
        background-color: #27ae60;
    }

    .add-new-btn i, .add-new-btn svg {
        margin-right: 5px;
    }

/* Status badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    display: inline-block;
}

.badge-upcoming {
    background-color: #2ecc71;
    color: white;
}

.badge-alarm {
    background-color: #f39c12;
    color: white;
}

.badge-danger {
    background-color: #e74c3c;
    color: white;
}

.badge-scheduled {
    background-color: #3498db;
    color: white;
}

.badge-due-soon {
    background-color: #f39c12;
    color: white;
}

.badge-healthy {
    background-color: #2ecc71;
    color: white;
}

.badge-overdue {
    background-color: #e74c3c;
    color: white;
}

/* Status colors */
.option-completed {
    background-color: #2ecc71;
    color: white;
}

.option-pending {
    background-color: #3498db;
    color: white;
}

.option-plan {
    background-color: #f39c12;
    color: white;
}

.option-overdue {
    background-color: #e74c3c;
    color: white;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

    .table th {
        background-color: #34495e;
        color: white;
        text-align: left;
        padding: 12px 15px;
        font-weight: 500;
    }

    .table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e0e0e0;
    }

    .table tr:nth-child(even) {
        background-color: #f8f9fa;
    }

    .table tr:hover {
        background-color: #e9ecef;
    }

/* Action buttons */
.action-btn {
    padding: 5px 10px;
    border-radius: 4px;
    color: #2c3e50;
    background-color: #f1f2f6;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: all 0.2s ease;
}

    .action-btn:hover {
        background-color: #dfe4ea;
    }

    .action-btn i, .action-btn svg {
        margin-right: 5px;
    }

/* Disabled fields */
input:disabled, select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .maintenance-input {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        width: 100%;
        overflow-x: auto;
    }
}
