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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.search-container {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    outline: none;
    transition: box-shadow 0.2s;
}

.search-input:focus {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.client-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.client-name-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.client-name-toggle:hover {
    opacity: 0.8;
}

.collapse-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border-radius: 4px;
    transition: background 0.2s;
}

.client-name-toggle:hover .collapse-icon {
    background: #e0e0e0;
}

.client-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.status-online {
    background: #4caf50;
    color: white;
}

.status-offline {
    background: #f44336;
    color: white;
}

.refresh-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #1976D2;
}

.refresh-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.refresh-btn.warning {
    background: #f44336;
}

.refresh-btn.warning:hover {
    background: #da190b;
}

.refresh-btn.success {
    background: #4caf50;
}

.refresh-btn.success:hover {
    background: #45a049;
}

.refresh-all-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.2s;
}

.refresh-all-btn:hover {
    background: #45a049;
}

.refresh-all-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.collapse-all-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.2s;
}

.collapse-all-btn:hover {
    background: #e68900;
}

.collapse-all-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.section {
    margin-top: 25px;
}

.section-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.item-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-name {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-indicator {
    color: #ff9800;
    font-size: 1.1em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.item-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-running {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-stopped {
    background: #ffcdd2;
    color: #c62828;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-start {
    background: #4caf50;
    color: white;
}

.btn-start:hover {
    background: #45a049;
}

.btn-stop {
    background: #f44336;
    color: white;
}

.btn-stop:hover {
    background: #da190b;
}

.btn-restart {
    background: #ff9800;
    color: white;
}

.btn-restart:hover {
    background: #e68900;
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

