/* ============================================
   STILURI PENTRU TEST ESP
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 20px;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0d6efd;
}

.header h1 i {
    margin-right: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-primary:hover {
    background: #0b5ed7;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5c636a;
}

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

.btn-success:hover {
    background: #218838;
}

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
}

/* Carduri */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

/* Node Card */
.node-card {
    border-left: 4px solid #28a745;
}

.node-card.offline {
    border-left-color: #dc3545;
}

.node-card .node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.node-card .node-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.node-card .node-status {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.node-card .node-status.online {
    background: #d4edda;
    color: #155724;
}

.node-card .node-status.offline {
    background: #f8d7da;
    color: #721c24;
}

.node-card .node-details {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6c757d;
}

.node-card .node-details div {
    padding: 3px 0;
}

.node-card .node-details i {
    width: 20px;
    margin-right: 6px;
}

/* Telemetrie */
.telemetry-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.telemetry-table th {
    background: #f8f9fa;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.telemetry-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
}

.telemetry-table tr:hover {
    background: #f8f9fa;
}

.telemetry-value {
    font-weight: 700;
    color: #0d6efd;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.5;
    display: block;
    margin-bottom: 10px;
}

/* Status Dot */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background: #28a745;
}

.status-dot.offline {
    background: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .telemetry-table {
        font-size: 0.8rem;
    }
    
    .telemetry-table th,
    .telemetry-table td {
        padding: 6px 8px;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast / Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}