body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #e6f9e6 0%, #d4edda 100%); /* Light green gradient */

}
header {
    color: white;
    text-align: center;
    margin-left: 200px;
    font-size:x-large;
    font-weight: bold;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 200px;
    background-color: #28a745;
    padding: 1rem 0;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
nav li {
    margin: 0.5rem 1rem;
}
nav a {
    color: white;
    text-decoration: none;
}
header{
    text-align: center;
    padding: 1rem;
    color: #000;
}
main {
    max-width: 1200px;
    margin: 2rem 2rem 2rem 220px;
    padding: 1rem;
}
.hero {
    display: flex;
    height:100%;
}
.hero h1 {
    margin: 0;
}
.left-side {
    flex: 1;
    position: relative;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
@media(max-width: 768px) {
    .hero {
        flex-direction: column;
        height:auto;
    }
    .left-side, .right-side {
        flex: none;
        width: 100%;
    }
}

.cta-button {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}
.cta-button:hover {
    background: linear-gradient(45deg, #218838, #17a2b8);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}
.emergency-button {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    animation: pulse 2s infinite;
}
.emergency-button:hover {
    background: linear-gradient(45deg, #c82333, #e8590c);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}
.tip-note {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    font-style: italic;
}
.emergency-alert {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left: 4px solid #dc3545;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    font-weight: bold;
    color: #721c24;
}
.left-side h3, .right-side h3, .left-side h2, .right-side h2 {
    color: #28a745;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.left-side ul li, .right-side ul li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.left-side ul li i, .right-side ul li i {
    color: #28a745;
    width: 20px;
}
.section {
    margin: 2rem 0;
    padding: 1rem;
    background-color: white;
}
footer {
    background-color: #28a745;
    color: white;
    text-align: center;
    
    position: fixed;
    bottom: 0;
    left: 200px;
    width: 100%;
}
.status-image {
    width: 300px;  /*Adjust size as needed */
    height: auto;
    display: block;     
}

.blink {
    border-radius: 50%;
    opacity: 0.7;
    animation: blink 1s infinite;
}

.danger {
    width: 30px; height: 30px;
    background: red;
}

.safety {
    width: 30px; height: 30px;
    background: green;
}

@keyframes blink {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.datetime {
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
}

.status-text {
    animation: pulse 3s infinite;
}

/*dashboard styles*/
    table { width: 100%; border-collapse: collapse; margin-top: 20px; }
    th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
    th { background: #28a745; color: white; }
    .logoutBtn { margin-right: 10px; padding: 8px 12px; border: none; border-radius: 5px; cursor: pointer; }
    .clockin { background: #28a745; color: white; }
    .clockout { background: #dc3545; color: white; }

    .status-select.safe {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: #28a745;
}

.status-select.leak {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
}

.clock-cell {
  font-family: monospace;
  white-space: nowrap;
}

.btn-clock {
  font-size: 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.btn-clock:hover {
  background: rgba(0,0,0,0.05);
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 400px; /* Limit chart card width */
    margin: 0 auto; /* Center the card */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
    color: white !important;
    font-weight: 600;
    display: table-cell !important;
    visibility: visible !important;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Make table responsive */
@media (max-width: 1200px) {
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

#logoutBtn {
    padding: 0.75rem;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}
/* Login and Register Styles */
.login-container, .register-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.login-container h2, .register-container h2 {
    text-align: center;
    color: #28a745;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
}

.login-container form, .register-container form {
    display: flex;
    flex-direction: column;
}

.login-container label, .register-container label {
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 600;
}

.login-container input, .register-container input, .register-container select {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-container input:focus, .register-container input:focus, .register-container select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.login-button, .register-button {
    padding: 0.75rem;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.login-button:hover, .register-button:hover {
    background: linear-gradient(45deg, #218838, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.register-link, .login-link {
    text-align: center;
    margin-top: 1.5rem;
}

.register-link a, .login-link a {
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover, .login-link a:hover {
    text-decoration: underline;
}

/* Dashboard Enhancements */
h2 {
    color: #28a745;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: bold;
}

#logoutBtn {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto 2rem;
}

#logoutBtn:hover {
    background: linear-gradient(45deg, #c82333, #e8590c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

#employeeTable {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#employeeTable th {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 1rem;
    font-weight: bold;
}

#employeeTable td {
    padding: 1rem;
}

#employeeTable tr:nth-child(even) {
    background: #f8f9fa;
}

#employeeTable tr:hover {
    background: #e9ecef;
}

.clockin, .clockout, .endshift {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.clockin:hover {
    background: #218838 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.clockout:hover {
    background: #c82333 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.endshift {
    background: #ffc107;
    color: #212529;
}

.endshift:hover {
    background: #e0a800 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.tick-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.tick-btn:hover {
    background: #218838;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.status-select {
    padding: 0.5rem;
    border: 2px solid #ced4da;
    border-radius: 5px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.status-select:focus {
    outline: none;
    border-color: #28a745;
}

.export-btn {
    background: linear-gradient(45deg, #007bff, #6610f2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 2rem auto 0;
}

.export-btn:hover {
    background: linear-gradient(45deg, #0056b3, #5a0fc8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Dashboard Section */
.dashboard-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #28a745;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn:hover {
  background: #218838;
}

#logoutBtn {
  background: #dc3545;
}

#logoutBtn:hover {
  background: #c82333;
}

.swal2-input {
  margin: 0.5rem auto;
}

/* Sensor Buttons */
.sensor-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
}

.deactivate-btn {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
}

.deactivate-btn:hover {
    background: linear-gradient(45deg, #c82333, #e8590c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.activate-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.activate-btn:hover {
    background: linear-gradient(45deg, #218838, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}
/* Alert table */
#alertsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#alertsTable th {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 1rem;
    font-weight: bold;
}
#alertsTable td {
    padding: 1rem;
    border: 1px solid #ddd;
    text-align: left;
}
#alertsTable tr:nth-child(even) {
    background: #f8f9fa;
}
#alertsTable tr:hover {
    background: #e9ecef;
}
.status-safe {
    color: green;
    font-weight: bold;
}
.status-warning {
    color: #f39c12;
    font-weight: bold;
}
.status-danger {
    color: red;
    font-weight: bold;
}
/* ==== STATUS PANEL ==== */
.status-section {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 350px;
}

.status-safe {
  color: #28a745;
  font-weight: bold;
}

.status-danger {
  color: #d93025;
  font-weight: bold;
}

.timer-settings {
  margin: 15px 0;
}

.buttons {
  display: flex;
  gap: 10px;
}

.safe-btn,
.danger-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s ease;
}

.safe-btn {
  background-color: #28a745;
  color: white;
}

.danger-btn {
  background-color: #d93025;
  color: white;
}

.safe-btn:hover,
.danger-btn:hover {
  opacity: 0.8;
}

/* ==== GRAPH SECTION ==== */
.graph-section {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 500px;
}

#alertsWeekChart {
  width: 100% !important;
  height: 300px !important;
  margin-top: 20px;
}

.chart-card canvas {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
}

.chart-container {
  width: 100%;
  max-width: 600px;
  margin: 2rem 0;
  padding: 1rem;
}

.chart-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-height: 400px;
}

#alertsWeekChart {
  max-width: 100% !important;
  width: 100% !important;
  height: 350px !important;
  display: block !important;
}

canvas {
  margin-top: 20px;
}

.error-cell {
  color: #dc3545;
  text-align: center;
  padding: 1rem !important;
}

.admin-only {
  display: none;
}