body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e;
    color: #ffffff;
    margin: 0;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

#status {
    font-size: 0.9em;
    color: #888;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.agent-card {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.agent-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #000;
}

.agent-title {
    margin-top: 10px;
    font-weight: bold;
    color: #ccc;
    font-size: 0.9em;
}

.agent-info {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
    text-align: left;
    background: #252525;
    padding: 5px;
    border-radius: 4px;
}

.updated-at {
    font-size: 0.7em;
    color: #666;
    margin-top: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    max-height: 80vh;
    object-fit: contain;
    margin-top: 50px;
    border: 2px solid #555;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 80px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.control-btn {
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    margin: 0 5px;
}

.danger-btn {
    background-color: #f44336;
}

.danger-btn:hover {
    background-color: #d32f2f;
}

.warning-btn {
    background-color: #ff9800;
    color: #000;
}

.warning-btn:hover {
    background-color: #f57c00;
}

.logout-btn {
    text-decoration: none;
    color: #fff;
    background-color: #d32f2f;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background 0.3s;
}

.logout-btn:hover {
    background-color: #b71c1c;
}

/* Login Page Styles */
/* Activity Tracking */
.activity-line {
    font-size: 0.85em;
    color: #bbb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Alarm Animation */
@keyframes flash-red {
    0% {
        background-color: #2a2a2a;
    }

    50% {
        background-color: #5a1a1a;
        box-shadow: 0 0 10px #ff0000;
    }

    100% {
        background-color: #2a2a2a;
    }
}

.agent-card.alarm {
    animation: flash-red 1s infinite;
    border: 1px solid #ff4444;
}

.login-container {
    background-color: #2d2d2d;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    width: 300px;
    margin: 100px auto;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #fff;
}

.input-group {
    margin-bottom: 15px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9em;
}

.input-group input {
    width: 100%;
    padding: 10px;
    background-color: #1e1e1e;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.login-container button:hover {
    background-color: #45a049;
}