* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    max-width: 400px;
    margin: 100px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 10px;
    text-align: center;
}

.login-box h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
}

.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

.hint {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 12px;
}

.header {
    background: white;
    border-radius: 10px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #667eea;
    font-size: 28px;
}

.btn-logout {
    width: auto;
    padding: 10px 20px;
    background: #e74c3c;
}

.btn-logout:hover {
    background: #c0392b;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.monitoring-form {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.btn-create {
    width: auto;
    padding: 10px 30px;
    margin-top: 0;
}

.monitoring-table,
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.monitoring-table th,
.results-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #667eea;
}

.monitoring-table td,
.results-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.monitoring-table tr:hover,
.results-table tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-http,
.badge-https {
    background: #3498db;
    color: white;
}

.badge-ping {
    background: #2ecc71;
    color: white;
}

.btn-view,
.btn-back {
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-view {
    background: #3498db;
    color: white;
}

.btn-view:hover {
    background: #2980b9;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    margin-left: 10px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-block;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Actions column styling */
.monitoring-table td:last-child {
    width: 200px;
    white-space: normal;
}

.monitoring-table th:last-child {
    width: 200px;
}

.monitoring-table td:last-child form {
    display: block;
    margin: 5px 0 0 0;
    padding: 0;
}

.monitoring-table td:last-child .btn-view {
    display: block;
    margin-bottom: 5px;
}

.monitoring-table td:last-child .btn-delete {
    display: block;
    width: 100%;
}

.delete-form {
    display: block;
    margin: 0;
    padding: 0;
}

.btn-back {
    background: #95a5a6;
    color: white;
    display: inline-block;
}

.btn-back:hover {
    background: #7f8c8d;
}

.no-data {
    text-align: center;
    color: #888;
    padding: 40px;
    font-style: italic;
}

.monitoring-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 15px;
}

.monitoring-details p {
    margin-bottom: 10px;
    color: #555;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-Online {
    background: #d4edda;
    color: #155724;
}

.status-Offline {
    background: #f8d7da;
    color: #721c24;
}

.result-details {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #666;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .monitoring-table,
    .results-table {
        font-size: 14px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
}
