/* General body styling */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to right, #00b4db, #0083b0);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Splash page styling */
.splash-container {
    text-align: center;
    max-width: 500px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Header styling */
header {
    background-color: #ffffff;
    padding: 10px;
    text-align: center;
    color: #4b0082;
}

header h1 {
    display: inline;
    font-size: 24px;
    color: #4b0082;
    margin-right: 20px;
}

header nav ul {
    display: inline;
    list-style-type: none;
}

header nav ul li {
    display: inline;
    margin-right: 10px;
}

header nav ul li a {
    color: #4b0082;
    text-decoration: none;
}

header nav ul li a:hover {
    text-decoration: underline;
}

/* Main content styling */
.main-content {
    display: flex;
    flex: 1;
    width: 100%;
}

/* Sidebar styling */
.sidebar {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 200px;
    padding: 10px;
    border-right: 1px solid #ddd;
}

.sidebar h3 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 10px;
}

.sidebar ul {
    list-style-type: none;
    padding-left: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #ffffff;
    text-decoration: none;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* Main section styling */
main {
    flex-grow: 1;
    padding: 20px;
    background-color: #ffffff;
    color: #333;
}

/* Apartment details styling */
.apartment-details {
    margin: 20px 0;
}

.apartment-details p {
    font-size: 16px;
    margin: 10px 0;
}

/* Footer styling */
footer {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-align: center;
    padding: 10px;
    margin-top: auto;
}

/* Login form styling */
.login-form {
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Button styling */
.btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit; /* Ensure consistent font family */
    font-size: 14px; /* Match the size of text */
    text-align: center;
    border: none; /* Add border if needed */
    line-height: 1.5; /* Ensure vertical alignment consistency */
}

/* Primary button styling (Edit Apartment) */
.btn-primary {
    background-color: #007bff;
    border: 1px solid #007bff;
}

/* Danger button styling */
.btn-danger {
    background-color: #dc3545;
    border: 1px solid #dc3545;
}

/* Success button styling */
.btn-success {
    background-color: #28a745;
    border: 1px solid #28a745;
}

.register-link {
    margin-top: 20px;
}

/* Message styling */
.message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.message.success {
    background-color: #28a745;
    color: #fff;
}

.message.error {
    color: red;
    background-color: #ffe5e5;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid red;
    border-radius: 5px;
}

.apartment-status {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.apartment-status.online {
    color: green;
}

.apartment-status.offline {
    color: red;
    border: 1px solid red;
    background-color: #ffebee;
}

.apartment-status.armed {
    color: #006400;
    border: 1px solid #006400;
    background-color: #ccffcc;
}

.validation-error {
    color: red;
    background-color: #ffe5e5;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid red;
    border-radius: 5px;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
}

/* Modal content box */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    border-radius: 8px;
    text-align: center;
}

/* Close button styling */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Modal actions */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.item-details {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative; /* For absolute positioning of actions, if needed */
}

.lock-actions {
    margin-top: 10px; /* Space from the content above */
    text-align: left; /* Center align the buttons */
}

.lock-actions button {
    margin: 0 5px; /* Add spacing between buttons */
}

.log-table th {
    text-align: left;
    padding: 8px;
}

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

.log-table .timestamp-column {
    white-space: nowrap;
    width: 1%;
}

.log-table th, .log-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.log-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.log-table tr:hover {
    background-color: #ddd;
}

.log-table th {
    background-color: #4CAF50;
    color: white;
}

/* Check-in table styling */
.checkin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.checkin-table th, .checkin-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.checkin-table th {
    background-color: #4CAF50;
    color: white;
}

.checkin-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.checkin-table tr:hover {
    background-color: #ddd;
}

.checkin-table .past-checkin {
    color: darkred;
    font-style: italic;
}

.checkin-table .current-checkin {
    color: darkgreen;
    font-weight: bold;
}

.checkin-table .future-checkin {
    color: black;
}

/* Modal Content Styling */
.modal-content {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    text-align: center; /* Center the text and table horizontally */
    margin: 0 auto; /* Center the content within the modal */
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
}

/* Delete Confirmation Table */
.delete-confirmation-message {
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: bold;
}

.delete-confirmation-table {
    margin: 0 auto; /* Center the table horizontally */
    border-collapse: collapse;
    text-align: left;
    width: 80%; /* Adjust table width for better alignment */
}

.delete-confirmation-table th,
.delete-confirmation-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.delete-confirmation-table th {
    text-align: left; /* Align headers to the left */
}

.delete-confirmation-table td {
    text-align: left; /* Align content to the left */
}
