* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* LOGIN PAGE */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 5px;
    font-size: 28px;
}

.login-box h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: normal;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-login:hover {
    background: #5568d3;
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.error-message {
    color: #d32f2f;
    padding: 10px;
    background: #ffebee;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

.demo-credentials {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

.demo-credentials h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.demo-credentials p {
    margin: 5px 0;
}

/* INVENTORY PAGE */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.navbar h1 {
    margin: 0;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-logout:hover {
    background-color: #c0392b;
}

.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-add {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.btn-add:hover {
    background-color: #229954;
}

.equipment-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.loading {
    padding: 40px;
    text-align: center;
    color: #7f8c8d;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #34495e;
    color: white;
    font-weight: 600;
    text-align: left;
}

table th {
    padding: 12px 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

.brand-model {
    font-weight: 600;
    color: #2c3e50;
}

.brand-model small {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
    font-weight: normal;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active { background-color: #27ae60; }
.status-inactive { background-color: #e74c3c; }
.status-maintenance { background-color: #f39c12; }
.status-retired { background-color: #95a5a6; }

.actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.btn-edit:hover {
    background-color: #e8f5e9;
}

.btn-delete:hover {
    background-color: #ffebee;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: #7f8c8d;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.btn-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.btn-close:hover {
    color: #000;
}

.equipment-form {
    padding: 20px;
}

fieldset {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border: none;
    border-bottom: 1px solid #eee;
}

fieldset legend {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-row.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-cancel,
.btn-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background-color: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background-color: #d0d0d0;
}

.btn-submit {
    background-color: #27ae60;
    color: white;
}

.btn-submit:hover:not(:disabled) {
    background-color: #229954;
}

.btn-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .toolbar {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }

    .btn-add {
        width: 100%;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }
}
